OSDN Git Service

ERL YER SERC CERN HERS BERN RERFERCKTERERD!
authorNathan Sweet <nathan.sweet@gmail.com>
Sat, 11 Aug 2012 02:23:26 +0000 (19:23 -0700)
committerNathan Sweet <nathan.sweet@gmail.com>
Sat, 11 Aug 2012 02:23:26 +0000 (19:23 -0700)
1121 files changed:
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidAudio.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidFileHandle.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidFiles.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidGraphics.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidInput.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidMultiTouchHandler.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidOnscreenKeyboard.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidPreferences.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/surfaceview/GLBaseSurfaceView.java
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/surfaceview/GLSurfaceViewCupcake.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplication.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSAudio.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSFileHandle.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSFiles.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSGLES20.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSGraphics.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSInput.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSMusic.java
backends/gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSSound.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglAnimator.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglApplication.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglApplicationConfiguration.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglFileHandle.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglFiles.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglGL20.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglGraphics.java
backends/gdx-backend-jogl/src/com/badlogic/gdx/backends/jogl/JoglGraphicsBase.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglAWTCanvas.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglAWTInput.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplicationConfiguration.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglFileHandle.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglFiles.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglFrame.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGL10.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglGL20.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglInput.java
backends/gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglPreferences.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplication.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplicationConfiguration.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtAudio.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtFileHandle.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtFiles.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtGL20.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtGL20Debug.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtGraphics.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtInput.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtMusic.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtPreferences.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtSound.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/avian/Utf8.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/assets/AssetLoadingTask.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/assets/AssetManager.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/assets/loaders/TextureLoader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/assets/loaders/resolvers/ResolutionFileResolver.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/files/FileHandle.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/graphics/Pixmap.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/graphics/Texture.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/graphics/g2d/ParticleEffect.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/graphics/glutils/IndexArray.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/graphics/glutils/ShaderProgram.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/graphics/glutils/VertexArray.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/graphics/glutils/VertexBufferObject.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/math/Matrix4.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/Body.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/Box2DDebugRenderer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/ChainShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/CircleShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/Contact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/ContactImpulse.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/EdgeShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/Fixture.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/FixtureDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/Joint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/JointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/Manifold.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/PolygonShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/Shape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/World.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/WorldManifold.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/DistanceJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/DistanceJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/FrictionJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/MouseJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/PrismaticJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/PulleyJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/RevoluteJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/RopeJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/RopeJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/WeldJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/WheelJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/physics/box2d/joints/WheelJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/scenes/scene2d/ui/Skin.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/scenes/scene2d/utils/Clipboard.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/Array.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/ArrayMap.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/BufferUtils.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/Json.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/JsonWriter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/NumberUtils.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/ReflectionPool.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx/utils/TimeUtils.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/google/gwt/corp/compatibility/CompatibilityImpl.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/google/gwt/corp/compatibility/Numbers.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/google/gwt/corp/localstorage/LocalStorage.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/BufferedInputStream.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/BufferedReader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/BufferedWriter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/ByteArrayInputStream.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/ByteArrayOutputStream.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/Closeable.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/DataInput.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/DataInputStream.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/DataOutput.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/DataOutputStream.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/EOFException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/File.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/FileNotFoundException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/FileWriter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/FilenameFilter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/Flushable.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/IOException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/InputStream.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/InputStreamReader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/OutputStream.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/OutputStreamWriter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/RandomAccessFile.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/Reader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/StringReader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/StringWriter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/UTFDataFormatException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/UnsupportedEncodingException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/io/Writer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/lang/ClassNotFoundException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/lang/IllegalAccessException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/lang/InterruptedException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/lang/NoSuchMethodException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/lang/Readable.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/lang/SecurityException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/lang/Thread.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/ByteBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/CharBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/DoubleBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/FloatBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/HasArrayBufferView.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/IntBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/LongBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/ReadWriteFloatArrayBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/ShortBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/nio/StringByteBuffer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/security/AccessControlException.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/security/Permission.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/security/PermissionCollection.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/util/StringTokenizer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/util/regex/Matcher.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/java/util/regex/TestPattern.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/ContactFilter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/ContactImpulse.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/ContactListener.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/DebugDraw.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/DestructionListener.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/PairCallback.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/QueryCallback.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/RayCastCallback.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/TreeCallback.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/callbacks/TreeRayCastCallback.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/AABB.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/Collision.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/ContactID.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/Distance.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/DistanceInput.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/DistanceOutput.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/Manifold.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/ManifoldPoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/RayCastInput.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/RayCastOutput.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/TimeOfImpact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/WorldManifold.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/broadphase/BroadPhase.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/broadphase/DynamicTree.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/broadphase/IBroadphase.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/broadphase/Pair.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/broadphase/TreeNode.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/shapes/ChainShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/shapes/CircleShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/shapes/EdgeShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/shapes/MassData.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/shapes/PolygonShape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/shapes/Shape.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/collision/shapes/ShapeType.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Color3f.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/IViewportTransform.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Mat22.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Mat33.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/OBBViewportTransform.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/RaycastResult.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Rot.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Settings.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Sweep.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Timer.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Transform.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Vec2.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/common/Vec3.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/Body.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/BodyDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/BodyType.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/ContactManager.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/Filter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/Fixture.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/FixtureDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/FixtureProxy.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/Island.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/Profile.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/SolverData.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/TimeStep.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/World.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ChainAndCircleContact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ChainAndPolygonContact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/CircleContact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/Contact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ContactCreator.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ContactEdge.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ContactPositionConstraint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ContactRegister.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ContactSolver.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/ContactVelocityConstraint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/EdgeAndCircleContact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/EdgeAndPolygonContact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/PolygonAndCircleContact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/PolygonContact.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/Position.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/contacts/Velocity.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/ConstantVolumeJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/ConstantVolumeJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/DistanceJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/DistanceJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/FrictionJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/FrictionJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/Jacobian.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/Joint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/JointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/JointEdge.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/JointType.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/LimitState.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/LineJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/MouseJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/MouseJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/PrismaticJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/PrismaticJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/PulleyJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/PulleyJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/RevoluteJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/RevoluteJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/WeldJoint.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/dynamics/joints/WeldJointDef.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/IDynamicStack.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/IOrderedStack.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/IWorldPool.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/arrays/FloatArray.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/arrays/IntArray.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/arrays/Vec2Array.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/normal/DefaultWorldPool.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/normal/Generator.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/normal/MutableStack.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/normal/OrderedStack.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/org/jbox2d/pooling/stacks/DynamicIntStack.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/AssetFilter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/AudioLoader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/BinaryLoader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/DefaultAssetFilter.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/FileWrapper.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/ImageLoader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/LoaderCallback.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/Preloader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/PreloaderBundle.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/PreloaderBundleGenerator.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/preloader/TextLoader.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/soundmanager2/SMSound.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/soundmanager2/SoundManager.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/widgets/PlaceholderTextBox.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/widgets/ProgressBar.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/widgets/ResizableWidget.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/widgets/ResizableWidgetCollection.java
backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/widgets/TextInputDialogBox.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/Constructor.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/Field.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/IReflectionCache.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/Method.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/Parameter.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/ReflectionCache.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/Test.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/client/Type.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/gen/ReflectionCacheGenerator.java
backends/gdx-backends-gwt/src/com/badlogic/gwtref/gen/ReflectionCacheSourceCreator.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/ArrayBuffer.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/ArrayBufferView.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/ArrayUtils.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/DataView.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/Float32Array.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/Int16Array.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/Int32Array.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/Int8Array.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/Uint16Array.java
backends/gdx-backends-gwt/src/com/google/gwt/typedarrays/client/Uint8Array.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLActiveInfo.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLBuffer.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLContextAttributes.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLFramebuffer.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLObject.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLProgram.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLRenderbuffer.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLRenderingContext.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLShader.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLTexture.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLUniformLocation.java
backends/gdx-backends-gwt/src/com/google/gwt/webgl/client/WebGLUtil.java
backends/gdx-openal/src/com/badlogic/gdx/backends/openal/Mp3.java
backends/gdx-openal/src/com/badlogic/gdx/backends/openal/Ogg.java
backends/gdx-openal/src/com/badlogic/gdx/backends/openal/OpenALAudio.java
backends/gdx-openal/src/com/badlogic/gdx/backends/openal/OpenALAudioDevice.java
backends/gdx-openal/src/com/badlogic/gdx/backends/openal/OpenALMusic.java
backends/gdx-openal/src/com/badlogic/gdx/backends/openal/OpenALSound.java
backends/gdx-openal/src/com/badlogic/gdx/backends/openal/Wav.java
demos/cuboc/cuboc-html/src/com/badlogic/cuboc/client/CubocGwt.java
demos/cuboc/cuboc/src/com/badlogic/cubocy/Cubocy.java
demos/cuboc/cuboc/src/com/badlogic/cubocy/Map.java
demos/invaders/gdx-invaders-html5/src/com/badlogic/gdxinvaders/client/GdxInvadersGwt.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/GdxInvaders.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/Renderer.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/RendererGL10.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/RendererGL20.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/screens/GameLoop.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/screens/InvadersScreen.java
demos/invaders/gdx-invaders/src/com/badlogic/gdxinvaders/screens/MainMenu.java
demos/superjumper/superjumper-html/src/com/badlogicgames/superjumper/client/SuperJumperGwt.java
demos/superjumper/superjumper/src/com/badlogicgames/superjumper/SuperJumper.java
demos/vector-pinball/gdx-vectorpinball-html5/src/com/dozingcatsoftware/bouncy/client/BouncyGwt.java
demos/vector-pinball/gdx-vectorpinball/src/com/dozingcatsoftware/bouncy/Field.java
demos/vector-pinball/gdx-vectorpinball/src/com/dozingcatsoftware/bouncy/GLFieldRenderer.java
demos/vector-pinball/gdx-vectorpinball/src/com/dozingcatsoftware/bouncy/elements/FieldElement.java
demos/vector-pinball/gdx-vectorpinball/src/com/dozingcatsoftware/bouncy/util/JSONArray.java
demos/vector-pinball/gdx-vectorpinball/src/com/dozingcatsoftware/bouncy/util/JSONObject.java
demos/very-angry-robots/very-angry-robots/src/com/badlydrawngames/veryangryrobots/Assets.java
demos/very-angry-robots/very-angry-robots/src/com/badlydrawngames/veryangryrobots/StatusManager.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/AudioBuild.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/CircularBuffer.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/analysis/AudioTools.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/analysis/KissFFT.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/io/Decoder.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/io/Mpg123Decoder.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/io/VorbisDecoder.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/io/WavDecoder.java
extensions/gdx-audio/src/com/badlogic/gdx/audio/transform/SoundTouch.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/BroadphaseNativeTypes.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/ClosestPointInput.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/ConvexH.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/GrahamVector2.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/HullDesc.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/HullError.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/HullFlag.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/HullLibrary.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/HullResult.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/PHY_ScalarType.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/PHullResult.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/Result.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_PHY_ScalarType.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btFace_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_int_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btCollisionWorld__ContactResultCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btCollisionWorld__RayResultCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btConvexCast__CastResult.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btDbvt__IClone.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btDbvt__ICollide.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btDbvt__IWriter.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btDbvt__sStkNPS.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btGjkEpaSolver2__sResults.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btMatrix3x3DoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btMatrix3x3FloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btSerializer.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btSimplexSolverInterface.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btSimulationIslandManager__IslandCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_double.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_p_btDynamicsWorld_float__void.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_p_void__bool.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_p_void__void.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_size_t__p_void.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_f_size_t_int__p_void.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_float.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_int.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_p_btCollisionObject.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_p_btDbvtProxy.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_p_btPersistentManifold.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_p_btTypedConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_p_btVector3.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_p_unsigned_char.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_unsigned_char.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_unsigned_int.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_unsigned_short.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SWIGTYPE_p_void.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/SphereTriangleDetector.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/bt32BitAxisSweep3.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/bt6DofFlags.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btActionInterface.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btActivatingCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btAngleCompareFunc.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btAngularLimit.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btAxisSweep3.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBU_Simplex1to4.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBlock.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBox2dBox2dCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBox2dShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBoxBoxCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBoxBoxDetector.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBoxShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBroadphaseAabbCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBroadphaseInterface.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBroadphasePair.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBroadphasePairSortPredicate.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBroadphaseProxy.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBroadphaseRayCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBvhSubtreeInfo.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBvhSubtreeInfoData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btBvhTriangleMeshShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCapsuleShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCapsuleShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCapsuleShapeX.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCapsuleShapeZ.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCharIndexTripletData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCharacterControllerInterface.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionAlgorithmConstructionInfo.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionAlgorithmCreateFunc.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionConfiguration.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionDispatcher.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionObject.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionObjectArray.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionObjectDoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionObjectFloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCollisionWorld.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCompoundCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCompoundShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCompoundShapeChild.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCompoundShapeChildData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCompoundShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConcaveShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConeShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConeShapeX.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConeShapeZ.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConeTwistConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConeTwistConstraintData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConeTwistFlags.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConstraintInfo2.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConstraintParams.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConstraintRow.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConstraintSetting.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConstraintSolver.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btContactConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btContactManifoldTypes.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btContactSolverInfo.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btContactSolverInfoData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btContinuousConvexCollision.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvex2dConvex2dAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvex2dShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexCast.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexConcaveCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexConvexAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexHullComputer.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexHullShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexHullShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexInternalAabbCachingShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexInternalShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexInternalShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexPenetrationDepthSolver.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexPlaneCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexPointCloudShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexPolyhedron.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexSeparatingDistanceUtil.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexTriangleCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btConvexTriangleMeshShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCylinderShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCylinderShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCylinderShapeX.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btCylinderShapeZ.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDbvt.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDbvtAabbMm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDbvtBroadphase.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDbvtNode.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDbvtProxy.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDefaultCollisionConfiguration.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDefaultCollisionConstructionInfo.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDefaultMotionState.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDiscreteDynamicsWorld.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDispatcher.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDispatcherInfo.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDynamicsWorld.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btDynamicsWorldType.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btElement.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btEmptyAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btEmptyShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btFace.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGEN_Link.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGEN_List.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGeneric6DofConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGeneric6DofConstraintData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGeneric6DofSpringConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGeneric6DofSpringConstraintData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGeometryUtil.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGhostObject.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGhostPairCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGjkConvexCast.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGjkEpaPenetrationDepthSolver.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGjkEpaSolver2.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btGjkPairDetector.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHashInt.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHashPtr.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHashString.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHashedOverlappingPairCache.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHeightfieldTerrainShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHinge2Constraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHingeConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHingeConstraintDoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHingeConstraintFloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btHingeFlags.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btIDebugDraw.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btIndexedMesh.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btIntIndexData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btInternalEdgeAdjustFlags.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btInternalTriangleIndexCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btJacobianEntry.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btKinematicCharacterController.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btManifoldPoint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btManifoldResult.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMaterial.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMaterialProperties.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMeshPartData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMinkowskiPenetrationDepthSolver.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMinkowskiSumShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMotionState.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMultiSapBroadphase.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMultiSphereShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMultiSphereShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btMultimaterialTriangleMeshShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btNodeOverlapCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btNullPairCache.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOptimizedBvh.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOptimizedBvhNode.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOptimizedBvhNodeDoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOptimizedBvhNodeFloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOverlapCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOverlapFilterCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOverlappingPairCache.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btOverlappingPairCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPairCachingGhostObject.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPersistentManifold.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPlane.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPoint2PointConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPoint2PointConstraintDoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPoint2PointConstraintFloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPoint2PointFlags.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPointCollector.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPolyhedralContactClipping.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPolyhedralConvexAabbCachingShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPolyhedralConvexShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPoolAllocator.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btPositionAndRadius.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btQuantizedBvh.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btQuantizedBvhDoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btQuantizedBvhFloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btQuantizedBvhNode.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btQuantizedBvhNodeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btQuaternion.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btRigidBody.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btRigidBodyConstructionInfo.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btRigidBodyDoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btRigidBodyFlags.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btRigidBodyFloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btRotationalLimitMotor.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btScaledBvhTriangleMeshShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btScaledTriangleMeshShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSequentialImpulseConstraintSolver.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btShapeHull.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btShortIntIndexData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btShortIntIndexTripletData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSimpleBroadphase.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSimpleBroadphaseProxy.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSimpleDynamicsWorld.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSimulationIslandManager.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSliderConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSliderConstraintData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSliderFlags.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSolve2LinearConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSolverBodyObsolete.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSolverConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSolverMode.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSortedOverlappingPairCache.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSphereBoxCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSphereShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSphereSphereCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSphereTriangleCollisionAlgorithm.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btStackAlloc.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btStaticPlaneShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btStaticPlaneShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btStridingMeshInterface.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btStridingMeshInterfaceData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSubSimplexClosestResult.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btSubsimplexConvexCast.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTransform.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTransformDoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTransformFloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTransformUtil.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTranslationalLimitMotor.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangle.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleBuffer.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleConvexcastCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleIndexVertexArray.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleIndexVertexMaterialArray.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleInfo.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleInfoData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleInfoMap.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleInfoMapData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleMesh.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleMeshShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleMeshShapeData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleRaycastCallback.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTriangleShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTypedConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTypedConstraintData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTypedConstraintType.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btTypedObject.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btUniformScalingShape.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btUnionFind.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btUniversalConstraint.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btUsageBitfield.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btVector3.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btVector3DoubleData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btVector3FloatData.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btVector4.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/btVoronoiSimplexSolver.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/gdxBullet.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/gdxBulletConstants.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/gdxBulletJNI.java
extensions/gdx-bullet/jni/swig-src/com/badlogic/gdx/physics/bullet/int4.java
extensions/gdx-bullet/src/com/badlogic/gdx/physics/bullet/Bullet.java
extensions/gdx-bullet/src/com/badlogic/gdx/physics/bullet/BulletBuild.java
extensions/gdx-bullet/src/com/badlogic/gdx/physics/bullet/BulletTest.java
extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreeType.java
extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreeTypeFontGenerator.java
extensions/gdx-freetype/src/com/badlogic/gdx/graphics/g2d/freetype/FreetypeBuild.java
extensions/gdx-image/src/com/badlogic/gdx/graphics/g2d/ImageBuild.java
extensions/gdx-image/src/com/badlogic/gdx/graphics/g2d/Jpeg.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/AndroidNdkScriptGenerator.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/AntPathMatcher.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/AntScriptGenerator.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/BuildConfig.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/BuildExecutor.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/BuildTarget.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/JniGenSharedLibraryLoader.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/NativeCodeGenerator.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/parsing/CMethodParser.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/parsing/JavaMethodParser.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/parsing/JniHeaderCMethodParser.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/parsing/RobustJavaMethodParser.java
extensions/gdx-jnigen/src/com/badlogic/gdx/jnigen/test/MyJniClass.java
extensions/gdx-setup-ui/src/Main.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/DownloadManager.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/LibraryDef.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ProjectConfiguration.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ProjectConfigurationHelper.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ProjectSetup.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/ConfigPanel.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/Ctx.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/GoPanel.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/LibrarySetupPanel.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/MainPanel.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/ResultPanel.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/ResultTree.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/dialogs/AdvancedSettingsDialog.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/dialogs/DownloadDialog.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/dialogs/FixHtmlHelpDialog.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/dialogs/GoDialog.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/dialogs/ImportHelpDialog.java
extensions/gdx-setup-ui/src/aurelienribon/libgdx/ui/dialogs/LibraryInfoDialog.java
extensions/gdx-setup-ui/src/aurelienribon/utils/HttpUtils.java
extensions/gdx-setup-ui/src/aurelienribon/utils/ParseUtils.java
extensions/gdx-setup-ui/src/aurelienribon/utils/TemplateManager.java
extensions/gdx-setup-ui/src/res/Res.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/AnimatedBody.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/BreakageCallback.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/CollisionCallback.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/CollisionInfo.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/CollisionTable.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/Geometry.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/Joint.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/Material.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/NativeObject.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/RigidBody.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/RigidBodyController.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/RigidBodyControllerCallback.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/Sensor.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/Simulator.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/SimulatorSizeInfo.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/TerrainTriangleQueryCallback.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/TokamakBuild.java
extensions/gdx-tokamak/src/com/badlogic/gdx/physics/tokamak/TriangleMesh.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/etc1/ETC1Compressor.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/hiero/Hiero4.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/imagepacker/TexturePacker.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/imagepacker/TexturePacker2.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/imagepacker/TexturePackerFileProcessor.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/CountPanel.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/RangedNumericPanel.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/ScaledNumericPanel.java
extensions/gdx-tools/src/com/badlogic/gdx/tools/particleeditor/Slider.java
extensions/model-loaders/model-loaders-android/src/com/badlogic/gdx/graphics/g3d/tests/ModelViewerActivity.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/AnimatedModelInstance.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/AnimatedModelNode.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/ModelLoaderHints.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/ModelRenderer.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/StillModelInstance.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/StillModelNode.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/Test.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/experimental/HybridLightTest.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/experimental/MaterialShaderHandler.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/experimental/PerspectiveCamController.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/experimental/ShaderFactory.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/experimental/ShaderLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/lights/DirectionalLight.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/lights/LightManager.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/lights/PointLight.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/lights/SpotLight.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/KeyframedModelLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ModelLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ModelLoaderRegistry.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/SkeletonModelLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/StillModelLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/collada/ColladaLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/collada/Faces.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/collada/Geometry.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/collada/Source.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/g3d/G3dConstants.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/g3d/G3dLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/g3d/G3dtLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/g3d/chunks/ChunkReader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/g3d/chunks/ChunkWriter.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/g3d/chunks/CountingDataInputStream.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/g3d/chunks/G3dExporter.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/md2/MD2Frame.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/md2/MD2Header.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/md2/MD2Loader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/md2/MD2Normals.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/md2/MD2Triangle.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/OgreXmlLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Animation.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Animations.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Binormal.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Boneassignments.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/ColourDiffuse.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/ColourSpecular.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Extremes.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Face.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Faces.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Geometry.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Keyframe.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Keyframes.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Levelofdetail.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Lodfacelist.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Lodgenerated.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Lodmanual.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Mesh.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Normal.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/ObjectFactory.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Pose.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Poseoffset.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Poseref.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Poses.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Position.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Sharedgeometry.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Skeletonlink.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Submesh.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/SubmeshExtremes.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Submeshes.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Submeshname.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Submeshnames.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Tangent.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Texcoord.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Texture.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Textures.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Track.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Tracks.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Vertex.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Vertexboneassignment.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/mesh/Vertexbuffer.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Animation.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Animationlink.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Animationlinks.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Animations.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Axis.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Bone.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Bonehierarchy.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Boneparent.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Bones.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Keyframe.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Keyframes.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/ObjectFactory.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Position.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Rotate.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Rotation.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Scale.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Skeleton.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Track.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Tracks.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/ogre/skeleton/Translate.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/loaders/wavefront/ObjLoader.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/materials/BlendingAttribute.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/materials/Material.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/materials/MaterialAttribute.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/AnimatedModel.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/Animation.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/Model.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/SubMesh.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/keyframe/Keyframe.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/keyframe/KeyframedAnimation.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/keyframe/KeyframedModel.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/skeleton/Skeleton.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/skeleton/SkeletonAnimation.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/skeleton/SkeletonJoint.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/skeleton/SkeletonKeyframe.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/skeleton/SkeletonModel.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/model/still/StillModel.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/test/ChunkTest.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/test/PrototypeRendererGL20.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/test/SkeletonModelViewer.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/test/StillModelViewer.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/test/StillModelViewerGL20.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/test/Viewer.java
extensions/model-loaders/model-loaders/src/com/badlogic/gdx/graphics/g3d/test/utils/PerspectiveCamController.java
gdx/src/com/badlogic/gdx/ApplicationAdapter.java
gdx/src/com/badlogic/gdx/Files.java
gdx/src/com/badlogic/gdx/Gdx.java
gdx/src/com/badlogic/gdx/Graphics.java
gdx/src/com/badlogic/gdx/Input.java
gdx/src/com/badlogic/gdx/InputMultiplexer.java
gdx/src/com/badlogic/gdx/Preferences.java
gdx/src/com/badlogic/gdx/assets/AssetLoadingTask.java
gdx/src/com/badlogic/gdx/assets/AssetManager.java
gdx/src/com/badlogic/gdx/assets/loaders/AssetLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/AsynchronousAssetLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/BitmapFontLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/FileHandleResolver.java
gdx/src/com/badlogic/gdx/assets/loaders/MusicLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/PixmapLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/SoundLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/TextureAtlasLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/TextureLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/TileAtlasLoader.java
gdx/src/com/badlogic/gdx/assets/loaders/TileMapRendererLoader.java
gdx/src/com/badlogic/gdx/audio/AudioDevice.java
gdx/src/com/badlogic/gdx/audio/Sound.java
gdx/src/com/badlogic/gdx/files/FileHandle.java
gdx/src/com/badlogic/gdx/files/FileHandleStream.java
gdx/src/com/badlogic/gdx/graphics/Camera.java
gdx/src/com/badlogic/gdx/graphics/Color.java
gdx/src/com/badlogic/gdx/graphics/Mesh.java
gdx/src/com/badlogic/gdx/graphics/OrthographicCamera.java
gdx/src/com/badlogic/gdx/graphics/Pixmap.java
gdx/src/com/badlogic/gdx/graphics/Texture.java
gdx/src/com/badlogic/gdx/graphics/TextureDict.java
gdx/src/com/badlogic/gdx/graphics/VertexAttributes.java
gdx/src/com/badlogic/gdx/graphics/g2d/Animation.java
gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java
gdx/src/com/badlogic/gdx/graphics/g2d/Gdx2DPixmap.java
gdx/src/com/badlogic/gdx/graphics/g2d/ParticleEffect.java
gdx/src/com/badlogic/gdx/graphics/g2d/ParticleEffectPool.java
gdx/src/com/badlogic/gdx/graphics/g2d/ParticleEmitter.java
gdx/src/com/badlogic/gdx/graphics/g2d/ParticleEmitterBox2D.java
gdx/src/com/badlogic/gdx/graphics/g2d/PixmapPacker.java
gdx/src/com/badlogic/gdx/graphics/g2d/PolygonRegion.java
gdx/src/com/badlogic/gdx/graphics/g2d/PolygonSprite.java
gdx/src/com/badlogic/gdx/graphics/g2d/PolygonSpriteBatch.java
gdx/src/com/badlogic/gdx/graphics/g2d/TextureAtlas.java
gdx/src/com/badlogic/gdx/graphics/g2d/tiled/TiledLoader.java
gdx/src/com/badlogic/gdx/graphics/g3d/decals/CameraGroupStrategy.java
gdx/src/com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Jni.java
gdx/src/com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Mesh.java
gdx/src/com/badlogic/gdx/graphics/g3d/loaders/md5/MD5Renderer.java
gdx/src/com/badlogic/gdx/graphics/g3d/loaders/obj/ObjLoader.java
gdx/src/com/badlogic/gdx/graphics/glutils/ETC1.java
gdx/src/com/badlogic/gdx/graphics/glutils/ETC1TextureData.java
gdx/src/com/badlogic/gdx/graphics/glutils/FrameBuffer.java
gdx/src/com/badlogic/gdx/graphics/glutils/ImmediateModeRenderer10.java
gdx/src/com/badlogic/gdx/graphics/glutils/ImmediateModeRenderer20.java
gdx/src/com/badlogic/gdx/graphics/glutils/IndexArray.java
gdx/src/com/badlogic/gdx/graphics/glutils/IndexBufferObject.java
gdx/src/com/badlogic/gdx/graphics/glutils/IndexBufferObjectSubData.java
gdx/src/com/badlogic/gdx/graphics/glutils/ShaderProgram.java
gdx/src/com/badlogic/gdx/graphics/glutils/VertexArray.java
gdx/src/com/badlogic/gdx/graphics/glutils/VertexBufferObject.java
gdx/src/com/badlogic/gdx/graphics/glutils/VertexBufferObjectSubData.java
gdx/src/com/badlogic/gdx/graphics/glutils/VertexData.java
gdx/src/com/badlogic/gdx/input/RemoteInput.java
gdx/src/com/badlogic/gdx/math/Frustum.java
gdx/src/com/badlogic/gdx/math/Interpolation.java
gdx/src/com/badlogic/gdx/math/Intersector.java
gdx/src/com/badlogic/gdx/math/Matrix3.java
gdx/src/com/badlogic/gdx/math/Matrix4.java
gdx/src/com/badlogic/gdx/math/Plane.java
gdx/src/com/badlogic/gdx/math/Vector2.java
gdx/src/com/badlogic/gdx/math/Vector3.java
gdx/src/com/badlogic/gdx/physics/box2d/Body.java
gdx/src/com/badlogic/gdx/physics/box2d/Box2DDebugRenderer.java
gdx/src/com/badlogic/gdx/physics/box2d/ChainShape.java
gdx/src/com/badlogic/gdx/physics/box2d/CircleShape.java
gdx/src/com/badlogic/gdx/physics/box2d/Contact.java
gdx/src/com/badlogic/gdx/physics/box2d/ContactImpulse.java
gdx/src/com/badlogic/gdx/physics/box2d/EdgeShape.java
gdx/src/com/badlogic/gdx/physics/box2d/Fixture.java
gdx/src/com/badlogic/gdx/physics/box2d/Joint.java
gdx/src/com/badlogic/gdx/physics/box2d/Manifold.java
gdx/src/com/badlogic/gdx/physics/box2d/PolygonShape.java
gdx/src/com/badlogic/gdx/physics/box2d/Shape.java
gdx/src/com/badlogic/gdx/physics/box2d/World.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/DistanceJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/FrictionJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/GearJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/MouseJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/PrismaticJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/PulleyJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/RevoluteJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/RopeJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/RopeJointDef.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/WheelJoint.java
gdx/src/com/badlogic/gdx/physics/box2d/joints/WheelJointDef.java
gdx/src/com/badlogic/gdx/scenes/scene2d/Event.java
gdx/src/com/badlogic/gdx/scenes/scene2d/EventListener.java
gdx/src/com/badlogic/gdx/scenes/scene2d/Group.java
gdx/src/com/badlogic/gdx/scenes/scene2d/InputEvent.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/AlphaAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/DelayAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/FloatAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/IntAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/MoveByAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/MoveToAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/RelativeTemporalAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/RemoveActorAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/RotateByAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/RotateToAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/ScaleByAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/ScaleToAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/SequenceAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/SizeByAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/SizeToAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/TemporalAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/actions/VisibleAction.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/ButtonGroup.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/CheckBox.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/List.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/SelectBox.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/TextField.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Tree.java
gdx/src/com/badlogic/gdx/scenes/scene2d/ui/Window.java
gdx/src/com/badlogic/gdx/scenes/scene2d/utils/ActorGestureListener.java
gdx/src/com/badlogic/gdx/scenes/scene2d/utils/ClickListener.java
gdx/src/com/badlogic/gdx/scenes/scene2d/utils/Cullable.java
gdx/src/com/badlogic/gdx/utils/ArrayMap.java
gdx/src/com/badlogic/gdx/utils/BinaryHeap.java
gdx/src/com/badlogic/gdx/utils/BufferUtils.java
gdx/src/com/badlogic/gdx/utils/DelayedRemovalArray.java
gdx/src/com/badlogic/gdx/utils/GdxBuild.java
gdx/src/com/badlogic/gdx/utils/GdxNativesLoader.java
gdx/src/com/badlogic/gdx/utils/GwtModuleGenerator.java
gdx/src/com/badlogic/gdx/utils/Json.java
gdx/src/com/badlogic/gdx/utils/JsonWriter.java
gdx/src/com/badlogic/gdx/utils/ReflectionPool.java
gdx/src/com/badlogic/gdx/utils/Scaling.java
gdx/src/com/badlogic/gdx/utils/SharedLibraryLoader.java
gdx/src/com/badlogic/gdx/utils/TimeUtils.java
gdx/src/com/badlogic/gdx/utils/Timer.java
gdx/src/com/badlogic/gdx/utils/compression/CRC.java
gdx/src/com/badlogic/gdx/utils/compression/ICodeProgress.java
gdx/src/com/badlogic/gdx/utils/compression/Lzma.java
gdx/src/com/badlogic/gdx/utils/compression/lz/BinTree.java
gdx/src/com/badlogic/gdx/utils/compression/lz/InWindow.java
gdx/src/com/badlogic/gdx/utils/compression/lz/OutWindow.java
gdx/src/com/badlogic/gdx/utils/compression/lzma/Base.java
gdx/src/com/badlogic/gdx/utils/compression/lzma/Decoder.java
gdx/src/com/badlogic/gdx/utils/compression/lzma/Encoder.java
gdx/src/com/badlogic/gdx/utils/compression/rangecoder/BitTreeDecoder.java
gdx/src/com/badlogic/gdx/utils/compression/rangecoder/BitTreeEncoder.java
gdx/src/com/badlogic/gdx/utils/compression/rangecoder/Decoder.java
gdx/src/com/badlogic/gdx/utils/compression/rangecoder/Encoder.java
tests/gdx-tests-gwt/src/com/badlogic/gdx/tests/gwt/client/GwtTestStarter.java
tests/gdx-tests-jogl/src/com/badlogic/gdx/tests/jogl/JoglDebugStarter.java
tests/gdx-tests-lwjgl/src/com/badlogic/gdx/tests/lwjgl/LocalLwjglTest.java
tests/gdx-tests-lwjgl/src/com/badlogic/gdx/tests/lwjgl/LwjglDebugStarter.java
tests/gdx-tests-lwjgl/src/com/badlogic/gdx/tests/lwjgl/SwingLwjglTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/AccelerometerTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/AlphaTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/AssetManagerTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/BitmapFontTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/BlitTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/BobTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/Box2DCharacterControllerTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/Box2DTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/Box2DTestCollection.java
tests/gdx-tests/src/com/badlogic/gdx/tests/BufferUtilsTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ComplexActionTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/CullTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/CustomShaderSpriteBatchTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/DecalTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/DirtyRenderingTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ETC1Test.java
tests/gdx-tests/src/com/badlogic/gdx/tests/EdgeDetectionTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ExitTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ExternalMusicTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/FFTTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/FilesTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/FrameBufferTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/FramebufferToTextureTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/FreeTypeTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/FrustumTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/FullscreenTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/GestureDetectorTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/GroupCullingTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ImageScaleTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ImageTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ImmediateModeRendererTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/InputTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/IntegerBitmapFontTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/InternationalFontsTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/InterpolationTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/InverseKinematicsTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/IsometricTileTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/JpegTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/LabelTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/LifeCycleTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/LineDrawingTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/MatrixJNITest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/MeshShaderTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/MeshTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/MipMapTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/Mpg123Test.java
tests/gdx-tests/src/com/badlogic/gdx/tests/MultitouchTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/MusicTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/OnscreenKeyboardTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ParallaxTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ParticleEmitterTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/PolygonRegionTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/PolygonSpriteTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/PreferencesTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ProjectiveTextureTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/Scene2dTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ScrollPane2Test.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ScrollPaneTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ShadowMappingTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/ShapeRendererAlphaTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SimpleAnimationTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SimpleDecalTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SoftKeyboardTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SortedSpriteTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SoundTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SoundTouchTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SpriteBatchOriginScaleTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/SpriteBatchTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/StageTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TableLayoutTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TableTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TerrainTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TextButtonTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TextButtonTestGL2.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TextureAtlasTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TextureBindTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TextureDownloadTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TouchpadTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TransformationTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/TreeTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/UITest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/VertexBufferObjectShaderTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/VorbisTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/WavTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/YDownTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/box2d/ContinuousTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/box2d/Prismatic.java
tests/gdx-tests/src/com/badlogic/gdx/tests/examples/MoveSpriteExample.java
tests/gdx-tests/src/com/badlogic/gdx/tests/gwt/GwtBinaryTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/gwt/GwtInputTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/gwt/GwtTest.java
tests/gdx-tests/src/com/badlogic/gdx/tests/gwt/GwtTestWrapper.java
tests/gdx-tests/src/com/badlogic/gdx/tests/utils/AssetsFileGenerator.java
tests/gdx-tests/src/com/badlogic/gdx/tests/utils/GdxTests.java
tests/gdx-tests/src/com/badlogic/gdx/tests/utils/PerspectiveCamController.java

index e50bfbb..477fdc2 100644 (file)
@@ -16,9 +16,6 @@
 \r
 package com.badlogic.gdx.backends.android;\r
 \r
-import java.util.ArrayList;\r
-import java.util.List;\r
-\r
 import android.app.Activity;\r
 import android.content.Context;\r
 import android.content.res.Configuration;\r
@@ -229,8 +226,7 @@ public class AndroidApplication extends Activity implements Application {
 \r
                if (!firstResume) {\r
                        graphics.resume();\r
-               }\r
-               else\r
+               } else\r
                        firstResume = false;\r
                super.onResume();\r
        }\r
@@ -316,14 +312,14 @@ public class AndroidApplication extends Activity implements Application {
                        }\r
                });\r
        }\r
-       \r
+\r
        @Override\r
        public void debug (String tag, String message) {\r
                if (logLevel >= LOG_DEBUG) {\r
                        Log.d(tag, message);\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public void debug (String tag, String message, Throwable exception) {\r
                if (logLevel >= LOG_DEBUG) {\r
index f47f540..84ac016 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.android;\r
 \r
 import android.media.SoundPool;\r
@@ -51,12 +52,11 @@ public class AndroidApplicationConfiguration {
        /** whether to use a {@link WakeLock} or not. In case this is true you have to add the permission "android.permission.WAKE_LOCK"\r
         * to your manifest file. default: false */\r
        public boolean useWakelock = false;\r
-       \r
+\r
        /** the maximum number of {@link Sound} instances that can be played simultaniously, sets the corresponding {@link SoundPool}\r
-        * constructor argument.\r
-        */\r
+        * constructor argument. */\r
        public int maxSimultaniousSounds = 16;\r
 \r
        /** the {@link ResolutionStrategy}. default: {@link FillResolutionStrategy} **/\r
        public ResolutionStrategy resolutionStrategy = new FillResolutionStrategy();\r
-}
\ No newline at end of file
+}\r
index 6819d1b..f58bc57 100644 (file)
@@ -42,7 +42,7 @@ import com.badlogic.gdx.utils.GdxRuntimeException;
 public final class AndroidAudio implements Audio {\r
        private SoundPool soundPool;\r
        private final AudioManager manager;\r
-       protected final List<AndroidMusic> musics = new ArrayList<AndroidMusic>();      \r
+       protected final List<AndroidMusic> musics = new ArrayList<AndroidMusic>();\r
 \r
        public AndroidAudio (Activity context, AndroidApplicationConfiguration config) {\r
                soundPool = new SoundPool(config.maxSimultaniousSounds, AudioManager.STREAM_MUSIC, 100);\r
@@ -50,20 +50,20 @@ public final class AndroidAudio implements Audio {
                context.setVolumeControlStream(AudioManager.STREAM_MUSIC);\r
        }\r
 \r
-       protected void pause () {               \r
-               synchronized (musics) {                 \r
+       protected void pause () {\r
+               synchronized (musics) {\r
                        for (AndroidMusic music : musics) {\r
                                if (music.isPlaying()) {\r
                                        music.wasPlaying = true;\r
                                        music.pause();\r
-                                       \r
+\r
                                } else\r
                                        music.wasPlaying = false;\r
                        }\r
                }\r
        }\r
 \r
-       protected void resume () {              \r
+       protected void resume () {\r
                synchronized (musics) {\r
                        for (int i = 0; i < musics.size(); i++) {\r
                                if (musics.get(i).wasPlaying == true) musics.get(i).play();\r
index 374f920..233316f 100644 (file)
@@ -47,7 +47,7 @@ public class AndroidFileHandle extends FileHandle {
                if (file.getPath().length() == 0) return new AndroidFileHandle(assets, new File(name), type);\r
                return new AndroidFileHandle(assets, new File(file, name), type);\r
        }\r
-       \r
+\r
        public FileHandle sibling (String name) {\r
                name = name.replace('\\', '/');\r
                if (file.getPath().length() == 0) throw new GdxRuntimeException("Cannot get the sibling of the root.");\r
@@ -133,12 +133,12 @@ public class AndroidFileHandle extends FileHandle {
                        try {\r
                                assets.open(fileName).close(); // Check if file exists.\r
                                return true;\r
-                       } catch (Exception ex) {                        \r
-                                // This is SUPER slow! but we need it for directories.\r
-                                try {\r
-                                return assets.list(fileName).length > 0;\r
-                                } catch (Exception ignored) {\r
-                                }\r
+                       } catch (Exception ex) {\r
+                               // This is SUPER slow! but we need it for directories.\r
+                               try {\r
+                                       return assets.list(fileName).length > 0;\r
+                               } catch (Exception ignored) {\r
+                               }\r
                                return false;\r
                        }\r
                }\r
index 2dd26e3..abe3a20 100644 (file)
@@ -27,14 +27,14 @@ import com.badlogic.gdx.files.FileHandle;
 public class AndroidFiles implements Files {\r
        protected final String sdcard = Environment.getExternalStorageDirectory().getAbsolutePath() + "/";\r
        protected final String localpath;\r
-       \r
+\r
        protected final AssetManager assets;\r
 \r
        public AndroidFiles (AssetManager assets) {\r
                this.assets = assets;\r
                localpath = sdcard;\r
        }\r
-       \r
+\r
        public AndroidFiles (AssetManager assets, String localpath) {\r
                this.assets = assets;\r
                this.localpath = localpath.endsWith("/") ? localpath : localpath + "/";\r
@@ -70,7 +70,7 @@ public class AndroidFiles implements Files {
                path = localpath + path;\r
                return new AndroidFileHandle(null, path, FileType.Local);\r
        }\r
-       \r
+\r
        @Override\r
        public String getExternalStoragePath () {\r
                return sdcard;\r
@@ -80,7 +80,7 @@ public class AndroidFiles implements Files {
        public boolean isExternalStorageAvailable () {\r
                return Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED);\r
        }\r
-       \r
+\r
        @Override\r
        public String getLocalStoragePath () {\r
                return localpath;\r
@@ -89,5 +89,5 @@ public class AndroidFiles implements Files {
        @Override\r
        public boolean isLocalStorageAvailable () {\r
                return true;\r
-       }       \r
+       }\r
 }\r
index 854e7a7..15ffd80 100644 (file)
@@ -19,7 +19,6 @@ package com.badlogic.gdx.backends.android;
 import java.lang.reflect.Method;\r
 \r
 import javax.microedition.khronos.egl.EGL10;\r
-import javax.microedition.khronos.egl.EGL11;\r
 import javax.microedition.khronos.egl.EGLConfig;\r
 import javax.microedition.khronos.egl.EGLContext;\r
 import javax.microedition.khronos.egl.EGLDisplay;\r
@@ -34,7 +33,6 @@ import android.view.View;
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Graphics;\r
-import com.badlogic.gdx.backends.android.surfaceview.DefaultGLSurfaceView;\r
 import com.badlogic.gdx.backends.android.surfaceview.GLSurfaceView20;\r
 import com.badlogic.gdx.backends.android.surfaceview.GLSurfaceViewCupcake;\r
 import com.badlogic.gdx.backends.android.surfaceview.GdxEglConfigChooser;\r
@@ -45,7 +43,6 @@ import com.badlogic.gdx.graphics.GL20;
 import com.badlogic.gdx.graphics.GLCommon;\r
 import com.badlogic.gdx.graphics.GLU;\r
 import com.badlogic.gdx.graphics.Mesh;\r
-import com.badlogic.gdx.graphics.Pixmap;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.glutils.FrameBuffer;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
@@ -105,13 +102,13 @@ public final class AndroidGraphics implements Graphics, Renderer {
                if (sdkVersion >= 11 && view instanceof GLSurfaceView20) {\r
                        try {\r
                                Method method = null;\r
-                               for(Method m: view.getClass().getMethods()) {\r
-                                       if(m.getName().equals("setPreserveEGLContextOnPause")) {\r
+                               for (Method m : view.getClass().getMethods()) {\r
+                                       if (m.getName().equals("setPreserveEGLContextOnPause")) {\r
                                                method = m;\r
                                                break;\r
                                        }\r
                                }\r
-                               if(method != null) {\r
+                               if (method != null) {\r
                                        method.invoke((GLSurfaceView20)view, true);\r
                                }\r
                        } catch (Exception e) {\r
@@ -134,12 +131,13 @@ public final class AndroidGraphics implements Graphics, Renderer {
                        config.useGL20 = false;\r
                        configChooser = getEglConfigChooser();\r
                        int sdkVersion = Integer.parseInt(android.os.Build.VERSION.SDK);\r
-                       \r
-                       if(sdkVersion >= 11) {\r
+\r
+                       if (sdkVersion >= 11) {\r
                                GLSurfaceView view = new GLSurfaceView(activity) {\r
                                        @Override\r
                                        protected void onMeasure (int widthMeasureSpec, int heightMeasureSpec) {\r
-                                               ResolutionStrategy.MeasuredDimension measures = resolutionStrategy.calcMeasures(widthMeasureSpec, heightMeasureSpec);\r
+                                               ResolutionStrategy.MeasuredDimension measures = resolutionStrategy.calcMeasures(widthMeasureSpec,\r
+                                                       heightMeasureSpec);\r
                                                setMeasuredDimension(measures.width, measures.height);\r
                                        }\r
                                };\r
@@ -304,7 +302,7 @@ public final class AndroidGraphics implements Graphics, Renderer {
                setupGL(gl);\r
                logConfig(config);\r
                updatePpi();\r
-               \r
+\r
                Mesh.invalidateAllMeshes(app);\r
                Texture.invalidateAllTextures(app);\r
                ShaderProgram.invalidateAllShaderPrograms(app);\r
@@ -438,12 +436,11 @@ public final class AndroidGraphics implements Graphics, Renderer {
                                app.executedRunnables.clear();\r
                                app.executedRunnables.addAll(app.runnables);\r
                                app.runnables.clear();\r
-                               \r
+\r
                                for (int i = 0; i < app.executedRunnables.size; i++) {\r
                                        try {\r
                                                app.executedRunnables.get(i).run();\r
-                                       }\r
-                                       catch(Throwable t) {\r
+                                       } catch (Throwable t) {\r
                                                t.printStackTrace();\r
                                        }\r
                                }\r
@@ -478,7 +475,7 @@ public final class AndroidGraphics implements Graphics, Renderer {
        public float getDeltaTime () {\r
                return mean.getMean() == 0 ? deltaTime : mean.getMean();\r
        }\r
-       \r
+\r
        @Override\r
        public float getRawDeltaTime () {\r
                return deltaTime;\r
@@ -603,24 +600,24 @@ public final class AndroidGraphics implements Graphics, Renderer {
 \r
        @Override\r
        public void setContinuousRendering (boolean isContinuous) {\r
-               if(view != null) {\r
+               if (view != null) {\r
                        this.isContinuous = isContinuous;\r
-                       int renderMode = isContinuous?GLSurfaceView.RENDERMODE_CONTINUOUSLY:GLSurfaceView.RENDERMODE_WHEN_DIRTY;\r
-                       if(view instanceof GLSurfaceViewCupcake) ((GLSurfaceViewCupcake)view).setRenderMode(renderMode);\r
-                       if(view instanceof GLSurfaceView) ((GLSurfaceView)view).setRenderMode(renderMode);\r
+                       int renderMode = isContinuous ? GLSurfaceView.RENDERMODE_CONTINUOUSLY : GLSurfaceView.RENDERMODE_WHEN_DIRTY;\r
+                       if (view instanceof GLSurfaceViewCupcake) ((GLSurfaceViewCupcake)view).setRenderMode(renderMode);\r
+                       if (view instanceof GLSurfaceView) ((GLSurfaceView)view).setRenderMode(renderMode);\r
                        mean.clear();\r
                }\r
        }\r
-       \r
-       public boolean isContinuousRendering() {\r
+\r
+       public boolean isContinuousRendering () {\r
                return isContinuous;\r
        }\r
 \r
        @Override\r
        public void requestRendering () {\r
-               if(view != null) {\r
-                       if(view instanceof GLSurfaceViewCupcake) ((GLSurfaceViewCupcake)view).requestRender();\r
-                       if(view instanceof GLSurfaceView) ((GLSurfaceView)view).requestRender();\r
+               if (view != null) {\r
+                       if (view instanceof GLSurfaceViewCupcake) ((GLSurfaceViewCupcake)view).requestRender();\r
+                       if (view instanceof GLSurfaceView) ((GLSurfaceView)view).requestRender();\r
                }\r
        }\r
 \r
index 71416e0..e147001 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.backends.android;\r
 \r
 import java.util.ArrayList;\r
-import java.util.HashSet;\r
 \r
 import android.app.AlertDialog;\r
 import android.content.Context;\r
index 93b2a20..ef72aea 100644 (file)
@@ -35,7 +35,7 @@ public class AndroidMultiTouchHandler implements AndroidTouchHandler {
                int realPointerIndex = 0;\r
 \r
                long timeStamp = System.nanoTime();\r
-//             long timeStamp = event.getEventTime() * 1000000;\r
+// long timeStamp = event.getEventTime() * 1000000;\r
                // logAction(action, pointerId);\r
                synchronized (input) { // FUCK\r
                        switch (action) {\r
@@ -113,7 +113,7 @@ public class AndroidMultiTouchHandler implements AndroidTouchHandler {
        }\r
 \r
        private void postTouchEvent (AndroidInput input, int type, int x, int y, int pointer, long timeStamp) {\r
-//             long timeStamp = System.nanoTime();\r
+// long timeStamp = System.nanoTime();\r
                TouchEvent event = input.usedTouchEvents.obtain();\r
                event.timeStamp = timeStamp;\r
                event.pointer = pointer;\r
index aeb43a4..651d518 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.android;\r
+ ******************************************************************************/\r
 \r
-import com.badlogic.gdx.Input.Peripheral;\r
+package com.badlogic.gdx.backends.android;\r
 \r
 import android.app.Dialog;\r
 import android.content.Context;\r
@@ -40,35 +39,30 @@ import android.view.inputmethod.InputMethodManager;
 import android.widget.FrameLayout;\r
 import android.widget.TextView;\r
 \r
-/**\r
- * Responsible for showing and hiding the Android onscreen keyboard (aka softkeyboard).\r
- * Uses a dialog with an invisible TextView and injects key down/up and typed events\r
- * into AndroidInput. Only the delete and back keys will trigger key down/up events.\r
- * Alphanumeric keys will be directly injected as key typed events which is sufficient\r
- * to implement things like text fields.\r
+import com.badlogic.gdx.Input.Peripheral;\r
+\r
+/** Responsible for showing and hiding the Android onscreen keyboard (aka softkeyboard). Uses a dialog with an invisible TextView\r
+ * and injects key down/up and typed events into AndroidInput. Only the delete and back keys will trigger key down/up events.\r
+ * Alphanumeric keys will be directly injected as key typed events which is sufficient to implement things like text fields.\r
  * \r
- * Since the input mechanism for softkeyboards is a bit complex, we don't directly get\r
- * key events from the softkeyboard. Instead we intercept calls to the Editable\r
- * of the invisible TextView which we translate into delete key events and key typed\r
- * events.\r
+ * Since the input mechanism for softkeyboards is a bit complex, we don't directly get key events from the softkeyboard. Instead\r
+ * we intercept calls to the Editable of the invisible TextView which we translate into delete key events and key typed events.\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 class AndroidOnscreenKeyboard implements OnKeyListener, OnTouchListener {\r
        final Context context;\r
        final Handler handler;\r
        final AndroidInput input;\r
        Dialog dialog;\r
        TextView textView;\r
-       \r
-       public AndroidOnscreenKeyboard(Context context, Handler handler, AndroidInput input) {\r
+\r
+       public AndroidOnscreenKeyboard (Context context, Handler handler, AndroidInput input) {\r
                this.context = context;\r
                this.handler = handler;\r
                this.input = input;\r
        }\r
-       \r
-       Dialog createDialog() {\r
+\r
+       Dialog createDialog () {\r
                textView = createView(context);\r
                textView.setOnKeyListener(this);\r
                FrameLayout.LayoutParams textBoxLayoutParams = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT,\r
@@ -88,16 +82,16 @@ class AndroidOnscreenKeyboard implements OnKeyListener, OnTouchListener {
                dialog.setContentView(layout);\r
                return dialog;\r
        }\r
-       \r
-       public static TextView createView(Context context) {\r
+\r
+       public static TextView createView (Context context) {\r
                final TextView view = new TextView(context) {\r
                        Editable editable = new PassThroughEditable();\r
-                       \r
+\r
                        @Override\r
                        protected boolean getDefaultEditable () {\r
                                return true;\r
                        }\r
-                       \r
+\r
                        @Override\r
                        public Editable getEditableText () {\r
                                return editable;\r
@@ -120,22 +114,22 @@ class AndroidOnscreenKeyboard implements OnKeyListener, OnTouchListener {
                                return super.onKeyUp(keyCode, event);\r
                        }\r
                };\r
-//             view.setCursorVisible(false);\r
+// view.setCursorVisible(false);\r
                return view;\r
        }\r
-       \r
-       public void setVisible(boolean visible) {\r
-               if(visible && dialog != null) {\r
+\r
+       public void setVisible (boolean visible) {\r
+               if (visible && dialog != null) {\r
                        dialog.dismiss();\r
                        dialog = null;\r
                }\r
-               if(visible && dialog == null && !input.isPeripheralAvailable(Peripheral.HardwareKeyboard)) {\r
+               if (visible && dialog == null && !input.isPeripheralAvailable(Peripheral.HardwareKeyboard)) {\r
                        handler.post(new Runnable() {\r
                                @Override\r
                                public void run () {\r
                                        dialog = createDialog();\r
                                        dialog.show();\r
-                                       \r
+\r
                                        handler.post(new Runnable() {\r
                                                @Override\r
                                                public void run () {\r
@@ -144,7 +138,7 @@ class AndroidOnscreenKeyboard implements OnKeyListener, OnTouchListener {
                                                        if (input != null) input.showSoftInput(textView, InputMethodManager.SHOW_FORCED);\r
                                                }\r
                                        });\r
-                                       \r
+\r
                                        final View content = dialog.getWindow().findViewById(Window.ID_ANDROID_CONTENT);\r
                                        content.getViewTreeObserver().addOnPreDrawListener(new OnPreDrawListener() {\r
                                                int[] screenloc = new int[2];\r
@@ -167,12 +161,12 @@ class AndroidOnscreenKeyboard implements OnKeyListener, OnTouchListener {
                                }\r
                        });\r
                } else {\r
-                       if(!visible && dialog != null) {\r
+                       if (!visible && dialog != null) {\r
                                dialog.dismiss();\r
                        }\r
                }\r
        }\r
-       \r
+\r
        public static class PassThroughEditable implements Editable {\r
 \r
                @Override\r
@@ -305,7 +299,7 @@ class AndroidOnscreenKeyboard implements OnKeyListener, OnTouchListener {
                @Override\r
                public void setFilters (InputFilter[] filters) {\r
                        Log.d("Editable", "setFilters");\r
-               }               \r
+               }\r
        }\r
 \r
        @Override\r
@@ -317,4 +311,4 @@ class AndroidOnscreenKeyboard implements OnKeyListener, OnTouchListener {
        public boolean onKey (View view, int keycode, KeyEvent e) {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index a098e73..3dc9065 100644 (file)
@@ -27,7 +27,7 @@ import com.badlogic.gdx.Preferences;
 public class AndroidPreferences implements Preferences {\r
        SharedPreferences sharedPrefs;\r
        Editor editor;\r
-       \r
+\r
        public AndroidPreferences (SharedPreferences preferences) {\r
                this.sharedPrefs = preferences;\r
        }\r
@@ -153,8 +153,8 @@ public class AndroidPreferences implements Preferences {
                edit();\r
                editor.remove(key);\r
        }\r
-       \r
-       private void edit() {\r
+\r
+       private void edit () {\r
                if (editor == null) {\r
                        editor = sharedPrefs.edit();\r
                }\r
index a59a410..8935765 100644 (file)
@@ -125,6 +125,7 @@ import android.view.SurfaceHolder;
  * \r
  * \r
  * \r
+ * \r
  * </pre> */\r
 public class GLBaseSurfaceView extends GLSurfaceView implements SurfaceHolder.Callback {\r
        private final static boolean LOG_THREADS = false;\r
index 169ca90..074aded 100644 (file)
@@ -15,7 +15,6 @@ package com.badlogic.gdx.backends.android.surfaceview;
 \r
 import java.io.Writer;\r
 import java.util.ArrayList;\r
-import java.util.concurrent.Semaphore;\r
 \r
 import javax.microedition.khronos.egl.EGL10;\r
 import javax.microedition.khronos.egl.EGL11;\r
@@ -128,6 +127,7 @@ import android.view.SurfaceView;
  * \r
  * \r
  * \r
+ * \r
  * </pre> */\r
 public class GLSurfaceViewCupcake extends SurfaceView implements SurfaceHolder.Callback {\r
        /** The renderer only renders when the surface is created, or when {@link #requestRender} is called.\r
@@ -314,7 +314,7 @@ public class GLSurfaceViewCupcake extends SurfaceView implements SurfaceHolder.C
         * after onResume() and before onPause(). */\r
        public void requestRender () {\r
                GLThread thread = mGLThread;\r
-               if(thread != null) {\r
+               if (thread != null) {\r
                        thread.requestRender();\r
                }\r
        }\r
@@ -638,11 +638,11 @@ public class GLSurfaceViewCupcake extends SurfaceView implements SurfaceHolder.C
                         * \r
                         * This semaphore ensures that only one instance at a time accesses EGL.\r
                         * \r
-                        * changed: using a normal monitor instead of a semaphore. see issue\r
-                        * 704 http://code.google.com/p/libgdx/issues/detail?id=704\r
+                        * changed: using a normal monitor instead of a semaphore. see issue 704\r
+                        * http://code.google.com/p/libgdx/issues/detail?id=704\r
                         */\r
                        try {\r
-                               synchronized (sEglLock) {                                       \r
+                               synchronized (sEglLock) {\r
                                        guardedRun();\r
                                }\r
                        } catch (InterruptedException e) {\r
index f177b3c..4a107e9 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.ios;\r
 \r
 import cli.MonoTouch.Foundation.NSDictionary;\r
@@ -42,30 +43,28 @@ public class IOSApplication extends UIApplicationDelegate implements Application
        IOSInput input;\r
        int logLevel = Application.LOG_DEBUG;\r
        boolean firstResume;\r
-       \r
-       /**\r
-        * Should be called in AppDelegate#FinishedLaunching\r
-        * @param uiApp\r
-        */\r
-       public IOSApplication(ApplicationListener listener) {\r
+\r
+       /** Should be called in AppDelegate#FinishedLaunching\r
+        * @param uiApp */\r
+       public IOSApplication (ApplicationListener listener) {\r
                this.listener = listener;\r
                Gdx.app = this;\r
        }\r
-       \r
+\r
        @Override\r
-       public boolean FinishedLaunching(UIApplication uiApp, NSDictionary options) {\r
+       public boolean FinishedLaunching (UIApplication uiApp, NSDictionary options) {\r
                this.uiApp = uiApp;\r
                RectangleF bounds = UIScreen.get_MainScreen().get_Bounds();\r
                this.input = new IOSInput();\r
                this.graphics = new IOSGraphics(bounds, this, input);\r
                this.files = new IOSFiles();\r
                this.audio = new IOSAudio();\r
-               \r
+\r
                Gdx.files = this.files;\r
                Gdx.graphics = this.graphics;\r
                Gdx.audio = this.audio;\r
                Gdx.input = this.input;\r
-               \r
+\r
                this.uiWindow = new UIWindow(bounds);\r
                this.uiWindow.Add(graphics);\r
                this.graphics.Run();\r
@@ -75,9 +74,9 @@ public class IOSApplication extends UIApplicationDelegate implements Application
        }\r
 \r
        @Override\r
-       public void OnActivated(UIApplication uiApp) {\r
+       public void OnActivated (UIApplication uiApp) {\r
                Gdx.app.log("IOSApplication", "resumed");\r
-               if(!firstResume) {\r
+               if (!firstResume) {\r
                        graphics.MakeCurrent();\r
                        listener.resume();\r
                        firstResume = true;\r
@@ -85,7 +84,7 @@ public class IOSApplication extends UIApplicationDelegate implements Application
        }\r
 \r
        @Override\r
-       public void OnResignActivation(UIApplication uiApp) {\r
+       public void OnResignActivation (UIApplication uiApp) {\r
                Gdx.app.log("IOSApplication", "paused");\r
                graphics.MakeCurrent();\r
                listener.pause();\r
@@ -93,7 +92,7 @@ public class IOSApplication extends UIApplicationDelegate implements Application
        }\r
 \r
        @Override\r
-       public void WillTerminate(UIApplication uiApp) {\r
+       public void WillTerminate (UIApplication uiApp) {\r
                Gdx.app.log("IOSApplication", "disposed");\r
                graphics.MakeCurrent();\r
                listener.dispose();\r
@@ -122,14 +121,14 @@ public class IOSApplication extends UIApplicationDelegate implements Application
 \r
        @Override\r
        public void log (String tag, String message) {\r
-               if(logLevel > LOG_NONE) {\r
+               if (logLevel > LOG_NONE) {\r
                        Console.WriteLine("[info] " + tag + ": " + message);\r
                }\r
        }\r
 \r
        @Override\r
        public void log (String tag, String message, Exception exception) {\r
-               if(logLevel > LOG_NONE) {\r
+               if (logLevel > LOG_NONE) {\r
                        Console.WriteLine("[info] " + tag + ": " + message);\r
                        exception.printStackTrace();\r
                }\r
@@ -137,30 +136,30 @@ public class IOSApplication extends UIApplicationDelegate implements Application
 \r
        @Override\r
        public void error (String tag, String message) {\r
-               if(logLevel >= LOG_ERROR) {\r
-                       Console.WriteLine("[error] " +  tag + ": " + message);\r
+               if (logLevel >= LOG_ERROR) {\r
+                       Console.WriteLine("[error] " + tag + ": " + message);\r
                }\r
        }\r
 \r
        @Override\r
        public void error (String tag, String message, Throwable exception) {\r
-               if(logLevel >= LOG_ERROR) {\r
-                       Console.WriteLine("[error] " +  tag + ": " + message);\r
+               if (logLevel >= LOG_ERROR) {\r
+                       Console.WriteLine("[error] " + tag + ": " + message);\r
                        exception.printStackTrace();\r
                }\r
        }\r
 \r
        @Override\r
        public void debug (String tag, String message) {\r
-               if(logLevel >= LOG_DEBUG) {\r
-                       Console.WriteLine("[debug] " +  tag + ": " + message);\r
+               if (logLevel >= LOG_DEBUG) {\r
+                       Console.WriteLine("[debug] " + tag + ": " + message);\r
                }\r
        }\r
 \r
        @Override\r
        public void debug (String tag, String message, Throwable exception) {\r
-               if(logLevel >= LOG_DEBUG) {\r
-                       Console.WriteLine("[error] " +  tag + ": " + message);\r
+               if (logLevel >= LOG_DEBUG) {\r
+                       Console.WriteLine("[error] " + tag + ": " + message);\r
                        exception.printStackTrace();\r
                }\r
        }\r
@@ -200,7 +199,7 @@ public class IOSApplication extends UIApplicationDelegate implements Application
        }\r
 \r
        @Override\r
-       public void exit () {   \r
+       public void exit () {\r
                System.exit(0);\r
        }\r
-}
\ No newline at end of file
+}\r
index 362f5ce..9a8b2b5 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.ios;
-
-import com.badlogic.gdx.Audio;
-import com.badlogic.gdx.audio.AudioDevice;
-import com.badlogic.gdx.audio.AudioRecorder;
-import com.badlogic.gdx.audio.Music;
-import com.badlogic.gdx.audio.Sound;
-import com.badlogic.gdx.files.FileHandle;
-
-public class IOSAudio implements Audio {
-
-       @Override
-       public AudioDevice newAudioDevice(int samplingRate, boolean isMono) {
-               return null;
-       }
-
-       @Override
-       public AudioRecorder newAudioRecorder(int samplingRate, boolean isMono) {
-               return null;
-       }
-
-       @Override
-       public Sound newSound(FileHandle fileHandle) {
-               return new IOSSound();
-       }
-
-       @Override
-       public Music newMusic(FileHandle file) {
-               return new IOSMusic();
-       }
-
-}
\ No newline at end of file
+ ******************************************************************************/\r
+\r
+package com.badlogic.gdx.backends.ios;\r
+\r
+import com.badlogic.gdx.Audio;\r
+import com.badlogic.gdx.audio.AudioDevice;\r
+import com.badlogic.gdx.audio.AudioRecorder;\r
+import com.badlogic.gdx.audio.Music;\r
+import com.badlogic.gdx.audio.Sound;\r
+import com.badlogic.gdx.files.FileHandle;\r
+\r
+public class IOSAudio implements Audio {\r
+\r
+       @Override\r
+       public AudioDevice newAudioDevice (int samplingRate, boolean isMono) {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public AudioRecorder newAudioRecorder (int samplingRate, boolean isMono) {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public Sound newSound (FileHandle fileHandle) {\r
+               return new IOSSound();\r
+       }\r
+\r
+       @Override\r
+       public Music newMusic (FileHandle file) {\r
+               return new IOSMusic();\r
+       }\r
+\r
+}\r
index 73d468e..050a865 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.ios;\r
 \r
 import java.io.File;\r
@@ -50,4 +51,4 @@ public class IOSFileHandle extends FileHandle {
                if (type == FileType.Local) return new File(IOSFiles.localPath, file.getPath());\r
                return file;\r
        }\r
-}
\ No newline at end of file
+}\r
index 1e77512..d164ed9 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.ios;
-
-import cli.System.Environment;
-import cli.System.IO.Directory;
-
-import com.badlogic.gdx.Files;
-import com.badlogic.gdx.files.FileHandle;
-
-public class IOSFiles implements Files {
-       static final String externalPath = Environment.GetFolderPath(Environment.SpecialFolder.wrap(Environment.SpecialFolder.MyDocuments));
-       static final String localPath = Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.wrap(Environment.SpecialFolder.MyDocuments))).ToString() + "/Library/local";
-       
-       public IOSFiles() {
-               new FileHandle(externalPath).mkdirs();
-               new FileHandle(localPath).mkdirs();
-       }
-       
-       @Override
-       public FileHandle getFileHandle (String fileName, FileType type) {
-               return new IOSFileHandle(fileName, type);
-       }
-
-       @Override
-       public FileHandle classpath (String path) {
-               return new IOSFileHandle(path, FileType.Classpath);
-       }
-
-       @Override
-       public FileHandle internal (String path) {
-               return new IOSFileHandle(path, FileType.Internal);
-       }
-
-       @Override
-       public FileHandle external (String path) {
-               return new IOSFileHandle(path, FileType.External);
-       }
-
-       @Override
-       public FileHandle absolute (String path) {
-               return new IOSFileHandle(path, FileType.Absolute);
-       }
-
-       @Override
-       public FileHandle local (String path) {
-               return new IOSFileHandle(path, FileType.Local);
-       }
-
-       @Override
-       public String getExternalStoragePath() {
-               return externalPath;
-       }
-
-       @Override
-       public boolean isExternalStorageAvailable() {
-               return true;
-       }
-
-       @Override
-       public String getLocalStoragePath() {
-               return localPath;
-       }
-
-       @Override
-       public boolean isLocalStorageAvailable() {
-               return true;
-       }
-}
\ No newline at end of file
+ ******************************************************************************/\r
+\r
+package com.badlogic.gdx.backends.ios;\r
+\r
+import cli.System.Environment;\r
+import cli.System.IO.Directory;\r
+\r
+import com.badlogic.gdx.Files;\r
+import com.badlogic.gdx.files.FileHandle;\r
+\r
+public class IOSFiles implements Files {\r
+       static final String externalPath = Environment.GetFolderPath(Environment.SpecialFolder\r
+               .wrap(Environment.SpecialFolder.MyDocuments));\r
+       static final String localPath = Directory.GetParent(\r
+               Environment.GetFolderPath(Environment.SpecialFolder.wrap(Environment.SpecialFolder.MyDocuments))).ToString()\r
+               + "/Library/local";\r
+\r
+       public IOSFiles () {\r
+               new FileHandle(externalPath).mkdirs();\r
+               new FileHandle(localPath).mkdirs();\r
+       }\r
+\r
+       @Override\r
+       public FileHandle getFileHandle (String fileName, FileType type) {\r
+               return new IOSFileHandle(fileName, type);\r
+       }\r
+\r
+       @Override\r
+       public FileHandle classpath (String path) {\r
+               return new IOSFileHandle(path, FileType.Classpath);\r
+       }\r
+\r
+       @Override\r
+       public FileHandle internal (String path) {\r
+               return new IOSFileHandle(path, FileType.Internal);\r
+       }\r
+\r
+       @Override\r
+       public FileHandle external (String path) {\r
+               return new IOSFileHandle(path, FileType.External);\r
+       }\r
+\r
+       @Override\r
+       public FileHandle absolute (String path) {\r
+               return new IOSFileHandle(path, FileType.Absolute);\r
+       }\r
+\r
+       @Override\r
+       public FileHandle local (String path) {\r
+               return new IOSFileHandle(path, FileType.Local);\r
+       }\r
+\r
+       @Override\r
+       public String getExternalStoragePath () {\r
+               return externalPath;\r
+       }\r
+\r
+       @Override\r
+       public boolean isExternalStorageAvailable () {\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public String getLocalStoragePath () {\r
+               return localPath;\r
+       }\r
+\r
+       @Override\r
+       public boolean isLocalStorageAvailable () {\r
+               return true;\r
+       }\r
+}\r
index bf71c1e..68c69e9 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.ios;\r
 \r
 import java.nio.Buffer;\r
 import java.nio.FloatBuffer;\r
 import java.nio.IntBuffer;\r
 \r
-import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.GLCommon;\r
 \r
-\r
-public class IOSGLES20 implements GL20, GLCommon\r
-{      \r
-       public IOSGLES20() {\r
+public class IOSGLES20 implements GL20, GLCommon {\r
+       public IOSGLES20 () {\r
                init();\r
        }\r
-       \r
-       private static native void init( );     \r
-       \r
-       public native void glActiveTexture ( int texture );\r
 \r
-       public native void glAttachShader ( int program, int shader );\r
+       private static native void init ();\r
+\r
+       public native void glActiveTexture (int texture);\r
+\r
+       public native void glAttachShader (int program, int shader);\r
+\r
+       public native void glBindAttribLocation (int program, int index, String name);\r
+\r
+       public native void glBindBuffer (int target, int buffer);\r
 \r
-       public native void glBindAttribLocation ( int program, int index, String name );\r
+       public native void glBindFramebuffer (int target, int framebuffer);\r
 \r
-       public native void glBindBuffer ( int target, int buffer );\r
+       public native void glBindRenderbuffer (int target, int renderbuffer);\r
 \r
-       public native void glBindFramebuffer ( int target, int framebuffer );\r
+       public native void glBindTexture (int target, int texture);\r
 \r
-       public native void glBindRenderbuffer ( int target, int renderbuffer );\r
+       public native void glBlendColor (float red, float green, float blue, float alpha);\r
 \r
-       public native void glBindTexture ( int target, int texture );\r
+       public native void glBlendEquation (int mode);\r
 \r
-       public native void glBlendColor ( float red, float green, float blue, float alpha );\r
+       public native void glBlendEquationSeparate (int modeRGB, int modeAlpha);\r
 \r
-       public native void glBlendEquation (  int mode  );\r
+       public native void glBlendFunc (int sfactor, int dfactor);\r
 \r
-       public native void glBlendEquationSeparate ( int modeRGB, int modeAlpha );\r
+       public native void glBlendFuncSeparate (int srcRGB, int dstRGB, int srcAlpha, int dstAlpha);\r
 \r
-       public native void glBlendFunc ( int sfactor, int dfactor );\r
+       public native void glBufferData (int target, int size, Buffer data, int usage);\r
 \r
-       public native void glBlendFuncSeparate ( int srcRGB, int dstRGB, int srcAlpha, int dstAlpha );\r
+       public native void glBufferSubData (int target, int offset, int size, Buffer data);\r
 \r
-       public native void glBufferData ( int target, int size, Buffer data, int usage );\r
+       public native int glCheckFramebufferStatus (int target);\r
 \r
-       public native void glBufferSubData ( int target, int offset, int size, Buffer data );\r
+       public native void glClear (int mask);\r
 \r
-       public native int glCheckFramebufferStatus ( int target );\r
+       public native void glClearColor (float red, float green, float blue, float alpha);\r
 \r
-       public native void glClear ( int mask );\r
+       public native void glClearDepthf (float depth);\r
 \r
-       public native void glClearColor ( float red, float green, float blue, float alpha );\r
+       public native void glClearStencil (int s);\r
 \r
-       public native void glClearDepthf ( float depth );\r
+       public native void glColorMask (boolean red, boolean green, boolean blue, boolean alpha);\r
 \r
-       public native void glClearStencil ( int s );\r
+       public native void glCompileShader (int shader);\r
 \r
-       public native void glColorMask ( boolean red, boolean green, boolean blue, boolean alpha );\r
+       public native void glCompressedTexImage2D (int target, int level, int internalformat, int width, int height, int border,\r
+               int imageSize, Buffer data);\r
 \r
-       public native void glCompileShader ( int shader );\r
+       public native void glCompressedTexSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height,\r
+               int format, int imageSize, Buffer data);\r
 \r
-       public native void glCompressedTexImage2D ( int target, int level, int internalformat, int width, int height, int border, int imageSize, Buffer data );\r
+       public native void glCopyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height, int border);\r
 \r
-       public native void glCompressedTexSubImage2D ( int target, int level, int xoffset, int yoffset, int width, int height, int format, int imageSize, Buffer data );\r
+       public native void glCopyTexSubImage2D (int target, int level, int xoffset, int yoffset, int x, int y, int width, int height);\r
 \r
-       public native void glCopyTexImage2D ( int target, int level, int internalformat, int x, int y, int width, int height, int border );\r
+       public native int glCreateProgram ();\r
 \r
-       public native void glCopyTexSubImage2D ( int target, int level, int xoffset, int yoffset, int x, int y, int width, int height );\r
+       public native int glCreateShader (int type);\r
 \r
-       public native int glCreateProgram (  );\r
+       public native void glCullFace (int mode);\r
 \r
-       public native int glCreateShader ( int type );\r
+       public native void glDeleteBuffers (int n, IntBuffer buffers);\r
 \r
-       public native void glCullFace ( int mode );\r
+       public native void glDeleteFramebuffers (int n, IntBuffer framebuffers);\r
 \r
-       public native void glDeleteBuffers ( int n, IntBuffer buffers );\r
+       public native void glDeleteProgram (int program);\r
 \r
-       public native void glDeleteFramebuffers ( int n, IntBuffer framebuffers );\r
+       public native void glDeleteRenderbuffers (int n, IntBuffer renderbuffers);\r
 \r
-       public native void glDeleteProgram ( int program );\r
+       public native void glDeleteShader (int shader);\r
 \r
-       public native void glDeleteRenderbuffers ( int n, IntBuffer renderbuffers );\r
+       public native void glDeleteTextures (int n, IntBuffer textures);\r
 \r
-       public native void glDeleteShader ( int shader );\r
+       public native void glDepthFunc (int func);\r
 \r
-       public native void glDeleteTextures ( int n, IntBuffer textures );\r
+       public native void glDepthMask (boolean flag);\r
 \r
-       public native void glDepthFunc ( int func );\r
+       public native void glDepthRangef (float zNear, float zFar);\r
 \r
-       public native void glDepthMask ( boolean flag );\r
+       public native void glDetachShader (int program, int shader);\r
 \r
-       public native void glDepthRangef ( float zNear, float zFar );\r
+       public native void glDisable (int cap);\r
 \r
-       public native void glDetachShader ( int program, int shader );\r
+       public native void glDisableVertexAttribArray (int index);\r
 \r
-       public native void glDisable ( int cap );\r
+       public native void glDrawArrays (int mode, int first, int count);\r
 \r
-       public native void glDisableVertexAttribArray ( int index );\r
+       public native void glDrawElements (int mode, int count, int type, Buffer indices);\r
 \r
-       public native void glDrawArrays ( int mode, int first, int count );\r
+       public native void glDrawElements (int mode, int count, int type, int indices);\r
 \r
-       public native void glDrawElements ( int mode, int count, int type, Buffer indices );\r
-       \r
-       public native void glDrawElements ( int mode, int count, int type, int indices );\r
+       public native void glEnable (int cap);\r
 \r
-       public native void glEnable ( int cap );\r
+       public native void glEnableVertexAttribArray (int index);\r
 \r
-       public native void glEnableVertexAttribArray ( int index );\r
+       public native void glFinish ();\r
 \r
-       public native void glFinish (  );\r
+       public native void glFlush ();\r
 \r
-       public native void glFlush (  );\r
+       public native void glFramebufferRenderbuffer (int target, int attachment, int renderbuffertarget, int renderbuffer);\r
 \r
-       public native void glFramebufferRenderbuffer ( int target, int attachment, int renderbuffertarget, int renderbuffer );\r
+       public native void glFramebufferTexture2D (int target, int attachment, int textarget, int texture, int level);\r
 \r
-       public native void glFramebufferTexture2D ( int target, int attachment, int textarget, int texture, int level );\r
+       public native void glFrontFace (int mode);\r
 \r
-       public native void glFrontFace ( int mode );\r
+       public native void glGenBuffers (int n, IntBuffer buffers);\r
 \r
-       public native void glGenBuffers ( int n, IntBuffer buffers );\r
+       public native void glGenerateMipmap (int target);\r
 \r
-       public native void glGenerateMipmap ( int target );\r
+       public native void glGenFramebuffers (int n, IntBuffer framebuffers);\r
 \r
-       public native void glGenFramebuffers ( int n, IntBuffer framebuffers );\r
+       public native void glGenRenderbuffers (int n, IntBuffer renderbuffers);\r
 \r
-       public native void glGenRenderbuffers ( int n, IntBuffer renderbuffers );\r
+       public native void glGenTextures (int n, IntBuffer textures);\r
 \r
-       public native void glGenTextures ( int n, IntBuffer textures );\r
+       public native String glGetActiveAttrib (int program, int index, IntBuffer size, Buffer type);\r
 \r
-       public native String glGetActiveAttrib ( int program, int index, IntBuffer size, Buffer type );\r
+       public native String glGetActiveUniform (int program, int index, IntBuffer size, Buffer type);\r
 \r
-       public native String glGetActiveUniform ( int program, int index, IntBuffer size, Buffer type );\r
+       public native void glGetAttachedShaders (int program, int maxcount, Buffer count, IntBuffer shaders);\r
 \r
-       public native void glGetAttachedShaders ( int program, int maxcount, Buffer count, IntBuffer shaders );\r
+       public native int glGetAttribLocation (int program, String name);\r
 \r
-       public native int glGetAttribLocation ( int program, String name );\r
+       public native void glGetBooleanv (int pname, Buffer params);\r
 \r
-       public native void glGetBooleanv ( int pname, Buffer params );\r
+       public native void glGetBufferParameteriv (int target, int pname, IntBuffer params);\r
 \r
-       public native void glGetBufferParameteriv ( int target, int pname, IntBuffer params );\r
+       public native int glGetError ();\r
 \r
-       public native int glGetError (  );\r
+       public native void glGetFloatv (int pname, FloatBuffer params);\r
 \r
-       public native void glGetFloatv ( int pname, FloatBuffer params );\r
+       public native void glGetFramebufferAttachmentParameteriv (int target, int attachment, int pname, IntBuffer params);\r
 \r
-       public native void glGetFramebufferAttachmentParameteriv ( int target, int attachment, int pname, IntBuffer params );\r
+       public native void glGetIntegerv (int pname, IntBuffer params);\r
 \r
-       public native void glGetIntegerv ( int pname, IntBuffer params );\r
+       public native void glGetProgramiv (int program, int pname, IntBuffer params);\r
 \r
-       public native void glGetProgramiv ( int program, int pname, IntBuffer params );\r
+       public native String glGetProgramInfoLog (int program);\r
 \r
-       public native String glGetProgramInfoLog ( int program );\r
+       public native void glGetRenderbufferParameteriv (int target, int pname, IntBuffer params);\r
 \r
-       public native void glGetRenderbufferParameteriv ( int target, int pname, IntBuffer params );\r
+       public native void glGetShaderiv (int shader, int pname, IntBuffer params);\r
 \r
-       public native void glGetShaderiv ( int shader, int pname, IntBuffer params );\r
+       public native String glGetShaderInfoLog (int shader);\r
 \r
-       public native String glGetShaderInfoLog ( int shader );\r
+       public native void glGetShaderPrecisionFormat (int shadertype, int precisiontype, IntBuffer range, IntBuffer precision);\r
 \r
-       public native void glGetShaderPrecisionFormat ( int shadertype, int precisiontype, IntBuffer range, IntBuffer precision );\r
+       public native void glGetShaderSource (int shader, int bufsize, Buffer length, String source);\r
 \r
-       public native void glGetShaderSource ( int shader, int bufsize, Buffer length, String source );\r
+       public native String glGetString (int name);\r
 \r
-       public native String glGetString ( int name );\r
+       public native void glGetTexParameterfv (int target, int pname, FloatBuffer params);\r
 \r
-       public native void glGetTexParameterfv ( int target, int pname, FloatBuffer params );\r
+       public native void glGetTexParameteriv (int target, int pname, IntBuffer params);\r
 \r
-       public native void glGetTexParameteriv ( int target, int pname, IntBuffer params );\r
+       public native void glGetUniformfv (int program, int location, FloatBuffer params);\r
 \r
-       public native void glGetUniformfv ( int program, int location, FloatBuffer params );\r
+       public native void glGetUniformiv (int program, int location, IntBuffer params);\r
 \r
-       public native void glGetUniformiv ( int program, int location, IntBuffer params );\r
+       public native int glGetUniformLocation (int program, String name);\r
 \r
-       public native int glGetUniformLocation ( int program, String name );\r
+       public native void glGetVertexAttribfv (int index, int pname, FloatBuffer params);\r
 \r
-       public native void glGetVertexAttribfv ( int index, int pname, FloatBuffer params );\r
+       public native void glGetVertexAttribiv (int index, int pname, IntBuffer params);\r
 \r
-       public native void glGetVertexAttribiv ( int index, int pname, IntBuffer params );\r
+       public native void glGetVertexAttribPointerv (int index, int pname, Buffer pointer);\r
 \r
-       public native void glGetVertexAttribPointerv ( int index, int pname, Buffer pointer );\r
+       public native void glHint (int target, int mode);\r
 \r
-       public native void glHint ( int target, int mode );\r
+       public native boolean glIsBuffer (int buffer);\r
 \r
-       public native boolean glIsBuffer ( int buffer );\r
+       public native boolean glIsEnabled (int cap);\r
 \r
-       public native boolean glIsEnabled ( int cap );\r
+       public native boolean glIsFramebuffer (int framebuffer);\r
 \r
-       public native boolean glIsFramebuffer ( int framebuffer );\r
+       public native boolean glIsProgram (int program);\r
 \r
-       public native boolean glIsProgram ( int program );\r
+       public native boolean glIsRenderbuffer (int renderbuffer);\r
 \r
-       public native boolean glIsRenderbuffer ( int renderbuffer );\r
+       public native boolean glIsShader (int shader);\r
 \r
-       public native boolean glIsShader ( int shader );\r
+       public native boolean glIsTexture (int texture);\r
 \r
-       public native boolean glIsTexture ( int texture );\r
+       public native void glLineWidth (float width);\r
 \r
-       public native void glLineWidth ( float width );\r
+       public native void glLinkProgram (int program);\r
 \r
-       public native void glLinkProgram ( int program );\r
+       public native void glPixelStorei (int pname, int param);\r
 \r
-       public native void glPixelStorei ( int pname, int param );\r
+       public native void glPolygonOffset (float factor, float units);\r
 \r
-       public native void glPolygonOffset ( float factor, float units );\r
+       public native void glReadPixels (int x, int y, int width, int height, int format, int type, Buffer pixels);\r
 \r
-       public native void glReadPixels ( int x, int y, int width, int height, int format, int type, Buffer pixels );\r
+       public native void glReleaseShaderCompiler ();\r
 \r
-       public native void glReleaseShaderCompiler (  );\r
+       public native void glRenderbufferStorage (int target, int internalformat, int width, int height);\r
 \r
-       public native void glRenderbufferStorage ( int target, int internalformat, int width, int height );\r
+       public native void glSampleCoverage (float value, boolean invert);\r
 \r
-       public native void glSampleCoverage ( float value, boolean invert );\r
+       public native void glScissor (int x, int y, int width, int height);\r
 \r
-       public native void glScissor ( int x, int y, int width, int height );\r
+       public native void glShaderBinary (int n, IntBuffer shaders, int binaryformat, Buffer binary, int length);\r
 \r
-       public native void glShaderBinary ( int n, IntBuffer shaders, int binaryformat, Buffer binary, int length );\r
+       public native void glShaderSource (int shader, String string);\r
 \r
-       public native void glShaderSource ( int shader, String string );\r
+       public native void glStencilFunc (int func, int ref, int mask);\r
 \r
-       public native void glStencilFunc ( int func, int ref, int mask );\r
+       public native void glStencilFuncSeparate (int face, int func, int ref, int mask);\r
 \r
-       public native void glStencilFuncSeparate ( int face, int func, int ref, int mask );\r
+       public native void glStencilMask (int mask);\r
 \r
-       public native void glStencilMask ( int mask );\r
+       public native void glStencilMaskSeparate (int face, int mask);\r
 \r
-       public native void glStencilMaskSeparate ( int face, int mask );\r
+       public native void glStencilOp (int fail, int zfail, int zpass);\r
 \r
-       public native void glStencilOp ( int fail, int zfail, int zpass );\r
+       public native void glStencilOpSeparate (int face, int fail, int zfail, int zpass);\r
 \r
-       public native void glStencilOpSeparate ( int face, int fail, int zfail, int zpass );\r
+       public native void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format,\r
+               int type, Buffer pixels);\r
 \r
-       public native void glTexImage2D ( int target, int level, int internalformat, int width, int height, int border, int format, int type, Buffer pixels );\r
+       public native void glTexParameterf (int target, int pname, float param);\r
 \r
-       public native void glTexParameterf ( int target, int pname, float param );\r
+       public native void glTexParameterfv (int target, int pname, FloatBuffer params);\r
 \r
-       public native void glTexParameterfv ( int target, int pname, FloatBuffer params );\r
+       public native void glTexParameteri (int target, int pname, int param);\r
 \r
-       public native void glTexParameteri ( int target, int pname, int param );\r
+       public native void glTexParameteriv (int target, int pname, IntBuffer params);\r
 \r
-       public native void glTexParameteriv ( int target, int pname, IntBuffer params );\r
+       public native void glTexSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height, int format,\r
+               int type, Buffer pixels);\r
 \r
-       public native void glTexSubImage2D ( int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, Buffer pixels );\r
+       public native void glUniform1f (int location, float x);\r
 \r
-       public native void glUniform1f ( int location, float x );\r
+       public native void glUniform1fv (int location, int count, FloatBuffer v);\r
 \r
-       public native void glUniform1fv ( int location, int count, FloatBuffer v );\r
+       public native void glUniform1i (int location, int x);\r
 \r
-       public native void glUniform1i ( int location, int x );\r
+       public native void glUniform1iv (int location, int count, IntBuffer v);\r
 \r
-       public native void glUniform1iv ( int location, int count, IntBuffer v );\r
+       public native void glUniform2f (int location, float x, float y);\r
 \r
-       public native void glUniform2f ( int location, float x, float y );\r
+       public native void glUniform2fv (int location, int count, FloatBuffer v);\r
 \r
-       public native void glUniform2fv ( int location, int count, FloatBuffer v );\r
+       public native void glUniform2i (int location, int x, int y);\r
 \r
-       public native void glUniform2i ( int location, int x, int y );\r
+       public native void glUniform2iv (int location, int count, IntBuffer v);\r
 \r
-       public native void glUniform2iv ( int location, int count, IntBuffer v );\r
+       public native void glUniform3f (int location, float x, float y, float z);\r
 \r
-       public native void glUniform3f ( int location, float x, float y, float z );\r
+       public native void glUniform3fv (int location, int count, FloatBuffer v);\r
 \r
-       public native void glUniform3fv ( int location, int count, FloatBuffer v );\r
+       public native void glUniform3i (int location, int x, int y, int z);\r
 \r
-       public native void glUniform3i ( int location, int x, int y, int z );\r
+       public native void glUniform3iv (int location, int count, IntBuffer v);\r
 \r
-       public native void glUniform3iv ( int location, int count, IntBuffer v );\r
+       public native void glUniform4f (int location, float x, float y, float z, float w);\r
 \r
-       public native void glUniform4f ( int location, float x, float y, float z, float w );\r
+       public native void glUniform4fv (int location, int count, FloatBuffer v);\r
 \r
-       public native void glUniform4fv ( int location, int count, FloatBuffer v );\r
+       public native void glUniform4i (int location, int x, int y, int z, int w);\r
 \r
-       public native void glUniform4i ( int location, int x, int y, int z, int w );\r
+       public native void glUniform4iv (int location, int count, IntBuffer v);\r
 \r
-       public native void glUniform4iv ( int location, int count, IntBuffer v );\r
+       public native void glUniformMatrix2fv (int location, int count, boolean transpose, FloatBuffer value);\r
 \r
-       public native void glUniformMatrix2fv ( int location, int count, boolean transpose, FloatBuffer value );\r
+       public native void glUniformMatrix3fv (int location, int count, boolean transpose, FloatBuffer value);\r
 \r
-       public native void glUniformMatrix3fv ( int location, int count, boolean transpose, FloatBuffer value );\r
+       public native void glUniformMatrix4fv (int location, int count, boolean transpose, FloatBuffer value);\r
 \r
-       public native void glUniformMatrix4fv ( int location, int count, boolean transpose, FloatBuffer value );\r
+       public native void glUseProgram (int program);\r
 \r
-       public native void glUseProgram ( int program );\r
+       public native void glValidateProgram (int program);\r
 \r
-       public native void glValidateProgram ( int program );\r
+       public native void glVertexAttrib1f (int indx, float x);\r
 \r
-       public native void glVertexAttrib1f ( int indx, float x );\r
+       public native void glVertexAttrib1fv (int indx, FloatBuffer values);\r
 \r
-       public native void glVertexAttrib1fv ( int indx, FloatBuffer values );\r
+       public native void glVertexAttrib2f (int indx, float x, float y);\r
 \r
-       public native void glVertexAttrib2f ( int indx, float x, float y );\r
+       public native void glVertexAttrib2fv (int indx, FloatBuffer values);\r
 \r
-       public native void glVertexAttrib2fv ( int indx, FloatBuffer values );\r
+       public native void glVertexAttrib3f (int indx, float x, float y, float z);\r
 \r
-       public native void glVertexAttrib3f ( int indx, float x, float y, float z );\r
+       public native void glVertexAttrib3fv (int indx, FloatBuffer values);\r
 \r
-       public native void glVertexAttrib3fv ( int indx, FloatBuffer values );\r
+       public native void glVertexAttrib4f (int indx, float x, float y, float z, float w);\r
 \r
-       public native void glVertexAttrib4f ( int indx, float x, float y, float z, float w );\r
+       public native void glVertexAttrib4fv (int indx, FloatBuffer values);\r
 \r
-       public native void glVertexAttrib4fv ( int indx, FloatBuffer values );\r
+       public native void glVertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, Buffer ptr);\r
 \r
-       public native void glVertexAttribPointer ( int indx, int size, int type, boolean normalized, int stride, Buffer ptr );\r
-       \r
-       public native void glVertexAttribPointer ( int indx, int size, int type, boolean normalized, int stride, int ptr );\r
+       public native void glVertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, int ptr);\r
 \r
-       public native void glViewport ( int x, int y, int width, int height );\r
-}
\ No newline at end of file
+       public native void glViewport (int x, int y, int width, int height);\r
+}\r
index e1a1497..134d88b 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.ios;
-
-import cli.MonoTouch.Foundation.ExportAttribute;
+ ******************************************************************************/\r
+\r
+package com.badlogic.gdx.backends.ios;\r
+\r
+import cli.MonoTouch.CoreAnimation.CAEAGLLayer;\r
+import cli.MonoTouch.Foundation.ExportAttribute;\r
 import cli.MonoTouch.Foundation.NSSet;\r
-import cli.MonoTouch.CoreAnimation.CAEAGLLayer;
-import cli.MonoTouch.OpenGLES.EAGLColorFormat;
-import cli.MonoTouch.OpenGLES.EAGLRenderingAPI;
+import cli.MonoTouch.OpenGLES.EAGLColorFormat;\r
+import cli.MonoTouch.OpenGLES.EAGLRenderingAPI;\r
 import cli.MonoTouch.UIKit.UIEvent;\r
-import cli.MonoTouch.UIKit.UIScreen;
-import cli.OpenTK.FrameEventArgs;
-import cli.OpenTK.Platform.iPhoneOS.iPhoneOSGameView;
-import cli.System.EventArgs;
-import cli.System.Drawing.RectangleF;
-
-import com.badlogic.gdx.Gdx;
-import com.badlogic.gdx.Graphics;
-import com.badlogic.gdx.graphics.GL10;
-import com.badlogic.gdx.graphics.GL11;
-import com.badlogic.gdx.graphics.GL20;
-import com.badlogic.gdx.graphics.GLCommon;
-import com.badlogic.gdx.graphics.GLU;
-import com.badlogic.gdx.graphics.Pixmap;
-
-public class IOSGraphics extends iPhoneOSGameView implements Graphics {
+import cli.MonoTouch.UIKit.UIScreen;\r
+import cli.OpenTK.FrameEventArgs;\r
+import cli.OpenTK.Platform.iPhoneOS.iPhoneOSGameView;\r
+import cli.System.EventArgs;\r
+import cli.System.Drawing.RectangleF;\r
+\r
+import com.badlogic.gdx.Gdx;\r
+import com.badlogic.gdx.Graphics;\r
+import com.badlogic.gdx.graphics.GL10;\r
+import com.badlogic.gdx.graphics.GL11;\r
+import com.badlogic.gdx.graphics.GL20;\r
+import com.badlogic.gdx.graphics.GLCommon;\r
+import com.badlogic.gdx.graphics.GLU;\r
+\r
+public class IOSGraphics extends iPhoneOSGameView implements Graphics {\r
        IOSApplication app;\r
-       IOSInput input;
-       IOSGLES20 gl20;
-       int width;
-       int height;
-       long lastFrameTime;
-       float deltaTime;
-       long framesStart;
-       int frames;
-       int fps;
-
-       public IOSGraphics(RectangleF bounds, IOSApplication app, IOSInput input) {
-               super(bounds);
-               width = (int)bounds.get_Width();
-               height = (int)bounds.get_Height();
-               app.log("IOSGraphics", bounds.get_Width() + "x" + bounds.get_Height() + ", " + UIScreen.get_MainScreen().get_Scale());
+       IOSInput input;\r
+       IOSGLES20 gl20;\r
+       int width;\r
+       int height;\r
+       long lastFrameTime;\r
+       float deltaTime;\r
+       long framesStart;\r
+       int frames;\r
+       int fps;\r
+\r
+       public IOSGraphics (RectangleF bounds, IOSApplication app, IOSInput input) {\r
+               super(bounds);\r
+               width = (int)bounds.get_Width();\r
+               height = (int)bounds.get_Height();\r
+               app.log("IOSGraphics", bounds.get_Width() + "x" + bounds.get_Height() + ", " + UIScreen.get_MainScreen().get_Scale());\r
                this.app = app;\r
-               this.input = input;
-               set_LayerRetainsBacking(false);
-               set_ContentScaleFactor(1);
-               set_MultipleTouchEnabled(true);
-               set_AutoResize(false);
-               set_LayerColorFormat(EAGLColorFormat.RGB565);
-               set_ContextRenderingApi(EAGLRenderingAPI.wrap(EAGLRenderingAPI.OpenGLES2));
-               gl20 = new IOSGLES20();
-               Gdx.gl = gl20;
-               Gdx.gl20 = gl20;
-               
-               lastFrameTime = System.nanoTime();
-               framesStart = lastFrameTime;
-       }
-
-       @Override
-       protected void ConfigureLayer(CAEAGLLayer layer) {
-               layer.set_Opaque(true);
-               super.ConfigureLayer(layer);
-       }
-
-       @Override
-       protected void OnLoad(EventArgs arg0) {
-               super.OnLoad(arg0);
-               MakeCurrent();
-               app.listener.create();
-               app.listener.resize(0, 0); // FIXME
-       }
-
-       @Override
-       protected void OnRenderFrame(FrameEventArgs arg0) {
-               super.OnRenderFrame(arg0);
-               
-               long time = System.nanoTime();
-               deltaTime = (time - lastFrameTime) / 1000000000.0f;
-               lastFrameTime = time;
-               
-               fps++;
-               if(time - framesStart >= 1000000000l) {
-                       framesStart = time;
-                       fps = frames;
-                       frames = 0;
-               }
-               
+               this.input = input;\r
+               set_LayerRetainsBacking(false);\r
+               set_ContentScaleFactor(1);\r
+               set_MultipleTouchEnabled(true);\r
+               set_AutoResize(false);\r
+               set_LayerColorFormat(EAGLColorFormat.RGB565);\r
+               set_ContextRenderingApi(EAGLRenderingAPI.wrap(EAGLRenderingAPI.OpenGLES2));\r
+               gl20 = new IOSGLES20();\r
+               Gdx.gl = gl20;\r
+               Gdx.gl20 = gl20;\r
+\r
+               lastFrameTime = System.nanoTime();\r
+               framesStart = lastFrameTime;\r
+       }\r
+\r
+       @Override\r
+       protected void ConfigureLayer (CAEAGLLayer layer) {\r
+               layer.set_Opaque(true);\r
+               super.ConfigureLayer(layer);\r
+       }\r
+\r
+       @Override\r
+       protected void OnLoad (EventArgs arg0) {\r
+               super.OnLoad(arg0);\r
                MakeCurrent();\r
-               ((IOSInput)Gdx.input).processEvents();
-               app.listener.render();
-               SwapBuffers();
-       }
-
-       @Override
-       protected void OnResize(EventArgs arg0) {
-               super.OnResize(arg0);
-               MakeCurrent();
-               app.listener.resize(0, 0); // FIXME
-       }
-
-       @ExportAttribute.Annotation("layerClass")
-       static cli.MonoTouch.ObjCRuntime.Class LayerClass() {
-               return iPhoneOSGameView.GetLayerClass();
-       }
-
-       @Override
-       public boolean isGL11Available() {
-               return false;
-       }
-
-       @Override
-       public boolean isGL20Available() {
-               return true;
-       }
-
-       @Override
-       public GLCommon getGLCommon() {
-               return gl20;
-       }
-
-       @Override
-       public GL10 getGL10() {
-               return null;
-       }
-
-       @Override
-       public GL11 getGL11() {
-               return null;
-       }
-
-       @Override
-       public GL20 getGL20() {
-               return gl20;
-       }
-
-       @Override
-       public GLU getGLU() {
-               return null;
-       }
-
-       @Override
-       public int getWidth() {
-               return width;
-       }
-
-       @Override
-       public int getHeight() {
-               return height;
-       }
-
-       @Override
-       public float getDeltaTime() {
-               return deltaTime;
-       }
-
-       @Override
-       public float getRawDeltaTime() {
-               return deltaTime;
-       }
-
-       @Override
-       public int getFramesPerSecond() {
-               return fps;
-       }
-
-       @Override
-       public GraphicsType getType() {
-               return GraphicsType.iOSGL;
-       }
-
-       @Override
-       public float getPpiX() {
-               return 0;
-       }
-
-       @Override
-       public float getPpiY() {
-               return 0;
-       }
-
-       @Override
-       public float getPpcX() {
-               return 0;
-       }
-
-       @Override
-       public float getPpcY() {
-               return 0;
-       }
-
-       @Override
-       public float getDensity() {
-               return 0;
-       }
-
-       @Override
-       public boolean supportsDisplayModeChange() {
-               return false;
-       }
-
-       @Override
-       public DisplayMode[] getDisplayModes() {
-               return null;
-       }
-
-       @Override
-       public DisplayMode getDesktopDisplayMode() {
-               return null;
-       }
-
-       @Override
-       public boolean setDisplayMode(DisplayMode displayMode) {
-               return false;
-       }
-
-       @Override
-       public boolean setDisplayMode(int width, int height, boolean fullscreen) {
-               return false;
-       }
-
-       @Override
-       public void setTitle(String title) {
-       }
-
-       @Override
-       public void setVSync(boolean vsync) {
-       }
-
-       @Override
-       public BufferFormat getBufferFormat() {
-               return null;
-       }
-
-       @Override
-       public boolean supportsExtension(String extension) {
-               return false;
-       }
-
-       @Override
-       public void setContinuousRendering(boolean isContinuous) {
-       }
-
-       @Override
-       public boolean isContinuousRendering() {
-               return false;
-       }
-
-       @Override
-       public void requestRendering() {
-       }
-
-       @Override
-       public boolean isFullscreen() {
-               return true;
-       }\r
-\r
-       @Override\r
-       public void TouchesBegan(NSSet touches, UIEvent event) {\r
+               app.listener.create();\r
+               app.listener.resize(0, 0); // FIXME\r
+       }\r
+\r
+       @Override\r
+       protected void OnRenderFrame (FrameEventArgs arg0) {\r
+               super.OnRenderFrame(arg0);\r
+\r
+               long time = System.nanoTime();\r
+               deltaTime = (time - lastFrameTime) / 1000000000.0f;\r
+               lastFrameTime = time;\r
+\r
+               fps++;\r
+               if (time - framesStart >= 1000000000l) {\r
+                       framesStart = time;\r
+                       fps = frames;\r
+                       frames = 0;\r
+               }\r
+\r
+               MakeCurrent();\r
+               ((IOSInput)Gdx.input).processEvents();\r
+               app.listener.render();\r
+               SwapBuffers();\r
+       }\r
+\r
+       @Override\r
+       protected void OnResize (EventArgs arg0) {\r
+               super.OnResize(arg0);\r
+               MakeCurrent();\r
+               app.listener.resize(0, 0); // FIXME\r
+       }\r
+\r
+       @ExportAttribute.Annotation("layerClass")\r
+       static cli.MonoTouch.ObjCRuntime.Class LayerClass () {\r
+               return iPhoneOSGameView.GetLayerClass();\r
+       }\r
+\r
+       @Override\r
+       public boolean isGL11Available () {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean isGL20Available () {\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public GLCommon getGLCommon () {\r
+               return gl20;\r
+       }\r
+\r
+       @Override\r
+       public GL10 getGL10 () {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public GL11 getGL11 () {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public GL20 getGL20 () {\r
+               return gl20;\r
+       }\r
+\r
+       @Override\r
+       public GLU getGLU () {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public int getWidth () {\r
+               return width;\r
+       }\r
+\r
+       @Override\r
+       public int getHeight () {\r
+               return height;\r
+       }\r
+\r
+       @Override\r
+       public float getDeltaTime () {\r
+               return deltaTime;\r
+       }\r
+\r
+       @Override\r
+       public float getRawDeltaTime () {\r
+               return deltaTime;\r
+       }\r
+\r
+       @Override\r
+       public int getFramesPerSecond () {\r
+               return fps;\r
+       }\r
+\r
+       @Override\r
+       public GraphicsType getType () {\r
+               return GraphicsType.iOSGL;\r
+       }\r
+\r
+       @Override\r
+       public float getPpiX () {\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public float getPpiY () {\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public float getPpcX () {\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public float getPpcY () {\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public float getDensity () {\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public boolean supportsDisplayModeChange () {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public DisplayMode[] getDisplayModes () {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public DisplayMode getDesktopDisplayMode () {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public boolean setDisplayMode (DisplayMode displayMode) {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean setDisplayMode (int width, int height, boolean fullscreen) {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public void setTitle (String title) {\r
+       }\r
+\r
+       @Override\r
+       public void setVSync (boolean vsync) {\r
+       }\r
+\r
+       @Override\r
+       public BufferFormat getBufferFormat () {\r
+               return null;\r
+       }\r
+\r
+       @Override\r
+       public boolean supportsExtension (String extension) {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public void setContinuousRendering (boolean isContinuous) {\r
+       }\r
+\r
+       @Override\r
+       public boolean isContinuousRendering () {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public void requestRendering () {\r
+       }\r
+\r
+       @Override\r
+       public boolean isFullscreen () {\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public void TouchesBegan (NSSet touches, UIEvent event) {\r
                super.TouchesBegan(touches, event);\r
                input.touchDown(touches, event);\r
        }\r
 \r
        @Override\r
-       public void TouchesCancelled(NSSet touches, UIEvent event) {\r
+       public void TouchesCancelled (NSSet touches, UIEvent event) {\r
                super.TouchesCancelled(touches, event);\r
                input.touchUp(touches, event);\r
        }\r
 \r
        @Override\r
-       public void TouchesEnded(NSSet touches, UIEvent event) {\r
+       public void TouchesEnded (NSSet touches, UIEvent event) {\r
                super.TouchesEnded(touches, event);\r
                input.touchUp(touches, event);\r
        }\r
 \r
        @Override\r
-       public void TouchesMoved(NSSet touches, UIEvent event) {\r
+       public void TouchesMoved (NSSet touches, UIEvent event) {\r
                super.TouchesMoved(touches, event);\r
                input.touchMoved(touches, event);\r
        }\r
-}
\ No newline at end of file
+}\r
index 8e09a69..bb947c9 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
  ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.ios;\r
 \r
 import cli.MonoTouch.Foundation.NSObject;\r
@@ -42,213 +43,210 @@ public class IOSInput implements Input {
        boolean justTouched = false;\r
        Pool<TouchEvent> touchEventPool = new Pool<TouchEvent>() {\r
                @Override\r
-               protected TouchEvent newObject() {\r
+               protected TouchEvent newObject () {\r
                        return new TouchEvent();\r
                }\r
        };\r
        Array<TouchEvent> touchEvents = new Array<TouchEvent>();\r
        TouchEvent currentEvent = null;\r
        InputProcessor inputProcessor = null;\r
-       \r
+\r
        @Override\r
-       public float getAccelerometerX() {\r
+       public float getAccelerometerX () {\r
                return 0;\r
        }\r
 \r
        @Override\r
-       public float getAccelerometerY() {\r
+       public float getAccelerometerY () {\r
                return 0;\r
        }\r
 \r
        @Override\r
-       public float getAccelerometerZ() {\r
+       public float getAccelerometerZ () {\r
                return 0;\r
        }\r
 \r
        @Override\r
-       public float getAzimuth() {\r
+       public float getAzimuth () {\r
                return 0;\r
        }\r
 \r
        @Override\r
-       public float getPitch() {\r
+       public float getPitch () {\r
                return 0;\r
        }\r
 \r
        @Override\r
-       public float getRoll() {\r
+       public float getRoll () {\r
                return 0;\r
        }\r
 \r
        @Override\r
-       public void getRotationMatrix(float[] matrix) {\r
+       public void getRotationMatrix (float[] matrix) {\r
        }\r
 \r
        @Override\r
-       public int getX() {\r
+       public int getX () {\r
                return touchX[0];\r
        }\r
 \r
        @Override\r
-       public int getX(int pointer) {\r
+       public int getX (int pointer) {\r
                return touchX[pointer];\r
        }\r
 \r
        @Override\r
-       public int getDeltaX() {\r
+       public int getDeltaX () {\r
                return deltaX[0];\r
        }\r
 \r
        @Override\r
-       public int getDeltaX(int pointer) {\r
+       public int getDeltaX (int pointer) {\r
                return deltaX[pointer];\r
        }\r
 \r
        @Override\r
-       public int getY() {\r
+       public int getY () {\r
                return touchY[0];\r
        }\r
 \r
        @Override\r
-       public int getY(int pointer) {\r
+       public int getY (int pointer) {\r
                return touchY[pointer];\r
        }\r
 \r
        @Override\r
-       public int getDeltaY() {\r
+       public int getDeltaY () {\r
                return deltaY[0];\r
        }\r
 \r
        @Override\r
-       public int getDeltaY(int pointer) {\r
+       public int getDeltaY (int pointer) {\r
                return deltaY[pointer];\r
        }\r
 \r
        @Override\r
-       public boolean isTouched() {\r
+       public boolean isTouched () {\r
                return touchDown[0] != 0;\r
        }\r
 \r
        @Override\r
-       public boolean justTouched() {\r
+       public boolean justTouched () {\r
                return justTouched;\r
        }\r
 \r
        @Override\r
-       public boolean isTouched(int pointer) {\r
+       public boolean isTouched (int pointer) {\r
                return touchDown[pointer] != 0;\r
        }\r
 \r
        @Override\r
-       public boolean isButtonPressed(int button) {\r
+       public boolean isButtonPressed (int button) {\r
                return button == Buttons.LEFT && numTouched > 0;\r
        }\r
 \r
        @Override\r
-       public boolean isKeyPressed(int key) {\r
+       public boolean isKeyPressed (int key) {\r
                return false;\r
        }\r
 \r
        @Override\r
-       public void getTextInput(TextInputListener listener, String title,\r
-                       String text) {\r
+       public void getTextInput (TextInputListener listener, String title, String text) {\r
        }\r
 \r
        @Override\r
-       public void getPlaceholderTextInput(TextInputListener listener,\r
-                       String title, String placeholder) {\r
+       public void getPlaceholderTextInput (TextInputListener listener, String title, String placeholder) {\r
        }\r
 \r
        @Override\r
-       public void setOnscreenKeyboardVisible(boolean visible) {\r
+       public void setOnscreenKeyboardVisible (boolean visible) {\r
        }\r
 \r
        @Override\r
-       public void vibrate(int milliseconds) {\r
+       public void vibrate (int milliseconds) {\r
        }\r
 \r
        @Override\r
-       public void vibrate(long[] pattern, int repeat) {\r
+       public void vibrate (long[] pattern, int repeat) {\r
        }\r
 \r
        @Override\r
-       public void cancelVibrate() {\r
+       public void cancelVibrate () {\r
        }\r
 \r
        @Override\r
-       public long getCurrentEventTime() {\r
+       public long getCurrentEventTime () {\r
                return currentEvent.timestamp;\r
        }\r
 \r
        @Override\r
-       public void setCatchBackKey(boolean catchBack) {\r
+       public void setCatchBackKey (boolean catchBack) {\r
        }\r
 \r
        @Override\r
-       public void setCatchMenuKey(boolean catchMenu) {\r
+       public void setCatchMenuKey (boolean catchMenu) {\r
        }\r
 \r
        @Override\r
-       public void setInputProcessor(InputProcessor processor) {\r
+       public void setInputProcessor (InputProcessor processor) {\r
                this.inputProcessor = processor;\r
        }\r
 \r
        @Override\r
-       public InputProcessor getInputProcessor() {\r
+       public InputProcessor getInputProcessor () {\r
                return inputProcessor;\r
        }\r
 \r
        @Override\r
-       public boolean isPeripheralAvailable(Peripheral peripheral) {\r
+       public boolean isPeripheralAvailable (Peripheral peripheral) {\r
                return false;\r
        }\r
 \r
        @Override\r
-       public int getRotation() {\r
+       public int getRotation () {\r
                return 0;\r
        }\r
 \r
        @Override\r
-       public Orientation getNativeOrientation() {\r
+       public Orientation getNativeOrientation () {\r
                return null;\r
        }\r
 \r
        @Override\r
-       public void setCursorCatched(boolean catched) {\r
+       public void setCursorCatched (boolean catched) {\r
        }\r
 \r
        @Override\r
-       public boolean isCursorCatched() {\r
+       public boolean isCursorCatched () {\r
                return false;\r
        }\r
 \r
        @Override\r
-       public void setCursorPosition(int x, int y) {\r
+       public void setCursorPosition (int x, int y) {\r
        }\r
 \r
-       public void touchDown(NSSet touches, UIEvent event) {\r
+       public void touchDown (NSSet touches, UIEvent event) {\r
                toTouchEvents(touches, event);\r
        }\r
 \r
-       public void touchUp(NSSet touches, UIEvent event) {\r
+       public void touchUp (NSSet touches, UIEvent event) {\r
                toTouchEvents(touches, event);\r
        }\r
 \r
-       public void touchMoved(NSSet touches, UIEvent event) {\r
+       public void touchMoved (NSSet touches, UIEvent event) {\r
                toTouchEvents(touches, event);\r
        }\r
-       \r
-       void processEvents() {\r
-               synchronized(touchEvents) {\r
+\r
+       void processEvents () {\r
+               synchronized (touchEvents) {\r
                        justTouched = false;\r
-                       if(inputProcessor != null) {\r
-                               for(TouchEvent event: touchEvents) {\r
+                       if (inputProcessor != null) {\r
+                               for (TouchEvent event : touchEvents) {\r
                                        currentEvent = event;\r
-                                       switch(event.phase) {\r
+                                       switch (event.phase) {\r
                                        case UITouchPhase.Began:\r
                                                inputProcessor.touchDown(event.x, event.y, event.pointer, Buttons.LEFT);\r
-                                               if(numTouched == 1)\r
-                                                       justTouched = true;\r
+                                               if (numTouched == 1) justTouched = true;\r
                                                break;\r
                                        case UITouchPhase.Cancelled:\r
                                        case UITouchPhase.Ended:\r
@@ -265,42 +263,40 @@ public class IOSInput implements Input {
                        touchEvents.clear();\r
                }\r
        }\r
-       \r
+\r
        NSSetEnumerator touchEnumerator = new NSSetEnumerator(new NSSetEnumerator.Method() {\r
-               public void Invoke(NSObject obj, boolean[] stop) {\r
-                       UITouch touch = (UITouch) obj;\r
+               public void Invoke (NSObject obj, boolean[] stop) {\r
+                       UITouch touch = (UITouch)obj;\r
                        PointF loc = touch.LocationInView(touch.get_View());\r
-                       synchronized(touchEvents) {\r
+                       synchronized (touchEvents) {\r
                                TouchEvent event = touchEventPool.obtain();\r
                                event.x = (int)loc.get_X();\r
                                event.y = (int)loc.get_Y();\r
                                event.phase = touch.get_Phase().Value;\r
                                event.timestamp = (long)(touch.get_Timestamp() * 1000000000);\r
                                touchEvents.add(event);\r
-                               \r
-                               if(touch.get_Phase().Value == UITouchPhase.Began) {\r
+\r
+                               if (touch.get_Phase().Value == UITouchPhase.Began) {\r
                                        event.pointer = getFreePointer();\r
                                        touchDown[event.pointer] = touch.get_Handle().ToInt32();\r
                                        touchX[event.pointer] = event.x;\r
                                        touchY[event.pointer] = event.y;\r
                                        deltaX[event.pointer] = 0;\r
-                                       deltaY[event.pointer] = 0; \r
+                                       deltaY[event.pointer] = 0;\r
                                        numTouched++;\r
                                }\r
-                               \r
-                               if(touch.get_Phase().Value == UITouchPhase.Moved ||\r
-                                       touch.get_Phase().Value == UITouchPhase.Stationary) {\r
+\r
+                               if (touch.get_Phase().Value == UITouchPhase.Moved || touch.get_Phase().Value == UITouchPhase.Stationary) {\r
                                        event.pointer = findPointer(touch);\r
                                        deltaX[event.pointer] = event.x - touchX[event.pointer];\r
-                                       deltaY[event.pointer] = event.y - touchY[event.pointer]; \r
+                                       deltaY[event.pointer] = event.y - touchY[event.pointer];\r
                                        touchX[event.pointer] = event.x;\r
                                        touchY[event.pointer] = event.y;\r
                                }\r
-                               \r
-                               if(touch.get_Phase().Value == UITouchPhase.Cancelled ||\r
-                                       touch.get_Phase().Value == UITouchPhase.Ended) {\r
+\r
+                               if (touch.get_Phase().Value == UITouchPhase.Cancelled || touch.get_Phase().Value == UITouchPhase.Ended) {\r
                                        event.pointer = findPointer(touch);\r
-                                       touchDown[event.pointer] = 0; \r
+                                       touchDown[event.pointer] = 0;\r
                                        touchX[event.pointer] = event.x;\r
                                        touchY[event.pointer] = event.y;\r
                                        deltaX[event.pointer] = 0;\r
@@ -311,30 +307,30 @@ public class IOSInput implements Input {
                        stop[0] = false;\r
                }\r
        });\r
-       \r
-       private int getFreePointer() {\r
-               for(int i = 0; i < touchDown.length; i++) {\r
-                       if(touchDown[i] == 0) return i;\r
+\r
+       private int getFreePointer () {\r
+               for (int i = 0; i < touchDown.length; i++) {\r
+                       if (touchDown[i] == 0) return i;\r
                }\r
                throw new GdxRuntimeException("Couldn't find free pointer id!");\r
        }\r
-       \r
-       private int findPointer(UITouch touch) {\r
+\r
+       private int findPointer (UITouch touch) {\r
                int ptr = touch.get_Handle().ToInt32();\r
-               for(int i = 0; i < touchDown.length; i++) {\r
-                       if(touchDown[i] == ptr) return i;\r
+               for (int i = 0; i < touchDown.length; i++) {\r
+                       if (touchDown[i] == ptr) return i;\r
                }\r
                throw new GdxRuntimeException("Couldn't find pointer id for touch event!");\r
        }\r
 \r
-       private void toTouchEvents(NSSet touches, UIEvent event) {\r
+       private void toTouchEvents (NSSet touches, UIEvent event) {\r
                touches.Enumerate(touchEnumerator);\r
        }\r
-       \r
+\r
        static class TouchEvent {\r
                int phase;\r
                long timestamp;\r
                int x, y;\r
                int pointer;\r
        }\r
-}
\ No newline at end of file
+}\r
index 835a538..45ded8a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.ios;
-
-import com.badlogic.gdx.audio.Music;
-
-public class IOSMusic implements Music {
-
-       @Override
-       public void play() {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void pause() {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void stop() {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public boolean isPlaying() {
-               // TODO Auto-generated method stub
-               return false;
-       }
-
-       @Override
-       public void setLooping(boolean isLooping) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public boolean isLooping() {
-               // TODO Auto-generated method stub
-               return false;
-       }
-
-       @Override
-       public void setVolume(float volume) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public float getPosition() {
-               // TODO Auto-generated method stub
-               return 0;
-       }
-
-       @Override
-       public void dispose() {
-               // TODO Auto-generated method stub
-               
-       }
-
-}
\ No newline at end of file
+ ******************************************************************************/\r
+\r
+package com.badlogic.gdx.backends.ios;\r
+\r
+import com.badlogic.gdx.audio.Music;\r
+\r
+public class IOSMusic implements Music {\r
+\r
+       @Override\r
+       public void play () {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void pause () {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void stop () {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public boolean isPlaying () {\r
+               // TODO Auto-generated method stub\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public void setLooping (boolean isLooping) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public boolean isLooping () {\r
+               // TODO Auto-generated method stub\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public void setVolume (float volume) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public float getPosition () {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public void dispose () {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+}\r
index 463af16..ae5c8e8 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.ios;
-
-import com.badlogic.gdx.audio.Sound;
-
-public class IOSSound implements Sound {
-
-       @Override
-       public long play() {
-               // TODO Auto-generated method stub
-               return 0;
-       }
-
-       @Override
-       public long play(float volume) {
-               // TODO Auto-generated method stub
-               return 0;
-       }
-
-       @Override
-       public long play(float volume, float pitch, float pan) {
-               // TODO Auto-generated method stub
-               return 0;
-       }
-
-       @Override
-       public long loop() {
-               // TODO Auto-generated method stub
-               return 0;
-       }
-
-       @Override
-       public long loop(float volume) {
-               // TODO Auto-generated method stub
-               return 0;
-       }
-
-       @Override
-       public long loop(float volume, float pitch, float pan) {
-               // TODO Auto-generated method stub
-               return 0;
-       }
-
-       @Override
-       public void stop() {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void dispose() {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void stop(long soundId) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void setLooping(long soundId, boolean looping) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void setPitch(long soundId, float pitch) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void setVolume(long soundId, float volume) {
-               // TODO Auto-generated method stub
-               
-       }
-
-       @Override
-       public void setPan(long soundId, float pan, float volume) {
-               // TODO Auto-generated method stub
-               
-       }
-
-}
\ No newline at end of file
+ ******************************************************************************/\r
+\r
+package com.badlogic.gdx.backends.ios;\r
+\r
+import com.badlogic.gdx.audio.Sound;\r
+\r
+public class IOSSound implements Sound {\r
+\r
+       @Override\r
+       public long play () {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public long play (float volume) {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public long play (float volume, float pitch, float pan) {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public long loop () {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public long loop (float volume) {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public long loop (float volume, float pitch, float pan) {\r
+               // TODO Auto-generated method stub\r
+               return 0;\r
+       }\r
+\r
+       @Override\r
+       public void stop () {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void dispose () {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void stop (long soundId) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void setLooping (long soundId, boolean looping) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void setPitch (long soundId, float pitch) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void setVolume (long soundId, float volume) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+       @Override\r
+       public void setPan (long soundId, float pan, float volume) {\r
+               // TODO Auto-generated method stub\r
+\r
+       }\r
+\r
+}\r
index 5a89c3e..ba8353a 100644 (file)
@@ -126,22 +126,22 @@ public class JoglAnimator {
         * lightweight widgets are continually being redrawn. */\r
        protected void display () {\r
                Iterator iter = drawableIterator();\r
-               \r
+\r
                // wait for a notification if we are non-continuous\r
-               if(!isContinuous) {\r
+               if (!isContinuous) {\r
                        boolean needToWait = true;\r
-                       while(needToWait) {\r
+                       while (needToWait) {\r
                                try {\r
-                                       synchronized(contMonitor) {\r
+                                       synchronized (contMonitor) {\r
                                                contMonitor.wait();\r
                                        }\r
                                        needToWait = false;\r
-                               } catch(InterruptedException e) {\r
+                               } catch (InterruptedException e) {\r
                                        needToWait = false;\r
-                               } \r
+                               }\r
                        }\r
                }\r
-               \r
+\r
                while (iter.hasNext()) {\r
                        GLAutoDrawable drawable = (GLAutoDrawable)iter.next();\r
                        if (drawable instanceof JComponent) {\r
@@ -323,7 +323,7 @@ public class JoglAnimator {
 \r
        public void setContinuousRendering (boolean isContinuous) {\r
                this.isContinuous = isContinuous;\r
-               synchronized(contMonitor) {\r
+               synchronized (contMonitor) {\r
                        contMonitor.notifyAll();\r
                }\r
        }\r
@@ -333,7 +333,7 @@ public class JoglAnimator {
        }\r
 \r
        public void requestRendering () {\r
-               synchronized(contMonitor) {\r
+               synchronized (contMonitor) {\r
                        contMonitor.notifyAll();\r
                }\r
        }\r
index 1fdbf77..f6a5fd2 100644 (file)
@@ -267,14 +267,14 @@ public final class JoglApplication implements Application {
                        Gdx.graphics.requestRendering();\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public void debug (String tag, String message) {\r
                if (logLevel >= LOG_DEBUG) {\r
                        System.out.println(tag + ": " + message);\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public void debug (String tag, String message, Throwable exception) {\r
                if (logLevel >= LOG_DEBUG) {\r
index d86552c..14550ac 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.jogl;\r
 \r
 import java.awt.GraphicsDevice;\r
@@ -101,4 +102,4 @@ public class JoglApplicationConfiguration {
 \r
                return modes.toArray(new DisplayMode[modes.size()]);\r
        }\r
-}
\ No newline at end of file
+}\r
index 12cf9b7..beb7836 100644 (file)
@@ -37,7 +37,7 @@ public class JoglFileHandle extends FileHandle {
                if (file.getPath().length() == 0) return new JoglFileHandle(new File(name), type);\r
                return new JoglFileHandle(new File(file, name), type);\r
        }\r
-       \r
+\r
        public FileHandle sibling (String name) {\r
                if (file.getPath().length() == 0) throw new GdxRuntimeException("Cannot get the sibling of the root.");\r
                return new JoglFileHandle(new File(file.getParent(), name), type);\r
index 12e5c6f..dd3d84c 100644 (file)
@@ -53,7 +53,7 @@ final class JoglFiles implements Files {
        public FileHandle local (String path) {\r
                return new JoglFileHandle(path, FileType.Local);\r
        }\r
-       \r
+\r
        @Override\r
        public String getExternalStoragePath () {\r
                return externalPath;\r
@@ -63,7 +63,7 @@ final class JoglFiles implements Files {
        public boolean isExternalStorageAvailable () {\r
                return true;\r
        }\r
-       \r
+\r
        @Override\r
        public String getLocalStoragePath () {\r
                return "";\r
@@ -72,5 +72,5 @@ final class JoglFiles implements Files {
        @Override\r
        public boolean isLocalStorageAvailable () {\r
                return true;\r
-       }       \r
+       }\r
 }\r
index 42ce6ff..06b2242 100644 (file)
@@ -348,7 +348,7 @@ final class JoglGL20 implements GL20 {
 \r
        @Override\r
        public void glGetBooleanv (int pname, Buffer params) {\r
-               if(!(params instanceof ByteBuffer)) throw new GdxRuntimeException("params must be a direct ByteBuffer");\r
+               if (!(params instanceof ByteBuffer)) throw new GdxRuntimeException("params must be a direct ByteBuffer");\r
                gl.glGetBooleanv(pname, (ByteBuffer)params);\r
        }\r
 \r
index ba7537d..bb493f3 100644 (file)
@@ -24,7 +24,6 @@ import java.awt.Dimension;
 import java.awt.GraphicsDevice;\r
 import java.awt.GraphicsEnvironment;\r
 import java.awt.Toolkit;\r
-import java.util.List;\r
 \r
 import javax.media.opengl.GLAutoDrawable;\r
 import javax.media.opengl.GLCanvas;\r
@@ -38,7 +37,6 @@ import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.Graphics;\r
 import com.badlogic.gdx.backends.openal.OpenALAudio;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.Pixmap;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
 /** Implements the {@link Graphics} interface with Jogl.\r
@@ -110,12 +108,11 @@ public class JoglGraphics extends JoglGraphicsBase implements GLEventListener {
                                        app.executedRunnables.clear();\r
                                        app.executedRunnables.addAll(app.runnables);\r
                                        app.runnables.clear();\r
-                                       \r
+\r
                                        for (int i = 0; i < app.executedRunnables.size(); i++) {\r
                                                try {\r
                                                        app.executedRunnables.get(i).run();\r
-                                               }\r
-                                               catch(Throwable t) {\r
+                                               } catch (Throwable t) {\r
                                                        t.printStackTrace();\r
                                                }\r
                                        }\r
index 5a23d53..f788703 100644 (file)
@@ -143,7 +143,7 @@ public abstract class JoglGraphicsBase implements Graphics, GLEventListener {
        public float getDeltaTime () {\r
                return deltaTime;\r
        }\r
-       \r
+\r
        @Override\r
        public float getRawDeltaTime () {\r
                return deltaTime;\r
@@ -203,7 +203,7 @@ public abstract class JoglGraphicsBase implements Graphics, GLEventListener {
        public GraphicsType getType () {\r
                return GraphicsType.JoglGL;\r
        }\r
-       \r
+\r
        @Override\r
        public void setContinuousRendering (boolean isContinuous) {\r
                animator.setContinuousRendering(isContinuous);\r
index d7818e4..daec1c7 100644 (file)
@@ -18,10 +18,7 @@ package com.badlogic.gdx.backends.lwjgl;
 
 import java.awt.Canvas;
 import java.awt.Dimension;
-import java.awt.EventQueue;
 import java.awt.GraphicsEnvironment;
-import java.awt.event.ComponentEvent;
-import java.awt.event.ComponentListener;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -37,7 +34,6 @@ import com.badlogic.gdx.Audio;
 import com.badlogic.gdx.Files;
 import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.Graphics;
-import com.badlogic.gdx.Graphics.DisplayMode;
 import com.badlogic.gdx.Input;
 import com.badlogic.gdx.Preferences;
 import com.badlogic.gdx.backends.openal.OpenALAudio;
@@ -64,24 +60,19 @@ public class LwjglAWTCanvas implements Application {
                this(listener, useGL2, null);
        }
 
-       public LwjglAWTCanvas (ApplicationListener listener, boolean useGL2,
-                       LwjglAWTCanvas sharedContextCanvas) {
+       public LwjglAWTCanvas (ApplicationListener listener, boolean useGL2, LwjglAWTCanvas sharedContextCanvas) {
                LwjglNativesLoader.load();
 
-               AWTGLCanvas sharedDrawable = sharedContextCanvas != null ?
-                       sharedContextCanvas.canvas : null;
+               AWTGLCanvas sharedDrawable = sharedContextCanvas != null ? sharedContextCanvas.canvas : null;
                try {
-                       canvas = new AWTGLCanvas(
-                               GraphicsEnvironment.getLocalGraphicsEnvironment()
-                                       .getDefaultScreenDevice(),
-                                       new PixelFormat(),
-                                       sharedDrawable) {
+                       canvas = new AWTGLCanvas(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(), new PixelFormat(),
+                               sharedDrawable) {
                                private final Dimension minSize = new Dimension(0, 0);
 
                                public Dimension getMinimumSize () {
                                        return minSize;
                                }
-                       
+
                                @Override
                                public void initGL () {
                                        start();
@@ -126,7 +117,7 @@ public class LwjglAWTCanvas implements Application {
                } else {
                        audio = null;
                }
-               if(Gdx.files == null) {
+               if (Gdx.files == null) {
                        files = new LwjglFiles();
                        Gdx.files = files;
                } else {
@@ -177,11 +168,11 @@ public class LwjglAWTCanvas implements Application {
        public int getVersion () {
                return 0;
        }
-       
-       void setGlobals() {
+
+       void setGlobals () {
                Gdx.app = this;
-               if(audio != null) Gdx.audio = audio;
-               if(files != null) Gdx.files = files;
+               if (audio != null) Gdx.audio = audio;
+               if (files != null) Gdx.files = files;
                Gdx.graphics = graphics;
                Gdx.input = input;
        }
@@ -336,17 +327,15 @@ public class LwjglAWTCanvas implements Application {
                        }
                });
        }
-       
-   /**
-    * Make the canvas' context current. It is highly recommended that the context
-    * is only made current inside the AWT thread (for example in an overridden paintGL()).
-    */
-   public void makeCurrent() {
-      try {
-         canvas.makeCurrent();
-         setGlobals();
-      } catch (LWJGLException ex) {
-         throw new GdxRuntimeException(ex);
-      }
-   }
+
+       /** Make the canvas' context current. It is highly recommended that the context is only made current inside the AWT thread (for
+        * example in an overridden paintGL()). */
+       public void makeCurrent () {
+               try {
+                       canvas.makeCurrent();
+                       setGlobals();
+               } catch (LWJGLException ex) {
+                       throw new GdxRuntimeException(ex);
+               }
+       }
 }
index 6116666..8742fb8 100644 (file)
@@ -59,7 +59,6 @@ import javax.swing.event.DocumentListener;
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Input;\r
 import com.badlogic.gdx.InputProcessor;\r
-import com.badlogic.gdx.Input.Buttons;\r
 import com.badlogic.gdx.utils.Pool;\r
 \r
 public class LwjglAWTInput implements Input, MouseMotionListener, MouseListener, MouseWheelListener, KeyListener {\r
index cf33d04..fe10bd3 100644 (file)
@@ -33,8 +33,8 @@ public class LwjglApplet extends Applet {
                public LwjglAppletApplication (ApplicationListener listener, boolean useGL2, Canvas canvas) {\r
                        super(listener, useGL2, canvas);\r
                }\r
-               \r
-               public LwjglAppletApplication(ApplicationListener listener, Canvas canvas, LwjglApplicationConfiguration config) {\r
+\r
+               public LwjglAppletApplication (ApplicationListener listener, Canvas canvas, LwjglApplicationConfiguration config) {\r
                        super(listener, config, canvas);\r
                }\r
 \r
@@ -43,8 +43,8 @@ public class LwjglApplet extends Applet {
                        return ApplicationType.Applet;\r
                }\r
        }\r
-       \r
-       public LwjglApplet(final ApplicationListener listener, final LwjglApplicationConfiguration config) {\r
+\r
+       public LwjglApplet (final ApplicationListener listener, final LwjglApplicationConfiguration config) {\r
                LwjglNativesLoader.load = false;\r
                canvas = new Canvas() {\r
                        public final void addNotify () {\r
index e428c75..a9c9685 100644 (file)
@@ -30,7 +30,6 @@ import com.badlogic.gdx.ApplicationListener;
 import com.badlogic.gdx.Audio;\r
 import com.badlogic.gdx.Files;\r
 import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.Graphics;\r
 import com.badlogic.gdx.Input;\r
 import com.badlogic.gdx.Preferences;\r
 import com.badlogic.gdx.backends.openal.OpenALAudio;\r
@@ -110,7 +109,7 @@ public class LwjglApplication implements Application {
                Gdx.input = input;\r
                initialize();\r
        }\r
-       \r
+\r
        public LwjglApplication (ApplicationListener listener, LwjglApplicationConfiguration config, Canvas canvas) {\r
                LwjglNativesLoader.load();\r
 \r
@@ -134,7 +133,7 @@ public class LwjglApplication implements Application {
                                graphics.setVSync(graphics.config.vSyncEnabled);\r
                                try {\r
                                        LwjglApplication.this.mainLoop();\r
-                               } catch(Throwable t) {\r
+                               } catch (Throwable t) {\r
                                        audio.dispose();\r
                                        throw new GdxRuntimeException(t);\r
                                }\r
@@ -158,24 +157,23 @@ public class LwjglApplication implements Application {
                int lastHeight = graphics.getHeight();\r
 \r
                graphics.lastTime = System.nanoTime();\r
-               while (running) {                       \r
+               while (running) {\r
                        Display.processMessages();\r
                        if (Display.isCloseRequested()) {\r
                                exit();\r
                        }\r
-                       \r
+\r
                        boolean shouldRender = false;\r
                        synchronized (runnables) {\r
                                executedRunnables.clear();\r
                                executedRunnables.addAll(runnables);\r
                                runnables.clear();\r
-                               \r
+\r
                                for (int i = 0; i < executedRunnables.size(); i++) {\r
                                        shouldRender = true;\r
                                        try {\r
                                                executedRunnables.get(i).run();\r
-                                       }\r
-                                       catch(Throwable t) {\r
+                                       } catch (Throwable t) {\r
                                                t.printStackTrace();\r
                                        }\r
                                }\r
@@ -198,18 +196,18 @@ public class LwjglApplication implements Application {
                                graphics.config.y = Display.getY();\r
                                if (graphics.resize || Display.wasResized() || Display.getWidth() != graphics.config.width\r
                                        || Display.getHeight() != graphics.config.height) {\r
-                                       graphics.resize  = false;\r
+                                       graphics.resize = false;\r
                                        Gdx.gl.glViewport(0, 0, Display.getWidth(), Display.getHeight());\r
                                        graphics.config.width = Display.getWidth();\r
                                        graphics.config.height = Display.getHeight();\r
-                                       if(listener != null) listener.resize(Display.getWidth(), Display.getHeight());\r
+                                       if (listener != null) listener.resize(Display.getWidth(), Display.getHeight());\r
                                        graphics.requestRendering();\r
                                }\r
                        }\r
 \r
                        input.processEvents();\r
                        audio.update();\r
-                       if(shouldRender) {\r
+                       if (shouldRender) {\r
                                graphics.updateTime();\r
                                listener.render();\r
                                Display.update();\r
@@ -298,14 +296,14 @@ public class LwjglApplication implements Application {
                        Gdx.graphics.requestRendering();\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public void debug (String tag, String message) {\r
                if (logLevel >= LOG_DEBUG) {\r
                        System.out.println(tag + ": " + message);\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public void debug (String tag, String message, Throwable exception) {\r
                if (logLevel >= LOG_DEBUG) {\r
index 7bdc781..82589a6 100644 (file)
@@ -18,18 +18,13 @@ package com.badlogic.gdx.backends.lwjgl;
 \r
 import java.awt.GraphicsDevice;\r
 import java.awt.GraphicsEnvironment;\r
-import java.nio.ByteBuffer;\r
 import java.util.ArrayList;\r
 \r
 import com.badlogic.gdx.Files.FileType;\r
 import com.badlogic.gdx.Graphics;\r
 import com.badlogic.gdx.Graphics.DisplayMode;\r
-import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.graphics.Color;\r
-import com.badlogic.gdx.graphics.Pixmap;\r
-import com.badlogic.gdx.graphics.glutils.FileTextureData;\r
 import com.badlogic.gdx.utils.Array;\r
-import com.badlogic.gdx.utils.GdxNativesLoader;\r
 \r
 public class LwjglApplicationConfiguration {\r
        /** whether to use OpenGL ES 2.0 or not. default: false **/\r
index f46ca8f..2fe5bf4 100644 (file)
@@ -32,7 +32,6 @@ import com.badlogic.gdx.Audio;
 import com.badlogic.gdx.Files;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Graphics;\r
-import com.badlogic.gdx.Graphics.DisplayMode;\r
 import com.badlogic.gdx.Input;\r
 import com.badlogic.gdx.Preferences;\r
 import com.badlogic.gdx.backends.openal.OpenALAudio;\r
index 7e6b206..6807f94 100644 (file)
@@ -18,7 +18,6 @@ package com.badlogic.gdx.backends.lwjgl;
 \r
 import java.io.File;\r
 \r
-import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Files.FileType;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
@@ -38,7 +37,7 @@ public final class LwjglFileHandle extends FileHandle {
                if (file.getPath().length() == 0) return new LwjglFileHandle(new File(name), type);\r
                return new LwjglFileHandle(new File(file, name), type);\r
        }\r
-       \r
+\r
        public FileHandle sibling (String name) {\r
                if (file.getPath().length() == 0) throw new GdxRuntimeException("Cannot get the sibling of the root.");\r
                return new LwjglFileHandle(new File(file.getParent(), name), type);\r
index b40290d..bc29a1f 100644 (file)
@@ -53,7 +53,7 @@ public final class LwjglFiles implements Files {
        public FileHandle local (String path) {\r
                return new LwjglFileHandle(path, FileType.Local);\r
        }\r
-       \r
+\r
        @Override\r
        public String getExternalStoragePath () {\r
                return externalPath;\r
@@ -63,7 +63,7 @@ public final class LwjglFiles implements Files {
        public boolean isExternalStorageAvailable () {\r
                return true;\r
        }\r
-       \r
+\r
        @Override\r
        public String getLocalStoragePath () {\r
                return "";\r
@@ -72,5 +72,5 @@ public final class LwjglFiles implements Files {
        @Override\r
        public boolean isLocalStorageAvailable () {\r
                return true;\r
-       }       \r
+       }\r
 }\r
index da5476f..960e162 100644 (file)
@@ -17,8 +17,6 @@
 package com.badlogic.gdx.backends.lwjgl;\r
 \r
 import java.awt.Dimension;\r
-import java.awt.event.WindowAdapter;\r
-import java.awt.event.WindowEvent;\r
 \r
 import javax.swing.JFrame;\r
 \r
index acd4556..a52ce9e 100644 (file)
@@ -424,7 +424,7 @@ class LwjglGL10 implements GL10 {
                if (pixels == null)\r
                        GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, (ByteBuffer)null);\r
                else if (pixels instanceof ByteBuffer)\r
-                        GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, (ByteBuffer)pixels);\r
+                       GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, (ByteBuffer)pixels);\r
                else if (pixels instanceof ShortBuffer)\r
                        GL11.glTexImage2D(target, level, internalformat, width, height, border, format, type, (ShortBuffer)pixels);\r
                else if (pixels instanceof IntBuffer)\r
index a38d48f..3109065 100644 (file)
@@ -694,13 +694,23 @@ final class LwjglGL20 implements com.badlogic.gdx.graphics.GL20 {
 \r
        public void glVertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, Buffer buffer) {\r
                if (buffer instanceof ByteBuffer) {\r
-                       if(type == GL_BYTE) GL20.glVertexAttribPointer(indx, size, false, normalized, stride, (ByteBuffer)buffer);\r
-                       else if(type == GL_UNSIGNED_BYTE) GL20.glVertexAttribPointer(indx, size, true, normalized, stride, (ByteBuffer)buffer);\r
-                       else if(type == GL_SHORT) GL20.glVertexAttribPointer(indx, size, false, normalized, stride, ((ByteBuffer)buffer).asShortBuffer());\r
-                       else if(type == GL_UNSIGNED_SHORT) GL20.glVertexAttribPointer(indx, size, true, normalized, stride, ((ByteBuffer)buffer).asShortBuffer());\r
-                       else if(type == GL_FLOAT) GL20.glVertexAttribPointer(indx, size, normalized, stride, ((ByteBuffer)buffer).asFloatBuffer());\r
-                       else throw new GdxRuntimeException("Can't use " + buffer.getClass().getName()\r
-                               + " with type " + type + " with this method. Use ByteBuffer and one of GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT or GL_FLOAT for type. Blame LWJGL");\r
+                       if (type == GL_BYTE)\r
+                               GL20.glVertexAttribPointer(indx, size, false, normalized, stride, (ByteBuffer)buffer);\r
+                       else if (type == GL_UNSIGNED_BYTE)\r
+                               GL20.glVertexAttribPointer(indx, size, true, normalized, stride, (ByteBuffer)buffer);\r
+                       else if (type == GL_SHORT)\r
+                               GL20.glVertexAttribPointer(indx, size, false, normalized, stride, ((ByteBuffer)buffer).asShortBuffer());\r
+                       else if (type == GL_UNSIGNED_SHORT)\r
+                               GL20.glVertexAttribPointer(indx, size, true, normalized, stride, ((ByteBuffer)buffer).asShortBuffer());\r
+                       else if (type == GL_FLOAT)\r
+                               GL20.glVertexAttribPointer(indx, size, normalized, stride, ((ByteBuffer)buffer).asFloatBuffer());\r
+                       else\r
+                               throw new GdxRuntimeException(\r
+                                       "Can't use "\r
+                                               + buffer.getClass().getName()\r
+                                               + " with type "\r
+                                               + type\r
+                                               + " with this method. Use ByteBuffer and one of GL_BYTE, GL_UNSIGNED_BYTE, GL_SHORT, GL_UNSIGNED_SHORT or GL_FLOAT for type. Blame LWJGL");\r
                } else\r
                        throw new GdxRuntimeException("Can't use " + buffer.getClass().getName()\r
                                + " with this method. Use ByteBuffer instead. Blame LWJGL");\r
index 09c3d61..cf20c0a 100644 (file)
@@ -43,7 +43,6 @@ import org.lwjgl.input.Mouse;
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Input;\r
 import com.badlogic.gdx.InputProcessor;\r
-import com.badlogic.gdx.Input.TextInputListener;\r
 import com.badlogic.gdx.utils.Pool;\r
 \r
 /** An implementation of the {@link Input} interface hooking a Jogl panel for input.\r
index ab1a681..004c1ac 100644 (file)
@@ -27,7 +27,6 @@ import java.util.Map.Entry;
 import java.util.Properties;\r
 \r
 import com.badlogic.gdx.Files.FileType;\r
-import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Preferences;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
index 65af3f4..3eab1f9 100644 (file)
 \r
 package com.badlogic.gdx.backends.gwt;\r
 \r
+import java.awt.Canvas;\r
+import java.awt.Panel;\r
+import java.awt.TextArea;\r
+\r
 import com.badlogic.gdx.Application;\r
 import com.badlogic.gdx.ApplicationListener;\r
 import com.badlogic.gdx.Audio;\r
@@ -27,38 +31,15 @@ import com.badlogic.gdx.Preferences;
 import com.badlogic.gdx.backends.gwt.preloader.Preloader;\r
 import com.badlogic.gdx.backends.gwt.preloader.Preloader.PreloaderCallback;\r
 import com.badlogic.gdx.backends.gwt.soundmanager2.SoundManager;\r
-import com.badlogic.gdx.backends.gwt.soundmanager2.SoundManager.SoundManagerCallback;\r
 import com.badlogic.gdx.graphics.Pixmap;\r
 import com.badlogic.gdx.utils.Array;\r
 import com.badlogic.gdx.utils.ObjectMap;\r
 import com.badlogic.gdx.utils.TimeUtils;\r
-import com.google.gwt.canvas.client.Canvas;\r
-import com.google.gwt.canvas.dom.client.Context2d;\r
-import com.google.gwt.canvas.dom.client.Context2d.TextAlign;\r
-import com.google.gwt.canvas.dom.client.Context2d.TextBaseline;\r
-import com.google.gwt.core.client.EntryPoint;\r
-import com.google.gwt.core.client.GWT;\r
-import com.google.gwt.core.client.JavaScriptObject;\r
-import com.google.gwt.dom.client.Document;\r
-import com.google.gwt.dom.client.Element;\r
-import com.google.gwt.user.client.Timer;\r
-import com.google.gwt.user.client.ui.HasHorizontalAlignment;\r
-import com.google.gwt.user.client.ui.HasVerticalAlignment;\r
-import com.google.gwt.user.client.ui.Label;\r
-import com.google.gwt.user.client.ui.Panel;\r
-import com.google.gwt.user.client.ui.RootPanel;\r
-import com.google.gwt.user.client.ui.TextArea;\r
-import com.google.gwt.user.client.ui.VerticalPanel;\r
-\r
-/**\r
- * Implementation of an {@link Application} based on GWT. Clients have to \r
- * override {@link #getConfig()}, {@link #getApplicationListener()} and\r
- * {@link #getAssetsPath()}. Clients can override the default loading screen\r
- * via {@link #getPreloaderCallback()} and implement any loading screen \r
- * drawing via GWT widgets.\r
- * @author mzechner\r
- *\r
- */\r
+\r
+/** Implementation of an {@link Application} based on GWT. Clients have to override {@link #getConfig()},\r
+ * {@link #getApplicationListener()} and {@link #getAssetsPath()}. Clients can override the default loading screen via\r
+ * {@link #getPreloaderCallback()} and implement any loading screen drawing via GWT widgets.\r
+ * @author mzechner */\r
 public abstract class GwtApplication implements EntryPoint, Application {\r
        private ApplicationListener listener;\r
        private GwtApplicationConfiguration config;\r
@@ -73,16 +54,12 @@ public abstract class GwtApplication implements EntryPoint, Application {
        private static AgentInfo agentInfo;\r
        private ObjectMap<String, Preferences> prefs = new ObjectMap<String, Preferences>();\r
 \r
-       /**\r
-        * @return the configuration for the {@link GwtApplication}.\r
-        */\r
+       /** @return the configuration for the {@link GwtApplication}. */\r
        public abstract GwtApplicationConfiguration getConfig ();\r
 \r
-       /**\r
-        * @return the {@link ApplicationListener} to be run by the {@link GwtApplication}.\r
-        */\r
+       /** @return the {@link ApplicationListener} to be run by the {@link GwtApplication}. */\r
        public abstract ApplicationListener getApplicationListener ();\r
-       \r
+\r
        @Override\r
        public void onModuleLoad () {\r
                this.agentInfo = computeAgentInfo();\r
@@ -113,17 +90,17 @@ public abstract class GwtApplication implements EntryPoint, Application {
                                root = panel;\r
                        }\r
                }\r
-               \r
+\r
                // initialize SoundManager2\r
                SoundManager.init(GWT.getModuleBaseURL(), 9);\r
-               \r
+\r
                // wait for soundmanager to load, this is fugly, but for\r
                // some reason the ontimeout and onerror callbacks are never\r
                // called (function instanceof Function fails, wtf JS?).\r
                new Timer() {\r
                        @Override\r
                        public void run () {\r
-                               if(SoundManager.swfLoaded()) {\r
+                               if (SoundManager.swfLoaded()) {\r
                                        final PreloaderCallback callback = getPreloaderCallback();\r
                                        preloader = new Preloader();\r
                                        preloader.preload("assets.txt", new PreloaderCallback() {\r
@@ -131,19 +108,19 @@ public abstract class GwtApplication implements EntryPoint, Application {
                                                public void loaded (String file, int loaded, int total) {\r
                                                        callback.loaded(file, loaded, total);\r
                                                }\r
-       \r
+\r
                                                @Override\r
                                                public void error (String file) {\r
                                                        callback.error(file);\r
                                                }\r
-       \r
+\r
                                                @Override\r
                                                public void done () {\r
                                                        callback.done();\r
                                                        root.clear();\r
                                                        setupLoop();\r
                                                }\r
-                                       });     \r
+                                       });\r
                                        cancel();\r
                                }\r
                        }\r
@@ -174,7 +151,7 @@ public abstract class GwtApplication implements EntryPoint, Application {
                try {\r
                        listener.create();\r
                        listener.resize(graphics.getWidth(), graphics.getHeight());\r
-               } catch(Throwable t) {\r
+               } catch (Throwable t) {\r
                        error("GwtApplication", "exception: " + t.getMessage(), t);\r
                        t.printStackTrace();\r
                        throw new RuntimeException(t);\r
@@ -211,6 +188,7 @@ public abstract class GwtApplication implements EntryPoint, Application {
        }\r
 \r
        long loadStart = TimeUtils.nanoTime();\r
+\r
        public PreloaderCallback getPreloaderCallback () {\r
                final Canvas canvas = Canvas.createIfSupported();\r
                canvas.setWidth("" + (int)(config.width * 0.7f) + "px");\r
@@ -238,7 +216,7 @@ public abstract class GwtApplication implements EntryPoint, Application {
                                context.setFillStyle(color);\r
                                context.setStrokeStyle(color);\r
                                context.fillRect(0, 0, 300 * (loaded / (float)total) * 0.97f, 70);\r
-                               \r
+\r
                                context.setFillStyle(Pixmap.make(50, 50, 50, 1));\r
                                context.fillText("loading", 300 / 2, 70 / 2);\r
                        }\r
@@ -402,54 +380,54 @@ public abstract class GwtApplication implements EntryPoint, Application {
 \r
        /** kindly borrowed from PlayN **/\r
        private static native AgentInfo computeAgentInfo () /*-{\r
-               var userAgent = navigator.userAgent.toLowerCase();\r
-               return {\r
-                       // browser type flags\r
-                       isFirefox : userAgent.indexOf("firefox") != -1,\r
-                       isChrome : userAgent.indexOf("chrome") != -1,\r
-                       isSafari : userAgent.indexOf("safari") != -1,\r
-                       isOpera : userAgent.indexOf("opera") != -1,\r
-                       isIE : userAgent.indexOf("msie") != -1,\r
-                       // OS type flags\r
-                       isMacOS : userAgent.indexOf("mac") != -1,\r
-                       isLinux : userAgent.indexOf("linux") != -1,\r
-                       isWindows : userAgent.indexOf("win") != -1\r
-               };\r
-       }-*/;\r
+                                                                                                                                                       var userAgent = navigator.userAgent.toLowerCase();\r
+                                                                                                                                                       return {\r
+                                                                                                                                                       // browser type flags\r
+                                                                                                                                                       isFirefox : userAgent.indexOf("firefox") != -1,\r
+                                                                                                                                                       isChrome : userAgent.indexOf("chrome") != -1,\r
+                                                                                                                                                       isSafari : userAgent.indexOf("safari") != -1,\r
+                                                                                                                                                       isOpera : userAgent.indexOf("opera") != -1,\r
+                                                                                                                                                       isIE : userAgent.indexOf("msie") != -1,\r
+                                                                                                                                                       // OS type flags\r
+                                                                                                                                                       isMacOS : userAgent.indexOf("mac") != -1,\r
+                                                                                                                                                       isLinux : userAgent.indexOf("linux") != -1,\r
+                                                                                                                                                       isWindows : userAgent.indexOf("win") != -1\r
+                                                                                                                                                       };\r
+                                                                                                                                                       }-*/;\r
 \r
        /** Returned by {@link #agentInfo}. Kindly borrowed from PlayN. */\r
        public static class AgentInfo extends JavaScriptObject {\r
                public final native boolean isFirefox () /*-{\r
-                       return this.isFirefox;\r
-               }-*/;\r
+                                                                                                                               return this.isFirefox;\r
+                                                                                                                               }-*/;\r
 \r
                public final native boolean isChrome () /*-{\r
-                       return this.isChrome;\r
-               }-*/;\r
+                                                                                                                               return this.isChrome;\r
+                                                                                                                               }-*/;\r
 \r
                public final native boolean isSafari () /*-{\r
-                       return this.isSafari;\r
-               }-*/;\r
+                                                                                                                               return this.isSafari;\r
+                                                                                                                               }-*/;\r
 \r
                public final native boolean isOpera () /*-{\r
-                       return this.isOpera;\r
-               }-*/;\r
+                                                                                                                       return this.isOpera;\r
+                                                                                                                       }-*/;\r
 \r
                public final native boolean isIE () /*-{\r
-                       return this.isIE;\r
-               }-*/;\r
+                                                                                                               return this.isIE;\r
+                                                                                                               }-*/;\r
 \r
                public final native boolean isMacOS () /*-{\r
-                       return this.isMacOS;\r
-               }-*/;\r
+                                                                                                                       return this.isMacOS;\r
+                                                                                                                       }-*/;\r
 \r
                public final native boolean isLinux () /*-{\r
-                       return this.isLinux;\r
-               }-*/;\r
+                                                                                                                       return this.isLinux;\r
+                                                                                                                       }-*/;\r
 \r
                public final native boolean isWindows () /*-{\r
-                       return this.isWindows;\r
-               }-*/;\r
+                                                                                                                               return this.isWindows;\r
+                                                                                                                               }-*/;\r
 \r
                protected AgentInfo () {\r
                }\r
index 651ac58..27e2e60 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
-import com.google.gwt.user.client.ui.Panel;\r
-import com.google.gwt.user.client.ui.TextArea;\r
+import java.awt.Panel;\r
+import java.awt.TextArea;\r
 \r
 public class GwtApplicationConfiguration {\r
        /** the width of the drawing area in pixels **/\r
@@ -29,22 +30,19 @@ public class GwtApplicationConfiguration {
        public boolean antialiasing = false;\r
        /** the framerate to run the game at **/\r
        public int fps = 60;\r
-       /** the Panel to add the WebGL canvas to, can be null in which case\r
-        * a Panel is added automatically to the body element of the DOM **/\r
+       /** the Panel to add the WebGL canvas to, can be null in which case a Panel is added automatically to the body element of the\r
+        * DOM **/\r
        public Panel rootPanel;\r
-       /** the id of a canvas element to be used as the drawing area, can be null\r
-        * in which case a Panel and Canvas are added to the body element of the DOM **/\r
+       /** the id of a canvas element to be used as the drawing area, can be null in which case a Panel and Canvas are added to the\r
+        * body element of the DOM **/\r
        public String canavsId;\r
-        /** a TextArea to log messages to, can be null in which case a TextArea\r
-         * will be added to the body element of the DOM. */\r
+       /** a TextArea to log messages to, can be null in which case a TextArea will be added to the body element of the DOM. */\r
        public TextArea log;\r
-       /** whether to use debugging mode for OpenGL calls. Errors will result in \r
-        * a RuntimeException being thrown.\r
-        */\r
+       /** whether to use debugging mode for OpenGL calls. Errors will result in a RuntimeException being thrown. */\r
        public boolean useDebugGL = false;\r
 \r
        public GwtApplicationConfiguration (int width, int height) {\r
                this.width = width;\r
                this.height = height;\r
        }\r
-}
\ No newline at end of file
+}\r
index 2cd9b80..e152c9c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import com.badlogic.gdx.Audio;\r
@@ -20,10 +21,8 @@ import com.badlogic.gdx.audio.AudioDevice;
 import com.badlogic.gdx.audio.AudioRecorder;\r
 import com.badlogic.gdx.audio.Music;\r
 import com.badlogic.gdx.audio.Sound;\r
-import com.badlogic.gdx.backends.gwt.soundmanager2.SoundManager;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
-import com.google.gwt.core.client.GWT;\r
 \r
 public class GwtAudio implements Audio {\r
        @Override\r
@@ -45,4 +44,4 @@ public class GwtAudio implements Audio {
        public Music newMusic (FileHandle file) {\r
                return new GwtMusic(file);\r
        }\r
-}
\ No newline at end of file
+}\r
index 4356b7d..b5dd15b 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import java.io.BufferedInputStream;\r
@@ -36,15 +37,15 @@ public class GwtFileHandle extends FileHandle {
        public final Preloader preloader;\r
        private final String file;\r
        private final FileType type;\r
-       \r
+\r
        protected GwtFileHandle (Preloader preloader, String fileName, FileType type) {\r
-               if(type != FileType.Internal) throw new GdxRuntimeException("FileType '" + type + "' Not supported in GWT backend");\r
+               if (type != FileType.Internal) throw new GdxRuntimeException("FileType '" + type + "' Not supported in GWT backend");\r
                this.preloader = preloader;\r
                this.file = fileName.replace('\\', '/');\r
                this.type = type;\r
        }\r
-       \r
-       public GwtFileHandle(String path) {\r
+\r
+       public GwtFileHandle (String path) {\r
                this.type = FileType.Internal;\r
                this.preloader = ((GwtApplication)Gdx.app).getPreloader();\r
                this.file = path.replace('\\', '/');\r
@@ -57,7 +58,7 @@ public class GwtFileHandle extends FileHandle {
        public String name () {\r
                int index = file.lastIndexOf('/');\r
                index = Math.max(index, file.lastIndexOf('\\'));\r
-               if(index < 0) return file;\r
+               if (index < 0) return file;\r
                // FIXME for paths\r
                return file.substring(index + 1);\r
        }\r
@@ -75,11 +76,9 @@ public class GwtFileHandle extends FileHandle {
                if (dotIndex == -1) return name;\r
                return name.substring(0, dotIndex);\r
        }\r
-       \r
-       /**\r
-        * @return the path and filename without the extension, e.g. dir/dir2/file.png -> dir/dir2/file\r
-        */\r
-       public String pathWithoutExtension() {\r
+\r
+       /** @return the path and filename without the extension, e.g. dir/dir2/file.png -> dir/dir2/file */\r
+       public String pathWithoutExtension () {\r
                String path = file;\r
                int dotIndex = path.lastIndexOf('.');\r
                if (dotIndex == -1) return path;\r
@@ -100,7 +99,7 @@ public class GwtFileHandle extends FileHandle {
         * @throw GdxRuntimeException if the file handle represents a directory, doesn't exist, or could not be read. */\r
        public InputStream read () {\r
                InputStream in = preloader.read(file);\r
-               if(in == null) throw new GdxRuntimeException(file + " does not exist");\r
+               if (in == null) throw new GdxRuntimeException(file + " does not exist");\r
                return in;\r
        }\r
 \r
@@ -147,7 +146,7 @@ public class GwtFileHandle extends FileHandle {
        /** Reads the entire file into a string using the specified charset.\r
         * @throw GdxRuntimeException if the file handle represents a directory, doesn't exist, or could not be read. */\r
        public String readString (String charset) {\r
-               if(preloader.isText(file)) return preloader.texts.get(file);\r
+               if (preloader.isText(file)) return preloader.texts.get(file);\r
                try {\r
                        return new String(readBytes(), "UTF-8");\r
                } catch (UnsupportedEncodingException e) {\r
@@ -311,19 +310,19 @@ public class GwtFileHandle extends FileHandle {
         * @throw GdxRuntimeException if this file handle is a {@link FileType#Classpath} or {@link FileType#Internal} and the child\r
         *        doesn't exist. */\r
        public FileHandle child (String name) {\r
-               return new GwtFileHandle(preloader, file + (file.endsWith("/")?"":"/") + name, FileType.Internal);\r
+               return new GwtFileHandle(preloader, file + (file.endsWith("/") ? "" : "/") + name, FileType.Internal);\r
        }\r
 \r
        public FileHandle parent () {\r
                int index = file.lastIndexOf("/");\r
                String dir = "";\r
-               if(index > 0) dir = file.substring(0, index + 1);\r
+               if (index > 0) dir = file.substring(0, index + 1);\r
                return new GwtFileHandle(preloader, dir, type);\r
        }\r
-       \r
+\r
        public FileHandle sibling (String name) {\r
                name = name.replace('\\', '/');\r
-               return parent().child(name);            \r
+               return parent().child(name);\r
        }\r
 \r
        /** @throw GdxRuntimeException if this file handle is a {@link FileType#Classpath} or {@link FileType#Internal} file. */\r
@@ -384,4 +383,4 @@ public class GwtFileHandle extends FileHandle {
        public String toString () {\r
                return file;\r
        }\r
-}
\ No newline at end of file
+}\r
index 2f2d1fa..62bed0e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import com.badlogic.gdx.Files;\r
@@ -22,14 +23,14 @@ import com.badlogic.gdx.utils.GdxRuntimeException;
 \r
 public class GwtFiles implements Files {\r
        final Preloader preloader;\r
-       \r
-       public GwtFiles(Preloader preloader) {\r
+\r
+       public GwtFiles (Preloader preloader) {\r
                this.preloader = preloader;\r
        }\r
-       \r
+\r
        @Override\r
        public FileHandle getFileHandle (String path, FileType type) {\r
-               if(type != FileType.Internal) throw new GdxRuntimeException("FileType '" + type + "' not supported in GWT backend");\r
+               if (type != FileType.Internal) throw new GdxRuntimeException("FileType '" + type + "' not supported in GWT backend");\r
                return new GwtFileHandle(preloader, path, type);\r
        }\r
 \r
@@ -77,4 +78,4 @@ public class GwtFiles implements Files {
        public boolean isLocalStorageAvailable () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index c12c5ec..2216444 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import java.nio.Buffer;\r
@@ -26,7 +27,6 @@ import java.util.Map;
 import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.Pixmap;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
-import com.google.gwt.core.client.GWT;\r
 import com.google.gwt.typedarrays.client.Float32Array;\r
 import com.google.gwt.typedarrays.client.Int16Array;\r
 import com.google.gwt.typedarrays.client.Int32Array;\r
@@ -41,9 +41,9 @@ import com.google.gwt.webgl.client.WebGLTexture;
 import com.google.gwt.webgl.client.WebGLUniformLocation;\r
 \r
 public class GwtGL20 implements GL20 {\r
-       final   Map<Integer, WebGLProgram> programs = new HashMap<Integer, WebGLProgram>();\r
+       final Map<Integer, WebGLProgram> programs = new HashMap<Integer, WebGLProgram>();\r
        int nextProgramId = 1;\r
-       final   Map<Integer, WebGLShader> shaders = new HashMap<Integer, WebGLShader>();\r
+       final Map<Integer, WebGLShader> shaders = new HashMap<Integer, WebGLShader>();\r
        int nextShaderId = 1;\r
        final Map<Integer, WebGLBuffer> buffers = new HashMap<Integer, WebGLBuffer>();\r
        int nextBufferId = 1;\r
@@ -56,58 +56,58 @@ public class GwtGL20 implements GL20 {
        final Map<Integer, Map<Integer, WebGLUniformLocation>> uniforms = new HashMap<Integer, Map<Integer, WebGLUniformLocation>>();\r
        int nextUniformId = 1;\r
        int currProgram = 0;\r
-       \r
+\r
        Float32Array floatBuffer = Float32Array.create(2000 * 20);\r
        Int16Array shortBuffer = Int16Array.create(2000 * 6);\r
-       \r
+\r
        final WebGLRenderingContext gl;\r
 \r
        protected GwtGL20 (WebGLRenderingContext gl) {\r
                this.gl = gl;\r
                this.gl.pixelStorei(WebGLRenderingContext.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0);\r
        }\r
-       \r
-       private void ensureCapacity(FloatBuffer buffer) {\r
-               if(buffer.remaining() > floatBuffer.getLength()) {\r
+\r
+       private void ensureCapacity (FloatBuffer buffer) {\r
+               if (buffer.remaining() > floatBuffer.getLength()) {\r
                        floatBuffer = Float32Array.create(buffer.remaining());\r
                }\r
        }\r
-       \r
-       private void ensureCapacity(ShortBuffer buffer) {\r
-               if(buffer.remaining() > shortBuffer.getLength()) {\r
+\r
+       private void ensureCapacity (ShortBuffer buffer) {\r
+               if (buffer.remaining() > shortBuffer.getLength()) {\r
                        shortBuffer = Int16Array.create(buffer.remaining());\r
                }\r
        }\r
-       \r
-       public Float32Array copy(FloatBuffer buffer) {\r
-               if(GWT.isProdMode()) {\r
+\r
+       public Float32Array copy (FloatBuffer buffer) {\r
+               if (GWT.isProdMode()) {\r
                        return ((Float32Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());\r
                } else {\r
                        ensureCapacity(buffer);\r
                        float[] array = buffer.array();\r
-                       for(int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {\r
+                       for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {\r
                                floatBuffer.set(j, array[i]);\r
                        }\r
                        return floatBuffer.subarray(0, buffer.remaining());\r
                }\r
        }\r
-       \r
-       public Int16Array copy(ShortBuffer buffer) {\r
-               if(GWT.isProdMode()) {\r
-                       return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());      \r
+\r
+       public Int16Array copy (ShortBuffer buffer) {\r
+               if (GWT.isProdMode()) {\r
+                       return ((Int16Array)((HasArrayBufferView)buffer).getTypedArray()).subarray(buffer.position(), buffer.remaining());\r
                } else {\r
                        ensureCapacity(buffer);\r
                        short[] array = buffer.array();\r
-                       for(int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {\r
+                       for (int i = buffer.position(), j = 0; i < buffer.limit(); i++, j++) {\r
                                shortBuffer.set(j, array[i]);\r
                        }\r
-                       return shortBuffer.subarray(0,  buffer.remaining());\r
+                       return shortBuffer.subarray(0, buffer.remaining());\r
                }\r
        }\r
-       \r
-       private int allocateUniformLocationId(int program, WebGLUniformLocation location) {\r
+\r
+       private int allocateUniformLocationId (int program, WebGLUniformLocation location) {\r
                Map<Integer, WebGLUniformLocation> progUniforms = uniforms.get(program);\r
-               if(progUniforms == null) {\r
+               if (progUniforms == null) {\r
                        progUniforms = new HashMap<Integer, WebGLUniformLocation>();\r
                        uniforms.put(program, progUniforms);\r
                }\r
@@ -116,69 +116,69 @@ public class GwtGL20 implements GL20 {
                progUniforms.put(id, location);\r
                return id;\r
        }\r
-       \r
+\r
        private WebGLUniformLocation getUniformLocation (int location) {\r
                return uniforms.get(currProgram).get(location);\r
        }\r
-       \r
-       private int allocateShaderId(WebGLShader shader) {\r
+\r
+       private int allocateShaderId (WebGLShader shader) {\r
                int id = nextShaderId++;\r
                shaders.put(id, shader);\r
                return id;\r
        }\r
-       \r
-       private void deallocateShaderId(int id) {\r
+\r
+       private void deallocateShaderId (int id) {\r
                shaders.remove(id);\r
        }\r
-       \r
-       private int allocateProgramId(WebGLProgram program) {\r
+\r
+       private int allocateProgramId (WebGLProgram program) {\r
                int id = nextProgramId++;\r
                programs.put(id, program);\r
                return id;\r
        }\r
-       \r
-       private void deallocateProgramId(int id) {\r
+\r
+       private void deallocateProgramId (int id) {\r
                uniforms.remove(id);\r
                programs.remove(id);\r
        }\r
-       \r
-       private int allocateBufferId(WebGLBuffer buffer) {\r
+\r
+       private int allocateBufferId (WebGLBuffer buffer) {\r
                int id = nextBufferId++;\r
                buffers.put(id, buffer);\r
                return id;\r
        }\r
-       \r
-       private void deallocateBufferId(int id) {\r
+\r
+       private void deallocateBufferId (int id) {\r
                buffers.remove(id);\r
        }\r
-       \r
-       private int allocateFrameBufferId(WebGLFramebuffer frameBuffer) {\r
+\r
+       private int allocateFrameBufferId (WebGLFramebuffer frameBuffer) {\r
                int id = nextBufferId++;\r
                frameBuffers.put(id, frameBuffer);\r
                return id;\r
        }\r
-       \r
-       private void deallocateFrameBufferId(int id) {\r
+\r
+       private void deallocateFrameBufferId (int id) {\r
                frameBuffers.remove(id);\r
        }\r
-       \r
-       private int allocateRenderBufferId(WebGLRenderbuffer renderBuffer) {\r
+\r
+       private int allocateRenderBufferId (WebGLRenderbuffer renderBuffer) {\r
                int id = nextRenderBufferId++;\r
                renderBuffers.put(id, renderBuffer);\r
                return id;\r
        }\r
-       \r
-       private void deallocateRenderBufferId(int id) {\r
+\r
+       private void deallocateRenderBufferId (int id) {\r
                renderBuffers.remove(id);\r
        }\r
-       \r
-       private int allocateTextureId(WebGLTexture texture) {\r
+\r
+       private int allocateTextureId (WebGLTexture texture) {\r
                int id = nextTextureId++;\r
                textures.put(id, texture);\r
                return id;\r
        }\r
-       \r
-       private void deallocateTextureId(int id) {\r
+\r
+       private void deallocateTextureId (int id) {\r
                textures.remove(id);\r
        }\r
 \r
@@ -251,7 +251,7 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glDeleteTextures (int n, IntBuffer textures) {\r
-               for(int i = 0; i < n; i++) {\r
+               for (int i = 0; i < n; i++) {\r
                        int id = textures.get();\r
                        WebGLTexture texture = this.textures.get(id);\r
                        deallocateTextureId(id);\r
@@ -452,9 +452,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glBufferData (int target, int size, Buffer data, int usage) {\r
-               if(data instanceof FloatBuffer) {\r
+               if (data instanceof FloatBuffer) {\r
                        gl.bufferData(target, copy((FloatBuffer)data), usage);\r
-               } else if(data instanceof ShortBuffer) {\r
+               } else if (data instanceof ShortBuffer) {\r
                        gl.bufferData(target, copy((ShortBuffer)data), usage);\r
                } else {\r
                        throw new GdxRuntimeException("Can only cope with FloatBuffer and ShortBuffer at the moment");\r
@@ -463,9 +463,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glBufferSubData (int target, int offset, int size, Buffer data) {\r
-               if(data instanceof FloatBuffer) {\r
+               if (data instanceof FloatBuffer) {\r
                        gl.bufferSubData(target, offset, copy((FloatBuffer)data));\r
-               } else if(data instanceof ShortBuffer) {\r
+               } else if (data instanceof ShortBuffer) {\r
                        gl.bufferSubData(target, offset, copy((ShortBuffer)data));\r
                } else {\r
                        throw new GdxRuntimeException("Can only cope with FloatBuffer and ShortBuffer at the moment");\r
@@ -497,7 +497,7 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glDeleteBuffers (int n, IntBuffer buffers) {\r
-               for(int i = 0; i < n; i++) {\r
+               for (int i = 0; i < n; i++) {\r
                        int id = buffers.get();\r
                        WebGLBuffer buffer = this.buffers.get(id);\r
                        deallocateBufferId(id);\r
@@ -507,7 +507,7 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glDeleteFramebuffers (int n, IntBuffer framebuffers) {\r
-               for(int i = 0; i < n; i++) {\r
+               for (int i = 0; i < n; i++) {\r
                        int id = framebuffers.get();\r
                        WebGLFramebuffer fb = this.frameBuffers.get(id);\r
                        deallocateFrameBufferId(id);\r
@@ -524,7 +524,7 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glDeleteRenderbuffers (int n, IntBuffer renderbuffers) {\r
-               for(int i = 0; i < n; i++) {\r
+               for (int i = 0; i < n; i++) {\r
                        int id = renderbuffers.get();\r
                        WebGLRenderbuffer rb = this.renderBuffers.get(id);\r
                        deallocateRenderBufferId(id);\r
@@ -571,7 +571,7 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glGenBuffers (int n, IntBuffer buffers) {\r
-               for(int i = 0; i < n; i++) {\r
+               for (int i = 0; i < n; i++) {\r
                        WebGLBuffer buffer = gl.createBuffer();\r
                        int id = allocateBufferId(buffer);\r
                        buffers.put(id);\r
@@ -585,7 +585,7 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glGenFramebuffers (int n, IntBuffer framebuffers) {\r
-               for(int i = 0; i < n; i++) {\r
+               for (int i = 0; i < n; i++) {\r
                        WebGLFramebuffer fb = gl.createFramebuffer();\r
                        int id = allocateFrameBufferId(fb);\r
                        framebuffers.put(id);\r
@@ -594,7 +594,7 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glGenRenderbuffers (int n, IntBuffer renderbuffers) {\r
-               for(int i = 0; i < n; i++) {\r
+               for (int i = 0; i < n; i++) {\r
                        WebGLRenderbuffer rb = gl.createRenderbuffer();\r
                        int id = allocateRenderBufferId(rb);\r
                        renderbuffers.put(id);\r
@@ -653,9 +653,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glGetProgramiv (int program, int pname, IntBuffer params) {\r
-               if(pname == GL20.GL_DELETE_STATUS || pname == GL20.GL_LINK_STATUS || pname == GL20.GL_VALIDATE_STATUS) {\r
+               if (pname == GL20.GL_DELETE_STATUS || pname == GL20.GL_LINK_STATUS || pname == GL20.GL_VALIDATE_STATUS) {\r
                        boolean result = gl.getProgramParameterb(programs.get(program), pname);\r
-                       params.put(result?GL20.GL_TRUE:GL20.GL_FALSE);\r
+                       params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);\r
                } else {\r
                        params.put(gl.getProgramParameteri(programs.get(program), pname));\r
                }\r
@@ -674,9 +674,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glGetShaderiv (int shader, int pname, IntBuffer params) {\r
-               if(pname == GL20.GL_COMPILE_STATUS || pname == GL20.GL_DELETE_STATUS) {\r
+               if (pname == GL20.GL_COMPILE_STATUS || pname == GL20.GL_DELETE_STATUS) {\r
                        boolean result = gl.getShaderParameterb(shaders.get(shader), pname);\r
-                       params.put(result?GL20.GL_TRUE:GL20.GL_FALSE);\r
+                       params.put(result ? GL20.GL_TRUE : GL20.GL_FALSE);\r
                } else {\r
                        int result = gl.getShaderParameteri(shaders.get(shader), pname);\r
                        params.put(result);\r
@@ -837,7 +837,7 @@ public class GwtGL20 implements GL20 {
        public void glTexParameteriv (int target, int pname, IntBuffer params) {\r
                gl.texParameterf(target, pname, params.get());\r
        }\r
-       \r
+\r
        @Override\r
        public void glUniform1f (int location, float x) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
@@ -847,7 +847,7 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform1fv (int location, int count, FloatBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        gl.uniform1fv(loc, ((Float32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
                } else {\r
                        gl.uniform1fv(loc, v.array());\r
@@ -863,7 +863,7 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform1iv (int location, int count, IntBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        gl.uniform1iv(loc, ((Int32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
                } else {\r
                        gl.uniform1iv(loc, v.array());\r
@@ -879,8 +879,9 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform2fv (int location, int count, FloatBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
-                       gl.uniform2fv(loc, ((Float32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));;\r
+               if (GWT.isProdMode()) {\r
+                       gl.uniform2fv(loc, ((Float32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
+                       ;\r
                } else {\r
                        gl.uniform2fv(loc, v.array());\r
                }\r
@@ -895,7 +896,7 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform2iv (int location, int count, IntBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        gl.uniform2iv(loc, ((Int32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
                } else {\r
                        gl.uniform2iv(loc, v.array());\r
@@ -911,7 +912,7 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform3fv (int location, int count, FloatBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        gl.uniform3fv(loc, ((Float32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
                } else {\r
                        gl.uniform3fv(loc, v.array());\r
@@ -927,7 +928,7 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform3iv (int location, int count, IntBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        gl.uniform3iv(loc, ((Int32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
                } else {\r
                        gl.uniform3iv(loc, v.array());\r
@@ -943,7 +944,7 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform4fv (int location, int count, FloatBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        gl.uniform4fv(loc, ((Float32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
                } else {\r
                        gl.uniform4fv(loc, v.array());\r
@@ -959,7 +960,7 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniform4iv (int location, int count, IntBuffer v) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        gl.uniform4iv(loc, ((Int32Array)((HasArrayBufferView)v).getTypedArray()).subarray(v.position(), v.remaining()));\r
                } else {\r
                        gl.uniform4iv(loc, v.array());\r
@@ -969,8 +970,9 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniformMatrix2fv (int location, int count, boolean transpose, FloatBuffer value) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
-                       gl.uniformMatrix2fv(loc, transpose, ((Float32Array)((HasArrayBufferView)value).getTypedArray()).subarray(value.position(), value.remaining()));\r
+               if (GWT.isProdMode()) {\r
+                       gl.uniformMatrix2fv(loc, transpose,\r
+                               ((Float32Array)((HasArrayBufferView)value).getTypedArray()).subarray(value.position(), value.remaining()));\r
                } else {\r
                        gl.uniformMatrix2fv(loc, transpose, value.array());\r
                }\r
@@ -979,8 +981,9 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniformMatrix3fv (int location, int count, boolean transpose, FloatBuffer value) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
-                       gl.uniformMatrix3fv(loc, transpose, ((Float32Array)((HasArrayBufferView)value).getTypedArray()).subarray(value.position(), value.remaining()));\r
+               if (GWT.isProdMode()) {\r
+                       gl.uniformMatrix3fv(loc, transpose,\r
+                               ((Float32Array)((HasArrayBufferView)value).getTypedArray()).subarray(value.position(), value.remaining()));\r
                } else {\r
                        gl.uniformMatrix3fv(loc, transpose, value.array());\r
                }\r
@@ -989,8 +992,9 @@ public class GwtGL20 implements GL20 {
        @Override\r
        public void glUniformMatrix4fv (int location, int count, boolean transpose, FloatBuffer value) {\r
                WebGLUniformLocation loc = getUniformLocation(location);\r
-               if(GWT.isProdMode()) {\r
-                       gl.uniformMatrix4fv(loc, transpose, ((Float32Array)((HasArrayBufferView)value).getTypedArray()).subarray(value.position(), value.remaining()));\r
+               if (GWT.isProdMode()) {\r
+                       gl.uniformMatrix4fv(loc, transpose,\r
+                               ((Float32Array)((HasArrayBufferView)value).getTypedArray()).subarray(value.position(), value.remaining()));\r
                } else {\r
                        gl.uniformMatrix4fv(loc, transpose, value.array());\r
                }\r
@@ -1014,8 +1018,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glVertexAttrib1fv (int indx, FloatBuffer values) {\r
-               if(GWT.isProdMode()) {\r
-                       gl.vertexAttrib1fv(indx, ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
+               if (GWT.isProdMode()) {\r
+                       gl.vertexAttrib1fv(indx,\r
+                               ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
                } else {\r
                        gl.vertexAttrib1fv(indx, values.array());\r
                }\r
@@ -1028,8 +1033,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glVertexAttrib2fv (int indx, FloatBuffer values) {\r
-               if(GWT.isProdMode()) {\r
-                       gl.vertexAttrib2fv(indx, ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
+               if (GWT.isProdMode()) {\r
+                       gl.vertexAttrib2fv(indx,\r
+                               ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
                } else {\r
                        gl.vertexAttrib2fv(indx, values.array());\r
                }\r
@@ -1042,8 +1048,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glVertexAttrib3fv (int indx, FloatBuffer values) {\r
-               if(GWT.isProdMode()) {\r
-                       gl.vertexAttrib3fv(indx, ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
+               if (GWT.isProdMode()) {\r
+                       gl.vertexAttrib3fv(indx,\r
+                               ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
                } else {\r
                        gl.vertexAttrib3fv(indx, values.array());\r
                }\r
@@ -1056,8 +1063,9 @@ public class GwtGL20 implements GL20 {
 \r
        @Override\r
        public void glVertexAttrib4fv (int indx, FloatBuffer values) {\r
-               if(GWT.isProdMode()) {\r
-                       gl.vertexAttrib4fv(indx, ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
+               if (GWT.isProdMode()) {\r
+                       gl.vertexAttrib4fv(indx,\r
+                               ((Float32Array)((HasArrayBufferView)values).getTypedArray()).subarray(values.position(), values.remaining()));\r
                } else {\r
                        gl.vertexAttrib4fv(indx, values.array());\r
                }\r
@@ -1072,4 +1080,4 @@ public class GwtGL20 implements GL20 {
        public void glVertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, int ptr) {\r
                gl.vertexAttribPointer(indx, size, type, normalized, stride, ptr);\r
        }\r
-}
\ No newline at end of file
+}\r
index dd7ca60..4e85a60 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import java.nio.Buffer;\r
@@ -28,13 +29,13 @@ public class GwtGL20Debug extends GwtGL20 {
                super(gl);\r
        }\r
 \r
-       private void checkError() {\r
+       private void checkError () {\r
                int error = 0;\r
-               if((error = gl.getError()) != GL_NO_ERROR) {\r
+               if ((error = gl.getError()) != GL_NO_ERROR) {\r
                        throw new GdxRuntimeException("GL error: " + error + ", " + Integer.toHexString(error));\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public void glActiveTexture (int texture) {\r
                super.glActiveTexture(texture);\r
@@ -1057,4 +1058,4 @@ public class GwtGL20Debug extends GwtGL20 {
                super.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);\r
                checkError();\r
        }\r
-}
\ No newline at end of file
+}\r
index b85e603..39990f3 100644 (file)
@@ -16,6 +16,9 @@
 \r
 package com.badlogic.gdx.backends.gwt;\r
 \r
+import java.awt.Canvas;\r
+import java.awt.Panel;\r
+\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Graphics;\r
 import com.badlogic.gdx.graphics.GL10;\r
@@ -23,11 +26,7 @@ import com.badlogic.gdx.graphics.GL11;
 import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.GLCommon;\r
 import com.badlogic.gdx.graphics.GLU;\r
-import com.badlogic.gdx.graphics.Pixmap;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
-import com.google.gwt.canvas.client.Canvas;\r
-import com.google.gwt.dom.client.CanvasElement;\r
-import com.google.gwt.user.client.ui.Panel;\r
 import com.google.gwt.webgl.client.WebGLContextAttributes;\r
 import com.google.gwt.webgl.client.WebGLRenderingContext;\r
 \r
@@ -46,22 +45,22 @@ public class GwtGraphics implements Graphics {
 \r
        public GwtGraphics (Panel root, GwtApplicationConfiguration config) {\r
                Canvas canvasWidget = Canvas.createIfSupported();\r
-               if(canvasWidget == null) throw new GdxRuntimeException("Canvas not supported");\r
+               if (canvasWidget == null) throw new GdxRuntimeException("Canvas not supported");\r
                canvas = canvasWidget.getCanvasElement();\r
                root.add(canvasWidget);\r
                canvas.setWidth(config.width);\r
                canvas.setHeight(config.height);\r
                this.config = config;\r
-               \r
+\r
                WebGLContextAttributes attributes = WebGLContextAttributes.create();\r
                attributes.setAntialias(config.antialiasing);\r
                attributes.setStencil(config.stencil);\r
                attributes.setAlpha(false);\r
                attributes.setPremultipliedAlpha(false);\r
-               \r
+\r
                context = WebGLRenderingContext.getContext(canvas, attributes);\r
                context.viewport(0, 0, config.width, config.height);\r
-               this.gl = config.useDebugGL?new GwtGL20Debug(context): new GwtGL20(context);\r
+               this.gl = config.useDebugGL ? new GwtGL20Debug(context) : new GwtGL20(context);\r
        }\r
 \r
        public WebGLRenderingContext getContext () {\r
@@ -155,79 +154,79 @@ public class GwtGraphics implements Graphics {
 \r
        @Override\r
        public DisplayMode[] getDisplayModes () {\r
-               return new DisplayMode[] { new DisplayMode(getScreenWidthJSNI(), getScreenHeightJSNI(), 60, 8){} };\r
-       }\r
-       \r
-       private native int getScreenWidthJSNI() /*-{\r
-               return screen.width;\r
-       }-*/;\r
-       \r
-       private native int getScreenHeightJSNI() /*-{\r
-               return screen.height;\r
-       }-*/;\r
-\r
-       private native boolean isFullscreenJSNI() /*-{\r
-               if("webkitIsFullScreen" in $doc) {\r
-                       return $doc.webkitIsFullScreen;\r
-               }\r
-               if("mozFullScreen" in $doc) {\r
-                       return $doc.mozFullScreen;\r
-               }\r
-               return false\r
-       }-*/;\r
-       \r
-       private void fullscreenChanged() {\r
-               if(!isFullscreen()) {\r
+               return new DisplayMode[] {new DisplayMode(getScreenWidthJSNI(), getScreenHeightJSNI(), 60, 8) {}};\r
+       }\r
+\r
+       private native int getScreenWidthJSNI () /*-{\r
+                                                                                                                       return screen.width;\r
+                                                                                                                       }-*/;\r
+\r
+       private native int getScreenHeightJSNI () /*-{\r
+                                                                                                                       return screen.height;\r
+                                                                                                                       }-*/;\r
+\r
+       private native boolean isFullscreenJSNI () /*-{\r
+                                                                                                                               if("webkitIsFullScreen" in $doc) {\r
+                                                                                                                               return $doc.webkitIsFullScreen;\r
+                                                                                                                               }\r
+                                                                                                                               if("mozFullScreen" in $doc) {\r
+                                                                                                                               return $doc.mozFullScreen;\r
+                                                                                                                               }\r
+                                                                                                                               return false\r
+                                                                                                                               }-*/;\r
+\r
+       private void fullscreenChanged () {\r
+               if (!isFullscreen()) {\r
                        canvas.setWidth(config.width);\r
                        canvas.setHeight(config.height);\r
                }\r
        }\r
-       \r
-       private native boolean setFullscreenJSNI(GwtGraphics graphics, CanvasElement element) /*-{\r
-                if(element.webkitRequestFullScreen) {\r
-                       element.width = screen.width;\r
-                       element.height = screen.height;\r
-                       element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);\r
-                       $doc.addEventListener("webkitfullscreenchange", function() {\r
-                                                       graphics.@com.badlogic.gdx.backends.gwt.GwtGraphics::fullscreenChanged()();\r
-                       }, false);\r
-                       return true;\r
-                }\r
-                if(element.mozRequestFullScreen) {\r
-                       element.width = screen.width;\r
-                       element.height = screen.height;\r
-                       element.mozRequestFullScreen();\r
-                       $doc.addEventListener("mozfullscreenchange", function() {\r
-                                                       graphics.@com.badlogic.gdx.backends.gwt.GwtGraphics::fullscreenChanged()();\r
-                       }, false);\r
-                       return true;\r
-                }\r
-       return false;\r
-       }-*/;\r
-       \r
-       private native void exitFullscreen() /*-{\r
-               if($doc.webkitExitFullscreen) $doc.webkitExitFullscreen();\r
-       if($doc.mozExitFullscreen) $doc.mozExitFullscreen();\r
-       }-*/;\r
-       \r
+\r
+       private native boolean setFullscreenJSNI (GwtGraphics graphics, CanvasElement element) /*-{\r
+                                                                                                                                                                                                                                               if(element.webkitRequestFullScreen) {\r
+                                                                                                                                                                                                                                               element.width = screen.width;\r
+                                                                                                                                                                                                                                               element.height = screen.height;\r
+                                                                                                                                                                                                                                               element.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);\r
+                                                                                                                                                                                                                                               $doc.addEventListener("webkitfullscreenchange", function() {\r
+                                                                                                                                                                                                                                               graphics.@com.badlogic.gdx.backends.gwt.GwtGraphics::fullscreenChanged()();\r
+                                                                                                                                                                                                                                               }, false);\r
+                                                                                                                                                                                                                                               return true;\r
+                                                                                                                                                                                                                                               }\r
+                                                                                                                                                                                                                                               if(element.mozRequestFullScreen) {\r
+                                                                                                                                                                                                                                               element.width = screen.width;\r
+                                                                                                                                                                                                                                               element.height = screen.height;\r
+                                                                                                                                                                                                                                               element.mozRequestFullScreen();\r
+                                                                                                                                                                                                                                               $doc.addEventListener("mozfullscreenchange", function() {\r
+                                                                                                                                                                                                                                               graphics.@com.badlogic.gdx.backends.gwt.GwtGraphics::fullscreenChanged()();\r
+                                                                                                                                                                                                                                               }, false);\r
+                                                                                                                                                                                                                                               return true;\r
+                                                                                                                                                                                                                                               }\r
+                                                                                                                                                                                                                                               return false;\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       private native void exitFullscreen () /*-{\r
+                                                                                                               if($doc.webkitExitFullscreen) $doc.webkitExitFullscreen();\r
+                                                                                                               if($doc.mozExitFullscreen) $doc.mozExitFullscreen();\r
+                                                                                                               }-*/;\r
+\r
        @Override\r
        public DisplayMode getDesktopDisplayMode () {\r
-               return new DisplayMode(getScreenWidthJSNI(), getScreenHeightJSNI(), 60, 8){};\r
+               return new DisplayMode(getScreenWidthJSNI(), getScreenHeightJSNI(), 60, 8) {};\r
        }\r
 \r
        @Override\r
        public boolean setDisplayMode (DisplayMode displayMode) {\r
-               if(displayMode.width != getScreenWidthJSNI() && displayMode.height != getScreenHeightJSNI()) return false;\r
+               if (displayMode.width != getScreenWidthJSNI() && displayMode.height != getScreenHeightJSNI()) return false;\r
                return setFullscreenJSNI(this, canvas);\r
        }\r
 \r
        @Override\r
        public boolean setDisplayMode (int width, int height, boolean fullscreen) {\r
-               if(fullscreen) {\r
-                       if(width != getScreenWidthJSNI() && height != getScreenHeightJSNI()) return false;\r
+               if (fullscreen) {\r
+                       if (width != getScreenWidthJSNI() && height != getScreenHeightJSNI()) return false;\r
                        return setFullscreenJSNI(this, canvas);\r
                } else {\r
-                       if(isFullscreenJSNI()) exitFullscreen();\r
+                       if (isFullscreenJSNI()) exitFullscreen();\r
                        canvas.setWidth(width);\r
                        canvas.setHeight(height);\r
                        return true;\r
@@ -236,7 +235,7 @@ public class GwtGraphics implements Graphics {
 \r
        @Override\r
        public BufferFormat getBufferFormat () {\r
-               return new BufferFormat(8, 8, 8, 0, 16, config.stencil?8:0, 0, false);\r
+               return new BufferFormat(8, 8, 8, 0, 16, config.stencil ? 8 : 0, 0, false);\r
        }\r
 \r
        @Override\r
@@ -251,7 +250,7 @@ public class GwtGraphics implements Graphics {
                lastTimeStamp = currTimeStamp;\r
                time += deltaTime;\r
                frames++;\r
-               if(time > 1) {\r
+               if (time > 1) {\r
                        this.fps = frames;\r
                        time = 0;\r
                        frames = 0;\r
@@ -265,7 +264,7 @@ public class GwtGraphics implements Graphics {
        @Override\r
        public void setVSync (boolean vsync) {\r
        }\r
-       \r
+\r
        @Override\r
        public float getDensity () {\r
                return 96 / 160;\r
index e00aae5..69180f5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import java.util.HashSet;\r
@@ -24,12 +25,6 @@ import com.badlogic.gdx.InputProcessor;
 import com.badlogic.gdx.backends.gwt.widgets.TextInputDialogBox;\r
 import com.badlogic.gdx.backends.gwt.widgets.TextInputDialogBox.TextInputDialogListener;\r
 import com.badlogic.gdx.utils.TimeUtils;\r
-import com.google.gwt.core.client.JavaScriptObject;\r
-import com.google.gwt.dom.client.CanvasElement;\r
-import com.google.gwt.dom.client.Document;\r
-import com.google.gwt.dom.client.Element;\r
-import com.google.gwt.dom.client.NativeEvent;\r
-import com.google.gwt.event.dom.client.KeyCodes;\r
 \r
 public class GwtInput implements Input {\r
        boolean touched = false;\r
@@ -132,7 +127,7 @@ public class GwtInput implements Input {
 \r
        @Override\r
        public boolean isKeyPressed (int key) {\r
-               if(key == Keys.ANY_KEY) return pressedKeys.size() > 0;\r
+               if (key == Keys.ANY_KEY) return pressedKeys.size() > 0;\r
                return pressedKeys.contains(key);\r
        }\r
 \r
@@ -144,16 +139,16 @@ public class GwtInput implements Input {
                        @Override\r
                        public void onPositive (String text) {\r
                                if (capturedListener != null) {\r
-                                       capturedListener.input(text);   \r
-                               }                               \r
+                                       capturedListener.input(text);\r
+                               }\r
                        }\r
 \r
                        @Override\r
                        public void onNegative () {\r
                                if (capturedListener != null) {\r
-                                       capturedListener.canceled();    \r
+                                       capturedListener.canceled();\r
                                }\r
-                       }                       \r
+                       }\r
                });\r
        }\r
 \r
@@ -165,16 +160,16 @@ public class GwtInput implements Input {
                        @Override\r
                        public void onPositive (String text) {\r
                                if (capturedListener != null) {\r
-                                       capturedListener.input(text);   \r
-                               }                               \r
+                                       capturedListener.input(text);\r
+                               }\r
                        }\r
 \r
                        @Override\r
                        public void onNegative () {\r
                                if (capturedListener != null) {\r
-                                       capturedListener.canceled();    \r
+                                       capturedListener.canceled();\r
                                }\r
-                       }                       \r
+                       }\r
                });\r
        }\r
 \r
@@ -256,99 +251,89 @@ public class GwtInput implements Input {
        public Orientation getNativeOrientation () {\r
                return Orientation.Landscape;\r
        }\r
-       \r
-       /**\r
-        * from https://github.com/toji/game-shim/blob/master/game-shim.js\r
-        * @return is Cursor catched\r
-        */\r
-       private native boolean isCursorCatchedJSNI() /*-{\r
-               if(!navigator.pointer) {\r
-               navigator.pointer = navigator.webkitPointer || navigator.mozPointer;\r
-       }\r
-           if(navigator.pointer) {\r
-               if(typeof(navigator.pointer.isLocked) === "boolean") {\r
-                   // Chrome initially launched with this interface\r
-                   return navigator.pointer.isLocked;\r
-               } else if(typeof(navigator.pointer.isLocked) === "function") {\r
-                   // Some older builds might provide isLocked as a function\r
-                   return navigator.pointer.isLocked();\r
-               } else if(typeof(navigator.pointer.islocked) === "function") {\r
-                   // For compatibility with early Firefox build\r
-                   return navigator.pointer.islocked();\r
-               }\r
-           }\r
-       return false;\r
-       }-*/;\r
-\r
-       /**\r
-        * from https://github.com/toji/game-shim/blob/master/game-shim.js\r
-        * @param element Canvas\r
-        */\r
-       private native void setCursorCatchedJSNI(CanvasElement element) /*-{\r
-           // Navigator pointer is not the right interface according to spec.\r
-           // Here for backwards compatibility only\r
-           if(!navigator.pointer) {\r
-               navigator.pointer = navigator.webkitPointer || navigator.mozPointer;\r
-       }\r
-       // element.requestPointerLock\r
-           if(!element.requestPointerLock) {\r
-               element.requestPointerLock = (function() {\r
-                   return  element.webkitRequestPointerLock ||\r
-                           element.mozRequestPointerLock    ||\r
-                           function(){\r
-                               if(navigator.pointer) {\r
-                                   navigator.pointer.lock(element);\r
-                               }\r
-                           };\r
-               })();\r
-           }\r
-           element.requestPointerLock();\r
-       }-*/;\r
-       \r
-       /**\r
-        * from https://github.com/toji/game-shim/blob/master/game-shim.js\r
-        */\r
-       private native void exitCursorCatchedJSNI() /*-{\r
-       if(!$doc.exitPointerLock) {\r
-               $doc.exitPointerLock = (function() {\r
-                   return  $doc.webkitExitPointerLock ||\r
-                           $doc.mozExitPointerLock ||\r
-                           function(){\r
-                               if(navigator.pointer) {\r
-                                   var elem = this;\r
-                                   navigator.pointer.unlock();\r
-                               }\r
-                           };\r
-               })();\r
-       }\r
-       }-*/;\r
-       \r
-       /**\r
-        * from https://github.com/toji/game-shim/blob/master/game-shim.js\r
+\r
+       /** from https://github.com/toji/game-shim/blob/master/game-shim.js\r
+        * @return is Cursor catched */\r
+       private native boolean isCursorCatchedJSNI () /*-{\r
+                                                                                                                                       if(!navigator.pointer) {\r
+                                                                                                                                       navigator.pointer = navigator.webkitPointer || navigator.mozPointer;\r
+                                                                                                                                       }\r
+                                                                                                                                       if(navigator.pointer) {\r
+                                                                                                                                       if(typeof(navigator.pointer.isLocked) === "boolean") {\r
+                                                                                                                                       // Chrome initially launched with this interface\r
+                                                                                                                                       return navigator.pointer.isLocked;\r
+                                                                                                                                       } else if(typeof(navigator.pointer.isLocked) === "function") {\r
+                                                                                                                                       // Some older builds might provide isLocked as a function\r
+                                                                                                                                       return navigator.pointer.isLocked();\r
+                                                                                                                                       } else if(typeof(navigator.pointer.islocked) === "function") {\r
+                                                                                                                                       // For compatibility with early Firefox build\r
+                                                                                                                                       return navigator.pointer.islocked();\r
+                                                                                                                                       }\r
+                                                                                                                                       }\r
+                                                                                                                                       return false;\r
+                                                                                                                                       }-*/;\r
+\r
+       /** from https://github.com/toji/game-shim/blob/master/game-shim.js\r
+        * @param element Canvas */\r
+       private native void setCursorCatchedJSNI (CanvasElement element) /*-{\r
+                                                                                                                                                                                       // Navigator pointer is not the right interface according to spec.\r
+                                                                                                                                                                                       // Here for backwards compatibility only\r
+                                                                                                                                                                                       if(!navigator.pointer) {\r
+                                                                                                                                                                                       navigator.pointer = navigator.webkitPointer || navigator.mozPointer;\r
+                                                                                                                                                                                       }\r
+                                                                                                                                                                                       // element.requestPointerLock\r
+                                                                                                                                                                                       if(!element.requestPointerLock) {\r
+                                                                                                                                                                                       element.requestPointerLock = (function() {\r
+                                                                                                                                                                                       return  element.webkitRequestPointerLock ||\r
+                                                                                                                                                                                       element.mozRequestPointerLock    ||\r
+                                                                                                                                                                                       function(){\r
+                                                                                                                                                                                       if(navigator.pointer) {\r
+                                                                                                                                                                                       navigator.pointer.lock(element);\r
+                                                                                                                                                                                       }\r
+                                                                                                                                                                                       };\r
+                                                                                                                                                                                       })();\r
+                                                                                                                                                                                       }\r
+                                                                                                                                                                                       element.requestPointerLock();\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** from https://github.com/toji/game-shim/blob/master/game-shim.js */\r
+       private native void exitCursorCatchedJSNI () /*-{\r
+                                                                                                                               if(!$doc.exitPointerLock) {\r
+                                                                                                                               $doc.exitPointerLock = (function() {\r
+                                                                                                                               return  $doc.webkitExitPointerLock ||\r
+                                                                                                                               $doc.mozExitPointerLock ||\r
+                                                                                                                               function(){\r
+                                                                                                                               if(navigator.pointer) {\r
+                                                                                                                               var elem = this;\r
+                                                                                                                               navigator.pointer.unlock();\r
+                                                                                                                               }\r
+                                                                                                                               };\r
+                                                                                                                               })();\r
+                                                                                                                               }\r
+                                                                                                                               }-*/;\r
+\r
+       /** from https://github.com/toji/game-shim/blob/master/game-shim.js\r
         * @param event JavaScript Mouse Event\r
-        * @return movement in x direction\r
-        */\r
-       private native float getMovementXJSNI(NativeEvent event) /*-{\r
-               return event.movementX || event.webkitMovementX || 0;\r
-       }-*/;\r
-       \r
-       /**\r
-        * from https://github.com/toji/game-shim/blob/master/game-shim.js\r
+        * @return movement in x direction */\r
+       private native float getMovementXJSNI (NativeEvent event) /*-{\r
+                                                                                                                                                                       return event.movementX || event.webkitMovementX || 0;\r
+                                                                                                                                                                       }-*/;\r
+\r
+       /** from https://github.com/toji/game-shim/blob/master/game-shim.js\r
         * @param event JavaScript Mouse Event\r
-        * @return movement in y direction\r
-        */\r
-       private native float getMovementYJSNI(NativeEvent event) /*-{\r
-               return event.movementY || event.webkitMovementY || 0;\r
-       }-*/;\r
-       \r
-       /**\r
-        * works only for Chrome > Version 18 with enabled Mouse Lock \r
-        * enable in about:flags or start Chrome with the --enable-pointer-lock flag\r
-        */\r
+        * @return movement in y direction */\r
+       private native float getMovementYJSNI (NativeEvent event) /*-{\r
+                                                                                                                                                                       return event.movementY || event.webkitMovementY || 0;\r
+                                                                                                                                                                       }-*/;\r
+\r
+       /** works only for Chrome > Version 18 with enabled Mouse Lock enable in about:flags or start Chrome with the\r
+        * --enable-pointer-lock flag */\r
        @Override\r
        public void setCursorCatched (boolean catched) {\r
-               if(catched) setCursorCatchedJSNI(canvas);\r
-               else exitCursorCatchedJSNI();\r
+               if (catched)\r
+                       setCursorCatchedJSNI(canvas);\r
+               else\r
+                       exitCursorCatchedJSNI();\r
        }\r
 \r
        @Override\r
@@ -363,54 +348,54 @@ public class GwtInput implements Input {
 \r
        // kindly borrowed from our dear playn friends...\r
        static native void addEventListener (JavaScriptObject target, String name, GwtInput handler, boolean capture) /*-{\r
-               target\r
-                               .addEventListener(\r
-                                               name,\r
-                                               function(e) {\r
-                                                       handler.@com.badlogic.gdx.backends.gwt.GwtInput::handleEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);\r
-                                               }, capture);\r
-       }-*/;\r
+                                                                                                                                                                                                                                                                                                               target\r
+                                                                                                                                                                                                                                                                                                               .addEventListener(\r
+                                                                                                                                                                                                                                                                                                               name,\r
+                                                                                                                                                                                                                                                                                                               function(e) {\r
+                                                                                                                                                                                                                                                                                                               handler.@com.badlogic.gdx.backends.gwt.GwtInput::handleEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);\r
+                                                                                                                                                                                                                                                                                                               }, capture);\r
+                                                                                                                                                                                                                                                                                                               }-*/;\r
 \r
        private static native float getMouseWheelVelocity (NativeEvent evt) /*-{\r
-               var delta = 0.0;\r
-               var agentInfo = @com.badlogic.gdx.backends.gwt.GwtApplication::agentInfo()();\r
-\r
-               if (agentInfo.isFirefox) {\r
-                       if (agentInfo.isMacOS) {\r
-                               delta = 1.0 * evt.detail;\r
-                       } else {\r
-                               delta = 1.0 * evt.detail / 3;\r
-                       }\r
-               } else if (agentInfo.isOpera) {\r
-                       if (agentInfo.isLinux) {\r
-                               delta = -1.0 * evt.wheelDelta / 80;\r
-                       } else {\r
-                               // on mac\r
-                               delta = -1.0 * evt.wheelDelta / 40;\r
-                       }\r
-               } else if (agentInfo.isChrome || agentInfo.isSafari) {\r
-                       delta = -1.0 * evt.wheelDelta / 120;\r
-                       // handle touchpad for chrome\r
-                       if (Math.abs(delta) < 1) {\r
-                               if (agentInfo.isWindows) {\r
-                                       delta = -1.0 * evt.wheelDelta;\r
-                               } else if (agentInfo.isMacOS) {\r
-                                       delta = -1.0 * evt.wheelDelta / 3;\r
-                               }\r
-                       }\r
-               }\r
-               return delta;\r
-       }-*/;\r
+                                                                                                                                                                                               var delta = 0.0;\r
+                                                                                                                                                                                               var agentInfo = @com.badlogic.gdx.backends.gwt.GwtApplication::agentInfo()();\r
+\r
+                                                                                                                                                                                               if (agentInfo.isFirefox) {\r
+                                                                                                                                                                                               if (agentInfo.isMacOS) {\r
+                                                                                                                                                                                               delta = 1.0 * evt.detail;\r
+                                                                                                                                                                                               } else {\r
+                                                                                                                                                                                               delta = 1.0 * evt.detail / 3;\r
+                                                                                                                                                                                               }\r
+                                                                                                                                                                                               } else if (agentInfo.isOpera) {\r
+                                                                                                                                                                                               if (agentInfo.isLinux) {\r
+                                                                                                                                                                                               delta = -1.0 * evt.wheelDelta / 80;\r
+                                                                                                                                                                                               } else {\r
+                                                                                                                                                                                               // on mac\r
+                                                                                                                                                                                               delta = -1.0 * evt.wheelDelta / 40;\r
+                                                                                                                                                                                               }\r
+                                                                                                                                                                                               } else if (agentInfo.isChrome || agentInfo.isSafari) {\r
+                                                                                                                                                                                               delta = -1.0 * evt.wheelDelta / 120;\r
+                                                                                                                                                                                               // handle touchpad for chrome\r
+                                                                                                                                                                                               if (Math.abs(delta) < 1) {\r
+                                                                                                                                                                                               if (agentInfo.isWindows) {\r
+                                                                                                                                                                                               delta = -1.0 * evt.wheelDelta;\r
+                                                                                                                                                                                               } else if (agentInfo.isMacOS) {\r
+                                                                                                                                                                                               delta = -1.0 * evt.wheelDelta / 3;\r
+                                                                                                                                                                                               }\r
+                                                                                                                                                                                               }\r
+                                                                                                                                                                                               }\r
+                                                                                                                                                                                               return delta;\r
+                                                                                                                                                                                               }-*/;\r
 \r
        /** Kindly borrowed from PlayN. **/\r
-       protected static native String getMouseWheelEvent() /*-{\r
-       if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {\r
-       return "DOMMouseScroll";\r
-       } else {\r
-       return "mousewheel";\r
-       }\r
-       }-*/;\r
-       \r
+       protected static native String getMouseWheelEvent () /*-{\r
+                                                                                                                                                       if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {\r
+                                                                                                                                                       return "DOMMouseScroll";\r
+                                                                                                                                                       } else {\r
+                                                                                                                                                       return "mousewheel";\r
+                                                                                                                                                       }\r
+                                                                                                                                                       }-*/;\r
+\r
        /** Kindly borrowed from PlayN. **/\r
        protected static float getRelativeX (NativeEvent e, Element target) {\r
                return e.getClientX() - target.getAbsoluteLeft() + target.getScrollLeft() + target.getOwnerDocument().getScrollLeft();\r
@@ -433,21 +418,21 @@ public class GwtInput implements Input {
                addEventListener(Document.get(), "keyup", this, false);\r
                addEventListener(Document.get(), "keypress", this, false);\r
        }\r
-       \r
-       private int getButton(int button) {\r
-               if(button == NativeEvent.BUTTON_LEFT) return Buttons.LEFT;\r
-               if(button == NativeEvent.BUTTON_RIGHT) return Buttons.RIGHT;\r
-               if(button == NativeEvent.BUTTON_MIDDLE) return Buttons.MIDDLE;\r
+\r
+       private int getButton (int button) {\r
+               if (button == NativeEvent.BUTTON_LEFT) return Buttons.LEFT;\r
+               if (button == NativeEvent.BUTTON_RIGHT) return Buttons.RIGHT;\r
+               if (button == NativeEvent.BUTTON_MIDDLE) return Buttons.MIDDLE;\r
                return Buttons.LEFT;\r
        }\r
 \r
        private void handleEvent (NativeEvent e) {\r
-               \r
-               if(e.getType().equals("mousedown")) {\r
-                       if(!e.getEventTarget().equals(canvas) || touched) {\r
+\r
+               if (e.getType().equals("mousedown")) {\r
+                       if (!e.getEventTarget().equals(canvas) || touched) {\r
                                float mouseX = (int)getRelativeX(e, canvas);\r
                                float mouseY = (int)getRelativeY(e, canvas);\r
-                               if(mouseX < 0 || mouseX > Gdx.graphics.getWidth() || mouseY < 0 || mouseY > Gdx.graphics.getHeight()) {\r
+                               if (mouseX < 0 || mouseX > Gdx.graphics.getWidth() || mouseY < 0 || mouseY > Gdx.graphics.getHeight()) {\r
                                        hasFocus = false;\r
                                }\r
                                return;\r
@@ -458,7 +443,7 @@ public class GwtInput implements Input {
                        this.pressedButtons.add(getButton(e.getButton()));\r
                        this.deltaX = 0;\r
                        this.deltaY = 0;\r
-                       if(isCursorCatched()) {\r
+                       if (isCursorCatched()) {\r
                                this.mouseX += getMovementXJSNI(e);\r
                                this.mouseY += getMovementYJSNI(e);\r
                        } else {\r
@@ -466,13 +451,13 @@ public class GwtInput implements Input {
                                this.mouseY = (int)getRelativeY(e, canvas);\r
                        }\r
                        this.currentEventTimeStamp = TimeUtils.nanoTime();\r
-                       if(processor != null) processor.touchDown(mouseX, mouseY, 0, getButton(e.getButton()));\r
+                       if (processor != null) processor.touchDown(mouseX, mouseY, 0, getButton(e.getButton()));\r
                }\r
-               \r
-               if(e.getType().equals("mousemove")) {\r
-                       if(isCursorCatched()) {\r
-                               this.deltaX = (int) getMovementXJSNI(e);\r
-                               this.deltaY = (int) getMovementYJSNI(e);\r
+\r
+               if (e.getType().equals("mousemove")) {\r
+                       if (isCursorCatched()) {\r
+                               this.deltaX = (int)getMovementXJSNI(e);\r
+                               this.deltaY = (int)getMovementYJSNI(e);\r
                                this.mouseX += getMovementXJSNI(e);\r
                                this.mouseY += getMovementYJSNI(e);\r
                        } else {\r
@@ -482,19 +467,21 @@ public class GwtInput implements Input {
                                this.mouseY = (int)getRelativeY(e, canvas);\r
                        }\r
                        this.currentEventTimeStamp = TimeUtils.nanoTime();\r
-                       if(processor != null) {\r
-                               if(touched) processor.touchDragged(mouseX, mouseY, 0);\r
-                               else processor.mouseMoved(mouseX, mouseY);\r
+                       if (processor != null) {\r
+                               if (touched)\r
+                                       processor.touchDragged(mouseX, mouseY, 0);\r
+                               else\r
+                                       processor.mouseMoved(mouseX, mouseY);\r
                        }\r
                }\r
-               \r
-               if(e.getType().equals("mouseup")) {\r
-                       if(!touched) return;\r
+\r
+               if (e.getType().equals("mouseup")) {\r
+                       if (!touched) return;\r
                        this.pressedButtons.remove(getButton(e.getButton()));\r
                        this.touched = pressedButtons.size() > 0;\r
-                       if(isCursorCatched()) {\r
-                               this.deltaX = (int) getMovementXJSNI(e);\r
-                               this.deltaY = (int) getMovementYJSNI(e);\r
+                       if (isCursorCatched()) {\r
+                               this.deltaX = (int)getMovementXJSNI(e);\r
+                               this.deltaY = (int)getMovementYJSNI(e);\r
                                this.mouseX += getMovementXJSNI(e);\r
                                this.mouseY += getMovementYJSNI(e);\r
                        } else {\r
@@ -505,229 +492,328 @@ public class GwtInput implements Input {
                        }\r
                        this.currentEventTimeStamp = TimeUtils.nanoTime();\r
                        this.touched = false;\r
-                       if(processor != null) processor.touchUp(mouseX, mouseY, 0, getButton(e.getButton()));\r
+                       if (processor != null) processor.touchUp(mouseX, mouseY, 0, getButton(e.getButton()));\r
                }\r
-               \r
-               if(e.getType().equals("keydown") && hasFocus) {\r
+\r
+               if (e.getType().equals("keydown") && hasFocus) {\r
                        System.out.println("keydown");\r
                        int code = keyForCode(e.getKeyCode());\r
-                       if(code == 67) {\r
+                       if (code == 67) {\r
                                e.preventDefault();\r
-                               if(processor != null) {\r
+                               if (processor != null) {\r
                                        processor.keyDown(code);\r
                                        processor.keyTyped('\b');\r
                                }\r
                        } else {\r
                                this.pressedKeys.add(code);\r
-                               if(processor != null) processor.keyDown(code);\r
+                               if (processor != null) processor.keyDown(code);\r
                        }\r
                }\r
-               \r
-               if(e.getType().equals("keypress") && hasFocus) {\r
+\r
+               if (e.getType().equals("keypress") && hasFocus) {\r
                        System.out.println("keypress");\r
                        char c = (char)e.getCharCode();\r
-                       if(processor != null) processor.keyTyped(c);\r
+                       if (processor != null) processor.keyTyped(c);\r
                }\r
-               \r
-               if(e.getType().equals("keyup") && hasFocus) {\r
+\r
+               if (e.getType().equals("keyup") && hasFocus) {\r
                        System.out.println("keyup");\r
                        int code = keyForCode(e.getKeyCode());\r
                        this.pressedKeys.remove(code);\r
-                       if(processor != null) processor.keyUp(code);\r
+                       if (processor != null) processor.keyUp(code);\r
                }\r
-               \r
-//             if(hasFocus) e.preventDefault();\r
+\r
+// if(hasFocus) e.preventDefault();\r
        }\r
-       \r
+\r
        /** borrowed from PlayN, thanks guys **/\r
-  private static int keyForCode(int keyCode) {\r
-           switch (keyCode) {\r
-           case KeyCodes.KEY_ALT: return Keys.ALT_LEFT;\r
-           case KeyCodes.KEY_BACKSPACE: return Keys.BACKSPACE;\r
-           case KeyCodes.KEY_CTRL: return Keys.CONTROL_LEFT;\r
-           case KeyCodes.KEY_DELETE: return Keys.DEL;\r
-           case KeyCodes.KEY_DOWN: return Keys.DOWN;\r
-           case KeyCodes.KEY_END: return Keys.END;\r
-           case KeyCodes.KEY_ENTER: return Keys.ENTER;\r
-           case KeyCodes.KEY_ESCAPE: return Keys.ESCAPE;\r
-           case KeyCodes.KEY_HOME: return Keys.HOME;\r
-           case KeyCodes.KEY_LEFT: return Keys.LEFT;\r
-           case KeyCodes.KEY_PAGEDOWN: return Keys.PAGE_DOWN;\r
-           case KeyCodes.KEY_PAGEUP: return Keys.PAGE_UP;\r
-           case KeyCodes.KEY_RIGHT: return Keys.RIGHT;\r
-           case KeyCodes.KEY_SHIFT: return Keys.SHIFT_LEFT;\r
-           case KeyCodes.KEY_TAB: return Keys.TAB;\r
-           case KeyCodes.KEY_UP: return Keys.UP;\r
-\r
-           case KEY_PAUSE: return Keys.UNKNOWN; // FIXME\r
-           case KEY_CAPS_LOCK: return Keys.UNKNOWN; // FIXME\r
-           case KEY_SPACE: return Keys.SPACE;\r
-           case KEY_INSERT: return Keys.INSERT;\r
-           case KEY_0: return Keys.NUM_0;\r
-           case KEY_1: return Keys.NUM_1;\r
-           case KEY_2: return Keys.NUM_2;\r
-           case KEY_3: return Keys.NUM_3;\r
-           case KEY_4: return Keys.NUM_4;\r
-           case KEY_5: return Keys.NUM_5;\r
-           case KEY_6: return Keys.NUM_6;\r
-           case KEY_7: return Keys.NUM_7;\r
-           case KEY_8: return Keys.NUM_8;\r
-           case KEY_9: return Keys.NUM_9;\r
-           case KEY_A: return Keys.A;\r
-           case KEY_B: return Keys.B;\r
-           case KEY_C: return Keys.C;\r
-           case KEY_D: return Keys.D;\r
-           case KEY_E: return Keys.E;\r
-           case KEY_F: return Keys.F;\r
-           case KEY_G: return Keys.G;\r
-           case KEY_H: return Keys.H;\r
-           case KEY_I: return Keys.I;\r
-           case KEY_J: return Keys.J;\r
-           case KEY_K: return Keys.K;\r
-           case KEY_L: return Keys.L;\r
-           case KEY_M: return Keys.M;\r
-           case KEY_N: return Keys.N;\r
-           case KEY_O: return Keys.O;\r
-           case KEY_P: return Keys.P;\r
-           case KEY_Q: return Keys.Q;\r
-           case KEY_R: return Keys.R;\r
-           case KEY_S: return Keys.S;\r
-           case KEY_T: return Keys.T;\r
-           case KEY_U: return Keys.U;\r
-           case KEY_V: return Keys.V;\r
-           case KEY_W: return Keys.W;\r
-           case KEY_X: return Keys.X;\r
-           case KEY_Y: return Keys.Y;\r
-           case KEY_Z: return Keys.Z;\r
-           case KEY_LEFT_WINDOW_KEY: return Keys.UNKNOWN; // FIXME\r
-           case KEY_RIGHT_WINDOW_KEY: return Keys.UNKNOWN; // FIXME\r
-           // case KEY_SELECT_KEY: return Keys.SELECT_KEY;\r
-           case KEY_NUMPAD0: return Keys.NUM_0;\r
-           case KEY_NUMPAD1: return Keys.NUM_1;\r
-           case KEY_NUMPAD2: return Keys.NUM_2;\r
-           case KEY_NUMPAD3: return Keys.NUM_3;\r
-           case KEY_NUMPAD4: return Keys.NUM_4;\r
-           case KEY_NUMPAD5: return Keys.NUM_5;\r
-           case KEY_NUMPAD6: return Keys.NUM_6;\r
-           case KEY_NUMPAD7: return Keys.NUM_7;\r
-           case KEY_NUMPAD8: return Keys.NUM_8;\r
-           case KEY_NUMPAD9: return Keys.NUM_9;\r
-           case KEY_MULTIPLY: return Keys.UNKNOWN; // FIXME\r
-           case KEY_ADD: return Keys.PLUS;\r
-           case KEY_SUBTRACT: return Keys.MINUS;\r
-           case KEY_DECIMAL_POINT_KEY: return Keys.PERIOD;\r
-           case KEY_DIVIDE: return Keys.UNKNOWN; // FIXME\r
-           case KEY_F1: return Keys.F1;\r
-           case KEY_F2: return Keys.F2;\r
-           case KEY_F3: return Keys.F3;\r
-           case KEY_F4: return Keys.F4;\r
-           case KEY_F5: return Keys.F5;\r
-           case KEY_F6: return Keys.F6;\r
-           case KEY_F7: return Keys.F7;\r
-           case KEY_F8: return Keys.F8;\r
-           case KEY_F9: return Keys.F9;\r
-           case KEY_F10: return Keys.F10;\r
-           case KEY_F11: return Keys.F11;\r
-           case KEY_F12: return Keys.F12;\r
-           case KEY_NUM_LOCK: return Keys.NUM;\r
-           case KEY_SCROLL_LOCK: return Keys.UNKNOWN; // FIXME\r
-           case KEY_SEMICOLON: return Keys.SEMICOLON;\r
-           case KEY_EQUALS: return Keys.EQUALS;\r
-           case KEY_COMMA: return Keys.COMMA;\r
-           case KEY_DASH: return Keys.MINUS;\r
-           case KEY_PERIOD: return Keys.PERIOD;\r
-           case KEY_FORWARD_SLASH: return Keys.SLASH;\r
-           case KEY_GRAVE_ACCENT: return Keys.UNKNOWN; // FIXME\r
-           case KEY_OPEN_BRACKET: return Keys.LEFT_BRACKET;\r
-           case KEY_BACKSLASH: return Keys.BACKSLASH;\r
-           case KEY_CLOSE_BRACKET: return Keys.RIGHT_BRACKET;\r
-           case KEY_SINGLE_QUOTE: return Keys.APOSTROPHE;\r
-           default: return Keys.UNKNOWN;\r
-           }\r
-         }\r
-\r
-         // these are absent from KeyCodes; we know not why...\r
-         private static final int KEY_PAUSE = 19;\r
-         private static final int KEY_CAPS_LOCK = 20;\r
-         private static final int KEY_SPACE = 32;\r
-         private static final int KEY_INSERT = 45;\r
-         private static final int KEY_0 = 48;\r
-         private static final int KEY_1 = 49;\r
-         private static final int KEY_2 = 50;\r
-         private static final int KEY_3 = 51;\r
-         private static final int KEY_4 = 52;\r
-         private static final int KEY_5 = 53;\r
-         private static final int KEY_6 = 54;\r
-         private static final int KEY_7 = 55;\r
-         private static final int KEY_8 = 56;\r
-         private static final int KEY_9 = 57;\r
-         private static final int KEY_A = 65;\r
-         private static final int KEY_B = 66;\r
-         private static final int KEY_C = 67;\r
-         private static final int KEY_D = 68;\r
-         private static final int KEY_E = 69;\r
-         private static final int KEY_F = 70;\r
-         private static final int KEY_G = 71;\r
-         private static final int KEY_H = 72;\r
-         private static final int KEY_I = 73;\r
-         private static final int KEY_J = 74;\r
-         private static final int KEY_K = 75;\r
-         private static final int KEY_L = 76;\r
-         private static final int KEY_M = 77;\r
-         private static final int KEY_N = 78;\r
-         private static final int KEY_O = 79;\r
-         private static final int KEY_P = 80;\r
-         private static final int KEY_Q = 81;\r
-         private static final int KEY_R = 82;\r
-         private static final int KEY_S = 83;\r
-         private static final int KEY_T = 84;\r
-         private static final int KEY_U = 85;\r
-         private static final int KEY_V = 86;\r
-         private static final int KEY_W = 87;\r
-         private static final int KEY_X = 88;\r
-         private static final int KEY_Y = 89;\r
-         private static final int KEY_Z = 90;\r
-         private static final int KEY_LEFT_WINDOW_KEY = 91;\r
-         private static final int KEY_RIGHT_WINDOW_KEY = 92;\r
-         private static final int KEY_SELECT_KEY = 93;\r
-         private static final int KEY_NUMPAD0 = 96;\r
-         private static final int KEY_NUMPAD1 = 97;\r
-         private static final int KEY_NUMPAD2 = 98;\r
-         private static final int KEY_NUMPAD3 = 99;\r
-         private static final int KEY_NUMPAD4 = 100;\r
-         private static final int KEY_NUMPAD5 = 101;\r
-         private static final int KEY_NUMPAD6 = 102;\r
-         private static final int KEY_NUMPAD7 = 103;\r
-         private static final int KEY_NUMPAD8 = 104;\r
-         private static final int KEY_NUMPAD9 = 105;\r
-         private static final int KEY_MULTIPLY = 106;\r
-         private static final int KEY_ADD = 107;\r
-         private static final int KEY_SUBTRACT = 109;\r
-         private static final int KEY_DECIMAL_POINT_KEY = 110;\r
-         private static final int KEY_DIVIDE = 111;\r
-         private static final int KEY_F1 = 112;\r
-         private static final int KEY_F2 = 113;\r
-         private static final int KEY_F3 = 114;\r
-         private static final int KEY_F4 = 115;\r
-         private static final int KEY_F5 = 116;\r
-         private static final int KEY_F6 = 117;\r
-         private static final int KEY_F7 = 118;\r
-         private static final int KEY_F8 = 119;\r
-         private static final int KEY_F9 = 120;\r
-         private static final int KEY_F10 = 121;\r
-         private static final int KEY_F11 = 122;\r
-         private static final int KEY_F12 = 123;\r
-         private static final int KEY_NUM_LOCK = 144;\r
-         private static final int KEY_SCROLL_LOCK = 145;\r
-         private static final int KEY_SEMICOLON = 186;\r
-         private static final int KEY_EQUALS = 187;\r
-         private static final int KEY_COMMA = 188;\r
-         private static final int KEY_DASH = 189;\r
-         private static final int KEY_PERIOD = 190;\r
-         private static final int KEY_FORWARD_SLASH = 191;\r
-         private static final int KEY_GRAVE_ACCENT = 192;\r
-         private static final int KEY_OPEN_BRACKET = 219;\r
-         private static final int KEY_BACKSLASH = 220;\r
-         private static final int KEY_CLOSE_BRACKET = 221;\r
-         private static final int KEY_SINGLE_QUOTE = 222;\r
-}
\ No newline at end of file
+       private static int keyForCode (int keyCode) {\r
+               switch (keyCode) {\r
+               case KeyCodes.KEY_ALT:\r
+                       return Keys.ALT_LEFT;\r
+               case KeyCodes.KEY_BACKSPACE:\r
+                       return Keys.BACKSPACE;\r
+               case KeyCodes.KEY_CTRL:\r
+                       return Keys.CONTROL_LEFT;\r
+               case KeyCodes.KEY_DELETE:\r
+                       return Keys.DEL;\r
+               case KeyCodes.KEY_DOWN:\r
+                       return Keys.DOWN;\r
+               case KeyCodes.KEY_END:\r
+                       return Keys.END;\r
+               case KeyCodes.KEY_ENTER:\r
+                       return Keys.ENTER;\r
+               case KeyCodes.KEY_ESCAPE:\r
+                       return Keys.ESCAPE;\r
+               case KeyCodes.KEY_HOME:\r
+                       return Keys.HOME;\r
+               case KeyCodes.KEY_LEFT:\r
+                       return Keys.LEFT;\r
+               case KeyCodes.KEY_PAGEDOWN:\r
+                       return Keys.PAGE_DOWN;\r
+               case KeyCodes.KEY_PAGEUP:\r
+                       return Keys.PAGE_UP;\r
+               case KeyCodes.KEY_RIGHT:\r
+                       return Keys.RIGHT;\r
+               case KeyCodes.KEY_SHIFT:\r
+                       return Keys.SHIFT_LEFT;\r
+               case KeyCodes.KEY_TAB:\r
+                       return Keys.TAB;\r
+               case KeyCodes.KEY_UP:\r
+                       return Keys.UP;\r
+\r
+               case KEY_PAUSE:\r
+                       return Keys.UNKNOWN; // FIXME\r
+               case KEY_CAPS_LOCK:\r
+                       return Keys.UNKNOWN; // FIXME\r
+               case KEY_SPACE:\r
+                       return Keys.SPACE;\r
+               case KEY_INSERT:\r
+                       return Keys.INSERT;\r
+               case KEY_0:\r
+                       return Keys.NUM_0;\r
+               case KEY_1:\r
+                       return Keys.NUM_1;\r
+               case KEY_2:\r
+                       return Keys.NUM_2;\r
+               case KEY_3:\r
+                       return Keys.NUM_3;\r
+               case KEY_4:\r
+                       return Keys.NUM_4;\r
+               case KEY_5:\r
+                       return Keys.NUM_5;\r
+               case KEY_6:\r
+                       return Keys.NUM_6;\r
+               case KEY_7:\r
+                       return Keys.NUM_7;\r
+               case KEY_8:\r
+                       return Keys.NUM_8;\r
+               case KEY_9:\r
+                       return Keys.NUM_9;\r
+               case KEY_A:\r
+                       return Keys.A;\r
+               case KEY_B:\r
+                       return Keys.B;\r
+               case KEY_C:\r
+                       return Keys.C;\r
+               case KEY_D:\r
+                       return Keys.D;\r
+               case KEY_E:\r
+                       return Keys.E;\r
+               case KEY_F:\r
+                       return Keys.F;\r
+               case KEY_G:\r
+                       return Keys.G;\r
+               case KEY_H:\r
+                       return Keys.H;\r
+               case KEY_I:\r
+                       return Keys.I;\r
+               case KEY_J:\r
+                       return Keys.J;\r
+               case KEY_K:\r
+                       return Keys.K;\r
+               case KEY_L:\r
+                       return Keys.L;\r
+               case KEY_M:\r
+                       return Keys.M;\r
+               case KEY_N:\r
+                       return Keys.N;\r
+               case KEY_O:\r
+                       return Keys.O;\r
+               case KEY_P:\r
+                       return Keys.P;\r
+               case KEY_Q:\r
+                       return Keys.Q;\r
+               case KEY_R:\r
+                       return Keys.R;\r
+               case KEY_S:\r
+                       return Keys.S;\r
+               case KEY_T:\r
+                       return Keys.T;\r
+               case KEY_U:\r
+                       return Keys.U;\r
+               case KEY_V:\r
+                       return Keys.V;\r
+               case KEY_W:\r
+                       return Keys.W;\r
+               case KEY_X:\r
+                       return Keys.X;\r
+               case KEY_Y:\r
+                       return Keys.Y;\r
+               case KEY_Z:\r
+                       return Keys.Z;\r
+               case KEY_LEFT_WINDOW_KEY:\r
+                       return Keys.UNKNOWN; // FIXME\r
+               case KEY_RIGHT_WINDOW_KEY:\r
+                       return Keys.UNKNOWN; // FIXME\r
+                       // case KEY_SELECT_KEY: return Keys.SELECT_KEY;\r
+               case KEY_NUMPAD0:\r
+                       return Keys.NUM_0;\r
+               case KEY_NUMPAD1:\r
+                       return Keys.NUM_1;\r
+               case KEY_NUMPAD2:\r
+                       return Keys.NUM_2;\r
+               case KEY_NUMPAD3:\r
+                       return Keys.NUM_3;\r
+               case KEY_NUMPAD4:\r
+                       return Keys.NUM_4;\r
+               case KEY_NUMPAD5:\r
+                       return Keys.NUM_5;\r
+               case KEY_NUMPAD6:\r
+                       return Keys.NUM_6;\r
+               case KEY_NUMPAD7:\r
+                       return Keys.NUM_7;\r
+               case KEY_NUMPAD8:\r
+                       return Keys.NUM_8;\r
+               case KEY_NUMPAD9:\r
+                       return Keys.NUM_9;\r
+               case KEY_MULTIPLY:\r
+                       return Keys.UNKNOWN; // FIXME\r
+               case KEY_ADD:\r
+                       return Keys.PLUS;\r
+               case KEY_SUBTRACT:\r
+                       return Keys.MINUS;\r
+               case KEY_DECIMAL_POINT_KEY:\r
+                       return Keys.PERIOD;\r
+               case KEY_DIVIDE:\r
+                       return Keys.UNKNOWN; // FIXME\r
+               case KEY_F1:\r
+                       return Keys.F1;\r
+               case KEY_F2:\r
+                       return Keys.F2;\r
+               case KEY_F3:\r
+                       return Keys.F3;\r
+               case KEY_F4:\r
+                       return Keys.F4;\r
+               case KEY_F5:\r
+                       return Keys.F5;\r
+               case KEY_F6:\r
+                       return Keys.F6;\r
+               case KEY_F7:\r
+                       return Keys.F7;\r
+               case KEY_F8:\r
+                       return Keys.F8;\r
+               case KEY_F9:\r
+                       return Keys.F9;\r
+               case KEY_F10:\r
+                       return Keys.F10;\r
+               case KEY_F11:\r
+                       return Keys.F11;\r
+               case KEY_F12:\r
+                       return Keys.F12;\r
+               case KEY_NUM_LOCK:\r
+                       return Keys.NUM;\r
+               case KEY_SCROLL_LOCK:\r
+                       return Keys.UNKNOWN; // FIXME\r
+               case KEY_SEMICOLON:\r
+                       return Keys.SEMICOLON;\r
+               case KEY_EQUALS:\r
+                       return Keys.EQUALS;\r
+               case KEY_COMMA:\r
+                       return Keys.COMMA;\r
+               case KEY_DASH:\r
+                       return Keys.MINUS;\r
+               case KEY_PERIOD:\r
+                       return Keys.PERIOD;\r
+               case KEY_FORWARD_SLASH:\r
+                       return Keys.SLASH;\r
+               case KEY_GRAVE_ACCENT:\r
+                       return Keys.UNKNOWN; // FIXME\r
+               case KEY_OPEN_BRACKET:\r
+                       return Keys.LEFT_BRACKET;\r
+               case KEY_BACKSLASH:\r
+                       return Keys.BACKSLASH;\r
+               case KEY_CLOSE_BRACKET:\r
+                       return Keys.RIGHT_BRACKET;\r
+               case KEY_SINGLE_QUOTE:\r
+                       return Keys.APOSTROPHE;\r
+               default:\r
+                       return Keys.UNKNOWN;\r
+               }\r
+       }\r
+\r
+       // these are absent from KeyCodes; we know not why...\r
+       private static final int KEY_PAUSE = 19;\r
+       private static final int KEY_CAPS_LOCK = 20;\r
+       private static final int KEY_SPACE = 32;\r
+       private static final int KEY_INSERT = 45;\r
+       private static final int KEY_0 = 48;\r
+       private static final int KEY_1 = 49;\r
+       private static final int KEY_2 = 50;\r
+       private static final int KEY_3 = 51;\r
+       private static final int KEY_4 = 52;\r
+       private static final int KEY_5 = 53;\r
+       private static final int KEY_6 = 54;\r
+       private static final int KEY_7 = 55;\r
+       private static final int KEY_8 = 56;\r
+       private static final int KEY_9 = 57;\r
+       private static final int KEY_A = 65;\r
+       private static final int KEY_B = 66;\r
+       private static final int KEY_C = 67;\r
+       private static final int KEY_D = 68;\r
+       private static final int KEY_E = 69;\r
+       private static final int KEY_F = 70;\r
+       private static final int KEY_G = 71;\r
+       private static final int KEY_H = 72;\r
+       private static final int KEY_I = 73;\r
+       private static final int KEY_J = 74;\r
+       private static final int KEY_K = 75;\r
+       private static final int KEY_L = 76;\r
+       private static final int KEY_M = 77;\r
+       private static final int KEY_N = 78;\r
+       private static final int KEY_O = 79;\r
+       private static final int KEY_P = 80;\r
+       private static final int KEY_Q = 81;\r
+       private static final int KEY_R = 82;\r
+       private static final int KEY_S = 83;\r
+       private static final int KEY_T = 84;\r
+       private static final int KEY_U = 85;\r
+       private static final int KEY_V = 86;\r
+       private static final int KEY_W = 87;\r
+       private static final int KEY_X = 88;\r
+       private static final int KEY_Y = 89;\r
+       private static final int KEY_Z = 90;\r
+       private static final int KEY_LEFT_WINDOW_KEY = 91;\r
+       private static final int KEY_RIGHT_WINDOW_KEY = 92;\r
+       private static final int KEY_SELECT_KEY = 93;\r
+       private static final int KEY_NUMPAD0 = 96;\r
+       private static final int KEY_NUMPAD1 = 97;\r
+       private static final int KEY_NUMPAD2 = 98;\r
+       private static final int KEY_NUMPAD3 = 99;\r
+       private static final int KEY_NUMPAD4 = 100;\r
+       private static final int KEY_NUMPAD5 = 101;\r
+       private static final int KEY_NUMPAD6 = 102;\r
+       private static final int KEY_NUMPAD7 = 103;\r
+       private static final int KEY_NUMPAD8 = 104;\r
+       private static final int KEY_NUMPAD9 = 105;\r
+       private static final int KEY_MULTIPLY = 106;\r
+       private static final int KEY_ADD = 107;\r
+       private static final int KEY_SUBTRACT = 109;\r
+       private static final int KEY_DECIMAL_POINT_KEY = 110;\r
+       private static final int KEY_DIVIDE = 111;\r
+       private static final int KEY_F1 = 112;\r
+       private static final int KEY_F2 = 113;\r
+       private static final int KEY_F3 = 114;\r
+       private static final int KEY_F4 = 115;\r
+       private static final int KEY_F5 = 116;\r
+       private static final int KEY_F6 = 117;\r
+       private static final int KEY_F7 = 118;\r
+       private static final int KEY_F8 = 119;\r
+       private static final int KEY_F9 = 120;\r
+       private static final int KEY_F10 = 121;\r
+       private static final int KEY_F11 = 122;\r
+       private static final int KEY_F12 = 123;\r
+       private static final int KEY_NUM_LOCK = 144;\r
+       private static final int KEY_SCROLL_LOCK = 145;\r
+       private static final int KEY_SEMICOLON = 186;\r
+       private static final int KEY_EQUALS = 187;\r
+       private static final int KEY_COMMA = 188;\r
+       private static final int KEY_DASH = 189;\r
+       private static final int KEY_PERIOD = 190;\r
+       private static final int KEY_FORWARD_SLASH = 191;\r
+       private static final int KEY_GRAVE_ACCENT = 192;\r
+       private static final int KEY_OPEN_BRACKET = 219;\r
+       private static final int KEY_BACKSLASH = 220;\r
+       private static final int KEY_CLOSE_BRACKET = 221;\r
+       private static final int KEY_SINGLE_QUOTE = 222;\r
+}\r
index f7555a3..1fea8a5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -25,16 +26,16 @@ public class GwtMusic implements Music {
        boolean isPlaying = false;\r
        boolean isLooping = false;\r
        SMSound sound;\r
-       \r
+\r
        public GwtMusic (FileHandle file) {\r
                String url = ((GwtApplication)Gdx.app).getBaseUrl() + file.path();\r
                sound = SoundManager.createSound(url, url);\r
                sound.loops(0);\r
        }\r
-       \r
+\r
        @Override\r
        public void play () {\r
-               if(isPlaying()) return;\r
+               if (isPlaying()) return;\r
                sound.play();\r
                isPlaying = true;\r
        }\r
@@ -59,7 +60,7 @@ public class GwtMusic implements Music {
 \r
        @Override\r
        public void setLooping (boolean isLooping) {\r
-               sound.loops(isLooping?999:0);\r
+               sound.loops(isLooping ? 999 : 0);\r
                this.isLooping = isLooping;\r
        }\r
 \r
@@ -82,4 +83,4 @@ public class GwtMusic implements Music {
        public void dispose () {\r
                sound.destruct();\r
        }\r
-}
\ No newline at end of file
+}\r
index bec770b..3f1a8b8 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import java.util.HashMap;\r
@@ -26,60 +27,60 @@ import com.google.gwt.corp.localstorage.LocalStorage;
 public class GwtPreferences implements Preferences {\r
        final String prefix;\r
        ObjectMap<String, Object> values = new ObjectMap<String, Object>();\r
-       \r
-       GwtPreferences(String prefix) {\r
+\r
+       GwtPreferences (String prefix) {\r
                this.prefix = prefix + ":";\r
                int prefixLength = this.prefix.length();\r
                try {\r
-                       for(int i = 0; i < LocalStorage.length(); i++) {\r
+                       for (int i = 0; i < LocalStorage.length(); i++) {\r
                                String key = LocalStorage.key(i);\r
-                               if(key.startsWith(prefix)) {\r
+                               if (key.startsWith(prefix)) {\r
                                        String value = LocalStorage.getItem(key);\r
-                                       values.put(key.substring(prefixLength, key.length()-1), toObject(key, value));\r
+                                       values.put(key.substring(prefixLength, key.length() - 1), toObject(key, value));\r
                                }\r
                        }\r
-               } catch(Exception e) {\r
+               } catch (Exception e) {\r
                        values.clear();\r
                }\r
        }\r
-       \r
-       private Object toObject(String key, String value) {\r
-               if(key.endsWith("b")) return new Boolean(Boolean.parseBoolean(value));\r
-               if(key.endsWith("i")) return new Integer(Integer.parseInt(value));\r
-               if(key.endsWith("l")) return new Long(Long.parseLong(value));\r
-               if(key.endsWith("f")) return new Float(Float.parseFloat(value));\r
-               return value; \r
-       }\r
-       \r
-       private String toStorageKey(String key, Object value) {\r
-               if(value instanceof Boolean) return prefix + key + "b";\r
-               if(value instanceof Integer) return prefix + key + "i";\r
-               if(value instanceof Long) return prefix + key + "l";\r
-               if(value instanceof Float) return prefix + key + "f";\r
+\r
+       private Object toObject (String key, String value) {\r
+               if (key.endsWith("b")) return new Boolean(Boolean.parseBoolean(value));\r
+               if (key.endsWith("i")) return new Integer(Integer.parseInt(value));\r
+               if (key.endsWith("l")) return new Long(Long.parseLong(value));\r
+               if (key.endsWith("f")) return new Float(Float.parseFloat(value));\r
+               return value;\r
+       }\r
+\r
+       private String toStorageKey (String key, Object value) {\r
+               if (value instanceof Boolean) return prefix + key + "b";\r
+               if (value instanceof Integer) return prefix + key + "i";\r
+               if (value instanceof Long) return prefix + key + "l";\r
+               if (value instanceof Float) return prefix + key + "f";\r
                return prefix + key + "s";\r
        }\r
-       \r
+\r
        @Override\r
        public void flush () {\r
                try {\r
                        // remove all old values\r
-                       for(int i = 0; i < LocalStorage.length(); i++) {\r
+                       for (int i = 0; i < LocalStorage.length(); i++) {\r
                                String key = LocalStorage.key(i);\r
-                               if(key.startsWith(prefix)) LocalStorage.removeItem(key);\r
+                               if (key.startsWith(prefix)) LocalStorage.removeItem(key);\r
                        }\r
-                       \r
+\r
                        // push new values to LocalStorage\r
-                       for(String key: values.keys()) {\r
+                       for (String key : values.keys()) {\r
                                String storageKey = toStorageKey(key, values.get(key));\r
                                String storageValue = "" + values.get(key).toString();\r
                                LocalStorage.setItem(storageKey, storageValue);\r
                        }\r
-                       \r
-               } catch(Exception e) {\r
+\r
+               } catch (Exception e) {\r
                        throw new GdxRuntimeException("Couldn't flush preferences");\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public void putBoolean (String key, boolean val) {\r
                values.put(key, val);\r
@@ -107,7 +108,7 @@ public class GwtPreferences implements Preferences {
 \r
        @Override\r
        public void put (Map<String, ?> vals) {\r
-               for(String key: vals.keySet()) {\r
+               for (String key : vals.keySet()) {\r
                        values.put(key, vals.get(key));\r
                }\r
        }\r
@@ -115,25 +116,25 @@ public class GwtPreferences implements Preferences {
        @Override\r
        public boolean getBoolean (String key) {\r
                Boolean v = (Boolean)values.get(key);\r
-               return v == null? false: v;\r
+               return v == null ? false : v;\r
        }\r
 \r
        @Override\r
        public int getInteger (String key) {\r
                Integer v = (Integer)values.get(key);\r
-               return v == null? 0: v;\r
+               return v == null ? 0 : v;\r
        }\r
 \r
        @Override\r
        public long getLong (String key) {\r
                Long v = (Long)values.get(key);\r
-               return v == null? 0: v;\r
+               return v == null ? 0 : v;\r
        }\r
 \r
        @Override\r
        public float getFloat (String key) {\r
                Float v = (Float)values.get(key);\r
-               return v == null? 0: v;\r
+               return v == null ? 0 : v;\r
        }\r
 \r
        @Override\r
@@ -144,37 +145,37 @@ public class GwtPreferences implements Preferences {
        @Override\r
        public boolean getBoolean (String key, boolean defValue) {\r
                Boolean res = (Boolean)values.get(key);\r
-               return res == null?defValue: res;\r
+               return res == null ? defValue : res;\r
        }\r
 \r
        @Override\r
        public int getInteger (String key, int defValue) {\r
                Integer res = (Integer)values.get(key);\r
-               return res == null?defValue: res;\r
+               return res == null ? defValue : res;\r
        }\r
 \r
        @Override\r
        public long getLong (String key, long defValue) {\r
                Long res = (Long)values.get(key);\r
-               return res == null?defValue: res;\r
+               return res == null ? defValue : res;\r
        }\r
 \r
        @Override\r
        public float getFloat (String key, float defValue) {\r
                Float res = (Float)values.get(key);\r
-               return res == null?defValue: res;\r
+               return res == null ? defValue : res;\r
        }\r
 \r
        @Override\r
        public String getString (String key, String defValue) {\r
                String res = (String)values.get(key);\r
-               return res == null?defValue: res;\r
+               return res == null ? defValue : res;\r
        }\r
 \r
        @Override\r
        public Map<String, ?> get () {\r
                HashMap<String, Object> map = new HashMap<String, Object>();\r
-               for(String key: values.keys()) {\r
+               for (String key : values.keys()) {\r
                        map.put(key, values.get(key));\r
                }\r
                return map;\r
@@ -194,4 +195,4 @@ public class GwtPreferences implements Preferences {
        public void remove (String key) {\r
                values.remove(key);\r
        }\r
-}
\ No newline at end of file
+}\r
index 2f06c69..c69b7bd 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -23,12 +24,12 @@ import com.badlogic.gdx.files.FileHandle;
 \r
 public class GwtSound implements Sound {\r
        SMSound sound;\r
-       \r
+\r
        public GwtSound (FileHandle file) {\r
                String url = ((GwtApplication)Gdx.app).getBaseUrl() + file.path();\r
                sound = SoundManager.createSound(url, url);\r
        }\r
-       \r
+\r
        @Override\r
        public long play () {\r
                sound.play();\r
@@ -71,7 +72,7 @@ public class GwtSound implements Sound {
        public void setLooping (long soundId, boolean looping) {\r
                // FIXME\r
        }\r
-               \r
+\r
        @Override\r
        public void setPitch (long soundId, float pitch) {\r
                // FIXME\r
@@ -97,4 +98,4 @@ public class GwtSound implements Sound {
        public long loop (float volume, float pitch, float pan) {\r
                return loop(volume);\r
        }\r
-}
\ No newline at end of file
+}\r
index 025cf7f..9f222e6 100644 (file)
@@ -13,88 +13,92 @@ package avian;
 import java.io.ByteArrayOutputStream;\r
 \r
 public class Utf8 {\r
-  public static boolean test(Object data) {\r
-    if (!(data instanceof byte[])) return false;\r
-    byte[] b = (byte[])data;\r
-    for (int i = 0; i < b.length; ++i) {\r
-      if (((int)b[i] & 0x080) != 0) return true;\r
-    }\r
-    return false;\r
-  }\r
+       public static boolean test (Object data) {\r
+               if (!(data instanceof byte[])) return false;\r
+               byte[] b = (byte[])data;\r
+               for (int i = 0; i < b.length; ++i) {\r
+                       if (((int)b[i] & 0x080) != 0) return true;\r
+               }\r
+               return false;\r
+       }\r
 \r
-  public static byte[] encode(char[] s16, int offset, int length) {\r
-    ByteArrayOutputStream buf = new ByteArrayOutputStream();\r
-    for (int i = offset; i < offset+length; ++i) {\r
-      char c = s16[i];\r
-      if (c == '\u0000') {     // null char\r
-        buf.write(0);\r
-        buf.write(0);\r
-      } else if (c < 0x080) {  // 1 byte char\r
-        buf.write(c);\r
-      } else if (c < 0x0800) { // 2 byte char\r
-        buf.write(0x0c0 | (c >>> 6));\r
-        buf.write(0x080 | (c & 0x03f));\r
-      } else {                // 3 byte char\r
-        buf.write(0x0e0 | ((c >>> 12) & 0x0f));\r
-        buf.write(0x080 | ((c >>> 6) & 0x03f));\r
-        buf.write(0x080 | (c & 0x03f));\r
-      }\r
-    }\r
-    return buf.toByteArray();\r
-  }\r
+       public static byte[] encode (char[] s16, int offset, int length) {\r
+               ByteArrayOutputStream buf = new ByteArrayOutputStream();\r
+               for (int i = offset; i < offset + length; ++i) {\r
+                       char c = s16[i];\r
+                       if (c == '\u0000') { // null char\r
+                               buf.write(0);\r
+                               buf.write(0);\r
+                       } else if (c < 0x080) { // 1 byte char\r
+                               buf.write(c);\r
+                       } else if (c < 0x0800) { // 2 byte char\r
+                               buf.write(0x0c0 | (c >>> 6));\r
+                               buf.write(0x080 | (c & 0x03f));\r
+                       } else { // 3 byte char\r
+                               buf.write(0x0e0 | ((c >>> 12) & 0x0f));\r
+                               buf.write(0x080 | ((c >>> 6) & 0x03f));\r
+                               buf.write(0x080 | (c & 0x03f));\r
+                       }\r
+               }\r
+               return buf.toByteArray();\r
+       }\r
 \r
-  public static Object decode(byte[] s8, int offset, int length) {\r
-    Object buf = new byte[length];\r
-    boolean isMultiByte = false;\r
-    int i=offset, j=0;\r
-    while (i < offset+length) {\r
-      int x = s8[i++];\r
-      if ((x & 0x080) == 0x0) {          // 1 byte char\r
-        if (x == 0) ++i;                 // 2 byte null char\r
-        cram(buf, j++, x);\r
-      } else if ((x & 0x0e0) == 0x0c0) { // 2 byte char\r
-        if (!isMultiByte) {\r
-          buf = widen(buf, j, length-1);\r
-          isMultiByte = true;\r
-        }\r
-        int y = s8[i++];\r
-        cram(buf, j++, ((x & 0x1f) << 6) | (y & 0x3f));\r
-      } else if ((x & 0x0f0) == 0x0e0) { // 3 byte char\r
-        if (!isMultiByte) {\r
-          buf = widen(buf, j, length-2);\r
-          isMultiByte = true;\r
-        }\r
-        int y = s8[i++]; int z = s8[i++];\r
-        cram(buf, j++, ((x & 0xf) << 12) | ((y & 0x3f) << 6) | (z & 0x3f));\r
-      }\r
-    }\r
+       public static Object decode (byte[] s8, int offset, int length) {\r
+               Object buf = new byte[length];\r
+               boolean isMultiByte = false;\r
+               int i = offset, j = 0;\r
+               while (i < offset + length) {\r
+                       int x = s8[i++];\r
+                       if ((x & 0x080) == 0x0) { // 1 byte char\r
+                               if (x == 0) ++i; // 2 byte null char\r
+                               cram(buf, j++, x);\r
+                       } else if ((x & 0x0e0) == 0x0c0) { // 2 byte char\r
+                               if (!isMultiByte) {\r
+                                       buf = widen(buf, j, length - 1);\r
+                                       isMultiByte = true;\r
+                               }\r
+                               int y = s8[i++];\r
+                               cram(buf, j++, ((x & 0x1f) << 6) | (y & 0x3f));\r
+                       } else if ((x & 0x0f0) == 0x0e0) { // 3 byte char\r
+                               if (!isMultiByte) {\r
+                                       buf = widen(buf, j, length - 2);\r
+                                       isMultiByte = true;\r
+                               }\r
+                               int y = s8[i++];\r
+                               int z = s8[i++];\r
+                               cram(buf, j++, ((x & 0xf) << 12) | ((y & 0x3f) << 6) | (z & 0x3f));\r
+                       }\r
+               }\r
 \r
-    return trim(buf, j);\r
-  }\r
+               return trim(buf, j);\r
+       }\r
 \r
-  public static char[] decode16(byte[] s8, int offset, int length) {\r
-    Object decoded = decode(s8, offset, length);\r
-    if (decoded instanceof char[]) return (char[])decoded;\r
-    return (char[])widen(decoded, length, length);\r
-  }\r
+       public static char[] decode16 (byte[] s8, int offset, int length) {\r
+               Object decoded = decode(s8, offset, length);\r
+               if (decoded instanceof char[]) return (char[])decoded;\r
+               return (char[])widen(decoded, length, length);\r
+       }\r
 \r
-  private static void cram(Object data, int index, int val) {\r
-    if (data instanceof byte[]) ((byte[])data)[index] = (byte)val;\r
-    else                        ((char[])data)[index] = (char)val;\r
-  }\r
+       private static void cram (Object data, int index, int val) {\r
+               if (data instanceof byte[])\r
+                       ((byte[])data)[index] = (byte)val;\r
+               else\r
+                       ((char[])data)[index] = (char)val;\r
+       }\r
 \r
-  private static Object widen(Object data, int length, int capacity) {\r
-    byte[] src = (byte[])data;\r
-    char[] result = new char[capacity];\r
-    for (int i = 0; i < length; ++i) result[i] = (char)((int)src[i] & 0x0ff);\r
-    return result;\r
-  }\r
+       private static Object widen (Object data, int length, int capacity) {\r
+               byte[] src = (byte[])data;\r
+               char[] result = new char[capacity];\r
+               for (int i = 0; i < length; ++i)\r
+                       result[i] = (char)((int)src[i] & 0x0ff);\r
+               return result;\r
+       }\r
 \r
-  private static Object trim(Object data, int length) {\r
-    if (data instanceof byte[]) return data;\r
-    if (((char[])data).length == length) return data;\r
-    char[] result = new char[length];\r
-    System.arraycopy(data, 0, result, 0, length);\r
-    return result;\r
-  }\r
+       private static Object trim (Object data, int length) {\r
+               if (data instanceof byte[]) return data;\r
+               if (((char[])data).length == length) return data;\r
+               char[] result = new char[length];\r
+               System.arraycopy(data, 0, result, 0, length);\r
+               return result;\r
+       }\r
 }\r
index 8902919..b3e7ad2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.assets;\r
 \r
 import com.badlogic.gdx.assets.loaders.AssetLoader;\r
@@ -29,24 +30,24 @@ public class AssetLoadingTask {
        boolean dependenciesLoaded;\r
        Array<AssetDescriptor> dependencies;\r
        Object asset;\r
-       \r
-       public AssetLoadingTask(AssetManager manager, AssetDescriptor desc, AssetLoader loader) {\r
+\r
+       public AssetLoadingTask (AssetManager manager, AssetDescriptor desc, AssetLoader loader) {\r
                this.manager = manager;\r
                this.assetDesc = desc;\r
                this.loader = loader;\r
        }\r
-       \r
+\r
        public boolean update () {\r
-               if(loader instanceof AsynchronousAssetLoader) {\r
+               if (loader instanceof AsynchronousAssetLoader) {\r
                        handleAsynchLoader((AsynchronousAssetLoader)loader);\r
                } else {\r
                        handleSynchLoader((SynchronousAssetLoader)loader);\r
                }\r
                return asset != null;\r
        }\r
-       \r
+\r
        private void handleSynchLoader (SynchronousAssetLoader loader) {\r
-               if(!dependenciesLoaded) {\r
+               if (!dependenciesLoaded) {\r
                        Array<AssetDescriptor> dependencies = loader.getDependencies(assetDesc.fileName, assetDesc.params);\r
                        if (dependencies != null) {\r
                                for (AssetDescriptor desc : dependencies) {\r
@@ -62,8 +63,8 @@ public class AssetLoadingTask {
                }\r
        }\r
 \r
-       private void handleAsynchLoader(AsynchronousAssetLoader loader) {\r
-               if(!dependenciesLoaded) {\r
+       private void handleAsynchLoader (AsynchronousAssetLoader loader) {\r
+               if (!dependenciesLoaded) {\r
                        Array<AssetDescriptor> dependencies = loader.getDependencies(assetDesc.fileName, assetDesc.params);\r
                        if (dependencies != null) {\r
                                for (AssetDescriptor desc : dependencies) {\r
@@ -80,8 +81,8 @@ public class AssetLoadingTask {
                        asset = loader.loadSync(manager, assetDesc.fileName, assetDesc.params);\r
                }\r
        }\r
-       \r
+\r
        public Object getAsset () {\r
                return asset;\r
        }\r
-}
\ No newline at end of file
+}\r
index 3bcfd77..c9c514b 100644 (file)
@@ -69,7 +69,7 @@ public class AssetManager implements Disposable {
                setLoader(TextureAtlas.class, new TextureAtlasLoader(resolver));\r
                setLoader(Texture.class, new TextureLoader(resolver));\r
                setLoader(Skin.class, new SkinLoader(resolver));\r
-//             setLoader(TileMapRenderer.class, new TileMapRendererLoader(resolver));\r
+// setLoader(TileMapRenderer.class, new TileMapRendererLoader(resolver));\r
        }\r
 \r
        /** @param fileName the asset file name\r
@@ -98,7 +98,7 @@ public class AssetManager implements Disposable {
                }\r
                if (foundIndex != -1) {\r
                        loadQueue.remove(foundIndex);\r
-//                     log.debug("Unload (from queue): " + fileName);\r
+// log.debug("Unload (from queue): " + fileName);\r
                        return;\r
                }\r
 \r
@@ -108,7 +108,7 @@ public class AssetManager implements Disposable {
                        AssetLoadingTask currAsset = tasks.firstElement();\r
                        if (currAsset.assetDesc.fileName.equals(fileName)) {\r
                                currAsset.cancel = true;\r
-//                             log.debug("Unload (from tasks): " + fileName);\r
+// log.debug("Unload (from tasks): " + fileName);\r
                                return;\r
                        }\r
                }\r
@@ -122,7 +122,7 @@ public class AssetManager implements Disposable {
                // if it is reference counted, decrement ref count and check if we can really get rid of it.\r
                assetRef.decRefCount();\r
                if (assetRef.getRefCount() <= 0) {\r
-//                     log.debug("Unload (dispose): " + fileName);\r
+// log.debug("Unload (dispose): " + fileName);\r
 \r
                        // if it is disposable dispose it\r
                        if (assetRef.getObject(Object.class) instanceof Disposable) ((Disposable)assetRef.getObject(Object.class)).dispose();\r
@@ -131,7 +131,7 @@ public class AssetManager implements Disposable {
                        assetTypes.remove(fileName);\r
                        assets.get(type).remove(fileName);\r
                } else {\r
-//                     log.debug("Unload (decrement): " + fileName);\r
+// log.debug("Unload (decrement): " + fileName);\r
                }\r
 \r
                // remove any dependencies (or just decrement their ref count).\r
@@ -151,7 +151,7 @@ public class AssetManager implements Disposable {
         * @return whether the asset is contained in this manager */\r
        public synchronized <T> boolean containsAsset (T asset) {\r
                ObjectMap<String, RefCountedContainer> typedAssets = assets.get(asset.getClass());\r
-               if(typedAssets == null) return false;\r
+               if (typedAssets == null) return false;\r
                for (String fileName : typedAssets.keys()) {\r
                        T otherAsset = (T)typedAssets.get(fileName).getObject(Object.class);\r
                        if (otherAsset == asset || asset.equals(otherAsset)) return true;\r
@@ -238,7 +238,7 @@ public class AssetManager implements Disposable {
                toLoad++;\r
                AssetDescriptor assetDesc = new AssetDescriptor(fileName, type, parameter);\r
                loadQueue.add(assetDesc);\r
-//             log.debug("Queued: " + assetDesc);\r
+// log.debug("Queued: " + assetDesc);\r
        }\r
 \r
        /** Adds the given asset to the loading queue of the AssetManager.\r
@@ -281,12 +281,12 @@ public class AssetManager implements Disposable {
                }\r
        }\r
 \r
-//     public void finishLoading () {\r
-//             log.debug("Waiting for loading to complete...");\r
-//             while (!update())\r
-//                     Thread.yield();\r
-//             log.debug("Loading complete.");\r
-//     }\r
+// public void finishLoading () {\r
+// log.debug("Waiting for loading to complete...");\r
+// while (!update())\r
+// Thread.yield();\r
+// log.debug("Loading complete.");\r
+// }\r
 \r
        synchronized void injectDependency (String parentAssetFilename, AssetDescriptor dependendAssetDesc) {\r
                // add the asset as a dependency of the parent asset\r
@@ -299,7 +299,7 @@ public class AssetManager implements Disposable {
 \r
                // if the asset is already loaded, increase its reference count.\r
                if (isLoaded(dependendAssetDesc.fileName)) {\r
-//                     log.debug("Dependency already loaded: " + dependendAssetDesc);\r
+// log.debug("Dependency already loaded: " + dependendAssetDesc);\r
                        Class type = assetTypes.get(dependendAssetDesc.fileName);\r
                        RefCountedContainer assetRef = assets.get(type).get(dependendAssetDesc.fileName);\r
                        assetRef.incRefCount();\r
@@ -307,7 +307,7 @@ public class AssetManager implements Disposable {
                }\r
                // else add a new task for the asset.\r
                else {\r
-//                     log.info("Loading dependency: " + dependendAssetDesc);\r
+// log.info("Loading dependency: " + dependendAssetDesc);\r
                        addTask(dependendAssetDesc);\r
                }\r
        }\r
@@ -319,7 +319,7 @@ public class AssetManager implements Disposable {
 \r
                // if the asset not meant to be reloaded and is already loaded, increase its reference count\r
                if (isLoaded(assetDesc.fileName)) {\r
-//                     log.debug("Already loaded: " + assetDesc);\r
+// log.debug("Already loaded: " + assetDesc);\r
                        Class type = assetTypes.get(assetDesc.fileName);\r
                        RefCountedContainer assetRef = assets.get(type).get(assetDesc.fileName);\r
                        assetRef.incRefCount();\r
@@ -327,7 +327,7 @@ public class AssetManager implements Disposable {
                        loaded++;\r
                } else {\r
                        // else add a new task for the asset.\r
-//                     log.info("Loading: " + assetDesc);\r
+// log.info("Loading: " + assetDesc);\r
                        addTask(assetDesc);\r
                }\r
        }\r
@@ -370,8 +370,8 @@ public class AssetManager implements Disposable {
                                        task.assetDesc.params.loadedCallback.finishedLoading(this, task.assetDesc.fileName, task.assetDesc.type);\r
                                }\r
 \r
-//                             long endTime = System.nanoTime();\r
-//                             log.debug("Loaded: " + (endTime - task.startTime) / 1000000f + "ms " + task.assetDesc);\r
+// long endTime = System.nanoTime();\r
+// log.debug("Loaded: " + (endTime - task.startTime) / 1000000f + "ms " + task.assetDesc);\r
                        }\r
 \r
                        return true;\r
@@ -395,7 +395,7 @@ public class AssetManager implements Disposable {
        /** Handles a runtime/loading error in {@link #update()} by optionally invoking the {@link AssetErrorListener}.\r
         * @param t */\r
        private void handleTaskError (Throwable t) {\r
-//             log.error("Error loading asset.", t);\r
+// log.error("Error loading asset.", t);\r
 \r
                if (tasks.isEmpty()) throw new GdxRuntimeException(t);\r
 \r
@@ -427,7 +427,7 @@ public class AssetManager implements Disposable {
        public synchronized <T, P extends AssetLoaderParameters<T>> void setLoader (Class<T> type, AssetLoader<T, P> loader) {\r
                if (type == null) throw new IllegalArgumentException("type cannot be null.");\r
                if (loader == null) throw new IllegalArgumentException("loader cannot be null.");\r
-//             log.debug("Loader set: " + type.getName() + " -> " + loader.getClass().getName());\r
+// log.debug("Loader set: " + type.getName() + " -> " + loader.getClass().getName());\r
                loaders.put(type, loader);\r
        }\r
 \r
@@ -455,7 +455,7 @@ public class AssetManager implements Disposable {
 \r
        /** Disposes all assets in the manager and stops all asynchronous loading. */\r
        public synchronized void dispose () {\r
-//             log.debug("Disposing.");\r
+// log.debug("Disposing.");\r
                clear();\r
        }\r
 \r
@@ -502,10 +502,10 @@ public class AssetManager implements Disposable {
        }\r
 \r
        /** @return the {@link Logger} used by the {@link AssetManager} */\r
-//     public Logger getLogger () {\r
-//             return log;\r
-//             return null;\r
-//     }\r
+// public Logger getLogger () {\r
+// return log;\r
+// return null;\r
+// }\r
 \r
        /** Returns the reference count of an asset.\r
         * @param fileName */\r
@@ -551,11 +551,10 @@ public class AssetManager implements Disposable {
                }\r
                return buffer.toString();\r
        }\r
-       \r
-       /**\r
-        * blocks until all assets are loaded.\r
-        */\r
+\r
+       /** blocks until all assets are loaded. */\r
        public void finishLoading () {\r
-               while (!update());                      \r
+               while (!update())\r
+                       ;\r
        }\r
 }\r
index c2b7eac..3ff1046 100644 (file)
@@ -56,7 +56,7 @@ public class TextureLoader extends AsynchronousAssetLoader<Texture, TextureLoade
                        data = new FileTextureData(handle, pixmap, format, genMipMaps);\r
                } else {\r
                        data = parameter.textureData;\r
-                       if(!data.isPrepared()) data.prepare();\r
+                       if (!data.isPrepared()) data.prepare();\r
                        texture = parameter.texture;\r
                }\r
        }\r
index 55dab59..3e85133 100644 (file)
@@ -18,7 +18,6 @@ package com.badlogic.gdx.assets.loaders.resolvers;
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.assets.loaders.FileHandleResolver;\r
-import com.badlogic.gdx.assets.loaders.resolvers.ResolutionFileResolver.Resolution;\r
 import com.badlogic.gdx.backends.gwt.GwtFileHandle;\r
 import com.badlogic.gdx.files.FileHandle;\r
 \r
index 1abe7d1..df0081c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.files;\r
 \r
 import java.io.BufferedInputStream;\r
@@ -42,12 +43,10 @@ public class FileHandle {
        public String nameWithoutExtension () {\r
                throw new GdxRuntimeException("Stub");\r
        }\r
-       \r
-       /**\r
-        * @return the path and filename without the extension, e.g. dir/dir2/file.png -> dir/dir2/file\r
-        */\r
-       public String pathWithoutExtension() {\r
-           throw new GdxRuntimeException("Stub");\r
+\r
+       /** @return the path and filename without the extension, e.g. dir/dir2/file.png -> dir/dir2/file */\r
+       public String pathWithoutExtension () {\r
+               throw new GdxRuntimeException("Stub");\r
        }\r
 \r
        public FileType type () {\r
@@ -223,7 +222,7 @@ public class FileHandle {
        public FileHandle parent () {\r
                throw new GdxRuntimeException("Stub");\r
        }\r
-       \r
+\r
        /** Returns a handle to the sibling with the specified name.\r
         * @throw GdxRuntimeException if this file handle is a {@link FileType#Classpath} or {@link FileType#Internal} and the sibling\r
         *        doesn't exist, or this file is the root. */\r
@@ -289,4 +288,4 @@ public class FileHandle {
        public String toString () {\r
                throw new GdxRuntimeException("Stub");\r
        }\r
-}
\ No newline at end of file
+}\r
index 8a9aea0..cf7cf63 100644 (file)
@@ -16,6 +16,7 @@
 \r
 package com.badlogic.gdx.graphics;\r
 \r
+import java.awt.Canvas;\r
 import java.nio.Buffer;\r
 import java.nio.IntBuffer;\r
 import java.util.HashMap;\r
@@ -23,18 +24,9 @@ import java.util.Map;
 \r
 import com.badlogic.gdx.backends.gwt.GwtFileHandle;\r
 import com.badlogic.gdx.files.FileHandle;\r
-import com.badlogic.gdx.graphics.g2d.Gdx2DPixmap;\r
 import com.badlogic.gdx.utils.BufferUtils;\r
 import com.badlogic.gdx.utils.Disposable;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
-import com.google.gwt.canvas.client.Canvas;\r
-import com.google.gwt.canvas.dom.client.CanvasPixelArray;\r
-import com.google.gwt.canvas.dom.client.Context2d;\r
-import com.google.gwt.canvas.dom.client.CssColor;\r
-import com.google.gwt.canvas.dom.client.ImageData;\r
-import com.google.gwt.canvas.dom.client.Context2d.Composite;\r
-import com.google.gwt.dom.client.CanvasElement;\r
-import com.google.gwt.dom.client.ImageElement;\r
 \r
 public class Pixmap implements Disposable {\r
        public static Map<Integer, Pixmap> pixmaps = new HashMap<Integer, Pixmap>();\r
@@ -46,7 +38,7 @@ public class Pixmap implements Disposable {
        public enum Format {\r
                Alpha, Intensity, LuminanceAlpha, RGB565, RGBA4444, RGB888, RGBA8888;\r
        }\r
-       \r
+\r
        /** Blending functions to be set with {@link Pixmap#setBlending}.\r
         * @author mzechner */\r
        public enum Blending {\r
@@ -72,22 +64,22 @@ public class Pixmap implements Disposable {
        String color = make(r, g, b, a);\r
        static Blending blending;\r
        CanvasPixelArray pixels;\r
-       \r
+\r
        public Pixmap (FileHandle file) {\r
                GwtFileHandle gwtFile = (GwtFileHandle)file;\r
                ImageElement img = gwtFile.preloader.images.get(file.path());\r
-               if(img == null) throw new GdxRuntimeException("Couldn't load image '" + file.path() + "', file does not exist");\r
+               if (img == null) throw new GdxRuntimeException("Couldn't load image '" + file.path() + "', file does not exist");\r
                create(img.getWidth(), img.getHeight(), Format.RGBA8888);\r
                context.setGlobalCompositeOperation(Composite.COPY);\r
                context.drawImage(img, 0, 0);\r
                context.setGlobalCompositeOperation(getComposite());\r
        }\r
-       \r
-       private static Composite getComposite() {\r
-               return blending == Blending.None? Composite.COPY: Composite.SOURCE_OVER;\r
+\r
+       private static Composite getComposite () {\r
+               return blending == Blending.None ? Composite.COPY : Composite.SOURCE_OVER;\r
        }\r
-       \r
-       public Pixmap(ImageElement img) {\r
+\r
+       public Pixmap (ImageElement img) {\r
                create(img.getWidth(), img.getHeight(), Format.RGBA8888);\r
                context.drawImage(img, 0, 0);\r
        }\r
@@ -115,17 +107,16 @@ public class Pixmap implements Disposable {
                return "rgba(" + r2 + "," + g2 + "," + b2 + "," + a2 + ")";\r
        }\r
 \r
-\r
        /** Sets the type of {@link Blending} to be used for all operations. Default is {@link Blending#SourceOver}.\r
         * @param blending the blending type */\r
        public static void setBlending (Blending blending) {\r
                Pixmap.blending = blending;\r
                Composite composite = getComposite();\r
-               for(Pixmap pixmap: pixmaps.values()) {\r
+               for (Pixmap pixmap : pixmaps.values()) {\r
                        pixmap.context.setGlobalCompositeOperation(composite);\r
                }\r
        }\r
-       \r
+\r
        /** @return the currently set {@link Blending} */\r
        public static Blending getBlending () {\r
                return blending;\r
@@ -136,20 +127,20 @@ public class Pixmap implements Disposable {
         * @param filter the filter. */\r
        public static void setFilter (Filter filter) {\r
        }\r
-       \r
+\r
        public Format getFormat () {\r
                return format;\r
        }\r
-       \r
-       public int getGLInternalFormat() {\r
+\r
+       public int getGLInternalFormat () {\r
                return GL20.GL_RGBA;\r
        }\r
-       \r
-       public int getGLFormat() {\r
+\r
+       public int getGLFormat () {\r
                return GL20.GL_RGBA;\r
        }\r
-       \r
-       public int getGLType() {\r
+\r
+       public int getGLType () {\r
                return GL20.GL_UNSIGNED_BYTE;\r
        }\r
 \r
@@ -329,16 +320,13 @@ public class Pixmap implements Disposable {
         * @param y The y-coordinate\r
         * @return The pixel color in RGBA8888 format. */\r
        public int getPixel (int x, int y) {\r
-               if(pixels == null) pixels = context.getImageData(0, 0, width, height).getData();\r
+               if (pixels == null) pixels = context.getImageData(0, 0, width, height).getData();\r
                int i = x * 4 + y * width * 4;\r
                int r = pixels.get(i + 0) & 0xff;\r
                int g = pixels.get(i + 1) & 0xff;\r
                int b = pixels.get(i + 2) & 0xff;\r
                int a = pixels.get(i + 3) & 0xff;\r
-               return (r << 24) | \r
-                                (g << 16) |\r
-                                (b << 8) |\r
-                                (a);\r
+               return (r << 24) | (g << 16) | (b << 8) | (a);\r
        }\r
 \r
        /** Draws a pixel at the given location with the current color.\r
index 9c7407a..425766b 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics;\r
 \r
 import java.nio.IntBuffer;\r
@@ -241,4 +242,4 @@ public class Texture implements Disposable {
        public static void setAssetManager (AssetManager manager) {\r
                // nothing to do, no pause/resume cycle\r
        }\r
-}
\ No newline at end of file
+}\r
index 5dfc3b7..6695340 100644 (file)
@@ -18,11 +18,9 @@ package com.badlogic.gdx.graphics.g2d;
 \r
 import java.io.BufferedReader;\r
 import java.io.File;\r
-import java.io.FileWriter;\r
 import java.io.IOException;\r
 import java.io.InputStream;\r
 import java.io.InputStreamReader;\r
-import java.io.Writer;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.graphics.Texture;\r
@@ -30,11 +28,8 @@ import com.badlogic.gdx.utils.Array;
 import com.badlogic.gdx.utils.Disposable;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
-/**\r
- * See <a href="http://www.badlogicgames.com/wordpress/?p=1255">http://www.badlogicgames.com/wordpress/?p=1255</a>\r
- * @author mzechner\r
- *\r
- */\r
+/** See <a href="http://www.badlogicgames.com/wordpress/?p=1255">http://www.badlogicgames.com/wordpress/?p=1255</a>\r
+ * @author mzechner */\r
 public class ParticleEffect implements Disposable {\r
        private final Array<ParticleEmitter> emitters;\r
 \r
index 220215b..8f4e7f9 100644 (file)
 \r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
-import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
-import java.nio.IntBuffer;\r
-import java.nio.ShortBuffer;\r
-\r
-import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.graphics.GL11;\r
-import com.badlogic.gdx.graphics.GL20;\r
-import com.badlogic.gdx.utils.BufferUtils;\r
-import com.badlogic.gdx.utils.GdxRuntimeException;\r
-\r
 /** <p>\r
  * In IndexBufferObject wraps OpenGL's index buffer functionality to be used in conjunction with VBOs. This class can be\r
  * seamlessly used with OpenGL ES 1.x and 2.0.\r
index b35a9c0..87b8b8d 100644 (file)
@@ -16,7 +16,6 @@
 \r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
-import java.nio.ByteBuffer;\r
 import java.nio.FloatBuffer;\r
 import java.nio.IntBuffer;\r
 import java.util.ArrayList;\r
@@ -134,7 +133,7 @@ public class ShaderProgram implements Disposable {
        public ShaderProgram (FileHandle vertexShader, FileHandle fragmentShader) {\r
                this(vertexShader.readString(), fragmentShader.readString());\r
        }\r
-       \r
+\r
        /** Construcs a new JOglShaderProgram and immediatly compiles it.\r
         * \r
         * @param vertexShader the vertex shader\r
index 48b7c84..75ecfed 100644 (file)
 \r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
-import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
-import java.nio.FloatBuffer;\r
-import java.nio.IntBuffer;\r
-\r
-import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.GL11;\r
-import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.VertexAttribute;\r
 import com.badlogic.gdx.graphics.VertexAttributes;\r
-import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
-import com.badlogic.gdx.utils.BufferUtils;\r
 \r
 /** <p>\r
  * A {@link VertexData} implementation based on OpenGL vertex buffer objects.\r
@@ -66,4 +55,3 @@ public class VertexArray extends VertexBufferObject {
                super(false, numVertices, attributes);\r
        }\r
 }\r
-\r
index 4bb8495..a39363e 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
-import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.FloatBuffer;\r
 import java.nio.IntBuffer;\r
 \r
@@ -297,4 +295,3 @@ public class VertexBufferObject implements VertexData {
                }\r
        }\r
 }\r
-\r
index 265e8d8..b75c120 100644 (file)
@@ -698,7 +698,7 @@ public class Matrix4 implements Serializable {
                val[M22] *= scale.z;\r
                return this;\r
        }\r
-       \r
+\r
        public Matrix4 scl (float scale) {\r
                val[M00] *= scale;\r
                val[M11] *= scale;\r
@@ -724,9 +724,8 @@ public class Matrix4 implements Serializable {
                inv();\r
                return tra();\r
        }\r
-       \r
-       \r
-       static void matrix4_mul(float[] mata, float[] matb) {\r
+\r
+       static void matrix4_mul (float[] mata, float[] matb) {\r
                float tmp[] = new float[16];\r
                tmp[M00] = mata[M00] * matb[M00] + mata[M01] * matb[M10] + mata[M02] * matb[M20] + mata[M03] * matb[M30];\r
                tmp[M01] = mata[M00] * matb[M01] + mata[M01] * matb[M11] + mata[M02] * matb[M21] + mata[M03] * matb[M31];\r
@@ -746,20 +745,20 @@ public class Matrix4 implements Serializable {
                tmp[M33] = mata[M30] * matb[M03] + mata[M31] * matb[M13] + mata[M32] * matb[M23] + mata[M33] * matb[M33];\r
                System.arraycopy(tmp, 0, mata, 0, 16);\r
        }\r
-       \r
-       static float matrix4_det(float[] val) {\r
+\r
+       static float matrix4_det (float[] val) {\r
                return val[M30] * val[M21] * val[M12] * val[M03] - val[M20] * val[M31] * val[M12] * val[M03] - val[M30] * val[M11]\r
-                               * val[M22] * val[M03] + val[M10] * val[M31] * val[M22] * val[M03] + val[M20] * val[M11] * val[M32] * val[M03] - val[M10]\r
-                               * val[M21] * val[M32] * val[M03] - val[M30] * val[M21] * val[M02] * val[M13] + val[M20] * val[M31] * val[M02] * val[M13]\r
-                               + val[M30] * val[M01] * val[M22] * val[M13] - val[M00] * val[M31] * val[M22] * val[M13] - val[M20] * val[M01] * val[M32]\r
-                               * val[M13] + val[M00] * val[M21] * val[M32] * val[M13] + val[M30] * val[M11] * val[M02] * val[M23] - val[M10] * val[M31]\r
-                               * val[M02] * val[M23] - val[M30] * val[M01] * val[M12] * val[M23] + val[M00] * val[M31] * val[M12] * val[M23] + val[M10]\r
-                               * val[M01] * val[M32] * val[M23] - val[M00] * val[M11] * val[M32] * val[M23] - val[M20] * val[M11] * val[M02] * val[M33]\r
-                               + val[M10] * val[M21] * val[M02] * val[M33] + val[M20] * val[M01] * val[M12] * val[M33] - val[M00] * val[M21] * val[M12]\r
-                               * val[M33] - val[M10] * val[M01] * val[M22] * val[M33] + val[M00] * val[M11] * val[M22] * val[M33];\r
+                       * val[M22] * val[M03] + val[M10] * val[M31] * val[M22] * val[M03] + val[M20] * val[M11] * val[M32] * val[M03] - val[M10]\r
+                       * val[M21] * val[M32] * val[M03] - val[M30] * val[M21] * val[M02] * val[M13] + val[M20] * val[M31] * val[M02] * val[M13]\r
+                       + val[M30] * val[M01] * val[M22] * val[M13] - val[M00] * val[M31] * val[M22] * val[M13] - val[M20] * val[M01] * val[M32]\r
+                       * val[M13] + val[M00] * val[M21] * val[M32] * val[M13] + val[M30] * val[M11] * val[M02] * val[M23] - val[M10] * val[M31]\r
+                       * val[M02] * val[M23] - val[M30] * val[M01] * val[M12] * val[M23] + val[M00] * val[M31] * val[M12] * val[M23] + val[M10]\r
+                       * val[M01] * val[M32] * val[M23] - val[M00] * val[M11] * val[M32] * val[M23] - val[M20] * val[M11] * val[M02] * val[M33]\r
+                       + val[M10] * val[M21] * val[M02] * val[M33] + val[M20] * val[M01] * val[M12] * val[M33] - val[M00] * val[M21] * val[M12]\r
+                       * val[M33] - val[M10] * val[M01] * val[M22] * val[M33] + val[M00] * val[M11] * val[M22] * val[M33];\r
        }\r
-       \r
-       static boolean matrix4_inv(float[] val) {\r
+\r
+       static boolean matrix4_inv (float[] val) {\r
                float tmp[] = new float[16];\r
                float l_det = matrix4_det(val);\r
                if (l_det == 0) return false;\r
@@ -795,7 +794,7 @@ public class Matrix4 implements Serializable {
                        * val[M12] * val[M31] + val[M01] * val[M10] * val[M32] - val[M00] * val[M11] * val[M32];\r
                tmp[M33] = val[M01] * val[M12] * val[M20] - val[M02] * val[M11] * val[M20] + val[M02] * val[M10] * val[M21] - val[M00]\r
                        * val[M12] * val[M21] - val[M01] * val[M10] * val[M22] + val[M00] * val[M11] * val[M22];\r
-       \r
+\r
                float inv_det = 1.0f / l_det;\r
                val[M00] = tmp[M00] * inv_det;\r
                val[M01] = tmp[M01] * inv_det;\r
@@ -815,8 +814,8 @@ public class Matrix4 implements Serializable {
                val[M33] = tmp[M33] * inv_det;\r
                return true;\r
        }\r
-       \r
-       static void matrix4_mulVec(float[] mat, float[] vec, int offset) {\r
+\r
+       static void matrix4_mulVec (float[] mat, float[] vec, int offset) {\r
                float x = vec[offset + 0] * mat[M00] + vec[offset + 1] * mat[M01] + vec[offset + 2] * mat[M02] + mat[M03];\r
                float y = vec[offset + 0] * mat[M10] + vec[offset + 1] * mat[M11] + vec[offset + 2] * mat[M12] + mat[M13];\r
                float z = vec[offset + 0] * mat[M20] + vec[offset + 1] * mat[M21] + vec[offset + 2] * mat[M22] + mat[M23];\r
@@ -824,18 +823,18 @@ public class Matrix4 implements Serializable {
                vec[offset + 1] = y;\r
                vec[offset + 2] = z;\r
        }\r
-       \r
-       static void matrix4_proj(float[] mat, float[] vec, int offset) {\r
+\r
+       static void matrix4_proj (float[] mat, float[] vec, int offset) {\r
                float inv_w = 1.0f / (vec[offset + 0] * mat[M30] + vec[offset + 1] * mat[M31] + vec[offset + 2] * mat[M32] + mat[M33]);\r
                float x = (vec[offset + 0] * mat[M00] + vec[offset + 1] * mat[M01] + vec[offset + 2] * mat[M02] + mat[M03]) * inv_w;\r
-               float y = (vec[offset + 0] * mat[M10] + vec[offset + 1] * mat[M11] + vec[offset + 2] * mat[M12] + mat[M13]) * inv_w; \r
+               float y = (vec[offset + 0] * mat[M10] + vec[offset + 1] * mat[M11] + vec[offset + 2] * mat[M12] + mat[M13]) * inv_w;\r
                float z = (vec[offset + 0] * mat[M20] + vec[offset + 1] * mat[M21] + vec[offset + 2] * mat[M22] + mat[M23]) * inv_w;\r
                vec[offset + 0] = x;\r
                vec[offset + 1] = y;\r
                vec[offset + 2] = z;\r
        }\r
-       \r
-       static void matrix4_rot(float[] mat, float[] vec, int offset) {\r
+\r
+       static void matrix4_rot (float[] mat, float[] vec, int offset) {\r
                float x = vec[offset + 0] * mat[M00] + vec[offset + 1] * mat[M01] + vec[offset + 2] * mat[M02];\r
                float y = vec[offset + 0] * mat[M10] + vec[offset + 1] * mat[M11] + vec[offset + 2] * mat[M12];\r
                float z = vec[offset + 0] * mat[M20] + vec[offset + 1] * mat[M21] + vec[offset + 2] * mat[M22];\r
@@ -875,7 +874,7 @@ public class Matrix4 implements Serializable {
         * @param numVecs the number of vectors\r
         * @param stride the stride between vectors in floats */\r
        public static void mulVec (float[] mat, float[] vecs, int offset, int numVecs, int stride) {\r
-               for(int i = 0; i < numVecs; i++) {\r
+               for (int i = 0; i < numVecs; i++) {\r
                        matrix4_mulVec(mat, vecs, offset);\r
                        offset += stride;\r
                }\r
@@ -903,7 +902,7 @@ public class Matrix4 implements Serializable {
         * @param numVecs the number of vectors\r
         * @param stride the stride between vectors in floats */\r
        public static void prj (float[] mat, float[] vecs, int offset, int numVecs, int stride) {\r
-               for(int i = 0; i < numVecs; i++) {\r
+               for (int i = 0; i < numVecs; i++) {\r
                        matrix4_proj(mat, vecs, offset);\r
                        offset += stride;\r
                }\r
@@ -931,7 +930,7 @@ public class Matrix4 implements Serializable {
         * @param numVecs the number of vectors\r
         * @param stride the stride between vectors in floats */\r
        public static void rot (float[] mat, float[] vecs, int offset, int numVecs, int stride) {\r
-               for(int i = 0; i < numVecs; i++) {\r
+               for (int i = 0; i < numVecs; i++) {\r
                        matrix4_rot(mat, vecs, offset);\r
                        offset += stride;\r
                }\r
@@ -960,7 +959,7 @@ public class Matrix4 implements Serializable {
        public Matrix4 translate (Vector3 translation) {\r
                return translate(translation.x, translation.y, translation.z);\r
        }\r
-       \r
+\r
        /** Postmultiplies this matrix by a translation matrix. Postmultiplication is also used by OpenGL ES'\r
         * glTranslate/glRotate/glScale\r
         * @param x\r
index d45d0f8..49f8e5c 100644 (file)
@@ -32,7 +32,7 @@ public class Body {
        final Vec2 tmp2 = new Vec2();\r
        final ArrayList<Fixture> fixtures = new ArrayList<Fixture>();\r
        final ArrayList<JointEdge> joints = new ArrayList<JointEdge>();\r
-       \r
+\r
        /** Constructs a new body with the given address\r
         * @param world the world\r
         * @param addr the address */\r
@@ -61,6 +61,7 @@ public class Body {
        }\r
 \r
        Transform transform = new Transform();\r
+\r
        /** Get the body transform for the body's origin. */\r
        public Transform getTransform () {\r
                org.jbox2d.common.Transform trans = body.getTransform();\r
@@ -72,7 +73,7 @@ public class Body {
        }\r
 \r
        final Vector2 position = new Vector2();\r
-       \r
+\r
        /** Get the world body origin position.\r
         * @return the world position of the body's origin. */\r
        public Vector2 getPosition () {\r
@@ -89,6 +90,7 @@ public class Body {
 \r
        /** Get the world position of the center of mass. */\r
        final Vector2 worldCenter = new Vector2();\r
+\r
        public Vector2 getWorldCenter () {\r
                Vec2 wc = body.getWorldCenter();\r
                return worldCenter.set(wc.x, wc.y);\r
@@ -103,7 +105,6 @@ public class Body {
                return localCenter;\r
        }\r
 \r
-\r
        /** Set the linear velocity of the center of mass. */\r
        public void setLinearVelocity (Vector2 v) {\r
                tmp.set(v.x, v.y);\r
@@ -337,18 +338,18 @@ public class Body {
        /** Set the type of this body. This may alter the mass and velocity. */\r
        public void setType (BodyType type) {\r
                org.jbox2d.dynamics.BodyType t = org.jbox2d.dynamics.BodyType.DYNAMIC;\r
-               if(type == BodyType.DynamicBody) t = org.jbox2d.dynamics.BodyType.DYNAMIC;\r
-               if(type == BodyType.KinematicBody) t = org.jbox2d.dynamics.BodyType.KINEMATIC;\r
-               if(type == BodyType.StaticBody) t = org.jbox2d.dynamics.BodyType.STATIC;\r
+               if (type == BodyType.DynamicBody) t = org.jbox2d.dynamics.BodyType.DYNAMIC;\r
+               if (type == BodyType.KinematicBody) t = org.jbox2d.dynamics.BodyType.KINEMATIC;\r
+               if (type == BodyType.StaticBody) t = org.jbox2d.dynamics.BodyType.STATIC;\r
                body.setType(t);\r
        }\r
-       \r
+\r
        /** Get the type of this body. */\r
        public BodyType getType () {\r
                org.jbox2d.dynamics.BodyType type = body.getType();\r
-               if(type == org.jbox2d.dynamics.BodyType.DYNAMIC) return BodyType.DynamicBody;\r
-               if(type == org.jbox2d.dynamics.BodyType.KINEMATIC) return BodyType.KinematicBody;\r
-               if(type == org.jbox2d.dynamics.BodyType.STATIC) return BodyType.StaticBody;\r
+               if (type == org.jbox2d.dynamics.BodyType.DYNAMIC) return BodyType.DynamicBody;\r
+               if (type == org.jbox2d.dynamics.BodyType.KINEMATIC) return BodyType.KinematicBody;\r
+               if (type == org.jbox2d.dynamics.BodyType.STATIC) return BodyType.StaticBody;\r
                return BodyType.DynamicBody;\r
        }\r
 \r
@@ -447,7 +448,7 @@ public class Body {
                fixtures.remove(fixture);\r
                world.fixtures.remove(fixture.fixture);\r
        }\r
-       \r
+\r
        /** Get the list of all fixtures attached to this body. Do not modify the list! */\r
        public ArrayList<Fixture> getFixtureList () {\r
                return fixtures;\r
@@ -458,7 +459,7 @@ public class Body {
                // FIXME wow this is bad...\r
                org.jbox2d.dynamics.joints.JointEdge jointEdge = body.getJointList();\r
                joints.clear();\r
-               while(jointEdge != null) {\r
+               while (jointEdge != null) {\r
                        JointEdge edge = new JointEdge(world.bodies.get(jointEdge.other), world.joints.get(jointEdge.joint));\r
                        joints.add(edge);\r
                        jointEdge = jointEdge.next;\r
@@ -473,7 +474,7 @@ public class Body {
 \r
        /** Sets the gravity scale of the body */\r
        public void setGravityScale (float scale) {\r
-                       body.setGravityScale(scale);\r
+               body.setGravityScale(scale);\r
        }\r
 \r
        /** Get the parent world of this body. */\r
@@ -482,7 +483,7 @@ public class Body {
        }\r
 \r
        private Object userData;\r
-       \r
+\r
        /** Get the user data */\r
        public Object getUserData () {\r
                return userData;\r
index e9b6838..f33202f 100644 (file)
@@ -298,7 +298,7 @@ public class Box2DDebugRenderer {
                Vector2 point = worldManifold.getPoints()[0];\r
                renderer.point(point.x, point.y, 0);\r
        }\r
-       \r
+\r
        public boolean isDrawBodies () {\r
                return drawBodies;\r
        }\r
index 85a728a..a6745d3 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d;\r
 \r
 import org.jbox2d.common.Vec2;\r
@@ -21,13 +22,13 @@ import com.badlogic.gdx.math.Vector2;
 \r
 public class ChainShape extends Shape {\r
        org.jbox2d.collision.shapes.ChainShape shape;\r
-       \r
+\r
        public ChainShape () {\r
                super(new org.jbox2d.collision.shapes.ChainShape());\r
                shape = (org.jbox2d.collision.shapes.ChainShape)super.shape;\r
        }\r
-       \r
-       ChainShape(org.jbox2d.collision.shapes.ChainShape shape) {\r
+\r
+       ChainShape (org.jbox2d.collision.shapes.ChainShape shape) {\r
                super(shape);\r
                this.shape = shape;\r
        }\r
@@ -41,7 +42,7 @@ public class ChainShape extends Shape {
         * @param vertices an array of vertices, these are copied */\r
        public void createLoop (Vector2[] vertices) {\r
                Vec2[] v = new Vec2[vertices.length];\r
-               for(int i = 0; i < vertices.length; i++) {\r
+               for (int i = 0; i < vertices.length; i++) {\r
                        v[i] = new Vec2(vertices[i].x, vertices[i].y);\r
                }\r
                shape.createLoop(v, v.length);\r
@@ -51,7 +52,7 @@ public class ChainShape extends Shape {
         * @param vertices an array of vertices, these are copied */\r
        public void createChain (Vector2[] vertices) {\r
                Vec2[] v = new Vec2[vertices.length];\r
-               for(int i = 0; i < vertices.length; i++) {\r
+               for (int i = 0; i < vertices.length; i++) {\r
                        v[i] = new Vec2(vertices[i].x, vertices[i].y);\r
                }\r
                shape.createChain(v, v.length);\r
@@ -104,4 +105,4 @@ public class ChainShape extends Shape {
        public int getChildCount () {\r
                return shape.getChildCount();\r
        }\r
-}
\ No newline at end of file
+}\r
index a0050bd..f7753b8 100644 (file)
@@ -22,13 +22,13 @@ import com.badlogic.gdx.math.Vector2;
  * @author mzechner */\r
 public class CircleShape extends Shape {\r
        org.jbox2d.collision.shapes.CircleShape shape;\r
-       \r
+\r
        public CircleShape () {\r
                super(new org.jbox2d.collision.shapes.CircleShape());\r
                shape = (org.jbox2d.collision.shapes.CircleShape)super.shape;\r
        }\r
-       \r
-       CircleShape(org.jbox2d.collision.shapes.CircleShape shape) {\r
+\r
+       CircleShape (org.jbox2d.collision.shapes.CircleShape shape) {\r
                super(shape);\r
                this.shape = shape;\r
        }\r
index 79433df..4296a20 100644 (file)
@@ -16,7 +16,6 @@
 \r
 package com.badlogic.gdx.physics.box2d;\r
 \r
-\r
 import com.badlogic.gdx.math.Vector2;\r
 \r
 /** The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if\r
@@ -28,10 +27,10 @@ public class Contact {
        final WorldManifold worldManifold = new WorldManifold();\r
        final org.jbox2d.collision.WorldManifold worldManifold2 = new org.jbox2d.collision.WorldManifold();\r
 \r
-       Contact(World world) {\r
+       Contact (World world) {\r
                this.world = world;\r
        }\r
-       \r
+\r
        protected Contact (World world, org.jbox2d.dynamics.contacts.Contact contact) {\r
                this.world = world;\r
                this.contact = contact;\r
@@ -42,7 +41,7 @@ public class Contact {
                worldManifold.normal.set(worldManifold2.normal.x, worldManifold2.normal.y);\r
                // FIXME jbox2d doesn't tell us the number of world manifold points :/\r
                worldManifold.numContactPoints = worldManifold2.points.length;\r
-               for(int i = 0; i < worldManifold.points.length; i++) {\r
+               for (int i = 0; i < worldManifold.points.length; i++) {\r
                        worldManifold.points[i] = new Vector2(worldManifold2.points[i].x, worldManifold2.points[i].y);\r
                }\r
                return worldManifold;\r
index 8f0effc..fdbee9c 100644 (file)
@@ -29,14 +29,14 @@ public class ContactImpulse {
        }\r
 \r
        public float[] getNormalImpulses () {\r
-               for(int i = 0; i < impulse.count; i++) {\r
+               for (int i = 0; i < impulse.count; i++) {\r
                        normalImpulses[i] = impulse.normalImpulses[i];\r
                }\r
                return normalImpulses;\r
        }\r
 \r
        public float[] getTangentImpulses () {\r
-               for(int i = 0; i < impulse.count; i++) {\r
+               for (int i = 0; i < impulse.count; i++) {\r
                        tangentImpulses[i] = impulse.tangentImpulses[i];\r
                }\r
                return tangentImpulses;\r
index c159e3e..01bdc0e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d;\r
 \r
 import org.jbox2d.common.Vec2;\r
@@ -23,7 +24,7 @@ import com.badlogic.gdx.math.Vector2;
  * used to ensure correct contact normals. */\r
 public class EdgeShape extends Shape {\r
        org.jbox2d.collision.shapes.EdgeShape shape;\r
-       \r
+\r
        public EdgeShape () {\r
                super(new org.jbox2d.collision.shapes.EdgeShape());\r
                shape = (org.jbox2d.collision.shapes.EdgeShape)super.shape;\r
@@ -38,7 +39,7 @@ public class EdgeShape extends Shape {
        public void set (Vector2 v1, Vector2 v2) {\r
                set(v1.x, v1.y, v2.x, v2.y);\r
        }\r
-       \r
+\r
        Vec2 tmp = new Vec2();\r
        Vec2 tmp2 = new Vec2();\r
 \r
@@ -78,4 +79,4 @@ public class EdgeShape extends Shape {
        public Type getType () {\r
                return Type.Edge;\r
        }\r
-}
\ No newline at end of file
+}\r
index 1202828..dd2fe11 100644 (file)
@@ -46,10 +46,10 @@ public class Fixture {
         * @return the shape type. */\r
        public Type getType () {\r
                ShapeType type = fixture.getType();\r
-               if(type == ShapeType.CIRCLE) return Type.Circle;\r
-               if(type == ShapeType.EDGE) return Type.Edge;\r
-               if(type == ShapeType.POLYGON) return Type.Polygon;\r
-               if(type == ShapeType.CHAIN) return Type.Chain;\r
+               if (type == ShapeType.CIRCLE) return Type.Circle;\r
+               if (type == ShapeType.EDGE) return Type.Edge;\r
+               if (type == ShapeType.POLYGON) return Type.Polygon;\r
+               if (type == ShapeType.CHAIN) return Type.Chain;\r
                return Type.Circle;\r
        }\r
 \r
@@ -58,10 +58,10 @@ public class Fixture {
                if (shape == null) {\r
                        org.jbox2d.collision.shapes.Shape shape2 = fixture.getShape();\r
                        ShapeType type = shape2.getType();\r
-                       if(type == ShapeType.CHAIN) shape = new ChainShape((org.jbox2d.collision.shapes.ChainShape)shape2);\r
-                       if(type == ShapeType.CIRCLE) shape = new CircleShape((org.jbox2d.collision.shapes.CircleShape)shape2);\r
-                       if(type == ShapeType.EDGE) shape = new EdgeShape((org.jbox2d.collision.shapes.EdgeShape)shape2);\r
-                       if(type == ShapeType.POLYGON) shape = new PolygonShape((org.jbox2d.collision.shapes.PolygonShape)shape2);\r
+                       if (type == ShapeType.CHAIN) shape = new ChainShape((org.jbox2d.collision.shapes.ChainShape)shape2);\r
+                       if (type == ShapeType.CIRCLE) shape = new CircleShape((org.jbox2d.collision.shapes.CircleShape)shape2);\r
+                       if (type == ShapeType.EDGE) shape = new EdgeShape((org.jbox2d.collision.shapes.EdgeShape)shape2);\r
+                       if (type == ShapeType.POLYGON) shape = new PolygonShape((org.jbox2d.collision.shapes.PolygonShape)shape2);\r
                }\r
                return shape;\r
        }\r
@@ -76,7 +76,7 @@ public class Fixture {
        public boolean isSensor () {\r
                return fixture.isSensor();\r
        }\r
-       \r
+\r
        /** Set the contact filtering data. This will not update contacts until the next time step when either parent body is active and\r
         * awake. This automatically calls Refilter. */\r
        public void setFilterData (Filter filter) {\r
@@ -109,6 +109,7 @@ public class Fixture {
        }\r
 \r
        final Vec2 tmp = new Vec2();\r
+\r
        /** Test a point for containment in this fixture.\r
         * @param p a point in world coordinates. */\r
        public boolean testPoint (Vector2 p) {\r
@@ -164,4 +165,4 @@ public class Fixture {
        public Object getUserData () {\r
                return userData;\r
        }\r
-}
\ No newline at end of file
+}\r
index 5a6512a..1642040 100644 (file)
@@ -16,7 +16,6 @@
 \r
 package com.badlogic.gdx.physics.box2d;\r
 \r
-\r
 /** A fixture definition is used to create a fixture. This class defines an abstract fixture definition. You can reuse fixture\r
  * definitions safely.\r
  * @author mzechner */\r
@@ -38,8 +37,8 @@ public class FixtureDef {
 \r
        /** Contact filtering data. **/\r
        public final Filter filter = new Filter();\r
-       \r
-       public org.jbox2d.dynamics.FixtureDef toJBox2d() {\r
+\r
+       public org.jbox2d.dynamics.FixtureDef toJBox2d () {\r
                org.jbox2d.dynamics.FixtureDef fd = new org.jbox2d.dynamics.FixtureDef();\r
                fd.density = density;\r
                fd.filter = new org.jbox2d.dynamics.Filter();\r
index 0a1a4e2..3b0c4e6 100644 (file)
@@ -37,17 +37,17 @@ public abstract class Joint {
        /** Get the type of the concrete joint. */\r
        public JointType getType () {\r
                org.jbox2d.dynamics.joints.JointType type2 = joint.getType();\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.DISTANCE) return JointType.DistanceJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.FRICTION) return JointType.FrictionJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.GEAR) return JointType.GearJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.MOUSE) return JointType.MouseJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.PRISMATIC) return JointType.PrismaticJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.PULLEY) return JointType.PulleyJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.REVOLUTE) return JointType.RevoluteJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.ROPE) return JointType.RopeJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.UNKNOWN) return JointType.Unknown;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.WELD) return JointType.WeldJoint;\r
-               if(type2 == org.jbox2d.dynamics.joints.JointType.WHEEL) return JointType.WheelJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.DISTANCE) return JointType.DistanceJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.FRICTION) return JointType.FrictionJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.GEAR) return JointType.GearJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.MOUSE) return JointType.MouseJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.PRISMATIC) return JointType.PrismaticJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.PULLEY) return JointType.PulleyJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.REVOLUTE) return JointType.RevoluteJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.ROPE) return JointType.RopeJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.UNKNOWN) return JointType.Unknown;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.WELD) return JointType.WeldJoint;\r
+               if (type2 == org.jbox2d.dynamics.joints.JointType.WHEEL) return JointType.WheelJoint;\r
                return JointType.Unknown;\r
        }\r
 \r
index 29d90c0..32573b6 100644 (file)
@@ -45,6 +45,6 @@ public abstract class JointDef {
 \r
        /** Set this flag to true if the attached bodies should collide. **/\r
        public boolean collideConnected = false;\r
-       \r
-       public abstract org.jbox2d.dynamics.joints.JointDef toJBox2d();\r
+\r
+       public abstract org.jbox2d.dynamics.joints.JointDef toJBox2d ();\r
 }\r
index 583b47d..677ec1a 100644 (file)
@@ -27,13 +27,13 @@ public class Manifold {
        final int[] tmpInt = new int[2];\r
        final float[] tmpFloat = new float[4];\r
 \r
-       Manifold() {\r
+       Manifold () {\r
        }\r
-       \r
+\r
        protected Manifold (org.jbox2d.collision.Manifold manifold) {\r
                this.manifold = manifold;\r
        }\r
-       \r
+\r
        public ManifoldType getType () {\r
                org.jbox2d.collision.Manifold.ManifoldType type = manifold.type;\r
                if (type == org.jbox2d.collision.Manifold.ManifoldType.CIRCLES) return ManifoldType.Circle;\r
@@ -55,7 +55,7 @@ public class Manifold {
        }\r
 \r
        public ManifoldPoint[] getPoints () {\r
-               for(int i = 0; i < manifold.points.length; i++) {\r
+               for (int i = 0; i < manifold.points.length; i++) {\r
                        points[i].contactID = manifold.points[i].id.getKey();\r
                        points[i].localPoint.set(manifold.points[i].localPoint.x, manifold.points[i].localPoint.y);\r
                        points[i].normalImpulse = manifold.points[i].normalImpulse;\r
@@ -74,4 +74,4 @@ public class Manifold {
        public enum ManifoldType {\r
                Circle, FaceA, FaceB\r
        }\r
-}
\ No newline at end of file
+}\r
index 1c4c6d7..815aeaf 100644 (file)
@@ -22,7 +22,7 @@ import com.badlogic.gdx.math.Vector2;
 \r
 public class PolygonShape extends Shape {\r
        org.jbox2d.collision.shapes.PolygonShape shape;\r
-       \r
+\r
        /** Constructs a new polygon */\r
        public PolygonShape () {\r
                super(new org.jbox2d.collision.shapes.PolygonShape());\r
@@ -44,7 +44,7 @@ public class PolygonShape extends Shape {
         * edge. */\r
        public void set (Vector2[] vertices) {\r
                Vec2[] v = new org.jbox2d.common.Vec2[vertices.length];\r
-               for(int i = 0; i < v.length; i++) {\r
+               for (int i = 0; i < v.length; i++) {\r
                        v[i] = new Vec2(vertices[i].x, vertices[i].y);\r
                }\r
                shape.set(v, v.length);\r
@@ -58,6 +58,7 @@ public class PolygonShape extends Shape {
        }\r
 \r
        final Vec2 tmp = new Vec2();\r
+\r
        /** Build vertices to represent an oriented box.\r
         * @param hx the half-width.\r
         * @param hy the half-height.\r
@@ -87,7 +88,7 @@ public class PolygonShape extends Shape {
        public int getChildCount () {\r
                return shape.getChildCount();\r
        }\r
-       \r
+\r
        /** Returns the vertex at the given position.\r
         * @param index the index of the vertex 0 <= index < getVertexCount( )\r
         * @param vertex vertex */\r
index 198e676..a2edb26 100644 (file)
@@ -27,10 +27,10 @@ public abstract class Shape {
        public enum Type {\r
                Circle, Polygon, Edge, Chain,\r
        };\r
-       \r
+\r
        public final org.jbox2d.collision.shapes.Shape shape;\r
-       \r
-       public Shape(org.jbox2d.collision.shapes.Shape shape) {\r
+\r
+       public Shape (org.jbox2d.collision.shapes.Shape shape) {\r
                this.shape = shape;\r
        }\r
 \r
@@ -39,7 +39,7 @@ public abstract class Shape {
        public abstract Type getType ();\r
 \r
        /** Returns the radius of this shape */\r
-       public abstract float getRadius();\r
+       public abstract float getRadius ();\r
 \r
        /** Sets the radius of this shape */\r
        public abstract void setRadius (float radius);\r
index 68d4f5c..786ee6e 100644 (file)
@@ -49,7 +49,7 @@ public final class World implements Disposable {
        ObjectMap<org.jbox2d.dynamics.Body, Body> bodies = new ObjectMap<org.jbox2d.dynamics.Body, Body>();\r
        ObjectMap<org.jbox2d.dynamics.Fixture, Fixture> fixtures = new ObjectMap<org.jbox2d.dynamics.Fixture, Fixture>();\r
        ObjectMap<org.jbox2d.dynamics.joints.Joint, Joint> joints = new ObjectMap<org.jbox2d.dynamics.joints.Joint, Joint>();\r
-       \r
+\r
        /** Construct a world object.\r
         * @param gravity the world gravity vector.\r
         * @param doSleep improve performance by not simulating inactive bodies. */\r
@@ -65,7 +65,7 @@ public final class World implements Disposable {
        /** Register a contact filter to provide specific control over collision. Otherwise the default filter is used\r
         * (b2_defaultFilter). The listener is owned by you and must remain in scope. */\r
        public void setContactFilter (final ContactFilter filter) {\r
-               if(filter != null) {\r
+               if (filter != null) {\r
                        world.setContactFilter(new org.jbox2d.callbacks.ContactFilter() {\r
                                @Override\r
                                public boolean shouldCollide (org.jbox2d.dynamics.Fixture fixtureA, org.jbox2d.dynamics.Fixture fixtureB) {\r
@@ -76,14 +76,14 @@ public final class World implements Disposable {
                        world.setContactFilter(new org.jbox2d.callbacks.ContactFilter());\r
                }\r
        }\r
-       \r
 \r
        /** Register a contact event listener. The listener is owned by you and must remain in scope. */\r
        Contact tmpContact = new Contact(this);\r
        Manifold tmpManifold = new Manifold();\r
        ContactImpulse tmpImpulse = new ContactImpulse();\r
+\r
        public void setContactListener (final ContactListener listener) {\r
-               if(listener != null) {\r
+               if (listener != null) {\r
                        world.setContactListener(new org.jbox2d.callbacks.ContactListener() {\r
                                @Override\r
                                public void beginContact (org.jbox2d.dynamics.contacts.Contact contact) {\r
@@ -132,9 +132,9 @@ public final class World implements Disposable {
                bd.linearDamping = def.linearDamping;\r
                bd.linearVelocity.set(def.linearVelocity.x, def.linearVelocity.y);\r
                bd.position.set(def.position.x, def.position.y);\r
-               if(def.type == BodyType.DynamicBody) bd.type = org.jbox2d.dynamics.BodyType.DYNAMIC;\r
-               if(def.type == BodyType.StaticBody) bd.type = org.jbox2d.dynamics.BodyType.STATIC;\r
-               if(def.type == BodyType.KinematicBody) bd.type = org.jbox2d.dynamics.BodyType.KINEMATIC;\r
+               if (def.type == BodyType.DynamicBody) bd.type = org.jbox2d.dynamics.BodyType.DYNAMIC;\r
+               if (def.type == BodyType.StaticBody) bd.type = org.jbox2d.dynamics.BodyType.STATIC;\r
+               if (def.type == BodyType.KinematicBody) bd.type = org.jbox2d.dynamics.BodyType.KINEMATIC;\r
 \r
                org.jbox2d.dynamics.Body b = world.createBody(bd);\r
                Body body = new Body(this, b);\r
@@ -149,11 +149,11 @@ public final class World implements Disposable {
        public void destroyBody (Body body) {\r
                world.destroyBody(body.body);\r
                bodies.remove(body.body);\r
-               for(Fixture fixture: body.fixtures) {\r
+               for (Fixture fixture : body.fixtures) {\r
                        fixtures.remove(fixture.fixture);\r
                }\r
                JointEdge jointEdge = body.body.getJointList();\r
-               while(jointEdge != null) {\r
+               while (jointEdge != null) {\r
                        joints.remove(jointEdge.joint);\r
                }\r
        }\r
@@ -165,17 +165,17 @@ public final class World implements Disposable {
                org.jbox2d.dynamics.joints.JointDef jd = def.toJBox2d();\r
                org.jbox2d.dynamics.joints.Joint j = world.createJoint(jd);\r
                Joint joint = null;\r
-               if(def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, (org.jbox2d.dynamics.joints.DistanceJoint)j);\r
-               if(def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, (org.jbox2d.dynamics.joints.FrictionJoint)j);\r
+               if (def.type == JointType.DistanceJoint) joint = new DistanceJoint(this, (org.jbox2d.dynamics.joints.DistanceJoint)j);\r
+               if (def.type == JointType.FrictionJoint) joint = new FrictionJoint(this, (org.jbox2d.dynamics.joints.FrictionJoint)j);\r
                // FIXME if(def.type == JointType.GearJoint) joint = new DistanceJoint(this, (org.jbox2d.dynamics.joints.DistanceJoint)j);\r
-               if(def.type == JointType.MouseJoint) joint = new MouseJoint(this, (org.jbox2d.dynamics.joints.MouseJoint)j);\r
-               if(def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, (org.jbox2d.dynamics.joints.PrismaticJoint)j);\r
-               if(def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, (org.jbox2d.dynamics.joints.PulleyJoint)j);\r
-               if(def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, (org.jbox2d.dynamics.joints.RevoluteJoint)j);\r
+               if (def.type == JointType.MouseJoint) joint = new MouseJoint(this, (org.jbox2d.dynamics.joints.MouseJoint)j);\r
+               if (def.type == JointType.PrismaticJoint) joint = new PrismaticJoint(this, (org.jbox2d.dynamics.joints.PrismaticJoint)j);\r
+               if (def.type == JointType.PulleyJoint) joint = new PulleyJoint(this, (org.jbox2d.dynamics.joints.PulleyJoint)j);\r
+               if (def.type == JointType.RevoluteJoint) joint = new RevoluteJoint(this, (org.jbox2d.dynamics.joints.RevoluteJoint)j);\r
                // FIXME if(def.type == JointType.RopeJoint) joint = new RopeJoint(this, (org.jbox2d.dynamics.joints.RopeJoint)j);\r
-               if(def.type == JointType.WeldJoint) joint = new WeldJoint(this, (org.jbox2d.dynamics.joints.WeldJoint)j);\r
-//     FIXME if(def.type == JointType.WheelJoint) joint = new WheelJoint(this, (org.jbox2d.dynamics.joints.WheelJoint)j);\r
-               if(joint == null) throw new GdxRuntimeException("Joint type '" + def.type + "' not yet supported by GWT backend");\r
+               if (def.type == JointType.WeldJoint) joint = new WeldJoint(this, (org.jbox2d.dynamics.joints.WeldJoint)j);\r
+// FIXME if(def.type == JointType.WheelJoint) joint = new WheelJoint(this, (org.jbox2d.dynamics.joints.WheelJoint)j);\r
+               if (joint == null) throw new GdxRuntimeException("Joint type '" + def.type + "' not yet supported by GWT backend");\r
                joints.put(j, joint);\r
                return joint;\r
        }\r
@@ -243,7 +243,7 @@ public final class World implements Disposable {
                Vec2 gravity = world.getGravity();\r
                return tmp2.set(gravity.x, gravity.y);\r
        }\r
-       \r
+\r
        /** Is the world locked (in the middle of a time step). */\r
        public boolean isLocked () {\r
                return world.isLocked();\r
@@ -266,6 +266,7 @@ public final class World implements Disposable {
         * @param upperX the x coordinate of the upper right corner\r
         * @param upperY the y coordinate of the upper right corner */\r
        AABB aabb = new AABB();\r
+\r
        public void QueryAABB (final QueryCallback callback, float lowerX, float lowerY, float upperX, float upperY) {\r
                // FIXME pool QueryCallback?\r
                aabb.lowerBound.set(lowerX, lowerY);\r
@@ -284,11 +285,12 @@ public final class World implements Disposable {
         * step. Use {@link ContactListener} to avoid missing contacts\r
         * @return the contact list */\r
        ArrayList<Contact> contacts = new ArrayList<Contact>();\r
+\r
        public List<Contact> getContactList () {\r
                // FIXME pool contacts\r
                org.jbox2d.dynamics.contacts.Contact contactList = world.getContactList();\r
                contacts.clear();\r
-               while(contactList != null) {\r
+               while (contactList != null) {\r
                        Contact contact = new Contact(this, contactList);\r
                        contacts.add(contact);\r
                        contactList = contactList.m_next;\r
@@ -309,7 +311,6 @@ public final class World implements Disposable {
        public void dispose () {\r
        }\r
 \r
-\r
        /** Sets the box2d velocity threshold globally, for all World instances.\r
         * @param threshold the threshold, default 1.0f */\r
        public static void setVelocityThreshold (float threshold) {\r
@@ -320,7 +321,7 @@ public final class World implements Disposable {
        public static float getVelocityThreshold () {\r
                return Settings.velocityThreshold;\r
        }\r
-       \r
+\r
        /** Ray-cast the world for all fixtures in the path of the ray. The ray-cast ignores shapes that contain the starting point.\r
         * @param callback a user implemented callback class.\r
         * @param point1 the ray starting point\r
@@ -329,6 +330,7 @@ public final class World implements Disposable {
        Vec2 point2 = new Vec2();\r
        Vector2 point = new Vector2();\r
        Vector2 normal = new Vector2();\r
+\r
        public void rayCast (final RayCastCallback callback, Vector2 point1, Vector2 point2) {\r
                // FIXME pool RayCastCallback?\r
                world.raycast(new org.jbox2d.callbacks.RayCastCallback() {\r
index 45f401f..cfe6a06 100644 (file)
@@ -24,12 +24,12 @@ public class WorldManifold {
        protected final Vector2[] points = {new Vector2(), new Vector2()};\r
        protected int numContactPoints;\r
 \r
-       protected WorldManifold() {\r
+       protected WorldManifold () {\r
        }\r
-       \r
+\r
        protected WorldManifold (org.jbox2d.collision.WorldManifold manifold) {\r
                normal.set(manifold.normal.x, manifold.normal.y);\r
-               for(int i = 0; i < manifold.points.length; i++) {\r
+               for (int i = 0; i < manifold.points.length; i++) {\r
                        points[i].set(manifold.points[i].x, manifold.points[i].y);\r
                }\r
                numContactPoints = manifold.points.length;\r
index 944789e..2ec4be3 100644 (file)
@@ -23,7 +23,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * massless, rigid rod. */\r
 public class DistanceJoint extends Joint {\r
        org.jbox2d.dynamics.joints.DistanceJoint joint;\r
-       \r
+\r
        public DistanceJoint (World world, org.jbox2d.dynamics.joints.DistanceJoint joint) {\r
                super(world, joint);\r
                this.joint = joint;\r
index ced1ff4..3b821b7 100644 (file)
@@ -52,8 +52,8 @@ public class DistanceJointDef extends JointDef {
 \r
        /** The damping ratio. 0 = no damping, 1 = critical damping. */\r
        public float dampingRatio = 0;\r
-       \r
-       public org.jbox2d.dynamics.joints.DistanceJointDef toJBox2d() {\r
+\r
+       public org.jbox2d.dynamics.joints.DistanceJointDef toJBox2d () {\r
                org.jbox2d.dynamics.joints.DistanceJointDef fd = new org.jbox2d.dynamics.joints.DistanceJointDef();\r
                fd.bodyA = bodyA.body;\r
                fd.bodyB = bodyB.body;\r
index cf4dc12..164e857 100644 (file)
@@ -22,7 +22,7 @@ import com.badlogic.gdx.physics.box2d.World;
 /** Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. */\r
 public class FrictionJoint extends Joint {\r
        org.jbox2d.dynamics.joints.FrictionJoint joint;\r
-       \r
+\r
        public FrictionJoint (World world, org.jbox2d.dynamics.joints.FrictionJoint joint) {\r
                super(world, joint);\r
                this.joint = joint;\r
index 4fd65e2..6c655b2 100644 (file)
@@ -28,7 +28,7 @@ import com.badlogic.gdx.physics.box2d.World;
 public class MouseJoint extends Joint {\r
        org.jbox2d.dynamics.joints.MouseJoint joint;\r
        final Vec2 tmp = new Vec2();\r
-       \r
+\r
        public MouseJoint (World world, org.jbox2d.dynamics.joints.MouseJoint joint) {\r
                super(world, joint);\r
                this.joint = joint;\r
@@ -53,13 +53,11 @@ public class MouseJoint extends Joint {
                joint.setMaxForce(force);\r
        }\r
 \r
-\r
        /** Set/get the maximum force in Newtons. */\r
        public float getMaxForce () {\r
                return joint.getMaxForce();\r
        }\r
 \r
-\r
        /** Set/get the frequency in Hertz. */\r
        public void setFrequency (float hz) {\r
                joint.setFrequency(hz);\r
index b4ab8df..be5d67e 100644 (file)
@@ -24,7 +24,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * friction. */\r
 public class PrismaticJoint extends Joint {\r
        org.jbox2d.dynamics.joints.PrismaticJoint joint;\r
-       \r
+\r
        public PrismaticJoint (World world, org.jbox2d.dynamics.joints.PrismaticJoint joint) {\r
                super(world, joint);\r
                this.joint = joint;\r
index 031c7b0..c000750 100644 (file)
@@ -27,7 +27,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * both sides. This is useful to prevent one side of the pulley hitting the top. */\r
 public class PulleyJoint extends Joint {\r
        org.jbox2d.dynamics.joints.PulleyJoint joint;\r
-       \r
+\r
        public PulleyJoint (World world, org.jbox2d.dynamics.joints.PulleyJoint joint) {\r
                super(world, joint);\r
                this.joint = joint;\r
index 71be4a0..a475368 100644 (file)
@@ -25,7 +25,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * provided so that infinite forces are not generated. */\r
 public class RevoluteJoint extends Joint {\r
        org.jbox2d.dynamics.joints.RevoluteJoint joint;\r
-       \r
+\r
        public RevoluteJoint (World world, org.jbox2d.dynamics.joints.RevoluteJoint joint) {\r
                super(world, joint);\r
                this.joint = joint;\r
@@ -78,6 +78,7 @@ public class RevoluteJoint extends Joint {
        }\r
 \r
        float motorSpeed = 0;\r
+\r
        /** Set the motor speed in radians per second. */\r
        public void setMotorSpeed (float speed) {\r
                motorSpeed = speed;\r
@@ -89,7 +90,6 @@ public class RevoluteJoint extends Joint {
                return motorSpeed;\r
        }\r
 \r
-\r
        /** Set the maximum motor torque, usually in N-m. */\r
        public void setMaxMotorTorque (float torque) {\r
                joint.setMaxMotorTorque(torque);\r
index 321368d..fcc265d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.physics.box2d.Joint;\r
@@ -33,4 +34,4 @@ public class RopeJoint extends Joint {
                // FIXME\r
                return 0;\r
        }\r
-}
\ No newline at end of file
+}\r
index 8cc8e5e..677e063 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.math.Vector2;\r
@@ -40,4 +41,4 @@ public class RopeJointDef extends JointDef {
                // FIXME not implemented in jbox2d\r
                return null;\r
        }\r
-}
\ No newline at end of file
+}\r
index c38dfdc..9c4179c 100644 (file)
@@ -23,7 +23,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * approximate. */\r
 public class WeldJoint extends Joint {\r
        org.jbox2d.dynamics.joints.WeldJoint joint;\r
-       \r
+\r
        public WeldJoint (World world, org.jbox2d.dynamics.joints.WeldJoint joint) {\r
                super(world, joint);\r
        }\r
index 169800e..2e01382 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.physics.box2d.Joint;\r
@@ -23,7 +24,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * friction. This joint is designed for vehicle suspensions. */\r
 public class WheelJoint extends Joint {\r
        // FIXME not implemented by jbox2d\r
-       \r
+\r
        public WheelJoint (World world) {\r
                super(world, null);\r
        }\r
@@ -89,4 +90,4 @@ public class WheelJoint extends Joint {
        public float getSpringDampingRatio () {\r
                return 0; // FIXME\r
        }\r
-}
\ No newline at end of file
+}\r
index bcdb403..a36f9c5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.math.Vector2;\r
@@ -65,4 +66,4 @@ public class WheelJointDef extends JointDef {
                // FIXME not implemented in jbox2d port.\r
                return null;\r
        }\r
-}
\ No newline at end of file
+}\r
index 14b3710..5195104 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.badlogic.gdx.scenes.scene2d.ui;\r
 \r
-import java.lang.reflect.Method;\r
-\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.graphics.Color;\r
@@ -73,47 +71,47 @@ public class Skin implements Disposable {
        TextureAtlas atlas;\r
 \r
        /** Creates an empty skin. */\r
-    public Skin () {\r
-    }\r
-\r
-    /** Creates a skin containing the resources in the specified skin JSON file. If a file in the same directory with a ".atlas"\r
-     * extension exists, it is loaded as a {@link TextureAtlas} and the texture regions added to the skin. The atlas is\r
-     * automatically disposed when the skin is disposed. */\r
-    public Skin (FileHandle skinFile) {\r
-            FileHandle atlasFile = skinFile.sibling(skinFile.nameWithoutExtension() + ".atlas");\r
-            if (atlasFile.exists()) {\r
-                    atlas = new TextureAtlas(atlasFile);\r
-                    addRegions(atlas);\r
-            }\r
-\r
-            load(skinFile);\r
-    }\r
-\r
-    /** Creates a skin containing the resources in the specified skin JSON file and the texture regions from the specified atlas.\r
-     * The atlas is automatically disposed when the skin is disposed. */\r
-    public Skin (FileHandle skinFile, TextureAtlas atlas) {\r
-            this.atlas = atlas;\r
-            addRegions(atlas);\r
-            load(skinFile);\r
-    }\r
-\r
-    /** Adds all resources in the specified skin JSON file. */\r
-    public void load (FileHandle skinFile) {\r
-            try {\r
-                    getJsonLoader(skinFile).fromJson(Skin.class, skinFile);\r
-            } catch (SerializationException ex) {\r
-                    throw new SerializationException("Error reading file: " + skinFile, ex);\r
-            }\r
-    }\r
-\r
-    /** Adds all named txeture regions from the atlas. The atlas will not be automatically disposed when the skin is disposed. */\r
-    public void addRegions (TextureAtlas atlas) {\r
-            Array<AtlasRegion> regions = atlas.getRegions();\r
-            for (int i = 0, n = regions.size; i < n; i++) {\r
-                    AtlasRegion region = regions.get(i);\r
-                    add(region.name, region, TextureRegion.class);\r
-            }\r
-    }\r
+       public Skin () {\r
+       }\r
+\r
+       /** Creates a skin containing the resources in the specified skin JSON file. If a file in the same directory with a ".atlas"\r
+        * extension exists, it is loaded as a {@link TextureAtlas} and the texture regions added to the skin. The atlas is\r
+        * automatically disposed when the skin is disposed. */\r
+       public Skin (FileHandle skinFile) {\r
+               FileHandle atlasFile = skinFile.sibling(skinFile.nameWithoutExtension() + ".atlas");\r
+               if (atlasFile.exists()) {\r
+                       atlas = new TextureAtlas(atlasFile);\r
+                       addRegions(atlas);\r
+               }\r
+\r
+               load(skinFile);\r
+       }\r
+\r
+       /** Creates a skin containing the resources in the specified skin JSON file and the texture regions from the specified atlas.\r
+        * The atlas is automatically disposed when the skin is disposed. */\r
+       public Skin (FileHandle skinFile, TextureAtlas atlas) {\r
+               this.atlas = atlas;\r
+               addRegions(atlas);\r
+               load(skinFile);\r
+       }\r
+\r
+       /** Adds all resources in the specified skin JSON file. */\r
+       public void load (FileHandle skinFile) {\r
+               try {\r
+                       getJsonLoader(skinFile).fromJson(Skin.class, skinFile);\r
+               } catch (SerializationException ex) {\r
+                       throw new SerializationException("Error reading file: " + skinFile, ex);\r
+               }\r
+       }\r
+\r
+       /** Adds all named txeture regions from the atlas. The atlas will not be automatically disposed when the skin is disposed. */\r
+       public void addRegions (TextureAtlas atlas) {\r
+               Array<AtlasRegion> regions = atlas.getRegions();\r
+               for (int i = 0, n = regions.size; i < n; i++) {\r
+                       AtlasRegion region = regions.get(i);\r
+                       add(region.name, region, TextureRegion.class);\r
+               }\r
+       }\r
 \r
        private void add (TextureAtlas atlas) {\r
                Array<AtlasRegion> regions = atlas.getRegions();\r
@@ -359,8 +357,10 @@ public class Skin implements Disposable {
                final Json json = new Json() {\r
                        @Override\r
                        public <T> T readValue (Class<T> type, Class elementType, Object jsonData) {\r
-                               // If the JSON is a string but the type is not, look up the actual value by name.                               \r
-                               if (jsonData instanceof String && !ReflectionCache.getType(type).isAssignableFrom(ReflectionCache.getType(CharSequence.class))) return get((String)jsonData, type);\r
+                               // If the JSON is a string but the type is not, look up the actual value by name.\r
+                               if (jsonData instanceof String\r
+                                       && !ReflectionCache.getType(type).isAssignableFrom(ReflectionCache.getType(CharSequence.class)))\r
+                                       return get((String)jsonData, type);\r
                                return super.readValue(type, elementType, jsonData);\r
                        }\r
                };\r
index 46d75ae..b157915 100644 (file)
@@ -12,9 +12,9 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.scenes.scene2d.utils;\r
+ ******************************************************************************/\r
 \r
+package com.badlogic.gdx.scenes.scene2d.utils;\r
 \r
 /** A very simple clipboard interface for text content.\r
  * @author mzechner */\r
@@ -39,4 +39,4 @@ public abstract class Clipboard {
                        }\r
                };\r
        }\r
-}
\ No newline at end of file
+}\r
index e4eece1..90f9f61 100644 (file)
@@ -121,7 +121,7 @@ public class Array<T> implements Iterable<T> {
                System.arraycopy(array, offset, items, size, length);\r
                size += length;\r
        }\r
-       \r
+\r
        public T get (int index) {\r
                if (index >= size) throw new IndexOutOfBoundsException(String.valueOf(index));\r
                return items[index];\r
@@ -142,7 +142,7 @@ public class Array<T> implements Iterable<T> {
                size++;\r
                items[index] = value;\r
        }\r
-       \r
+\r
        public void swap (int first, int second) {\r
                if (first >= size) throw new IndexOutOfBoundsException(String.valueOf(first));\r
                if (second >= size) throw new IndexOutOfBoundsException(String.valueOf(second));\r
index c8ca254..1dace93 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import com.badlogic.gdx.math.MathUtils;\r
@@ -385,4 +386,4 @@ public class ArrayMap<K, V> {
                buffer.append('}');\r
                return buffer.toString();\r
        }\r
-}
\ No newline at end of file
+}\r
index 31bef65..813c550 100644 (file)
@@ -26,8 +26,6 @@ import java.nio.IntBuffer;
 import java.nio.LongBuffer;\r
 import java.nio.ShortBuffer;\r
 \r
-import com.google.gwt.core.client.GWT;\r
-\r
 /** Class with static helper methods to increase the speed of array/direct buffer and direct buffer/direct buffer transfers\r
  * \r
  * @author mzechner */\r
@@ -44,21 +42,22 @@ public class BufferUtils {
         * @param offset the offset in src to start copying from */\r
        public static void copy (float[] src, Buffer dst, int numFloats, int offset) {\r
                FloatBuffer floatBuffer = null;\r
-               if(dst instanceof ByteBuffer) {\r
+               if (dst instanceof ByteBuffer) {\r
                        floatBuffer = ((ByteBuffer)dst).asFloatBuffer();\r
-               } else \r
-               if(dst instanceof FloatBuffer) {\r
+               } else if (dst instanceof FloatBuffer) {\r
                        floatBuffer = (FloatBuffer)dst;\r
                } else {\r
                        throw new GdxRuntimeException("dst must be a ByteBuffer or FloatBuffer");\r
                }\r
-               \r
+\r
                floatBuffer.clear();\r
                dst.position(0);\r
                floatBuffer.put(src, offset, numFloats);\r
                dst.position(0);\r
-               if (dst instanceof ByteBuffer) dst.limit(numFloats << 2);\r
-               else dst.limit(numFloats);\r
+               if (dst instanceof ByteBuffer)\r
+                       dst.limit(numFloats << 2);\r
+               else\r
+                       dst.limit(numFloats);\r
        }\r
 \r
        /** Copies the contents of src to dst, starting from src[srcOffset], copying numElements elements. The {@link Buffer} instance's\r
@@ -71,8 +70,8 @@ public class BufferUtils {
         * @param dst the destination Buffer, its position is used as an offset.\r
         * @param numElements the number of elements to copy. */\r
        public static void copy (byte[] src, int srcOffset, Buffer dst, int numElements) {\r
-               if(!(dst instanceof ByteBuffer)) throw new GdxRuntimeException("dst must be a ByteBuffer");\r
-               \r
+               if (!(dst instanceof ByteBuffer)) throw new GdxRuntimeException("dst must be a ByteBuffer");\r
+\r
                ByteBuffer byteBuffer = (ByteBuffer)dst;\r
                int oldPosition = byteBuffer.position();\r
                byteBuffer.put(src, srcOffset, numElements);\r
@@ -91,10 +90,11 @@ public class BufferUtils {
         * @param numElements the number of elements to copy. */\r
        public static void copy (short[] src, int srcOffset, Buffer dst, int numElements) {\r
                ShortBuffer buffer = null;\r
-               if(dst instanceof ByteBuffer) buffer = ((ByteBuffer)dst).asShortBuffer();\r
-               else if(dst instanceof ShortBuffer) buffer = (ShortBuffer)dst;\r
-               if(buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or ShortBuffer");\r
-               \r
+               if (dst instanceof ByteBuffer)\r
+                       buffer = ((ByteBuffer)dst).asShortBuffer();\r
+               else if (dst instanceof ShortBuffer) buffer = (ShortBuffer)dst;\r
+               if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or ShortBuffer");\r
+\r
                int oldPosition = buffer.position();\r
                buffer.put(src, srcOffset, numElements);\r
                buffer.position(oldPosition);\r
@@ -112,10 +112,11 @@ public class BufferUtils {
         * @param numElements the number of elements to copy. */\r
        public static void copy (char[] src, int srcOffset, Buffer dst, int numElements) {\r
                CharBuffer buffer = null;\r
-               if(dst instanceof ByteBuffer) buffer = ((ByteBuffer)dst).asCharBuffer();\r
-               else if(dst instanceof CharBuffer) buffer = (CharBuffer)dst;\r
-               if(buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or CharBuffer");\r
-               \r
+               if (dst instanceof ByteBuffer)\r
+                       buffer = ((ByteBuffer)dst).asCharBuffer();\r
+               else if (dst instanceof CharBuffer) buffer = (CharBuffer)dst;\r
+               if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or CharBuffer");\r
+\r
                int oldPosition = buffer.position();\r
                buffer.put(src, srcOffset, numElements);\r
                buffer.position(oldPosition);\r
@@ -133,10 +134,11 @@ public class BufferUtils {
         * @param numElements the number of elements to copy. */\r
        public static void copy (int[] src, int srcOffset, Buffer dst, int numElements) {\r
                IntBuffer buffer = null;\r
-               if(dst instanceof ByteBuffer) buffer = ((ByteBuffer)dst).asIntBuffer();\r
-               else if(dst instanceof IntBuffer) buffer = (IntBuffer)dst;\r
-               if(buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or IntBuffer");\r
-               \r
+               if (dst instanceof ByteBuffer)\r
+                       buffer = ((ByteBuffer)dst).asIntBuffer();\r
+               else if (dst instanceof IntBuffer) buffer = (IntBuffer)dst;\r
+               if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or IntBuffer");\r
+\r
                int oldPosition = buffer.position();\r
                buffer.put(src, srcOffset, numElements);\r
                buffer.position(oldPosition);\r
@@ -154,10 +156,11 @@ public class BufferUtils {
         * @param numElements the number of elements to copy. */\r
        public static void copy (long[] src, int srcOffset, Buffer dst, int numElements) {\r
                LongBuffer buffer = null;\r
-               if(dst instanceof ByteBuffer) buffer = ((ByteBuffer)dst).asLongBuffer();\r
-               else if(dst instanceof LongBuffer) buffer = (LongBuffer)dst;\r
-               if(buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");\r
-               \r
+               if (dst instanceof ByteBuffer)\r
+                       buffer = ((ByteBuffer)dst).asLongBuffer();\r
+               else if (dst instanceof LongBuffer) buffer = (LongBuffer)dst;\r
+               if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or LongBuffer");\r
+\r
                int oldPosition = buffer.position();\r
                buffer.put(src, srcOffset, numElements);\r
                buffer.position(oldPosition);\r
@@ -175,10 +178,11 @@ public class BufferUtils {
         * @param numElements the number of elements to copy. */\r
        public static void copy (float[] src, int srcOffset, Buffer dst, int numElements) {\r
                FloatBuffer buffer = null;\r
-               if(dst instanceof ByteBuffer) buffer = ((ByteBuffer)dst).asFloatBuffer();\r
-               else if(dst instanceof FloatBuffer) buffer = (FloatBuffer)dst;\r
-               if(buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or FloatBuffer");\r
-               \r
+               if (dst instanceof ByteBuffer)\r
+                       buffer = ((ByteBuffer)dst).asFloatBuffer();\r
+               else if (dst instanceof FloatBuffer) buffer = (FloatBuffer)dst;\r
+               if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or FloatBuffer");\r
+\r
                int oldPosition = buffer.position();\r
                buffer.put(src, srcOffset, numElements);\r
                buffer.position(oldPosition);\r
@@ -196,33 +200,34 @@ public class BufferUtils {
         * @param numElements the number of elements to copy. */\r
        public static void copy (double[] src, int srcOffset, Buffer dst, int numElements) {\r
                DoubleBuffer buffer = null;\r
-               if(dst instanceof ByteBuffer) buffer = ((ByteBuffer)dst).asDoubleBuffer();\r
-               else if(dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;\r
-               if(buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");\r
-               \r
+               if (dst instanceof ByteBuffer)\r
+                       buffer = ((ByteBuffer)dst).asDoubleBuffer();\r
+               else if (dst instanceof DoubleBuffer) buffer = (DoubleBuffer)dst;\r
+               if (buffer == null) throw new GdxRuntimeException("dst must be a ByteBuffer or DoubleBuffer");\r
+\r
                int oldPosition = buffer.position();\r
                buffer.put(src, srcOffset, numElements);\r
                buffer.position(oldPosition);\r
                buffer.limit(oldPosition + numElements);\r
        }\r
 \r
-//     /** Copies the contents of src to dst, starting from the current position of src, copying numElements elements (using the data\r
-//      * type of src, no matter the datatype of dst). The dst {@link Buffer#position()} is used as the writing offset. The position\r
-//      * of both Buffers will stay the same. The limit of the src Buffer will stay the same. The limit of the dst Buffer will be set\r
-//      * to dst.position() + numElements, where numElements are translated to the number of elements appropriate for the dst Buffer\r
-//      * data type. <b>The Buffers must be direct Buffers with native byte order. No error checking is performed</b>.\r
-//      * \r
-//      * @param src the source Buffer.\r
-//      * @param dst the destination Buffer.\r
-//      * @param numElements the number of elements to copy. */\r
-//     public static void copy (Buffer src, Buffer dst, int numElements) {\r
-//             int numBytes = elementsToBytes(src, numElements);\r
-//             copyJni(src, positionInBytes(src), dst, positionInBytes(dst), numBytes);\r
-//             dst.limit(dst.position() + bytesToElements(dst, numBytes));\r
-//     }\r
+// /** Copies the contents of src to dst, starting from the current position of src, copying numElements elements (using the data\r
+// * type of src, no matter the datatype of dst). The dst {@link Buffer#position()} is used as the writing offset. The position\r
+// * of both Buffers will stay the same. The limit of the src Buffer will stay the same. The limit of the dst Buffer will be set\r
+// * to dst.position() + numElements, where numElements are translated to the number of elements appropriate for the dst Buffer\r
+// * data type. <b>The Buffers must be direct Buffers with native byte order. No error checking is performed</b>.\r
+// *\r
+// * @param src the source Buffer.\r
+// * @param dst the destination Buffer.\r
+// * @param numElements the number of elements to copy. */\r
+// public static void copy (Buffer src, Buffer dst, int numElements) {\r
+// int numBytes = elementsToBytes(src, numElements);\r
+// copyJni(src, positionInBytes(src), dst, positionInBytes(dst), numBytes);\r
+// dst.limit(dst.position() + bytesToElements(dst, numBytes));\r
+// }\r
 \r
        public static FloatBuffer newFloatBuffer (int numFloats) {\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        ByteBuffer buffer = ByteBuffer.allocateDirect(numFloats * 4);\r
                        buffer.order(ByteOrder.nativeOrder());\r
                        return buffer.asFloatBuffer();\r
@@ -232,7 +237,7 @@ public class BufferUtils {
        }\r
 \r
        public static DoubleBuffer newDoubleBuffer (int numDoubles) {\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        ByteBuffer buffer = ByteBuffer.allocateDirect(numDoubles * 8);\r
                        buffer.order(ByteOrder.nativeOrder());\r
                        return buffer.asDoubleBuffer();\r
@@ -242,7 +247,7 @@ public class BufferUtils {
        }\r
 \r
        public static ByteBuffer newByteBuffer (int numBytes) {\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        ByteBuffer buffer = ByteBuffer.allocateDirect(numBytes);\r
                        buffer.order(ByteOrder.nativeOrder());\r
                        return buffer;\r
@@ -252,7 +257,7 @@ public class BufferUtils {
        }\r
 \r
        public static ShortBuffer newShortBuffer (int numShorts) {\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        ByteBuffer buffer = ByteBuffer.allocateDirect(numShorts * 2);\r
                        buffer.order(ByteOrder.nativeOrder());\r
                        return buffer.asShortBuffer();\r
@@ -262,7 +267,7 @@ public class BufferUtils {
        }\r
 \r
        public static CharBuffer newCharBuffer (int numChars) {\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        ByteBuffer buffer = ByteBuffer.allocateDirect(numChars * 2);\r
                        buffer.order(ByteOrder.nativeOrder());\r
                        return buffer.asCharBuffer();\r
@@ -272,7 +277,7 @@ public class BufferUtils {
        }\r
 \r
        public static IntBuffer newIntBuffer (int numInts) {\r
-               if(GWT.isProdMode()) {\r
+               if (GWT.isProdMode()) {\r
                        ByteBuffer buffer = ByteBuffer.allocateDirect(numInts * 4);\r
                        buffer.order(ByteOrder.nativeOrder());\r
                        return buffer.asIntBuffer();\r
index a8c94ce..7cff93f 100644 (file)
@@ -355,8 +355,10 @@ public class Json {
                        Type knownType = ReflectionCache.getType(knownClass);\r
                        Type actualType = ReflectionCache.getType(value.getClass());\r
 \r
-                       if (actualType.isPrimitive() || actualType.getClassOfType() == String.class || actualType.getClassOfType() == Integer.class || actualType.getClassOfType() == Boolean.class\r
-                               || actualType.getClassOfType() == Float.class || actualType.getClassOfType() == Long.class || actualType.getClassOfType() == Double.class || actualType.getClassOfType() == Short.class\r
+                       if (actualType.isPrimitive() || actualType.getClassOfType() == String.class\r
+                               || actualType.getClassOfType() == Integer.class || actualType.getClassOfType() == Boolean.class\r
+                               || actualType.getClassOfType() == Float.class || actualType.getClassOfType() == Long.class\r
+                               || actualType.getClassOfType() == Double.class || actualType.getClassOfType() == Short.class\r
                                || actualType.getClassOfType() == Byte.class || actualType.getClassOfType() == Character.class) {\r
                                writer.value(value);\r
                                return;\r
@@ -697,7 +699,7 @@ public class Json {
 \r
        public <T> T readValue (Class<T> clazz, Class elementType, Object jsonData) {\r
                if (jsonData == null) return null;\r
-               \r
+\r
                Type type = ReflectionCache.getType(clazz);\r
                if (jsonData instanceof OrderedMap) {\r
                        OrderedMap<String, Object> jsonMap = (OrderedMap)jsonData;\r
@@ -978,7 +980,7 @@ public class Json {
 \r
                abstract public T read (Json json, Object jsonData, Class type);\r
        }\r
-       \r
+\r
        static public interface Serializable {\r
                public void write (Json json);\r
 \r
index b85cd16..e6bf0ea 100644 (file)
@@ -18,7 +18,6 @@ package com.badlogic.gdx.utils;
 \r
 import java.io.IOException;\r
 import java.io.Writer;\r
-import java.util.regex.Pattern;\r
 \r
 /** Builder style API for emitting JSON.\r
  * @author Nathan Sweet */\r
@@ -157,28 +156,28 @@ public class JsonWriter extends Writer {
                minimal;\r
 \r
                // FIXME Avian regex matcher can't do that...\r
-//             static private Pattern javascriptPattern = Pattern.compile("[a-zA-Z_$][a-zA-Z_$0-9]*");\r
-//             static private Pattern minimalPattern = Pattern.compile("[a-zA-Z_$][^:}\\], ]*");\r
+// static private Pattern javascriptPattern = Pattern.compile("[a-zA-Z_$][a-zA-Z_$0-9]*");\r
+// static private Pattern minimalPattern = Pattern.compile("[a-zA-Z_$][^:}\\], ]*");\r
 \r
                public String quoteValue (String value) {\r
                        value = value.replace("\\", "\\\\");\r
-//                     if (this == OutputType.minimal && !value.equals("true") && !value.equals("false") && !value.equals("null")\r
-//                             && minimalPattern.matcher(value).matches()) return value;\r
+// if (this == OutputType.minimal && !value.equals("true") && !value.equals("false") && !value.equals("null")\r
+// && minimalPattern.matcher(value).matches()) return value;\r
                        return '"' + value.replace("\"", "\\\"") + '"';\r
                }\r
 \r
                public String quoteName (String value) {\r
                        value = value.replace("\\", "\\\\");\r
-//                     switch (this) {\r
-//                     case minimal:\r
-//                             if (minimalPattern.matcher(value).matches()) return value;\r
-//                             return '"' + value.replace("\"", "\\\"") + '"';\r
-//                     case javascript:\r
-//                             if (javascriptPattern.matcher(value).matches()) return value;\r
-//                             return '"' + value.replace("\"", "\\\"") + '"';\r
-//                     default:\r
-                               return '"' + value.replace("\"", "\\\"") + '"';\r
-//                     }\r
+// switch (this) {\r
+// case minimal:\r
+// if (minimalPattern.matcher(value).matches()) return value;\r
+// return '"' + value.replace("\"", "\\\"") + '"';\r
+// case javascript:\r
+// if (javascriptPattern.matcher(value).matches()) return value;\r
+// return '"' + value.replace("\"", "\\\"") + '"';\r
+// default:\r
+                       return '"' + value.replace("\"", "\\\"") + '"';\r
+// }\r
                }\r
        }\r
 }\r
index a20c723..d9f9ce7 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import com.google.gwt.corp.compatibility.Numbers;\r
@@ -26,7 +27,7 @@ public class NumberUtils {
        public static int floatToRawIntBits (float value) {\r
                return Numbers.floatToIntBits(value);\r
        }\r
-       \r
+\r
        public static int floatToIntColor (float value) {\r
                return Numbers.floatToIntBits(value);\r
        }\r
@@ -48,4 +49,4 @@ public class NumberUtils {
        public static double longBitsToDouble (long value) {\r
                return 0; // FIXME\r
        }\r
-}
\ No newline at end of file
+}\r
index 983ace5..08167b4 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import java.lang.reflect.Constructor;\r
@@ -48,4 +49,4 @@ public class ReflectionPool<T> extends Pool<T> {
                        throw new GdxRuntimeException("Unable to create new instance: " + type.getName(), ex);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 5de0aab..ff5c51b 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
-/**\r
- * Wrapper around System.nanoTime() and System.currentTimeMillis(). Use this\r
- * if you want to be compatible across all platforms!\r
- * @author mzechner\r
- *\r
- */\r
+/** Wrapper around System.nanoTime() and System.currentTimeMillis(). Use this if you want to be compatible across all platforms!\r
+ * @author mzechner */\r
 public class TimeUtils {\r
-       /**\r
-        * @return The current value of the system timer, in nanoseconds.\r
-        */\r
-       public static long nanoTime() {\r
+       /** @return The current value of the system timer, in nanoseconds. */\r
+       public static long nanoTime () {\r
                return System.currentTimeMillis() * 1000000l;\r
        }\r
-       \r
-       /**\r
-        * @return the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.\r
-        */\r
-       public static long millis() {\r
+\r
+       /** @return the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. */\r
+       public static long millis () {\r
                return System.currentTimeMillis();\r
        }\r
-}
\ No newline at end of file
+}\r
index c733df8..a186f9f 100644 (file)
@@ -47,7 +47,7 @@ public class CompatibilityImpl implements Compatibility.Impl {
        @Override
        public void printStackTrace (Throwable e) {
                // TODO Auto-generated method stub
-               
+
        }
 
        @Override
@@ -59,6 +59,6 @@ public class CompatibilityImpl implements Compatibility.Impl {
        @Override
        public void sleep (int i) {
                // TODO Auto-generated method stub
-               
+
        }
 }
index db29326..ca9f8a7 100644 (file)
@@ -20,7 +20,6 @@ import com.google.gwt.typedarrays.client.Float32Array;
 import com.google.gwt.typedarrays.client.Int32Array;
 import com.google.gwt.typedarrays.client.Int8Array;
 
-
 public class Numbers {
 
        static final double LN2 = Math.log(2);
index 0cc66a0..8583f86 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package com.google.gwt.corp.localstorage;
 
+package com.google.gwt.corp.localstorage;
 
 import java.io.IOException;
 
-import com.google.gwt.core.client.JavaScriptException;
+import sun.org.mozilla.javascript.internal.JavaScriptException;
 
 public class LocalStorage {
 
-  public static String getItem(String key) throws IOException {
-    try {
-      return getItemImpl(key);
-    } catch (JavaScriptException e) {
-      throw new IOException("" + e);
-    }
-  }
+       public static String getItem (String key) throws IOException {
+               try {
+                       return getItemImpl(key);
+               } catch (JavaScriptException e) {
+                       throw new IOException("" + e);
+               }
+       }
 
-  public static String key(int index) throws IOException {
-    try {
-      return keyImpl(index);
-    } catch (JavaScriptException e) {
-      throw new IOException("" + e);
-    }
-  }
+       public static String key (int index) throws IOException {
+               try {
+                       return keyImpl(index);
+               } catch (JavaScriptException e) {
+                       throw new IOException("" + e);
+               }
+       }
 
-  public static int length() throws IOException {
-    try {
-      return lengthImpl();
-    } catch (JavaScriptException e) {
-      throw new IOException("" + e);
-    }
-  }
+       public static int length () throws IOException {
+               try {
+                       return lengthImpl();
+               } catch (JavaScriptException e) {
+                       throw new IOException("" + e);
+               }
+       }
 
-  public static void removeItem(String key) throws IOException {
-    try {
-      removeItemImpl(key);
-    } catch (JavaScriptException e) {
-      throw new IOException("" + e);
-    }
-  }
+       public static void removeItem (String key) throws IOException {
+               try {
+                       removeItemImpl(key);
+               } catch (JavaScriptException e) {
+                       throw new IOException("" + e);
+               }
+       }
 
-  public static void setItem(String key, String value) throws IOException {
-    try {
-      setItemImpl(key, value);
-    } catch (JavaScriptException e) {
-      throw new IOException("" + e);
-    }
-  }
+       public static void setItem (String key, String value) throws IOException {
+               try {
+                       setItemImpl(key, value);
+               } catch (JavaScriptException e) {
+                       throw new IOException("" + e);
+               }
+       }
 
-  private native static String getItemImpl(String key) /*-{
-    return $wnd.localStorage.getItem(key);
-  }-*/;
+       private native static String getItemImpl (String key) /*-{
+                                                                                                                                                       return $wnd.localStorage.getItem(key);
+                                                                                                                                                       }-*/;
 
-  private native static String keyImpl(int index) /*-{
-    return $wnd.localStorage.key(index);
-  }-*/;
+       private native static String keyImpl (int index) /*-{
+                                                                                                                                               return $wnd.localStorage.key(index);
+                                                                                                                                               }-*/;
 
-  public native static int lengthImpl() /*-{
-    return $wnd.localStorage.length;
-  }-*/;
+       public native static int lengthImpl () /*-{
+                                                                                                               return $wnd.localStorage.length;
+                                                                                                               }-*/;
 
-  public native static void setItemImpl(String key, String value) /*-{
-    $wnd.localStorage.setItem(key, value);
-  }-*/;
+       public native static void setItemImpl (String key, String value) /*-{
+                                                                                                                                                                                       $wnd.localStorage.setItem(key, value);
+                                                                                                                                                                                       }-*/;
 
-  public native static void removeItemImpl(String key) /*-{
-               $wnd.localStorage.removeItem(key);
-       }-*/;
+       public native static void removeItemImpl (String key) /*-{
+                                                                                                                                                       $wnd.localStorage.removeItem(key);
+                                                                                                                                                       }-*/;
 }
index db4eb9c..81c6fe8 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package java.io;\r
 \r
 public class BufferedInputStream extends InputStream {\r
        InputStream in;\r
-       \r
-       public BufferedInputStream(InputStream in) {\r
+\r
+       public BufferedInputStream (InputStream in) {\r
                this.in = in;\r
        }\r
-       \r
-       public BufferedInputStream(InputStream in, int size) {\r
+\r
+       public BufferedInputStream (InputStream in, int size) {\r
                this.in = in;\r
        }\r
-       \r
+\r
        @Override\r
        public int read () throws IOException {\r
                return in.read();\r
        }\r
-}
\ No newline at end of file
+}\r
index 31ac450..6a8a957 100644 (file)
 package java.io;\r
 \r
 public class BufferedReader extends Reader {\r
-  private final Reader in;\r
-  private final char[] buffer;\r
-  private int position;\r
-  private int limit;\r
-\r
-  public BufferedReader(Reader in, int bufferSize) {\r
-    this.in = in;\r
-    this.buffer = new char[bufferSize];\r
-  }\r
-\r
-  public BufferedReader(Reader in) {\r
-    this(in, 32);\r
-  }\r
-  \r
-  private void fill() throws IOException {\r
-    position = 0;\r
-    limit = in.read(buffer);\r
-  }\r
-\r
-  public String readLine() throws IOException {\r
-    StringBuilder sb = new StringBuilder();\r
-    while (true) {\r
-      if (position >= limit) {\r
-        fill();\r
-      }\r
-\r
-      if (position >= limit) {\r
-        return sb.length() == 0 ? null : sb.toString();\r
-      }\r
-\r
-      for (int i = position; i < limit; ++i) {\r
-        if(buffer[i] == '\r') {\r
-          sb.append(buffer, position, i - position);\r
-          position = i + 1;\r
-          if(i+1 < limit && buffer[i+1] == '\n') {\r
-            position = i + 2;\r
-          }\r
-          return sb.toString();\r
-        } else if (buffer[i] == '\n') {\r
-          sb.append(buffer, position, i - position);\r
-          position = i + 1;\r
-          return sb.toString();\r
-        }\r
-      }\r
-      sb.append(buffer, position, limit-position);\r
-      position = limit;\r
-    }\r
-  }\r
-\r
-  public int read(char[] b, int offset, int length) throws IOException {\r
-    int count = 0;\r
-\r
-    if (position >= limit && length < buffer.length) {\r
-      fill();\r
-    }\r
-\r
-    if (position < limit) {\r
-      int remaining = limit - position;\r
-      if (remaining > length) {\r
-        remaining = length;\r
-      }\r
-\r
-      System.arraycopy(buffer, position, b, offset, remaining);\r
-\r
-      count += remaining;\r
-      position += remaining;\r
-      offset += remaining;\r
-      length -= remaining;\r
-    }\r
-\r
-    if (length > 0) {\r
-      int c = in.read(b, offset, length);\r
-      if (c == -1) {\r
-        if (count == 0) {\r
-          count = -1;\r
-        }\r
-      } else {\r
-        count += c;\r
-      }\r
-    }\r
-\r
-    return count;\r
-  }\r
-\r
-  public void close() throws IOException {\r
-    in.close();\r
-  }\r
+       private final Reader in;\r
+       private final char[] buffer;\r
+       private int position;\r
+       private int limit;\r
+\r
+       public BufferedReader (Reader in, int bufferSize) {\r
+               this.in = in;\r
+               this.buffer = new char[bufferSize];\r
+       }\r
+\r
+       public BufferedReader (Reader in) {\r
+               this(in, 32);\r
+       }\r
+\r
+       private void fill () throws IOException {\r
+               position = 0;\r
+               limit = in.read(buffer);\r
+       }\r
+\r
+       public String readLine () throws IOException {\r
+               StringBuilder sb = new StringBuilder();\r
+               while (true) {\r
+                       if (position >= limit) {\r
+                               fill();\r
+                       }\r
+\r
+                       if (position >= limit) {\r
+                               return sb.length() == 0 ? null : sb.toString();\r
+                       }\r
+\r
+                       for (int i = position; i < limit; ++i) {\r
+                               if (buffer[i] == '\r') {\r
+                                       sb.append(buffer, position, i - position);\r
+                                       position = i + 1;\r
+                                       if (i + 1 < limit && buffer[i + 1] == '\n') {\r
+                                               position = i + 2;\r
+                                       }\r
+                                       return sb.toString();\r
+                               } else if (buffer[i] == '\n') {\r
+                                       sb.append(buffer, position, i - position);\r
+                                       position = i + 1;\r
+                                       return sb.toString();\r
+                               }\r
+                       }\r
+                       sb.append(buffer, position, limit - position);\r
+                       position = limit;\r
+               }\r
+       }\r
+\r
+       public int read (char[] b, int offset, int length) throws IOException {\r
+               int count = 0;\r
+\r
+               if (position >= limit && length < buffer.length) {\r
+                       fill();\r
+               }\r
+\r
+               if (position < limit) {\r
+                       int remaining = limit - position;\r
+                       if (remaining > length) {\r
+                               remaining = length;\r
+                       }\r
+\r
+                       System.arraycopy(buffer, position, b, offset, remaining);\r
+\r
+                       count += remaining;\r
+                       position += remaining;\r
+                       offset += remaining;\r
+                       length -= remaining;\r
+               }\r
+\r
+               if (length > 0) {\r
+                       int c = in.read(b, offset, length);\r
+                       if (c == -1) {\r
+                               if (count == 0) {\r
+                                       count = -1;\r
+                               }\r
+                       } else {\r
+                               count += c;\r
+                       }\r
+               }\r
+\r
+               return count;\r
+       }\r
+\r
+       public void close () throws IOException {\r
+               in.close();\r
+       }\r
 }\r
index 476caba..2aeed0c 100644 (file)
 package java.io;\r
 \r
 public class BufferedWriter extends Writer {\r
-  private final Writer out;\r
-  private final char[] buffer;\r
-  private int position;\r
-\r
-  public BufferedWriter(Writer out, int size) {\r
-    this.out = out;\r
-    this.buffer = new char[size];\r
-  }\r
-  \r
-  public BufferedWriter(Writer out) {\r
-    this(out, 4096);\r
-  }\r
-  \r
-  private void drain() throws IOException {\r
-    if (position > 0) {\r
-      out.write(buffer, 0, position);\r
-      position = 0;\r
-    }\r
-  }\r
-\r
-  public void write(char[] b, int offset, int length) throws IOException {\r
-    if (length > buffer.length - position) {\r
-      drain();\r
-      out.write(b, offset, length);      \r
-    } else {\r
-      System.arraycopy(b, offset, buffer, position, length);\r
-      position += length;\r
-    }\r
-  }\r
-\r
-  public void flush() throws IOException {\r
-    drain();\r
-    out.flush();\r
-  }\r
-\r
-  public void close() throws IOException {\r
-    flush();\r
-    out.close();\r
-  }\r
+       private final Writer out;\r
+       private final char[] buffer;\r
+       private int position;\r
+\r
+       public BufferedWriter (Writer out, int size) {\r
+               this.out = out;\r
+               this.buffer = new char[size];\r
+       }\r
+\r
+       public BufferedWriter (Writer out) {\r
+               this(out, 4096);\r
+       }\r
+\r
+       private void drain () throws IOException {\r
+               if (position > 0) {\r
+                       out.write(buffer, 0, position);\r
+                       position = 0;\r
+               }\r
+       }\r
+\r
+       public void write (char[] b, int offset, int length) throws IOException {\r
+               if (length > buffer.length - position) {\r
+                       drain();\r
+                       out.write(b, offset, length);\r
+               } else {\r
+                       System.arraycopy(b, offset, buffer, position, length);\r
+                       position += length;\r
+               }\r
+       }\r
+\r
+       public void flush () throws IOException {\r
+               drain();\r
+               out.flush();\r
+       }\r
+\r
+       public void close () throws IOException {\r
+               flush();\r
+               out.close();\r
+       }\r
 }\r
index 61824d1..e72d7f3 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public class ByteArrayInputStream extends InputStream {
 
-  byte[] data;
-  int pos = 0;
-  
-  public ByteArrayInputStream(byte[] data) {
-    this.data = data;
-  }
-  
-  @Override
-  public int read()  {
-    return pos < data.length ? data[pos++] & 0xff: -1;
-  }
-  
-  @Override
-  public int available() {
-         return data.length - pos;
-  }  
+       byte[] data;
+       int pos = 0;
+
+       public ByteArrayInputStream (byte[] data) {
+               this.data = data;
+       }
+
+       @Override
+       public int read () {
+               return pos < data.length ? data[pos++] & 0xff : -1;
+       }
+
+       @Override
+       public int available () {
+               return data.length - pos;
+       }
 }
index 8d74378..9153674 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public class ByteArrayOutputStream extends OutputStream {
 
-  protected int count;
-  protected byte[] buf;
-  public ByteArrayOutputStream() {
-    this(16);
-  }
-  
-  public ByteArrayOutputStream(int initialSize) {
-    buf = new byte[initialSize];
-  }
-  
-  @Override
-  public void write(int b) {
-    if (buf.length == count) {
-      byte[] newBuf = new byte[buf.length * 3 / 2];
-      System.arraycopy(buf, 0, newBuf, 0, count);
-      buf = newBuf;
-    }
-    
-    buf[count++] = (byte) b;
-  }
-  
-  public byte[] toByteArray() {
-    byte[] result = new byte[count];
-    System.arraycopy(buf, 0, result, 0, count);
-    return result;
-  }
-
-  
-  public int size() {
-    return count;
-  }
-  
-  public String toString() {
-         return new String(buf, 0, count);
-  }
-  public String toString(String enc) throws UnsupportedEncodingException {
-         return new String(buf, 0, count, enc);
-  }  
+       protected int count;
+       protected byte[] buf;
+
+       public ByteArrayOutputStream () {
+               this(16);
+       }
+
+       public ByteArrayOutputStream (int initialSize) {
+               buf = new byte[initialSize];
+       }
+
+       @Override
+       public void write (int b) {
+               if (buf.length == count) {
+                       byte[] newBuf = new byte[buf.length * 3 / 2];
+                       System.arraycopy(buf, 0, newBuf, 0, count);
+                       buf = newBuf;
+               }
+
+               buf[count++] = (byte)b;
+       }
+
+       public byte[] toByteArray () {
+               byte[] result = new byte[count];
+               System.arraycopy(buf, 0, result, 0, count);
+               return result;
+       }
+
+       public int size () {
+               return count;
+       }
+
+       public String toString () {
+               return new String(buf, 0, count);
+       }
+
+       public String toString (String enc) throws UnsupportedEncodingException {
+               return new String(buf, 0, count, enc);
+       }
 }
index 984d980..e752c4e 100644 (file)
 \r
 package java.io;\r
 \r
-/***\r
- * Defines an interface for classes that can (or need to) be closed once they\r
- * are not used any longer. This usually includes all sorts of\r
- * {@link InputStream}s and {@link OutputStream}s. Calling the {@code close}\r
- * method releases resources that the object holds.\r
- */\r
+/*** Defines an interface for classes that can (or need to) be closed once they are not used any longer. This usually includes all\r
+ * sorts of {@link InputStream}s and {@link OutputStream}s. Calling the {@code close} method releases resources that the object\r
+ * holds. */\r
 public interface Closeable {\r
 \r
-    /***\r
-     * Closes the object and release any system resources it holds. If the\r
-     * object has already been closed, then invoking this method has no effect.\r
-     * \r
-     * @throws IOException\r
-     *             if any error occurs when closing the object.\r
-     */\r
-    public void close() throws IOException;\r
-}
\ No newline at end of file
+       /*** Closes the object and release any system resources it holds. If the object has already been closed, then invoking this\r
+        * method has no effect.\r
+        * \r
+        * @throws IOException if any error occurs when closing the object. */\r
+       public void close () throws IOException;\r
+}\r
index 622ec4d..29f3b7c 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public interface DataInput {
-  public boolean readBoolean() throws IOException;
-  public byte readByte() throws IOException;
-  public char readChar() throws IOException;
-  public double readDouble() throws IOException;
-  public float readFloat() throws IOException;
-  public void readFully(byte[] b) throws IOException;
-  public void readFully(byte[] b, int off, int len) throws IOException;
-  public int readInt() throws IOException;
-  public String readLine() throws IOException;
-  public long readLong() throws IOException;
-  public short readShort() throws IOException;
-  public String readUTF() throws IOException;
-  public int readUnsignedByte() throws IOException;
-  public int readUnsignedShort() throws IOException;
-  public int skipBytes(int n) throws IOException;
+       public boolean readBoolean () throws IOException;
+
+       public byte readByte () throws IOException;
+
+       public char readChar () throws IOException;
+
+       public double readDouble () throws IOException;
+
+       public float readFloat () throws IOException;
+
+       public void readFully (byte[] b) throws IOException;
+
+       public void readFully (byte[] b, int off, int len) throws IOException;
+
+       public int readInt () throws IOException;
+
+       public String readLine () throws IOException;
+
+       public long readLong () throws IOException;
+
+       public short readShort () throws IOException;
+
+       public String readUTF () throws IOException;
+
+       public int readUnsignedByte () throws IOException;
+
+       public int readUnsignedShort () throws IOException;
+
+       public int skipBytes (int n) throws IOException;
 }
index 44e567b..6ad6d0b 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 import com.google.gwt.corp.compatibility.Numbers;
 
 public class DataInputStream extends InputStream implements DataInput {
 
-  private final InputStream is;
-  
-  public DataInputStream(final InputStream is) {
-    this.is = is;
-  }
-  
-  @Override
-  public int read() throws IOException {
-    return is.read();
-  }
-
-  public boolean readBoolean() throws IOException {
-    return readByte() != 0;
-  }
-
-  public byte readByte() throws IOException {
-    int i = read();
-    if (i == -1) {
-      throw new EOFException();
-    }
-    return (byte) i;
-  }
-
-  public char readChar() throws IOException {
-    int a = is.read();
-    int b = readUnsignedByte();
-    return (char) ((a << 8) | b);
-  }
-
-  public double readDouble() throws IOException {
-    throw new RuntimeException("readDouble");
-  }
-
-  public float readFloat() throws IOException {
-    return Numbers.intBitsToFloat(readInt());
-  }
-
-  public void readFully(byte[] b) throws IOException {
-    readFully(b, 0, b.length);
-  }
-
-  public void readFully(byte[] b, int off, int len) throws IOException {
-    while (len > 0) {
-      int count = is.read(b, off, len);
-      if (count <= 0) {
-        throw new EOFException();
-      }
-      off += count;
-      len -= count;
-    }
-  }
-
-  public int readInt() throws IOException {
-    int a = is.read();
-    int b = is.read();
-    int c = is.read();
-    int d = readUnsignedByte();
-    return (a << 24) | (b << 16) | (c << 8) | d;
-  }
-
-  public String readLine() throws IOException {
-    throw new RuntimeException("readline NYI");
-  }
-
-  public long readLong() throws IOException {
-    long a = readInt();
-    long b = readInt() & 0x0ffffffff;
-    return (a << 32) | b;
-  }
-
-  public short readShort() throws IOException {
-    int a = is.read();
-    int b = readUnsignedByte();
-    return (short) ((a << 8) | b);
-  }
-
-  public String readUTF() throws IOException {
-    int bytes = readUnsignedShort();
-    StringBuilder sb = new StringBuilder();
-    
-    while (bytes > 0) {
-      bytes -= readUtfChar(sb);
-    }
-    
-    return sb.toString();
-  }
-
-  private int readUtfChar(StringBuilder sb) throws IOException {
-    int a = readUnsignedByte();
-    if ((a & 0x80) == 0) {
-      sb.append((char) a);
-      return 1;
-    }
-    if ((a & 0xe0) == 0xb0) {
-      int b = readUnsignedByte();
-      sb.append((char)(((a& 0x1F) << 6) | (b & 0x3F)));
-      return 2;
-    }
-    if ((a & 0xf0) == 0xe0) {
-      int b = is.read();
-      int c = readUnsignedByte();
-      sb.append((char)(((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F)));
-      return 3;
-    }
-    throw new UTFDataFormatException();
-  }
-
-  public int readUnsignedByte() throws IOException {
-    int i = read();
-    if (i == -1) {
-      throw new EOFException();
-    }
-    return i;
-  }
-
-  public int readUnsignedShort() throws IOException {
-    int a = is.read();
-    int b = readUnsignedByte();
-    return ((a << 8) | b);
-  }
-
-  public int skipBytes(int n) throws IOException {
-    // note: This is actually a valid implementation of this method, rendering it quite useless...
-    return 0;
-  }
+       private final InputStream is;
+
+       public DataInputStream (final InputStream is) {
+               this.is = is;
+       }
+
+       @Override
+       public int read () throws IOException {
+               return is.read();
+       }
+
+       public boolean readBoolean () throws IOException {
+               return readByte() != 0;
+       }
+
+       public byte readByte () throws IOException {
+               int i = read();
+               if (i == -1) {
+                       throw new EOFException();
+               }
+               return (byte)i;
+       }
+
+       public char readChar () throws IOException {
+               int a = is.read();
+               int b = readUnsignedByte();
+               return (char)((a << 8) | b);
+       }
+
+       public double readDouble () throws IOException {
+               throw new RuntimeException("readDouble");
+       }
+
+       public float readFloat () throws IOException {
+               return Numbers.intBitsToFloat(readInt());
+       }
+
+       public void readFully (byte[] b) throws IOException {
+               readFully(b, 0, b.length);
+       }
+
+       public void readFully (byte[] b, int off, int len) throws IOException {
+               while (len > 0) {
+                       int count = is.read(b, off, len);
+                       if (count <= 0) {
+                               throw new EOFException();
+                       }
+                       off += count;
+                       len -= count;
+               }
+       }
+
+       public int readInt () throws IOException {
+               int a = is.read();
+               int b = is.read();
+               int c = is.read();
+               int d = readUnsignedByte();
+               return (a << 24) | (b << 16) | (c << 8) | d;
+       }
+
+       public String readLine () throws IOException {
+               throw new RuntimeException("readline NYI");
+       }
+
+       public long readLong () throws IOException {
+               long a = readInt();
+               long b = readInt() & 0x0ffffffff;
+               return (a << 32) | b;
+       }
+
+       public short readShort () throws IOException {
+               int a = is.read();
+               int b = readUnsignedByte();
+               return (short)((a << 8) | b);
+       }
+
+       public String readUTF () throws IOException {
+               int bytes = readUnsignedShort();
+               StringBuilder sb = new StringBuilder();
+
+               while (bytes > 0) {
+                       bytes -= readUtfChar(sb);
+               }
+
+               return sb.toString();
+       }
+
+       private int readUtfChar (StringBuilder sb) throws IOException {
+               int a = readUnsignedByte();
+               if ((a & 0x80) == 0) {
+                       sb.append((char)a);
+                       return 1;
+               }
+               if ((a & 0xe0) == 0xb0) {
+                       int b = readUnsignedByte();
+                       sb.append((char)(((a & 0x1F) << 6) | (b & 0x3F)));
+                       return 2;
+               }
+               if ((a & 0xf0) == 0xe0) {
+                       int b = is.read();
+                       int c = readUnsignedByte();
+                       sb.append((char)(((a & 0x0F) << 12) | ((b & 0x3F) << 6) | (c & 0x3F)));
+                       return 3;
+               }
+               throw new UTFDataFormatException();
+       }
+
+       public int readUnsignedByte () throws IOException {
+               int i = read();
+               if (i == -1) {
+                       throw new EOFException();
+               }
+               return i;
+       }
+
+       public int readUnsignedShort () throws IOException {
+               int a = is.read();
+               int b = readUnsignedByte();
+               return ((a << 8) | b);
+       }
+
+       public int skipBytes (int n) throws IOException {
+               // note: This is actually a valid implementation of this method, rendering it quite useless...
+               return 0;
+       }
 
 }
index 3102904..16b58d3 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public interface DataOutput {
-  public void write(byte[] data) throws IOException;
-  public void write(byte[] data, int ofs, int len) throws IOException;
-  public void write(int v) throws IOException;
-  public void writeBoolean(boolean v) throws IOException;
-  public void writeByte(int v) throws IOException;
-  public void writeBytes(String s) throws IOException;
-  public void writeChar(int v) throws IOException;
-  public void writeChars(String s) throws IOException;
-  public void writeDouble(double v) throws IOException;
-  public void writeFloat(float v) throws IOException;
-  public void writeInt(int v) throws IOException;
-  public void writeLong(long v) throws IOException;
-  public void writeShort(int v) throws IOException;
-  public void writeUTF(String s) throws IOException;
+       public void write (byte[] data) throws IOException;
+
+       public void write (byte[] data, int ofs, int len) throws IOException;
+
+       public void write (int v) throws IOException;
+
+       public void writeBoolean (boolean v) throws IOException;
+
+       public void writeByte (int v) throws IOException;
+
+       public void writeBytes (String s) throws IOException;
+
+       public void writeChar (int v) throws IOException;
+
+       public void writeChars (String s) throws IOException;
+
+       public void writeDouble (double v) throws IOException;
+
+       public void writeFloat (float v) throws IOException;
+
+       public void writeInt (int v) throws IOException;
+
+       public void writeLong (long v) throws IOException;
+
+       public void writeShort (int v) throws IOException;
+
+       public void writeUTF (String s) throws IOException;
 }
index 44dc55d..ec9fbb1 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 import com.google.gwt.corp.compatibility.Numbers;
 
 public class DataOutputStream extends OutputStream implements DataOutput {
 
-  OutputStream os;
-  
-  public DataOutputStream (OutputStream os) {
-    this.os = os;
-  }
-  
-  @Override
-  public void write(int b) throws IOException {
-    os.write(b);
-  }
-
-  public void writeBoolean(boolean v) throws IOException {
-    os.write(v ? 1 : 0); 
-  }
-
-  public void writeByte(int v) throws IOException {
-    os.write(v);
-  }
-
-  public void writeBytes(String s) throws IOException {
-       int len = s.length();
-    for(int i = 0; i < len; i++) {
-       os.write(s.charAt(i) & 0xff);
-    }
-  }
-
-  public void writeChar(int v) throws IOException {
-    os.write(v >> 8);
-    os.write(v);
-  }
-
-  public void writeChars(String s) throws IOException {
-    throw new RuntimeException("writeChars NYI");
-  }
-
-  public void writeDouble(double v) throws IOException {
-    throw new RuntimeException("writeDouble");
-  }
-
-  public void writeFloat(float v) throws IOException {
-    writeInt(Numbers.floatToIntBits(v));
-  }
-
-  public void writeInt(int v) throws IOException {
-    os.write(v >> 24);
-    os.write(v >> 16);
-    os.write(v >> 8);
-    os.write(v);
-  }
-
-  public void writeLong(long v) throws IOException {
-    writeInt((int) (v >> 32L));
-    writeInt((int) v);
-  }
-
-  public void writeShort(int v) throws IOException {
-    os.write(v >> 8);
-    os.write(v);
-  }
-
-  public void writeUTF(String s) throws IOException {
-    ByteArrayOutputStream baos = new ByteArrayOutputStream();
-    for (int i = 0; i < s.length(); i++) {
-      char c = s.charAt(i);
-      if (c > 0 && c < 80) {
-        baos.write(c);
-      } else if (c < '\u0800') {
-        baos.write(0xc0 | (0x1f & (c >> 6)));
-        baos.write(0x80 | (0x3f & c));
-      } else {
-        baos.write(0xe0 | (0x0f & (c >> 12)));
-        baos.write(0x80 | (0x3f & (c >>  6)));
-        baos.write(0x80 | (0x3f & c));
-      }
-    }
-    writeShort(baos.count);
-    os.write(baos.buf, 0, baos.count);
-  }
-}
\ No newline at end of file
+       OutputStream os;
+
+       public DataOutputStream (OutputStream os) {
+               this.os = os;
+       }
+
+       @Override
+       public void write (int b) throws IOException {
+               os.write(b);
+       }
+
+       public void writeBoolean (boolean v) throws IOException {
+               os.write(v ? 1 : 0);
+       }
+
+       public void writeByte (int v) throws IOException {
+               os.write(v);
+       }
+
+       public void writeBytes (String s) throws IOException {
+               int len = s.length();
+               for (int i = 0; i < len; i++) {
+                       os.write(s.charAt(i) & 0xff);
+               }
+       }
+
+       public void writeChar (int v) throws IOException {
+               os.write(v >> 8);
+               os.write(v);
+       }
+
+       public void writeChars (String s) throws IOException {
+               throw new RuntimeException("writeChars NYI");
+       }
+
+       public void writeDouble (double v) throws IOException {
+               throw new RuntimeException("writeDouble");
+       }
+
+       public void writeFloat (float v) throws IOException {
+               writeInt(Numbers.floatToIntBits(v));
+       }
+
+       public void writeInt (int v) throws IOException {
+               os.write(v >> 24);
+               os.write(v >> 16);
+               os.write(v >> 8);
+               os.write(v);
+       }
+
+       public void writeLong (long v) throws IOException {
+               writeInt((int)(v >> 32L));
+               writeInt((int)v);
+       }
+
+       public void writeShort (int v) throws IOException {
+               os.write(v >> 8);
+               os.write(v);
+       }
+
+       public void writeUTF (String s) throws IOException {
+               ByteArrayOutputStream baos = new ByteArrayOutputStream();
+               for (int i = 0; i < s.length(); i++) {
+                       char c = s.charAt(i);
+                       if (c > 0 && c < 80) {
+                               baos.write(c);
+                       } else if (c < '\u0800') {
+                               baos.write(0xc0 | (0x1f & (c >> 6)));
+                               baos.write(0x80 | (0x3f & c));
+                       } else {
+                               baos.write(0xe0 | (0x0f & (c >> 12)));
+                               baos.write(0x80 | (0x3f & (c >> 6)));
+                               baos.write(0x80 | (0x3f & c));
+                       }
+               }
+               writeShort(baos.count);
+               os.write(baos.buf, 0, baos.count);
+       }
+}
index 234f818..0aaa32d 100644 (file)
@@ -13,6 +13,7 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public class EOFException extends IOException {
index 8283312..1f11909 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 import java.util.ArrayList;
 
-import com.google.gwt.core.client.JavaScriptObject;
-
 import com.google.gwt.corp.localstorage.LocalStorage;
 
-/**
- * LocalStorage based File implementation for GWT. Should probably have used Harmony as a
- * starting point instead of writing this from scratch.
+/** LocalStorage based File implementation for GWT. Should probably have used Harmony as a starting point instead of writing this
+ * from scratch.
  * 
- * @author Stefan Haustein
- */
+ * @author Stefan Haustein */
 public class File {
 
-  public static final File ROOT = new File("");
-       
-  public static final char separatorChar = '/';
-
-  public static final String separator = "" + separatorChar;
-
-  public static final char pathSeparatorChar = ':';
-
-  public static final String pathSeparator = "" + pathSeparatorChar;
-
-  File parent;
-  String name;
-  boolean absolute;
-  
-  public File(String pathname) {
-         while (pathname.endsWith(separator) && pathname.length() > 0) {
-                 pathname = pathname.substring(0, pathname.length() - 1);
-         }
-         
-         int cut = pathname.lastIndexOf(separatorChar);
-         if (cut == -1) {
-                 name = pathname;
-         } else if (cut == 0) { 
-                 name = pathname.substring(cut);
-                 parent = name.equals("") ? null : ROOT;
-         } else {
-                 name = pathname.substring(cut + 1);
-                 parent = new File(pathname.substring(0, cut));
-         }
-         
-//       Compatibility.println("new File ('"+pathname+ "'); canonical name: '" + getCanonicalPath() + "'");
-  }
-
-  public File(String parent, String child) {
-         this(new File(parent), child);
-  }
-
-  public File(File parent, String child) {
-         this.parent = parent;
-         this.name = child;
-  }
-
-  /*
-  public File(URI uri) {
-  }
-  */
-
-  public String getName() {
-    return name;
-  }
-
-  public String getParent() {
-    return parent == null ? "" : parent.getPath();
-  }
-
-  public File getParentFile() {
-    return parent;
-  }
-
-  public String getPath() {
-    return parent == null ? name : (parent.getPath() + 
-               separatorChar + name);
-  }
-
-  private boolean isRoot() {
-         return name.equals("") && parent == null;
-  }
-  
-  public boolean isAbsolute() {
-       if (isRoot()) {
+       public static final File ROOT = new File("");
+
+       public static final char separatorChar = '/';
+
+       public static final String separator = "" + separatorChar;
+
+       public static final char pathSeparatorChar = ':';
+
+       public static final String pathSeparator = "" + pathSeparatorChar;
+
+       File parent;
+       String name;
+       boolean absolute;
+
+       public File (String pathname) {
+               while (pathname.endsWith(separator) && pathname.length() > 0) {
+                       pathname = pathname.substring(0, pathname.length() - 1);
+               }
+
+               int cut = pathname.lastIndexOf(separatorChar);
+               if (cut == -1) {
+                       name = pathname;
+               } else if (cut == 0) {
+                       name = pathname.substring(cut);
+                       parent = name.equals("") ? null : ROOT;
+               } else {
+                       name = pathname.substring(cut + 1);
+                       parent = new File(pathname.substring(0, cut));
+               }
+
+// Compatibility.println("new File ('"+pathname+ "'); canonical name: '" + getCanonicalPath() + "'");
+       }
+
+       public File (String parent, String child) {
+               this(new File(parent), child);
+       }
+
+       public File (File parent, String child) {
+               this.parent = parent;
+               this.name = child;
+       }
+
+       /*
+        * public File(URI uri) { }
+        */
+
+       public String getName () {
+               return name;
+       }
+
+       public String getParent () {
+               return parent == null ? "" : parent.getPath();
+       }
+
+       public File getParentFile () {
+               return parent;
+       }
+
+       public String getPath () {
+               return parent == null ? name : (parent.getPath() + separatorChar + name);
+       }
+
+       private boolean isRoot () {
+               return name.equals("") && parent == null;
+       }
+
+       public boolean isAbsolute () {
+               if (isRoot()) {
+                       return true;
+               }
+               if (parent == null) {
+                       return false;
+               }
+               return parent.isAbsolute();
+       }
+
+       public String getAbsolutePath () {
+               String path = getAbsoluteFile().getPath();
+               return path.length() == 0 ? "/" : path;
+       }
+
+       public File getAbsoluteFile () {
+               if (isAbsolute()) {
+                       return this;
+               }
+               if (parent == null) {
+                       return new File(ROOT, name);
+               }
+               return new File(parent.getAbsoluteFile(), name);
+       }
+
+       public String getCanonicalPath () {
+               return getCanonicalFile().getAbsolutePath();
+       }
+
+       public File getCanonicalFile () {
+               File cParent = parent == null ? null : parent.getCanonicalFile();
+               if (name.equals(".")) {
+                       return cParent == null ? ROOT : cParent;
+               }
+               if (cParent != null && cParent.name.equals("")) {
+                       cParent = null;
+               }
+               if (name.equals("..")) {
+                       if (cParent == null) {
+                               return ROOT;
+                       }
+                       if (cParent.parent == null) {
+                               return ROOT;
+                       }
+                       return cParent.parent;
+               }
+               if (cParent == null && !name.equals("")) {
+                       return new File(ROOT, name);
+               }
+               return new File(cParent, name);
+       }
+
+       /*
+        * public URL toURL() throws MalformedURLException { }
+        * 
+        * public URI toURI() { }
+        */
+
+       public boolean canRead () {
                return true;
        }
-       if(parent == null) {
-               return false;
+
+       public boolean canWrite () {
+               return true;
+       }
+
+       public boolean exists () {
+               try {
+                       return LocalStorage.getItem(getCanonicalPath()) != null;
+               } catch (IOException e) {
+                       return false;
+               }
+       }
+
+       public boolean isDirectory () {
+               try {
+                       String s = LocalStorage.getItem(getCanonicalPath());
+                       return s != null && s.startsWith("{");
+               } catch (IOException e) {
+                       return false;
+               }
        }
-       return parent.isAbsolute();
-  }
-
-  public String getAbsolutePath() {
-    String path = getAbsoluteFile().getPath();
-    return path.length() == 0 ? "/" : path;
-  }
-
-  public File getAbsoluteFile() {
-        if (isAbsolute()) { 
-                return this;
-        }
-        if (parent == null) {
-                return new File(ROOT, name);
-        }
-        return new File(parent.getAbsoluteFile(), name);
-  }
-
-  public String getCanonicalPath() {
-        return getCanonicalFile().getAbsolutePath();
-  }
-
-  public File getCanonicalFile() {
-         File cParent = parent == null ? null : parent.getCanonicalFile();
-         if (name.equals (".")) {
-                 return cParent == null ? ROOT : cParent;
-         }
-         if (cParent != null && cParent.name.equals("")) {
-                 cParent = null;
-         }
-         if (name.equals("..")) {
-                 if (cParent == null) {
-                         return ROOT;
-                 } 
-                 if (cParent.parent == null) {
-                         return ROOT;
-                 }
-                 return cParent.parent;
-         }
-         if (cParent == null && !name.equals("")) {
-                 return new File(ROOT, name);
-         }
-         return new File(cParent, name);
-  }
-
-  /*
-  public URL toURL() throws MalformedURLException {
-  }
-
-  public URI toURI() {
-  }
-  */
-
-  public boolean canRead() {
-    return true;
-  }
-
-  public boolean canWrite() {
-    return true;
-  }
-
-  public boolean exists() {
-       try {
-               return LocalStorage.getItem(getCanonicalPath()) != null;
-       } catch (IOException e) {
+
+       public boolean isFile () {
+               try {
+                       String s = LocalStorage.getItem(getCanonicalPath());
+                       return s != null && !s.startsWith("{");
+               } catch (IOException e) {
+                       return false;
+               }
+       }
+
+       public boolean isHidden () {
                return false;
        }
-  }
-
-  public boolean isDirectory() {
-         try {
-                 String s = LocalStorage.getItem(getCanonicalPath());
-                 return s != null && s.startsWith("{");
-         } catch (IOException e) {
-                 return false;
-         }
-  }
-
-  public boolean isFile() {
-         try {
-                 String s = LocalStorage.getItem(getCanonicalPath());
-                 return s != null && !s.startsWith("{");
-         } catch (IOException e) {
-                 return false;
-         }
-  }
-
-  public boolean isHidden() {
-    return false;
-  }
-
-  public long lastModified() {
-    return 0;
-  }
-
-  public long length() {
-       try {
-               if (!exists()) {
+
+       public long lastModified () {
+               return 0;
+       }
+
+       public long length () {
+               try {
+                       if (!exists()) {
+                               return 0;
+                       }
+
+                       RandomAccessFile raf = new RandomAccessFile(this, "r");
+                       long len = raf.length();
+                       raf.close();
+                       return len;
+               } catch (IOException e) {
                        return 0;
                }
-               
-               RandomAccessFile raf = new RandomAccessFile(this, "r");
-               long len = raf.length();
-               raf.close();
-               return len;
-       } catch (IOException e) {
-               return 0;
        }
-  }
-
-  public boolean createNewFile() throws IOException {
-         if (exists()) return false;
-         if (!parent.exists()) return false;
-         LocalStorage.setItem(getCanonicalPath(), RandomAccessFile.btoa(""));
-         return true;
-  }
-
-  public boolean delete() {
-         try {
-                 if (!exists()) {
-                         return false;
-                 }
-                 LocalStorage.removeItem(getCanonicalPath());
-                 return true;
-         } catch (IOException e) {
-                 return false;
-         }
-  }
-
-  public void deleteOnExit() {
-         throw new RuntimeException("NYI: File.deleteOnExit()");
-  }
-
-  public String[] list() {
-         throw new RuntimeException("NYI: File.list()");
-  }
-
-  /*
-  public String[] list(FilenameFilter filter) {
-    return null;
-  }
-  */
-
-  public File[] listFiles() {
-        return listFiles(null);
-  }
-
-  
-  public File[] listFiles(FilenameFilter filter) {
-         ArrayList<File> files = new ArrayList<File>();
-         try {
-                 String prefix = getCanonicalPath();
-                 if (!prefix.endsWith(separator)) {
-                         prefix += separatorChar;
-                 }
-
-                 int cut = prefix.length();
-                 int cnt = LocalStorage.length();
-                 for (int i = 0; i < cnt; i++) {
-                         String key = LocalStorage.key(i);
-                         if (key.startsWith(prefix) && key.indexOf(separatorChar, cut) == -1) {
-                                 String name = key.substring(cut);
-                                 if (filter == null || filter.accept(this, name)) {
-                                         files.add(new File(this, name));
-                                 }
-                         }
-                 }
-         } catch (IOException e) {
-                 System.err.println("lisFiles() exception: " + e);
-         }
-         return files.toArray(new File[files.size()]);
-  }
-  /*
-  public File[] listFiles(FileFilter filter) {
-    return null;
-  }
-  */
-
-  public boolean mkdir() { 
-         try {
-                 if (parent != null && !parent.exists()) {
-                         return false;
-                 }
-                 if (exists()) {
-                         return false;
-                 }
-                 // We may want to make this a JS map
-                 LocalStorage.setItem(getCanonicalPath(), "{}");
-                 return true;
-         } catch (IOException e) {
-                 return false;
-         }
-  }
-
-  public boolean mkdirs() {
-         if (parent != null) {
-                 parent.mkdirs();
-         }
-         return mkdir();
-  }
-
-  public boolean renameTo(File dest) {
-         throw new RuntimeException("renameTo()");
-  }
-
-  public boolean setLastModified(long time) {
-    return false;
-  }
-
-  public boolean setReadOnly() {
-    return false;
-  }
-
-  public static File[] listRoots() {
-    return new File[]{ROOT};
-  }
-
-  public static File createTempFile(String prefix, String suffix, File directory)
-      throws IOException {
-         throw new RuntimeException("NYI: createTempFile");
-  }
-
-  public static File createTempFile(String prefix, String suffix)
-      throws IOException {
-         throw new RuntimeException("NYI: createTempFile");
-  }
-
-  public int compareTo(File pathname) {
-         throw new RuntimeException("NYI: File.compareTo()");
-  }
-
-  public boolean equals(Object obj) {
-    if (!(obj instanceof File)) {
-       return false;
-    }
-    return getPath().equals(((File) obj).getPath());
-  }
-
-  public int hashCode() {
-         return parent != null ? parent.hashCode() + name.hashCode() :
-                 name.hashCode();
-  }
-
-  public String toString() {
-    return name;
-  }
+
+       public boolean createNewFile () throws IOException {
+               if (exists()) return false;
+               if (!parent.exists()) return false;
+               LocalStorage.setItem(getCanonicalPath(), RandomAccessFile.btoa(""));
+               return true;
+       }
+
+       public boolean delete () {
+               try {
+                       if (!exists()) {
+                               return false;
+                       }
+                       LocalStorage.removeItem(getCanonicalPath());
+                       return true;
+               } catch (IOException e) {
+                       return false;
+               }
+       }
+
+       public void deleteOnExit () {
+               throw new RuntimeException("NYI: File.deleteOnExit()");
+       }
+
+       public String[] list () {
+               throw new RuntimeException("NYI: File.list()");
+       }
+
+       /*
+        * public String[] list(FilenameFilter filter) { return null; }
+        */
+
+       public File[] listFiles () {
+               return listFiles(null);
+       }
+
+       public File[] listFiles (FilenameFilter filter) {
+               ArrayList<File> files = new ArrayList<File>();
+               try {
+                       String prefix = getCanonicalPath();
+                       if (!prefix.endsWith(separator)) {
+                               prefix += separatorChar;
+                       }
+
+                       int cut = prefix.length();
+                       int cnt = LocalStorage.length();
+                       for (int i = 0; i < cnt; i++) {
+                               String key = LocalStorage.key(i);
+                               if (key.startsWith(prefix) && key.indexOf(separatorChar, cut) == -1) {
+                                       String name = key.substring(cut);
+                                       if (filter == null || filter.accept(this, name)) {
+                                               files.add(new File(this, name));
+                                       }
+                               }
+                       }
+               } catch (IOException e) {
+                       System.err.println("lisFiles() exception: " + e);
+               }
+               return files.toArray(new File[files.size()]);
+       }
+
+       /*
+        * public File[] listFiles(FileFilter filter) { return null; }
+        */
+
+       public boolean mkdir () {
+               try {
+                       if (parent != null && !parent.exists()) {
+                               return false;
+                       }
+                       if (exists()) {
+                               return false;
+                       }
+                       // We may want to make this a JS map
+                       LocalStorage.setItem(getCanonicalPath(), "{}");
+                       return true;
+               } catch (IOException e) {
+                       return false;
+               }
+       }
+
+       public boolean mkdirs () {
+               if (parent != null) {
+                       parent.mkdirs();
+               }
+               return mkdir();
+       }
+
+       public boolean renameTo (File dest) {
+               throw new RuntimeException("renameTo()");
+       }
+
+       public boolean setLastModified (long time) {
+               return false;
+       }
+
+       public boolean setReadOnly () {
+               return false;
+       }
+
+       public static File[] listRoots () {
+               return new File[] {ROOT};
+       }
+
+       public static File createTempFile (String prefix, String suffix, File directory) throws IOException {
+               throw new RuntimeException("NYI: createTempFile");
+       }
+
+       public static File createTempFile (String prefix, String suffix) throws IOException {
+               throw new RuntimeException("NYI: createTempFile");
+       }
+
+       public int compareTo (File pathname) {
+               throw new RuntimeException("NYI: File.compareTo()");
+       }
+
+       public boolean equals (Object obj) {
+               if (!(obj instanceof File)) {
+                       return false;
+               }
+               return getPath().equals(((File)obj).getPath());
+       }
+
+       public int hashCode () {
+               return parent != null ? parent.hashCode() + name.hashCode() : name.hashCode();
+       }
+
+       public String toString () {
+               return name;
+       }
 }
index a83f3ff..daf3460 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public class FileNotFoundException extends IOException {
 
-  public FileNotFoundException() {
-    super();
-  }
+       public FileNotFoundException () {
+               super();
+       }
 
-  public FileNotFoundException(String s) {
-    super(s);
-  }
+       public FileNotFoundException (String s) {
+               super(s);
+       }
 }
index c0a2304..8ff6ce5 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
-public class FileWriter  {
+public class FileWriter {
 
        private final RandomAccessFile file;
-       
-       public FileWriter(String name) throws FileNotFoundException {
+
+       public FileWriter (String name) throws FileNotFoundException {
                this.file = new RandomAccessFile(new File(name), "rw");
        }
-       
-       public void close() throws IOException {
+
+       public void close () throws IOException {
                file.close();
        }
 
-       
-       public void flush() throws IOException {
+       public void flush () throws IOException {
                file.flush();
        }
 
-       public void write(String s) throws IOException {
-           for(int i = 0; i < s.length(); i++) {
-                  file.write(s.charAt(i));
-           }
+       public void write (String s) throws IOException {
+               for (int i = 0; i < s.length(); i++) {
+                       file.write(s.charAt(i));
+               }
        }
-       
-//     public void write(char[] cbuf, int off, int len) throws IOException {
-//             // TODO Auto-generated method stub
+
+// public void write(char[] cbuf, int off, int len) throws IOException {
+// // TODO Auto-generated method stub
 //
-//     }
+// }
 
 }
index 00753f0..7140671 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public interface FilenameFilter {
 
-       boolean accept(File file, String name);
-}
\ No newline at end of file
+       boolean accept (File file, String name);
+}
index 6892b0e..f0f4603 100644 (file)
 
 package java.io;
 
-/***
- * Defines an interface for classes that can (or need to) be flushed, typically
- * before some output processing is considered to be finished and the object
- * gets closed.
- */
+/*** Defines an interface for classes that can (or need to) be flushed, typically before some output processing is considered to be
+ * finished and the object gets closed. */
 public interface Flushable {
-    /***
-     * Flushes the object by writing out any buffered data to the underlying
-     * output.
-     *
-     * @throws IOException
-     *             if there are any issues writing the data.
-     */
-    void flush() throws IOException;
+       /*** Flushes the object by writing out any buffered data to the underlying output.
+        * 
+        * @throws IOException if there are any issues writing the data. */
+       void flush () throws IOException;
 }
index c48057c..5556679 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public class IOException extends Exception {
 
-  public IOException() {
-    super();
-  }
+       public IOException () {
+               super();
+       }
 
-  public IOException(String s) {
-    super(s);
-  }
+       public IOException (String s) {
+               super(s);
+       }
 }
index 5fa1ce9..42b8507 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public abstract class InputStream {
-  public abstract int read() throws IOException;
-  
-  public int read(byte[]buf, int start, int len) throws IOException {
-    
-    int end = start + len;
-    for (int i = start; i < end; i++) {
-      int r = read();
-      if (r == -1) {
-        return i == start ? -1 : i - start;
-      }
-      buf[i] = (byte) r;
-    }
-    return len;    
-  }
-  
-  public int read(byte[] buf) throws IOException {
-        return read(buf, 0, buf.length);
-  }
-  
-  public void close() throws IOException {
-    
-  }
-  
-  public int available() {
-         return 0;
-  }
+       public abstract int read () throws IOException;
+
+       public int read (byte[] buf, int start, int len) throws IOException {
+
+               int end = start + len;
+               for (int i = start; i < end; i++) {
+                       int r = read();
+                       if (r == -1) {
+                               return i == start ? -1 : i - start;
+                       }
+                       buf[i] = (byte)r;
+               }
+               return len;
+       }
+
+       public int read (byte[] buf) throws IOException {
+               return read(buf, 0, buf.length);
+       }
+
+       public void close () throws IOException {
+
+       }
+
+       public int available () {
+               return 0;
+       }
 }
index a2e41da..93f7758 100644 (file)
@@ -13,38 +13,35 @@ package java.io;
 import avian.Utf8;\r
 \r
 public class InputStreamReader extends Reader {\r
-  private final InputStream in;\r
+       private final InputStream in;\r
 \r
-  public InputStreamReader(InputStream in) {\r
-    this.in = in;\r
-  }\r
+       public InputStreamReader (InputStream in) {\r
+               this.in = in;\r
+       }\r
 \r
-  public InputStreamReader(InputStream in, String encoding)\r
-    throws UnsupportedEncodingException\r
-  {\r
-    this(in);\r
+       public InputStreamReader (InputStream in, String encoding) throws UnsupportedEncodingException {\r
+               this(in);\r
 \r
-    // FIXME this is bad, but some APIs seem to use "ISO-8859-1", fuckers...\r
-//    if (! encoding.equals("UTF-8")) {\r
-//      throw new UnsupportedEncodingException(encoding);\r
-//    }    \r
-  }\r
+               // FIXME this is bad, but some APIs seem to use "ISO-8859-1", fuckers...\r
+// if (! encoding.equals("UTF-8")) {\r
+// throw new UnsupportedEncodingException(encoding);\r
+// }\r
+       }\r
 \r
-  \r
-  public int read(char[] b, int offset, int length) throws IOException {\r
-    byte[] buffer = new byte[length];\r
-    int c = in.read(buffer);\r
+       public int read (char[] b, int offset, int length) throws IOException {\r
+               byte[] buffer = new byte[length];\r
+               int c = in.read(buffer);\r
 \r
-    if (c <= 0) return c;\r
+               if (c <= 0) return c;\r
 \r
-    char[] buffer16 = Utf8.decode16(buffer, 0, c);\r
+               char[] buffer16 = Utf8.decode16(buffer, 0, c);\r
 \r
-    System.arraycopy(buffer16, 0, b, offset, buffer16.length);\r
+               System.arraycopy(buffer16, 0, b, offset, buffer16.length);\r
 \r
-    return buffer16.length;\r
-  }\r
+               return buffer16.length;\r
+       }\r
 \r
-  public void close() throws IOException {\r
-    in.close();\r
-  }\r
+       public void close () throws IOException {\r
+               in.close();\r
+       }\r
 }\r
index ac4029d..bfeb987 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public abstract class OutputStream {
-  // not abstract because of some gwt strangeness
-  public void write(int b) throws IOException {
-  }
-  
-  public void write(byte[] ba) throws IOException {
-    write(ba, 0, ba.length);
-  }
-  
-  public void write(byte[] ba, int start, int len) throws IOException {
-    int end = start + len;
-    for (int i = start; i < end; i++) {
-      write(ba[i]);
-    }
-  }
-  
-  public void flush() {
-  }
-  
-  public void close() throws IOException {
-  }
+       // not abstract because of some gwt strangeness
+       public void write (int b) throws IOException {
+       }
+
+       public void write (byte[] ba) throws IOException {
+               write(ba, 0, ba.length);
+       }
+
+       public void write (byte[] ba, int start, int len) throws IOException {
+               int end = start + len;
+               for (int i = start; i < end; i++) {
+                       write(ba[i]);
+               }
+       }
+
+       public void flush () {
+       }
+
+       public void close () throws IOException {
+       }
 }
index 89d63b9..82e0e7f 100644 (file)
@@ -13,25 +13,25 @@ package java.io;
 import avian.Utf8;\r
 \r
 public class OutputStreamWriter extends Writer {\r
-  private final OutputStream out;\r
-\r
-  public OutputStreamWriter(OutputStream out, String encoding) {\r
-         this(out);\r
-  }\r
-  \r
-  public OutputStreamWriter(OutputStream out) {\r
-    this.out = out;\r
-  }\r
-  \r
-  public void write(char[] b, int offset, int length) throws IOException {\r
-    out.write(Utf8.encode(b, offset, length));\r
-  }\r
-\r
-  public void flush() throws IOException {\r
-    out.flush();\r
-  }\r
-\r
-  public void close() throws IOException {\r
-    out.close();\r
-  }\r
+       private final OutputStream out;\r
+\r
+       public OutputStreamWriter (OutputStream out, String encoding) {\r
+               this(out);\r
+       }\r
+\r
+       public OutputStreamWriter (OutputStream out) {\r
+               this.out = out;\r
+       }\r
+\r
+       public void write (char[] b, int offset, int length) throws IOException {\r
+               out.write(Utf8.encode(b, offset, length));\r
+       }\r
+\r
+       public void flush () throws IOException {\r
+               out.flush();\r
+       }\r
+\r
+       public void close () throws IOException {\r
+               out.close();\r
+       }\r
 }\r
index eebb5fd..9e1239a 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 import com.google.gwt.corp.localstorage.LocalStorage;
 
-/**
- * Saves binary data to the local storage; currently using hex encoding.
- * The string is prefixed with "hex:"
- * @author haustein
- */
-public class RandomAccessFile /*implements DataOutput, DataInput, Closeable*/ {
+/** Saves binary data to the local storage; currently using hex encoding. The string is prefixed with "hex:"
+ * @author haustein */
+public class RandomAccessFile /* implements DataOutput, DataInput, Closeable */{
 
 /*
-    public final FileDescriptor getFD() throws IOException { }
-    public final FileChannel getChannel() { }
-*/
+ * public final FileDescriptor getFD() throws IOException { } public final FileChannel getChannel() { }
+ */
        final String name;
        final boolean writeable;
        boolean dirty;
@@ -38,286 +35,283 @@ public class RandomAccessFile /*implements DataOutput, DataInput, Closeable*/ {
        int len;
        DataInputStream dis = new DataInputStream(new RafInputStream());
        DataOutputStream dos = new DataOutputStream(new RafOutputStream());
-       
-    public RandomAccessFile(String name, String mode) throws FileNotFoundException { 
-       this (new File(name), mode);
-    }
-
-    public RandomAccessFile(File file, String mode) throws FileNotFoundException { 
-       name = file.getCanonicalPath();
-       
-       mode = mode.toLowerCase();
-       if (!mode.equals("r") && !mode.equals("rw")) {
-               throw new IllegalArgumentException("mode: '" + mode + "'");
-       } 
-       writeable = mode.equals("rw");
-       if (file.exists()) {
-               try {
-                       data = atob(LocalStorage.getItem(name));
-                       len = data.length();
-               } catch (IOException e) {
-                       throw new FileNotFoundException("" + e);
-               }
-       } else if (writeable) {
-               data = "";
-               dirty = true;
-               try {
-                       flush();
-               } catch (IOException e) {
-                       throw new FileNotFoundException("" + e);
-               }
-       } else {
-               throw new FileNotFoundException(name);
-       }
-    }
-
-    static native String btoa(String s) /*-{
-       return $wnd.btoa(s);
-    }-*/;
-
-    static native String atob(String s) /*-{
-               return $wnd.atob(s);
-       }-*/;
-
-    public int read() throws IOException { 
-       return dis.read();
-    }
-
-    public int read(byte b[], int off, int len) throws IOException { 
-       return dis.read(b, off, len);
-    }
-
-    public int read(byte b[]) throws IOException { 
-       return dis.read(b); 
-    }
-
-    public final void readFully(byte b[]) throws IOException { 
-       dis.readFully(b);
-    }
-
-    public final void readFully(byte b[], int off, int len) throws IOException { 
-       dis.readFully(b, off, len);
-    }
-
-    public int skipBytes(int n) throws IOException { 
-       return dis.skipBytes(n); 
-    }
-
-    public void write(int b) throws IOException { 
-       dos.write(b);
-    };
-
-    public void write(byte b[]) throws IOException { 
-       dos.write(b);
-    }
-
-    public void write(byte b[], int off, int len) throws IOException {
-       dos.write(b, off, len);
-    }
-
-    public long getFilePointer() throws IOException { 
-       return pos;
-    }
-
-    public void seek(long pos) throws IOException { 
-       if (pos < 0) {
-               throw new IllegalArgumentException();
-       }
-       this.pos = (int) pos;
-    }
-
-    public long length() throws IOException {
-       return len;
-    }
-    
-    public void setLength(long newLength) throws IOException {
-       if (len != newLength) {
-               consolidate();
-               if (data.length() > newLength) {
-                       data = data.substring(0, (int) newLength);
-                       len = (int) newLength;
-               } else {
-//                     System.out.println("padding " + (newLength - len) + " zeros in setLength to " + newLength);
-                       while (len < newLength) {
-                               write(0);
-                       }
-               }
-       }
-    }
-
-    public void close() throws IOException {
-       if (data != null) {
-               flush();
-               data = null;
-       }
-    }
-
-    private void consolidate() {
-       if (newData == null) {
-               return;
-       }
-       
-//     System.out.println("consolidate(); ndp: " + newDataPos + " nd-len: " + newData.length());
-       
-       if (data.length() < newDataPos) {
-          StringBuilder filler = new StringBuilder();
-         while (data.length() + filler.length() < newDataPos) {
-               filler.append('\0');
-          }
-//       System.out.println("padding " + (filler.length()) + " zeros in consolidate ");
-         
-         data += filler.toString();
-       }
-       
-       int p2 = newDataPos + newData.length();
-       data = data.substring(0, newDataPos) + newData.toString() +
-               (p2 < data.length() ? data.substring(p2) : "");
-       newData = null;
-     }
-
-
-    void flush() throws IOException {
-       if (!dirty) {
-               return;
-       }
-       consolidate();
-       LocalStorage.setItem(name, btoa(data));
-       dirty = false;
-    }
-    
-    
-    public final boolean readBoolean() throws IOException { 
-       return dis.readBoolean(); 
-    }
-
-    public final byte readByte() throws IOException { 
-       return dis.readByte(); 
-    }
-
-    public final int readUnsignedByte() throws IOException { 
-       return dis.readUnsignedByte(); 
-    }
-
-    public final short readShort() throws IOException { 
-       return dis.readShort(); 
-    }
-
-    public final int readUnsignedShort() throws IOException { 
-       return dis.readUnsignedShort(); 
-    }
-
-    public final char readChar() throws IOException { 
-       return dis.readChar(); 
-    }
-
-    public final int readInt() throws IOException { 
-       return dis.readInt(); 
-    }
-
-    public final long readLong() throws IOException { 
-       return dis.readLong(); 
-    }
-
-    public final float readFloat() throws IOException { 
-       return dis.readFloat(); 
-    }
-
-    public final double readDouble() throws IOException { 
-       return dis.readDouble(); 
-    }
-
-    public final String readLine() throws IOException { 
-       return dis.readLine();
-    }
-
-    public final String readUTF() throws IOException { 
-       return dis.readUTF(); 
-    }
-
-    public final void writeBoolean(boolean v) throws IOException {
-       dos.writeBoolean(v);
-    }
-
-    public final void writeByte(int v) throws IOException { 
-       dos.writeByte(v);
-    }
-
-    public final void writeShort(int v) throws IOException { 
-       dos.writeShort(v);
-    }
-
-    public final void writeChar(int v) throws IOException { 
-       dos.writeChar(v);
-    }
-
-    public final void writeInt(int v) throws IOException { 
-       dos.writeInt(v);
-    }
-
-    public final void writeLong(long v) throws IOException {
-       dos.writeLong(v);
-    }
-
-    public final void writeFloat(float v) throws IOException { 
-       dos.writeFloat(v);
-    }
-
-    public final void writeDouble(double v) throws IOException { 
-       dos.writeDouble(v);
-    }
-
-    public final void writeBytes(String s) throws IOException { 
-       dos.writeBytes(s);
-    }
-
-    public final void writeChars(String s) throws IOException { 
-       dos.writeChars(s);
-    }
-
-    public final void writeUTF(String str) throws IOException { 
-       dos.writeUTF(str);
-    }
-    
-//    public final FileChannel getChannel() throws IOException { }
-    
+
+       public RandomAccessFile (String name, String mode) throws FileNotFoundException {
+               this(new File(name), mode);
+       }
+
+       public RandomAccessFile (File file, String mode) throws FileNotFoundException {
+               name = file.getCanonicalPath();
+
+               mode = mode.toLowerCase();
+               if (!mode.equals("r") && !mode.equals("rw")) {
+                       throw new IllegalArgumentException("mode: '" + mode + "'");
+               }
+               writeable = mode.equals("rw");
+               if (file.exists()) {
+                       try {
+                               data = atob(LocalStorage.getItem(name));
+                               len = data.length();
+                       } catch (IOException e) {
+                               throw new FileNotFoundException("" + e);
+                       }
+               } else if (writeable) {
+                       data = "";
+                       dirty = true;
+                       try {
+                               flush();
+                       } catch (IOException e) {
+                               throw new FileNotFoundException("" + e);
+                       }
+               } else {
+                       throw new FileNotFoundException(name);
+               }
+       }
+
+       static native String btoa (String s) /*-{
+                                                                                                               return $wnd.btoa(s);
+                                                                                                               }-*/;
+
+       static native String atob (String s) /*-{
+                                                                                                               return $wnd.atob(s);
+                                                                                                               }-*/;
+
+       public int read () throws IOException {
+               return dis.read();
+       }
+
+       public int read (byte b[], int off, int len) throws IOException {
+               return dis.read(b, off, len);
+       }
+
+       public int read (byte b[]) throws IOException {
+               return dis.read(b);
+       }
+
+       public final void readFully (byte b[]) throws IOException {
+               dis.readFully(b);
+       }
+
+       public final void readFully (byte b[], int off, int len) throws IOException {
+               dis.readFully(b, off, len);
+       }
+
+       public int skipBytes (int n) throws IOException {
+               return dis.skipBytes(n);
+       }
+
+       public void write (int b) throws IOException {
+               dos.write(b);
+       };
+
+       public void write (byte b[]) throws IOException {
+               dos.write(b);
+       }
+
+       public void write (byte b[], int off, int len) throws IOException {
+               dos.write(b, off, len);
+       }
+
+       public long getFilePointer () throws IOException {
+               return pos;
+       }
+
+       public void seek (long pos) throws IOException {
+               if (pos < 0) {
+                       throw new IllegalArgumentException();
+               }
+               this.pos = (int)pos;
+       }
+
+       public long length () throws IOException {
+               return len;
+       }
+
+       public void setLength (long newLength) throws IOException {
+               if (len != newLength) {
+                       consolidate();
+                       if (data.length() > newLength) {
+                               data = data.substring(0, (int)newLength);
+                               len = (int)newLength;
+                       } else {
+// System.out.println("padding " + (newLength - len) + " zeros in setLength to " + newLength);
+                               while (len < newLength) {
+                                       write(0);
+                               }
+                       }
+               }
+       }
+
+       public void close () throws IOException {
+               if (data != null) {
+                       flush();
+                       data = null;
+               }
+       }
+
+       private void consolidate () {
+               if (newData == null) {
+                       return;
+               }
+
+// System.out.println("consolidate(); ndp: " + newDataPos + " nd-len: " + newData.length());
+
+               if (data.length() < newDataPos) {
+                       StringBuilder filler = new StringBuilder();
+                       while (data.length() + filler.length() < newDataPos) {
+                               filler.append('\0');
+                       }
+// System.out.println("padding " + (filler.length()) + " zeros in consolidate ");
+
+                       data += filler.toString();
+               }
+
+               int p2 = newDataPos + newData.length();
+               data = data.substring(0, newDataPos) + newData.toString() + (p2 < data.length() ? data.substring(p2) : "");
+               newData = null;
+       }
+
+       void flush () throws IOException {
+               if (!dirty) {
+                       return;
+               }
+               consolidate();
+               LocalStorage.setItem(name, btoa(data));
+               dirty = false;
+       }
+
+       public final boolean readBoolean () throws IOException {
+               return dis.readBoolean();
+       }
+
+       public final byte readByte () throws IOException {
+               return dis.readByte();
+       }
+
+       public final int readUnsignedByte () throws IOException {
+               return dis.readUnsignedByte();
+       }
+
+       public final short readShort () throws IOException {
+               return dis.readShort();
+       }
+
+       public final int readUnsignedShort () throws IOException {
+               return dis.readUnsignedShort();
+       }
+
+       public final char readChar () throws IOException {
+               return dis.readChar();
+       }
+
+       public final int readInt () throws IOException {
+               return dis.readInt();
+       }
+
+       public final long readLong () throws IOException {
+               return dis.readLong();
+       }
+
+       public final float readFloat () throws IOException {
+               return dis.readFloat();
+       }
+
+       public final double readDouble () throws IOException {
+               return dis.readDouble();
+       }
+
+       public final String readLine () throws IOException {
+               return dis.readLine();
+       }
+
+       public final String readUTF () throws IOException {
+               return dis.readUTF();
+       }
+
+       public final void writeBoolean (boolean v) throws IOException {
+               dos.writeBoolean(v);
+       }
+
+       public final void writeByte (int v) throws IOException {
+               dos.writeByte(v);
+       }
+
+       public final void writeShort (int v) throws IOException {
+               dos.writeShort(v);
+       }
+
+       public final void writeChar (int v) throws IOException {
+               dos.writeChar(v);
+       }
+
+       public final void writeInt (int v) throws IOException {
+               dos.writeInt(v);
+       }
+
+       public final void writeLong (long v) throws IOException {
+               dos.writeLong(v);
+       }
+
+       public final void writeFloat (float v) throws IOException {
+               dos.writeFloat(v);
+       }
+
+       public final void writeDouble (double v) throws IOException {
+               dos.writeDouble(v);
+       }
+
+       public final void writeBytes (String s) throws IOException {
+               dos.writeBytes(s);
+       }
+
+       public final void writeChars (String s) throws IOException {
+               dos.writeChars(s);
+       }
+
+       public final void writeUTF (String str) throws IOException {
+               dos.writeUTF(str);
+       }
+
+// public final FileChannel getChannel() throws IOException { }
+
        class RafInputStream extends InputStream {
                @Override
-               public int read() throws IOException {
+               public int read () throws IOException {
                        if (pos >= len) {
                                return -1;
                        } else {
                                consolidate();
                                return data.charAt(pos++);
-//                             int p2 = (pos << 1);
-//                             int result = Character.digit(data.charAt(p2), 16) * 16 + 
-//                                     Character.digit(data.charAt(p2 + 1), 16);
-//                             pos++;
-//                             return result;
+// int p2 = (pos << 1);
+// int result = Character.digit(data.charAt(p2), 16) * 16 +
+// Character.digit(data.charAt(p2 + 1), 16);
+// pos++;
+// return result;
                        }
                }
        }
-       
-       class RafOutputStream extends OutputStream {    
 
-               public void write(int b) throws IOException {
+       class RafOutputStream extends OutputStream {
+
+               public void write (int b) throws IOException {
                        if (!writeable) {
                                throw new IOException("not writeable");
                        }
-                       
+
                        if (newData == null) {
                                newDataPos = pos;
                                newData = new StringBuilder();
-//                             System.out.println("no buf; newDataPos: " + pos);
+// System.out.println("no buf; newDataPos: " + pos);
                        } else if (newDataPos + newData.length() != pos) {
                                consolidate();
                                newDataPos = pos;
                                newData = new StringBuilder();
-//                             System.out.println("pos mismatch; newDataPos: " + pos);
+// System.out.println("pos mismatch; newDataPos: " + pos);
                        }
 
-                       newData.append((char) (b&255));
-//                     newData.append("" + Character.forDigit((b >> 4) & 15, 16) + 
-//                                     Character.forDigit(b & 15, 16));
+                       newData.append((char)(b & 255));
+// newData.append("" + Character.forDigit((b >> 4) & 15, 16) +
+// Character.forDigit(b & 15, 16));
                        pos++;
                        len = Math.max(pos, len);
                        dirty = true;
index 5f4d649..197ce44 100644 (file)
@@ -20,252 +20,177 @@ package java.io;
 import java.nio.CharBuffer;\r
 import java.nio.ReadOnlyBufferException;\r
 \r
-/***\r
- * The base class for all readers. A reader is a means of reading data from a\r
- * source in a character-wise manner. Some readers also support marking a\r
- * position in the input and returning to this position later.\r
+/*** The base class for all readers. A reader is a means of reading data from a source in a character-wise manner. Some readers also\r
+ * support marking a position in the input and returning to this position later.\r
  * <p>\r
- * This abstract class does not provide a fully working implementation, so it\r
- * needs to be subclassed, and at least the {@link #read(char[], int, int)} and\r
- * {@link #close()} methods needs to be overridden. Overriding some of the\r
- * non-abstract methods is also often advised, since it might result in higher\r
- * efficiency.\r
+ * This abstract class does not provide a fully working implementation, so it needs to be subclassed, and at least the\r
+ * {@link #read(char[], int, int)} and {@link #close()} methods needs to be overridden. Overriding some of the non-abstract\r
+ * methods is also often advised, since it might result in higher efficiency.\r
  * <p>\r
- * Many specialized readers for purposes like reading from a file already exist\r
- * in this package.\r
+ * Many specialized readers for purposes like reading from a file already exist in this package.\r
  * \r
- * @see Writer\r
- */\r
+ * @see Writer */\r
 public abstract class Reader implements Readable, Closeable {\r
-    /***\r
-     * The object used to synchronize access to the reader.\r
-     */\r
-    protected Object lock;\r
+       /*** The object used to synchronize access to the reader. */\r
+       protected Object lock;\r
 \r
-    /***\r
-     * Constructs a new {@code Reader} with {@code this} as the object used to\r
-     * synchronize critical sections.\r
-     */\r
-    protected Reader() {\r
-        super();\r
-        lock = this;\r
-    }\r
+       /*** Constructs a new {@code Reader} with {@code this} as the object used to synchronize critical sections. */\r
+       protected Reader () {\r
+               super();\r
+               lock = this;\r
+       }\r
 \r
-    /***\r
-     * Constructs a new {@code Reader} with {@code lock} used to synchronize\r
-     * critical sections.\r
-     * \r
-     * @param lock\r
-     *            the {@code Object} used to synchronize critical sections.\r
-     * @throws NullPointerException\r
-     *             if {@code lock} is {@code null}.\r
-     */\r
-    protected Reader(Object lock) {\r
-        if (lock == null) {\r
-            throw new NullPointerException();\r
-        }\r
-        this.lock = lock;\r
-    }\r
+       /*** Constructs a new {@code Reader} with {@code lock} used to synchronize critical sections.\r
+        * \r
+        * @param lock the {@code Object} used to synchronize critical sections.\r
+        * @throws NullPointerException if {@code lock} is {@code null}. */\r
+       protected Reader (Object lock) {\r
+               if (lock == null) {\r
+                       throw new NullPointerException();\r
+               }\r
+               this.lock = lock;\r
+       }\r
 \r
-    /***\r
-     * Closes this reader. Implementations of this method should free any\r
-     * resources associated with the reader.\r
-     * \r
-     * @throws IOException\r
-     *             if an error occurs while closing this reader.\r
-     */\r
-    public abstract void close() throws IOException;\r
+       /*** Closes this reader. Implementations of this method should free any resources associated with the reader.\r
+        * \r
+        * @throws IOException if an error occurs while closing this reader. */\r
+       public abstract void close () throws IOException;\r
 \r
-    /***\r
-     * Sets a mark position in this reader. The parameter {@code readLimit}\r
-     * indicates how many characters can be read before the mark is invalidated.\r
-     * Calling {@code reset()} will reposition the reader back to the marked\r
-     * position if {@code readLimit} has not been surpassed.\r
-     * <p>\r
-     * This default implementation simply throws an {@code IOException};\r
-     * subclasses must provide their own implementation.\r
-     * \r
-     * @param readLimit\r
-     *            the number of characters that can be read before the mark is\r
-     *            invalidated.\r
-     * @throws IllegalArgumentException\r
-     *             if {@code readLimit < 0}.\r
-     * @throws IOException\r
-     *             if an error occurs while setting a mark in this reader.\r
-     * @see #markSupported()\r
-     * @see #reset()\r
-     */\r
-    public void mark(int readLimit) throws IOException {\r
-        throw new IOException();\r
-    }\r
+       /*** Sets a mark position in this reader. The parameter {@code readLimit} indicates how many characters can be read before the\r
+        * mark is invalidated. Calling {@code reset()} will reposition the reader back to the marked position if {@code readLimit} has\r
+        * not been surpassed.\r
+        * <p>\r
+        * This default implementation simply throws an {@code IOException}; subclasses must provide their own implementation.\r
+        * \r
+        * @param readLimit the number of characters that can be read before the mark is invalidated.\r
+        * @throws IllegalArgumentException if {@code readLimit < 0}.\r
+        * @throws IOException if an error occurs while setting a mark in this reader.\r
+        * @see #markSupported()\r
+        * @see #reset() */\r
+       public void mark (int readLimit) throws IOException {\r
+               throw new IOException();\r
+       }\r
 \r
-    /***\r
-     * Indicates whether this reader supports the {@code mark()} and\r
-     * {@code reset()} methods. This default implementation returns\r
-     * {@code false}.\r
-     * \r
-     * @return always {@code false}.\r
-     */\r
-    public boolean markSupported() {\r
-        return false;\r
-    }\r
+       /*** Indicates whether this reader supports the {@code mark()} and {@code reset()} methods. This default implementation returns\r
+        * {@code false}.\r
+        * \r
+        * @return always {@code false}. */\r
+       public boolean markSupported () {\r
+               return false;\r
+       }\r
 \r
-    /***\r
-     * Reads a single character from this reader and returns it as an integer\r
-     * with the two higher-order bytes set to 0. Returns -1 if the end of the\r
-     * reader has been reached.\r
-     * \r
-     * @return the character read or -1 if the end of the reader has been\r
-     *         reached.\r
-     * @throws IOException\r
-     *             if this reader is closed or some other I/O error occurs.\r
-     */\r
-    public int read() throws IOException {\r
-        synchronized (lock) {\r
-            char charArray[] = new char[1];\r
-            if (read(charArray, 0, 1) != -1) {\r
-                return charArray[0];\r
-            }\r
-            return -1;\r
-        }\r
-    }\r
+       /*** Reads a single character from this reader and returns it as an integer with the two higher-order bytes set to 0. Returns -1\r
+        * if the end of the reader has been reached.\r
+        * \r
+        * @return the character read or -1 if the end of the reader has been reached.\r
+        * @throws IOException if this reader is closed or some other I/O error occurs. */\r
+       public int read () throws IOException {\r
+               synchronized (lock) {\r
+                       char charArray[] = new char[1];\r
+                       if (read(charArray, 0, 1) != -1) {\r
+                               return charArray[0];\r
+                       }\r
+                       return -1;\r
+               }\r
+       }\r
 \r
-    /***\r
-     * Reads characters from this reader and stores them in the character array\r
-     * {@code buf} starting at offset 0. Returns the number of characters\r
-     * actually read or -1 if the end of the reader has been reached.\r
-     * \r
-     * @param buf\r
-     *            character array to store the characters read.\r
-     * @return the number of characters read or -1 if the end of the reader has\r
-     *         been reached.\r
-     * @throws IOException\r
-     *             if this reader is closed or some other I/O error occurs.\r
-     */\r
-    public int read(char buf[]) throws IOException {\r
-        return read(buf, 0, buf.length);\r
-    }\r
+       /*** Reads characters from this reader and stores them in the character array {@code buf} starting at offset 0. Returns the\r
+        * number of characters actually read or -1 if the end of the reader has been reached.\r
+        * \r
+        * @param buf character array to store the characters read.\r
+        * @return the number of characters read or -1 if the end of the reader has been reached.\r
+        * @throws IOException if this reader is closed or some other I/O error occurs. */\r
+       public int read (char buf[]) throws IOException {\r
+               return read(buf, 0, buf.length);\r
+       }\r
 \r
-    /***\r
-     * Reads at most {@code count} characters from this reader and stores them\r
-     * at {@code offset} in the character array {@code buf}. Returns the number\r
-     * of characters actually read or -1 if the end of the reader has been\r
-     * reached.\r
-     * \r
-     * @param buf\r
-     *            the character array to store the characters read.\r
-     * @param offset\r
-     *            the initial position in {@code buffer} to store the characters\r
-     *            read from this reader.\r
-     * @param count\r
-     *            the maximum number of characters to read.\r
-     * @return the number of characters read or -1 if the end of the reader has\r
-     *         been reached.\r
-     * @throws IOException\r
-     *             if this reader is closed or some other I/O error occurs.\r
-     */\r
-    public abstract int read(char buf[], int offset, int count)\r
-            throws IOException;\r
+       /*** Reads at most {@code count} characters from this reader and stores them at {@code offset} in the character array {@code buf}\r
+        * . Returns the number of characters actually read or -1 if the end of the reader has been reached.\r
+        * \r
+        * @param buf the character array to store the characters read.\r
+        * @param offset the initial position in {@code buffer} to store the characters read from this reader.\r
+        * @param count the maximum number of characters to read.\r
+        * @return the number of characters read or -1 if the end of the reader has been reached.\r
+        * @throws IOException if this reader is closed or some other I/O error occurs. */\r
+       public abstract int read (char buf[], int offset, int count) throws IOException;\r
 \r
-    /***\r
-     * Indicates whether this reader is ready to be read without blocking.\r
-     * Returns {@code true} if this reader will not block when {@code read} is\r
-     * called, {@code false} if unknown or blocking will occur. This default\r
-     * implementation always returns {@code false}.\r
-     * \r
-     * @return always {@code false}.\r
-     * @throws IOException\r
-     *             if this reader is closed or some other I/O error occurs.\r
-     * @see #read()\r
-     * @see #read(char[])\r
-     * @see #read(char[], int, int)\r
-     */\r
-    public boolean ready() throws IOException {\r
-        return false;\r
-    }\r
+       /*** Indicates whether this reader is ready to be read without blocking. Returns {@code true} if this reader will not block when\r
+        * {@code read} is called, {@code false} if unknown or blocking will occur. This default implementation always returns\r
+        * {@code false}.\r
+        * \r
+        * @return always {@code false}.\r
+        * @throws IOException if this reader is closed or some other I/O error occurs.\r
+        * @see #read()\r
+        * @see #read(char[])\r
+        * @see #read(char[], int, int) */\r
+       public boolean ready () throws IOException {\r
+               return false;\r
+       }\r
 \r
-    /***\r
-     * Resets this reader's position to the last {@code mark()} location.\r
-     * Invocations of {@code read()} and {@code skip()} will occur from this new\r
-     * location. If this reader has not been marked, the behavior of\r
-     * {@code reset()} is implementation specific. This default\r
-     * implementation throws an {@code IOException}.\r
-     * \r
-     * @throws IOException\r
-     *             always thrown in this default implementation.\r
-     * @see #mark(int)\r
-     * @see #markSupported()\r
-     */\r
-    public void reset() throws IOException {\r
-        throw new IOException();\r
-    }\r
+       /*** Resets this reader's position to the last {@code mark()} location. Invocations of {@code read()} and {@code skip()} will\r
+        * occur from this new location. If this reader has not been marked, the behavior of {@code reset()} is implementation\r
+        * specific. This default implementation throws an {@code IOException}.\r
+        * \r
+        * @throws IOException always thrown in this default implementation.\r
+        * @see #mark(int)\r
+        * @see #markSupported() */\r
+       public void reset () throws IOException {\r
+               throw new IOException();\r
+       }\r
 \r
-    /***\r
-     * Skips {@code amount} characters in this reader. Subsequent calls of\r
-     * {@code read} methods will not return these characters unless {@code\r
-     * reset()} is used. This method may perform multiple reads to read {@code\r
-     * count} characters.\r
-     * \r
-     * @param count\r
-     *            the maximum number of characters to skip.\r
-     * @return the number of characters actually skipped.\r
-     * @throws IllegalArgumentException\r
-     *             if {@code amount < 0}.\r
-     * @throws IOException\r
-     *             if this reader is closed or some other I/O error occurs.\r
-     * @see #mark(int)\r
-     * @see #markSupported()\r
-     * @see #reset()\r
-     */\r
-    public long skip(long count) throws IOException {\r
-        if (count < 0) {\r
-            throw new IllegalArgumentException();\r
-        }\r
-        synchronized (lock) {\r
-            long skipped = 0;\r
-            int toRead = count < 512 ? (int) count : 512;\r
-            char charsSkipped[] = new char[toRead];\r
-            while (skipped < count) {\r
-                int read = read(charsSkipped, 0, toRead);\r
-                if (read == -1) {\r
-                    return skipped;\r
-                }\r
-                skipped += read;\r
-                if (read < toRead) {\r
-                    return skipped;\r
-                }\r
-                if (count - skipped < toRead) {\r
-                    toRead = (int) (count - skipped);\r
-                }\r
-            }\r
-            return skipped;\r
-        }\r
-    }\r
+       /*** Skips {@code amount} characters in this reader. Subsequent calls of {@code read} methods will not return these characters\r
+        * unless {@code reset()} is used. This method may perform multiple reads to read {@code count} characters.\r
+        * \r
+        * @param count the maximum number of characters to skip.\r
+        * @return the number of characters actually skipped.\r
+        * @throws IllegalArgumentException if {@code amount < 0}.\r
+        * @throws IOException if this reader is closed or some other I/O error occurs.\r
+        * @see #mark(int)\r
+        * @see #markSupported()\r
+        * @see #reset() */\r
+       public long skip (long count) throws IOException {\r
+               if (count < 0) {\r
+                       throw new IllegalArgumentException();\r
+               }\r
+               synchronized (lock) {\r
+                       long skipped = 0;\r
+                       int toRead = count < 512 ? (int)count : 512;\r
+                       char charsSkipped[] = new char[toRead];\r
+                       while (skipped < count) {\r
+                               int read = read(charsSkipped, 0, toRead);\r
+                               if (read == -1) {\r
+                                       return skipped;\r
+                               }\r
+                               skipped += read;\r
+                               if (read < toRead) {\r
+                                       return skipped;\r
+                               }\r
+                               if (count - skipped < toRead) {\r
+                                       toRead = (int)(count - skipped);\r
+                               }\r
+                       }\r
+                       return skipped;\r
+               }\r
+       }\r
 \r
-    /***\r
-     * Reads characters and puts them into the {@code target} character buffer.\r
-     * \r
-     * @param target\r
-     *            the destination character buffer.\r
-     * @return the number of characters put into {@code target} or -1 if the end\r
-     *         of this reader has been reached before a character has been read.\r
-     * @throws IOException\r
-     *             if any I/O error occurs while reading from this reader.\r
-     * @throws NullPointerException\r
-     *             if {@code target} is {@code null}.\r
-     * @throws ReadOnlyBufferException\r
-     *             if {@code target} is read-only.\r
-     */\r
-    public int read(CharBuffer target) throws IOException {\r
-        if (null == target) {\r
-            throw new NullPointerException();\r
-        }\r
-        int length = target.length();\r
-        char[] buf = new char[length];\r
-        length = Math.min(length, read(buf));\r
-        if (length > 0) {\r
-            target.put(buf, 0, length);\r
-        }\r
-        return length;\r
-    }\r
+       /*** Reads characters and puts them into the {@code target} character buffer.\r
+        * \r
+        * @param target the destination character buffer.\r
+        * @return the number of characters put into {@code target} or -1 if the end of this reader has been reached before a character\r
+        *         has been read.\r
+        * @throws IOException if any I/O error occurs while reading from this reader.\r
+        * @throws NullPointerException if {@code target} is {@code null}.\r
+        * @throws ReadOnlyBufferException if {@code target} is read-only. */\r
+       public int read (CharBuffer target) throws IOException {\r
+               if (null == target) {\r
+                       throw new NullPointerException();\r
+               }\r
+               int length = target.length();\r
+               char[] buf = new char[length];\r
+               length = Math.min(length, read(buf));\r
+               if (length > 0) {\r
+                       target.put(buf, 0, length);\r
+               }\r
+               return length;\r
+       }\r
 }\r
index 7732a1c..c2247d1 100644 (file)
 package java.io;\r
 \r
 public class StringReader extends Reader {\r
-  private final String in;\r
-  private int position = 0;\r
+       private final String in;\r
+       private int position = 0;\r
 \r
-  public StringReader(String in) {\r
-    this.in = in;\r
-  }\r
-  \r
-  public int read(char[] b, int offset, int length) throws IOException {\r
-    if (length > in.length() - position) {\r
-      length = in.length() - position;\r
-      if (length <= 0) {\r
-        return -1;\r
-      }\r
-    }\r
-    in.getChars(position, position+length, b, offset);\r
-    position += length;\r
-    return length;\r
-  }\r
+       public StringReader (String in) {\r
+               this.in = in;\r
+       }\r
 \r
-  public void close() throws IOException { }\r
+       public int read (char[] b, int offset, int length) throws IOException {\r
+               if (length > in.length() - position) {\r
+                       length = in.length() - position;\r
+                       if (length <= 0) {\r
+                               return -1;\r
+                       }\r
+               }\r
+               in.getChars(position, position + length, b, offset);\r
+               position += length;\r
+               return length;\r
+       }\r
+\r
+       public void close () throws IOException {\r
+       }\r
 }\r
index 65869b1..7562bcb 100644 (file)
 package java.io;\r
 \r
 public class StringWriter extends Writer {\r
-  private final StringBuilder out = new StringBuilder();\r
-  \r
-  public void write(char[] b, int offset, int length) throws IOException {\r
-    out.append(b, offset, length);\r
-  }\r
+       private final StringBuilder out = new StringBuilder();\r
 \r
-  public String toString() {\r
-    return out.toString();\r
-  }\r
+       public void write (char[] b, int offset, int length) throws IOException {\r
+               out.append(b, offset, length);\r
+       }\r
 \r
-  public void flush() throws IOException { }\r
+       public String toString () {\r
+               return out.toString();\r
+       }\r
 \r
-  public void close() throws IOException { }\r
+       public void flush () throws IOException {\r
+       }\r
+\r
+       public void close () throws IOException {\r
+       }\r
 }\r
index d8c32b9..b0076e6 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public class UTFDataFormatException extends IOException {
 
-  
-  public UTFDataFormatException(String msg) {
-    super(msg);
-  }
-  
-  public UTFDataFormatException() {
-    super();
-  }
+       public UTFDataFormatException (String msg) {
+               super(msg);
+       }
+
+       public UTFDataFormatException () {
+               super();
+       }
 }
index bb355ef..f0f8151 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package java.io;
 
 public class UnsupportedEncodingException extends IOException {
-  public UnsupportedEncodingException() {
-    super();
-  }
+       public UnsupportedEncodingException () {
+               super();
+       }
 
-  public UnsupportedEncodingException(String s) {
-    super(s);
-  }
+       public UnsupportedEncodingException (String s) {
+               super(s);
+       }
 }
index a3faf3e..8f07bb6 100644 (file)
 
 package java.io;
 
-/***
- * The base class for all writers. A writer is a means of writing data to a
- * target in a character-wise manner. Most output streams expect the
- * {@link #flush()} method to be called before closing the stream, to ensure all
- * data is actually written out.
+/*** The base class for all writers. A writer is a means of writing data to a target in a character-wise manner. Most output streams
+ * expect the {@link #flush()} method to be called before closing the stream, to ensure all data is actually written out.
  * <p>
- * This abstract class does not provide a fully working implementation, so it
- * needs to be subclassed, and at least the {@link #write(char[], int, int)},
- * {@link #close()} and {@link #flush()} methods needs to be overridden.
- * Overriding some of the non-abstract methods is also often advised, since it
- * might result in higher efficiency.
+ * This abstract class does not provide a fully working implementation, so it needs to be subclassed, and at least the
+ * {@link #write(char[], int, int)}, {@link #close()} and {@link #flush()} methods needs to be overridden. Overriding some of the
+ * non-abstract methods is also often advised, since it might result in higher efficiency.
  * <p>
- * Many specialized readers for purposes like reading from a file already exist
- * in this package.
+ * Many specialized readers for purposes like reading from a file already exist in this package.
  * 
- * @see Reader
- */
+ * @see Reader */
 public abstract class Writer implements Appendable, Closeable, Flushable {
 
-    static final String TOKEN_NULL = "null"; //$NON-NLS-1$
-
-    /***
-     * The object used to synchronize access to the writer.
-     */
-    protected Object lock;
-
-    /***
-     * Constructs a new {@code Writer} with {@code this} as the object used to
-     * synchronize critical sections.
-     */
-    protected Writer() {
-        super();
-        lock = this;
-    }
-
-    /***
-     * Constructs a new {@code Writer} with {@code lock} used to synchronize
-     * critical sections.
-     * 
-     * @param lock
-     *            the {@code Object} used to synchronize critical sections.
-     * @throws NullPointerException
-     *             if {@code lock} is {@code null}.
-     */
-    protected Writer(Object lock) {
-        if (lock == null) {
-            throw new NullPointerException();
-        }
-        this.lock = lock;
-    }
-
-    /***
-     * Closes this writer. Implementations of this method should free any
-     * resources associated with the writer.
-     * 
-     * @throws IOException
-     *             if an error occurs while closing this writer.
-     */
-    public abstract void close() throws IOException;
-
-    /***
-     * Flushes this writer. Implementations of this method should ensure that
-     * all buffered characters are written to the target.
-     * 
-     * @throws IOException
-     *             if an error occurs while flushing this writer.
-     */
-    public abstract void flush() throws IOException;
-
-    /***
-     * Writes the entire character buffer {@code buf} to the target.
-     * 
-     * @param buf
-     *            the non-null array containing characters to write.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     */
-    public void write(char buf[]) throws IOException {
-        write(buf, 0, buf.length);
-    }
-
-    /***
-     * Writes {@code count} characters starting at {@code offset} in {@code buf}
-     * to the target.
-     *
-     * @param buf
-     *            the non-null character array to write.
-     * @param offset
-     *            the index of the first character in {@code buf} to write.
-     * @param count
-     *            the maximum number of characters to write.
-     * @throws IndexOutOfBoundsException
-     *             if {@code offset < 0} or {@code count < 0}, or if {@code
-     *             offset + count} is greater than the size of {@code buf}.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     */
-    public abstract void write(char buf[], int offset, int count)
-            throws IOException;
-
-    /***
-     * Writes one character to the target. Only the two least significant bytes
-     * of the integer {@code oneChar} are written.
-     * 
-     * @param oneChar
-     *            the character to write to the target.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     */
-    public void write(int oneChar) throws IOException {
-        synchronized (lock) {
-            char oneCharArray[] = new char[1];
-            oneCharArray[0] = (char) oneChar;
-            write(oneCharArray);
-        }
-    }
-
-    /***
-     * Writes the characters from the specified string to the target.
-     * 
-     * @param str
-     *            the non-null string containing the characters to write.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     */
-    public void write(String str) throws IOException {
-        write(str, 0, str.length());
-    }
-
-    /***
-     * Writes {@code count} characters from {@code str} starting at {@code
-     * offset} to the target.
-     * 
-     * @param str
-     *            the non-null string containing the characters to write.
-     * @param offset
-     *            the index of the first character in {@code str} to write.
-     * @param count
-     *            the number of characters from {@code str} to write.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     * @throws IndexOutOfBoundsException
-     *             if {@code offset < 0} or {@code count < 0}, or if {@code
-     *             offset + count} is greater than the length of {@code str}.
-     */
-    public void write(String str, int offset, int count) throws IOException {
-        if (count < 0) { // other cases tested by getChars()
-            throw new StringIndexOutOfBoundsException();
-        }
-        char buf[] = new char[count];
-        str.getChars(offset, offset + count, buf, 0);
-
-        synchronized (lock) {
-            write(buf, 0, buf.length);
-        }
-    }
-
-    /***
-     * Appends the character {@code c} to the target. This method works the same
-     * way as {@link #write(int)}.
-     * 
-     * @param c
-     *            the character to append to the target stream.
-     * @return this writer.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     */
-    public Writer append(char c) throws IOException {
-        write(c);
-        return this;
-    }
-
-    /***
-     * Appends the character sequence {@code csq} to the target. This method
-     * works the same way as {@code Writer.write(csq.toString())}. If {@code
-     * csq} is {@code null}, then the string "null" is written to the target
-     * stream.
-     * 
-     * @param csq
-     *            the character sequence appended to the target.
-     * @return this writer.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     */
-    public Writer append(CharSequence csq) throws IOException {
-        if (null == csq) {
-            write(TOKEN_NULL);
-        } else {
-            write(csq.toString());
-        }
-        return this;
-    }
-
-    /***
-     * Appends a subsequence of the character sequence {@code csq} to the
-     * target. This method works the same way as {@code
-     * Writer.writer(csq.subsequence(start, end).toString())}. If {@code
-     * csq} is {@code null}, then the specified subsequence of the string "null"
-     * will be written to the target.
-     * 
-     * @param csq
-     *            the character sequence appended to the target.
-     * @param start
-     *            the index of the first char in the character sequence appended
-     *            to the target.
-     * @param end
-     *            the index of the character following the last character of the
-     *            subsequence appended to the target.
-     * @return this writer.
-     * @throws IOException
-     *             if this writer is closed or another I/O error occurs.
-     * @throws IndexOutOfBoundsException
-     *             if {@code start > end}, {@code start < 0}, {@code end < 0} or
-     *             either {@code start} or {@code end} are greater or equal than
-     *             the length of {@code csq}.
-     */
-    public Writer append(CharSequence csq, int start, int end)
-            throws IOException {
-        if (null == csq) {
-            write(TOKEN_NULL.substring(start, end));
-        } else {
-            write(csq.subSequence(start, end).toString());
-        }
-        return this;
-    }
-
-    /***
-     * Returns true if this writer has encountered and suppressed an error. Used
-     * by PrintWriters as an alternative to checked exceptions.
-     */
-    boolean checkError() {
-        return false;
-    }
+       static final String TOKEN_NULL = "null"; //$NON-NLS-1$
+
+       /*** The object used to synchronize access to the writer. */
+       protected Object lock;
+
+       /*** Constructs a new {@code Writer} with {@code this} as the object used to synchronize critical sections. */
+       protected Writer () {
+               super();
+               lock = this;
+       }
+
+       /*** Constructs a new {@code Writer} with {@code lock} used to synchronize critical sections.
+        * 
+        * @param lock the {@code Object} used to synchronize critical sections.
+        * @throws NullPointerException if {@code lock} is {@code null}. */
+       protected Writer (Object lock) {
+               if (lock == null) {
+                       throw new NullPointerException();
+               }
+               this.lock = lock;
+       }
+
+       /*** Closes this writer. Implementations of this method should free any resources associated with the writer.
+        * 
+        * @throws IOException if an error occurs while closing this writer. */
+       public abstract void close () throws IOException;
+
+       /*** Flushes this writer. Implementations of this method should ensure that all buffered characters are written to the target.
+        * 
+        * @throws IOException if an error occurs while flushing this writer. */
+       public abstract void flush () throws IOException;
+
+       /*** Writes the entire character buffer {@code buf} to the target.
+        * 
+        * @param buf the non-null array containing characters to write.
+        * @throws IOException if this writer is closed or another I/O error occurs. */
+       public void write (char buf[]) throws IOException {
+               write(buf, 0, buf.length);
+       }
+
+       /*** Writes {@code count} characters starting at {@code offset} in {@code buf} to the target.
+        * 
+        * @param buf the non-null character array to write.
+        * @param offset the index of the first character in {@code buf} to write.
+        * @param count the maximum number of characters to write.
+        * @throws IndexOutOfBoundsException if {@code offset < 0} or {@code count < 0}, or if {@code offset + count} is greater than
+        *            the size of {@code buf}.
+        * @throws IOException if this writer is closed or another I/O error occurs. */
+       public abstract void write (char buf[], int offset, int count) throws IOException;
+
+       /*** Writes one character to the target. Only the two least significant bytes of the integer {@code oneChar} are written.
+        * 
+        * @param oneChar the character to write to the target.
+        * @throws IOException if this writer is closed or another I/O error occurs. */
+       public void write (int oneChar) throws IOException {
+               synchronized (lock) {
+                       char oneCharArray[] = new char[1];
+                       oneCharArray[0] = (char)oneChar;
+                       write(oneCharArray);
+               }
+       }
+
+       /*** Writes the characters from the specified string to the target.
+        * 
+        * @param str the non-null string containing the characters to write.
+        * @throws IOException if this writer is closed or another I/O error occurs. */
+       public void write (String str) throws IOException {
+               write(str, 0, str.length());
+       }
+
+       /*** Writes {@code count} characters from {@code str} starting at {@code offset} to the target.
+        * 
+        * @param str the non-null string containing the characters to write.
+        * @param offset the index of the first character in {@code str} to write.
+        * @param count the number of characters from {@code str} to write.
+        * @throws IOException if this writer is closed or another I/O error occurs.
+        * @throws IndexOutOfBoundsException if {@code offset < 0} or {@code count < 0}, or if {@code offset + count} is greater than
+        *            the length of {@code str}. */
+       public void write (String str, int offset, int count) throws IOException {
+               if (count < 0) { // other cases tested by getChars()
+                       throw new StringIndexOutOfBoundsException();
+               }
+               char buf[] = new char[count];
+               str.getChars(offset, offset + count, buf, 0);
+
+               synchronized (lock) {
+                       write(buf, 0, buf.length);
+               }
+       }
+
+       /*** Appends the character {@code c} to the target. This method works the same way as {@link #write(int)}.
+        * 
+        * @param c the character to append to the target stream.
+        * @return this writer.
+        * @throws IOException if this writer is closed or another I/O error occurs. */
+       public Writer append (char c) throws IOException {
+               write(c);
+               return this;
+       }
+
+       /*** Appends the character sequence {@code csq} to the target. This method works the same way as
+        * {@code Writer.write(csq.toString())}. If {@code csq} is {@code null}, then the string "null" is written to the target
+        * stream.
+        * 
+        * @param csq the character sequence appended to the target.
+        * @return this writer.
+        * @throws IOException if this writer is closed or another I/O error occurs. */
+       public Writer append (CharSequence csq) throws IOException {
+               if (null == csq) {
+                       write(TOKEN_NULL);
+               } else {
+                       write(csq.toString());
+               }
+               return this;
+       }
+
+       /*** Appends a subsequence of the character sequence {@code csq} to the target. This method works the same way as
+        * {@code Writer.writer(csq.subsequence(start, end).toString())}. If {@code csq} is {@code null}, then the specified
+        * subsequence of the string "null" will be written to the target.
+        * 
+        * @param csq the character sequence appended to the target.
+        * @param start the index of the first char in the character sequence appended to the target.
+        * @param end the index of the character following the last character of the subsequence appended to the target.
+        * @return this writer.
+        * @throws IOException if this writer is closed or another I/O error occurs.
+        * @throws IndexOutOfBoundsException if {@code start > end}, {@code start < 0}, {@code end < 0} or either {@code start} or
+        *            {@code end} are greater or equal than the length of {@code csq}. */
+       public Writer append (CharSequence csq, int start, int end) throws IOException {
+               if (null == csq) {
+                       write(TOKEN_NULL.substring(start, end));
+               } else {
+                       write(csq.subSequence(start, end).toString());
+               }
+               return this;
+       }
+
+       /*** Returns true if this writer has encountered and suppressed an error. Used by PrintWriters as an alternative to checked
+        * exceptions. */
+       boolean checkError () {
+               return false;
+       }
 }
index 7367623..4d5e4e7 100644 (file)
 \r
 package java.lang;\r
 \r
-/**\r
- * Thrown when an application tries to load in a class through its \r
- * string name using:\r
+/** Thrown when an application tries to load in a class through its string name using:\r
  * <ul>\r
  * <li>The <code>forName</code> method in class <code>Class</code>.\r
- * <li>The <code>findSystemClass</code> method in class\r
- *     <code>ClassLoader</code> .\r
+ * <li>The <code>findSystemClass</code> method in class <code>ClassLoader</code> .\r
  * <li>The <code>loadClass</code> method in class <code>ClassLoader</code>.\r
  * </ul>\r
  * <p>\r
- * but no definition for the class with the specified name could be found. \r
- *\r
- * <p>As of release 1.4, this exception has been retrofitted to conform to\r
- * the general purpose exception-chaining mechanism.  The "optional exception\r
- * that was raised while loading the class" that may be provided at\r
- * construction time and accessed via the {@link #getException()} method is\r
- * now known as the <i>cause</i>, and may be accessed via the {@link\r
- * Throwable#getCause()} method, as well as the aforementioned "legacy method."\r
- *\r
- * @author  unascribed\r
+ * but no definition for the class with the specified name could be found.\r
+ * \r
+ * <p>\r
+ * As of release 1.4, this exception has been retrofitted to conform to the general purpose exception-chaining mechanism. The\r
+ * "optional exception that was raised while loading the class" that may be provided at construction time and accessed via the\r
+ * {@link #getException()} method is now known as the <i>cause</i>, and may be accessed via the {@link Throwable#getCause()}\r
+ * method, as well as the aforementioned "legacy method."\r
+ * \r
+ * @author unascribed\r
  * @version 1.20, 02/19/04\r
- * @see     java.lang.Class#forName(java.lang.String)\r
- * @see     java.lang.ClassLoader#findSystemClass(java.lang.String)\r
- * @see     java.lang.ClassLoader#loadClass(java.lang.String, boolean)\r
- * @since   JDK1.0\r
- */\r
+ * @see java.lang.Class#forName(java.lang.String)\r
+ * @see java.lang.ClassLoader#findSystemClass(java.lang.String)\r
+ * @see java.lang.ClassLoader#loadClass(java.lang.String, boolean)\r
+ * @since JDK1.0 */\r
 public class ClassNotFoundException extends Exception {\r
-    /**\r
-     * use serialVersionUID from JDK 1.1.X for interoperability\r
-     */\r
-     private static final long serialVersionUID = 9176873029745254542L;\r
+       /** use serialVersionUID from JDK 1.1.X for interoperability */\r
+       private static final long serialVersionUID = 9176873029745254542L;\r
 \r
-    /**\r
-     * This field holds the exception ex if the \r
-     * ClassNotFoundException(String s, Throwable ex) constructor was\r
-     * used to instantiate the object\r
-     * @serial \r
-     * @since 1.2\r
-     */\r
-    private Throwable ex;\r
+       /** This field holds the exception ex if the ClassNotFoundException(String s, Throwable ex) constructor was used to instantiate\r
+        * the object\r
+        * @serial\r
+        * @since 1.2 */\r
+       private Throwable ex;\r
 \r
-    /**\r
-     * Constructs a <code>ClassNotFoundException</code> with no detail message.\r
-     */\r
-    public ClassNotFoundException() {\r
-       super((Throwable)null);  // Disallow initCause\r
-    }\r
+       /** Constructs a <code>ClassNotFoundException</code> with no detail message. */\r
+       public ClassNotFoundException () {\r
+               super((Throwable)null); // Disallow initCause\r
+       }\r
 \r
-    /**\r
-     * Constructs a <code>ClassNotFoundException</code> with the \r
-     * specified detail message. \r
-     *\r
-     * @param   s   the detail message.\r
-     */\r
-    public ClassNotFoundException(String s) {\r
-       super(s, null);  //  Disallow initCause\r
-    }\r
+       /** Constructs a <code>ClassNotFoundException</code> with the specified detail message.\r
+        * \r
+        * @param s the detail message. */\r
+       public ClassNotFoundException (String s) {\r
+               super(s, null); // Disallow initCause\r
+       }\r
 \r
-    /**\r
-     * Constructs a <code>ClassNotFoundException</code> with the\r
-     * specified detail message and optional exception that was\r
-     * raised while loading the class.\r
-     *\r
-     * @param s the detail message\r
-     * @param ex the exception that was raised while loading the class\r
-     * @since 1.2\r
-     */\r
-    public ClassNotFoundException(String s, Throwable ex) {\r
-       super(s, null);  //  Disallow initCause\r
-       this.ex = ex;\r
-    }\r
+       /** Constructs a <code>ClassNotFoundException</code> with the specified detail message and optional exception that was raised\r
+        * while loading the class.\r
+        * \r
+        * @param s the detail message\r
+        * @param ex the exception that was raised while loading the class\r
+        * @since 1.2 */\r
+       public ClassNotFoundException (String s, Throwable ex) {\r
+               super(s, null); // Disallow initCause\r
+               this.ex = ex;\r
+       }\r
 \r
-    /**\r
-     * Returns the exception that was raised if an error occurred while\r
-     * attempting to load the class. Otherwise, returns <tt>null</tt>.\r
-     *\r
-     * <p>This method predates the general-purpose exception chaining facility.\r
-     * The {@link Throwable#getCause()} method is now the preferred means of\r
-     * obtaining this information.\r
-     *\r
-     * @return the <code>Exception</code> that was raised while loading a class\r
-     * @since 1.2\r
-     */\r
-    public Throwable getException() {\r
-        return ex;\r
-    }\r
+       /** Returns the exception that was raised if an error occurred while attempting to load the class. Otherwise, returns\r
+        * <tt>null</tt>.\r
+        * \r
+        * <p>\r
+        * This method predates the general-purpose exception chaining facility. The {@link Throwable#getCause()} method is now the\r
+        * preferred means of obtaining this information.\r
+        * \r
+        * @return the <code>Exception</code> that was raised while loading a class\r
+        * @since 1.2 */\r
+       public Throwable getException () {\r
+               return ex;\r
+       }\r
 \r
-    /**\r
-     * Returns the cause of this exception (the exception that was raised\r
-     * if an error occurred while attempting to load the class; otherwise\r
-     * <tt>null</tt>).\r
-     *\r
-     * @return  the cause of this exception.\r
-     * @since   1.4\r
-     */\r
-    public Throwable getCause() {\r
-        return ex;\r
-    }\r
+       /** Returns the cause of this exception (the exception that was raised if an error occurred while attempting to load the class;\r
+        * otherwise <tt>null</tt>).\r
+        * \r
+        * @return the cause of this exception.\r
+        * @since 1.4 */\r
+       public Throwable getCause () {\r
+               return ex;\r
+       }\r
 }\r
index b6aaf04..cfbc5d9 100644 (file)
 package java.lang;\r
 \r
 public class IllegalAccessException extends Exception {\r
-  public IllegalAccessException(String message) {\r
-    super(message);\r
-  }\r
+       public IllegalAccessException (String message) {\r
+               super(message);\r
+       }\r
 \r
-  public IllegalAccessException() {\r
-    super();\r
-  }\r
+       public IllegalAccessException () {\r
+               super();\r
+       }\r
 }\r
index 34d69df..26723c4 100644 (file)
 package java.lang;\r
 \r
 public class InterruptedException extends Exception {\r
-  public InterruptedException(String message, Throwable cause) {\r
-    super(message, cause);\r
-  }\r
+       public InterruptedException (String message, Throwable cause) {\r
+               super(message, cause);\r
+       }\r
 \r
-  public InterruptedException(String message) {\r
-    this(message, null);\r
-  }\r
+       public InterruptedException (String message) {\r
+               this(message, null);\r
+       }\r
 \r
-  public InterruptedException(Throwable cause) {\r
-    this(null, cause);\r
-  }\r
+       public InterruptedException (Throwable cause) {\r
+               this(null, cause);\r
+       }\r
 \r
-  public InterruptedException() {\r
-    this(null, null);\r
-  }\r
-}
\ No newline at end of file
+       public InterruptedException () {\r
+               this(null, null);\r
+       }\r
+}\r
index e065f89..3298be0 100644 (file)
 package java.lang;\r
 \r
 public class NoSuchMethodException extends Exception {\r
-  public NoSuchMethodException(String message) {\r
-    super(message);\r
-  }\r
+       public NoSuchMethodException (String message) {\r
+               super(message);\r
+       }\r
 \r
-  public NoSuchMethodException() {\r
-    super();\r
-  }\r
+       public NoSuchMethodException () {\r
+               super();\r
+       }\r
 }\r
index 2828d46..1cd5777 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package java.lang;\r
 \r
 import java.io.IOException;\r
 import java.nio.CharBuffer;\r
 \r
 public interface Readable {\r
-       int read(CharBuffer cb) throws IOException;\r
-}
\ No newline at end of file
+       int read (CharBuffer cb) throws IOException;\r
+}\r
index 7c53010..94ca28d 100644 (file)
 package java.lang;\r
 \r
 public class SecurityException extends RuntimeException {\r
-  public SecurityException(String message, Throwable cause) {\r
-    super(message, cause);\r
-  }\r
+       public SecurityException (String message, Throwable cause) {\r
+               super(message, cause);\r
+       }\r
 \r
-  public SecurityException(String message) {\r
-    this(message, null);\r
-  }\r
+       public SecurityException (String message) {\r
+               this(message, null);\r
+       }\r
 \r
-  public SecurityException(Throwable cause) {\r
-    this(null, cause);\r
-  }\r
+       public SecurityException (Throwable cause) {\r
+               this(null, cause);\r
+       }\r
 \r
-  public SecurityException() {\r
-    this(null, null);\r
-  }\r
+       public SecurityException () {\r
+               this(null, null);\r
+       }\r
 }\r
index 347c6e9..e81c218 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package java.lang;\r
 \r
 public class Thread {\r
-       public static void sleep(long millis) throws InterruptedException {\r
+       public static void sleep (long millis) throws InterruptedException {\r
                // noop emu\r
        }\r
-}
\ No newline at end of file
+}\r
index 76a218d..8ef09d0 100644 (file)
@@ -72,8 +72,7 @@ public abstract class ByteBuffer extends Buffer implements Comparable<ByteBuffer
 
        /** Creates a new byte buffer by wrapping the given byte array.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the
-        * array.
+        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the array.
         * </p>
         * 
         * @param array the byte array which the new buffer will be based on.
index e5c4dad..8011e36 100644 (file)
@@ -60,8 +60,7 @@ public abstract class CharBuffer extends Buffer implements Comparable<CharBuffer
 
        /** Creates a new char buffer by wrapping the given char array.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the
-        * array.
+        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the array.
         * </p>
         * 
         * @param array the char array which the new buffer will be based on.
@@ -97,8 +96,8 @@ public abstract class CharBuffer extends Buffer implements Comparable<CharBuffer
 
        /** Creates a new char buffer by wrapping the given char sequence.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code end}, capacity will be the length of the char
-        * sequence. The new buffer is read-only.
+        * The new buffer's position will be {@code start}, limit will be {@code end}, capacity will be the length of the char sequence.
+        * The new buffer is read-only.
         * </p>
         * 
         * @param chseq the char sequence which the new buffer will be based on.
index 861b4ee..c88d69c 100644 (file)
@@ -24,8 +24,8 @@ package java.nio;
  * <ul>
  * <li>{@link #allocate(int) Allocate} a new double array and create a buffer based on it;</li>
  * <li>{@link #wrap(double[]) Wrap} an existing double array to create a new buffer;</li>
- * <li>Use {@link java.nio.ByteBuffer#asDoubleBuffer() ByteBuffer.asDoubleBuffer} to create a double buffer based on a byte
- * buffer.</li>
+ * <li>Use {@link java.nio.ByteBuffer#asDoubleBuffer() ByteBuffer.asDoubleBuffer} to create a double buffer based on a byte buffer.
+ * </li>
  * </ul>
  * 
  * @since Android 1.0 */
@@ -58,8 +58,7 @@ public abstract class DoubleBuffer extends Buffer implements Comparable<DoubleBu
 
        /** Creates a new double buffer by wrapping the given double array.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the
-        * array.
+        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the array.
         * </p>
         * 
         * @param array the double array which the new buffer will be based on.
index 6d3f390..9f34720 100644 (file)
@@ -57,8 +57,7 @@ public abstract class FloatBuffer extends Buffer implements Comparable<FloatBuff
 
        /** Creates a new float buffer by wrapping the given float array.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the
-        * array.
+        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the array.
         * </p>
         * 
         * @param array the float array which the new buffer will be based on.
index ed70047..2dc8b7a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package java.nio;
-
+ ******************************************************************************/\r
+\r
+package java.nio;\r
+\r
 import com.google.gwt.typedarrays.client.ArrayBufferView;\r
-
-public interface HasArrayBufferView {
-
-       public ArrayBufferView getTypedArray ();
-
-       public int getElementSize ();
-}
\ No newline at end of file
+\r
+public interface HasArrayBufferView {\r
+\r
+       public ArrayBufferView getTypedArray ();\r
+\r
+       public int getElementSize ();\r
+}\r
index b88e59e..923ae34 100644 (file)
@@ -57,8 +57,7 @@ public abstract class IntBuffer extends Buffer implements Comparable<IntBuffer>
 
        /** Creates a new int buffer by wrapping the given int array.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the
-        * array.
+        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the array.
         * </p>
         * 
         * @param array the int array which the new buffer will be based on.
@@ -180,8 +179,8 @@ public abstract class IntBuffer extends Buffer implements Comparable<IntBuffer>
 
        /** Checks whether this int buffer is equal to another object.
         * <p>
-        * If {@code other} is not a int buffer then {@code false} is returned. Two int buffers are equal if and only if their
-        * remaining ints are exactly the same. Position, limit, capacity and mark are not considered.
+        * If {@code other} is not a int buffer then {@code false} is returned. Two int buffers are equal if and only if their remaining
+        * ints are exactly the same. Position, limit, capacity and mark are not considered.
         * </p>
         * 
         * @param other the object to compare with this int buffer.
index 97a8a12..53a226f 100644 (file)
@@ -57,8 +57,7 @@ public abstract class LongBuffer extends Buffer implements Comparable<LongBuffer
 
        /** Creates a new long buffer by wrapping the given long array.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the
-        * array.
+        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the array.
         * </p>
         * 
         * @param array the long array which the new buffer will be based on.
index 63432d1..8793522 100644 (file)
@@ -52,8 +52,8 @@ final class ReadWriteFloatArrayBuffer extends FloatArrayBuffer {
        }
 
        public FloatBuffer compact () {
-//             System.arraycopy(backingArray, position + offset, backingArray, offset, remaining());
-               for(int i = position + offset, j = offset, k = 0; k < remaining(); i++, j++, k++) {
+// System.arraycopy(backingArray, position + offset, backingArray, offset, remaining());
+               for (int i = position + offset, j = offset, k = 0; k < remaining(); i++, j++, k++) {
                        backingArray[j] = backingArray[i];
                }
                position = limit - position;
index 6ab2eda..817cc48 100644 (file)
@@ -57,8 +57,7 @@ public abstract class ShortBuffer extends Buffer implements Comparable<ShortBuff
 
        /** Creates a new short buffer by wrapping the given short array.
         * <p>
-        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the
-        * array.
+        * The new buffer's position will be {@code start}, limit will be {@code start + len}, capacity will be the length of the array.
         * </p>
         * 
         * @param array the short array which the new buffer will be based on.
index 55ddcd9..2c79a78 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package java.nio;
-
-import com.google.gwt.corp.compatibility.Numbers;
-
-class StringByteBuffer extends BaseByteBuffer {
-
-       private String s;
-
-       StringByteBuffer (String s) {
-               super(s.length());
-               this.s = s;
-               order(ByteOrder.LITTLE_ENDIAN);
-       }
-
-       StringByteBuffer (String s, int position, int limit) {
-               this(s);
-               this.position = position;
-               this.limit = limit;
-       }
-
-       public ByteBuffer asReadOnlyBuffer () {
-               return this;
-       }
-
-       byte[] protectedArray () {
-               throw new UnsupportedOperationException();
-       }
-
-       int protectedArrayOffset () {
-               throw new UnsupportedOperationException();
-       }
-
-       boolean protectedHasArray () {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer compact () {
-               return this;
-       }
-
-       @Override
-       public ByteBuffer duplicate () {
-               return this;
-       }
-
-       @Override
-       public byte get () {
-               return get(position++);
-       }
-
-       @Override
-       public byte get (int index) {
-               return get(s, index);
-       }
-
-       public final double getDouble () {
-               return Numbers.longBitsToDouble(getLong());
-       }
-
-       public final double getDouble (int index) {
-               return Numbers.longBitsToDouble(getLong(index));
-       }
-
-       public final float getFloat () {
-               return Numbers.intBitsToFloat(getInt());
-       }
-
-       public final float getFloat (int index) {
-               return Numbers.intBitsToFloat(getInt(index));
-       }
-
-       public final int getInt () {
-               int newPosition = position + 4;
-               int result = loadInt(position);
-               position = newPosition;
-               return result;
-       }
-
-       public final int getInt (int index) {
-               return loadInt(index);
-       }
-
-       public final long getLong () {
-               throw new UnsupportedOperationException();
-       }
-
-       public final long getLong (int index) {
-               throw new UnsupportedOperationException();
-       }
-
-       public final short getShort () {
-               int newPosition = position + 2;
-               short result = loadShort(position);
-               position = newPosition;
-               return result;
-       }
-
-       public final short getShort (int index) {
-               return loadShort(index);
-       }
-
-       @Override
-       public boolean isDirect () {
-               return false;
-       }
-
-       @Override
-       public ByteBuffer put (byte b) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer put (int index, byte b) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putDouble (double value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putDouble (int index, double value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putFloat (float value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putFloat (int index, float value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putInt (int value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putInt (int index, int value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putLong (long value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putLong (int index, long value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putShort (short value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer putShort (int index, short value) {
-               throw new UnsupportedOperationException();
-       }
-
-       @Override
-       public ByteBuffer slice () {
-               // TODO(jgw): I don't think this is right, but might work for our purposes.
-               StringByteBuffer slice = new StringByteBuffer(s, position, limit);
-               slice.order = order;
-               return slice;
-       }
-
-       @Override
-       public boolean isReadOnly () {
-               return true;
-       }
-
-       private native byte get (String s, int i) /*-{
-                                                                                                                       var x = s.charCodeAt(i) & 0xff;
-                                                                                                                       if (x > 127) x -= 256;
-                                                                                                                       return x;
-                                                                                                                       }-*/;
-
-       protected final int loadInt (int baseOffset) {
-               int bytes = 0;
-               for (int i = 3; i >= 0; i--) {
-                       bytes = bytes << 8;
-                       bytes = bytes | (get(baseOffset + i) & 0xFF);
-               }
-               return bytes;
-       }
-
-       protected final short loadShort (int baseOffset) {
-               short bytes = 0;
-               bytes = (short)(get(baseOffset + 1) << 8);
-               bytes |= (get(baseOffset) & 0xFF);
-               return bytes;
-       }
-}
\ No newline at end of file
+ ******************************************************************************/\r
+\r
+package java.nio;\r
+\r
+import com.google.gwt.corp.compatibility.Numbers;\r
+\r
+class StringByteBuffer extends BaseByteBuffer {\r
+\r
+       private String s;\r
+\r
+       StringByteBuffer (String s) {\r
+               super(s.length());\r
+               this.s = s;\r
+               order(ByteOrder.LITTLE_ENDIAN);\r
+       }\r
+\r
+       StringByteBuffer (String s, int position, int limit) {\r
+               this(s);\r
+               this.position = position;\r
+               this.limit = limit;\r
+       }\r
+\r
+       public ByteBuffer asReadOnlyBuffer () {\r
+               return this;\r
+       }\r
+\r
+       byte[] protectedArray () {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       int protectedArrayOffset () {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       boolean protectedHasArray () {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer compact () {\r
+               return this;\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer duplicate () {\r
+               return this;\r
+       }\r
+\r
+       @Override\r
+       public byte get () {\r
+               return get(position++);\r
+       }\r
+\r
+       @Override\r
+       public byte get (int index) {\r
+               return get(s, index);\r
+       }\r
+\r
+       public final double getDouble () {\r
+               return Numbers.longBitsToDouble(getLong());\r
+       }\r
+\r
+       public final double getDouble (int index) {\r
+               return Numbers.longBitsToDouble(getLong(index));\r
+       }\r
+\r
+       public final float getFloat () {\r
+               return Numbers.intBitsToFloat(getInt());\r
+       }\r
+\r
+       public final float getFloat (int index) {\r
+               return Numbers.intBitsToFloat(getInt(index));\r
+       }\r
+\r
+       public final int getInt () {\r
+               int newPosition = position + 4;\r
+               int result = loadInt(position);\r
+               position = newPosition;\r
+               return result;\r
+       }\r
+\r
+       public final int getInt (int index) {\r
+               return loadInt(index);\r
+       }\r
+\r
+       public final long getLong () {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       public final long getLong (int index) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       public final short getShort () {\r
+               int newPosition = position + 2;\r
+               short result = loadShort(position);\r
+               position = newPosition;\r
+               return result;\r
+       }\r
+\r
+       public final short getShort (int index) {\r
+               return loadShort(index);\r
+       }\r
+\r
+       @Override\r
+       public boolean isDirect () {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer put (byte b) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer put (int index, byte b) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putDouble (double value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putDouble (int index, double value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putFloat (float value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putFloat (int index, float value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putInt (int value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putInt (int index, int value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putLong (long value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putLong (int index, long value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putShort (short value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer putShort (int index, short value) {\r
+               throw new UnsupportedOperationException();\r
+       }\r
+\r
+       @Override\r
+       public ByteBuffer slice () {\r
+               // TODO(jgw): I don't think this is right, but might work for our purposes.\r
+               StringByteBuffer slice = new StringByteBuffer(s, position, limit);\r
+               slice.order = order;\r
+               return slice;\r
+       }\r
+\r
+       @Override\r
+       public boolean isReadOnly () {\r
+               return true;\r
+       }\r
+\r
+       private native byte get (String s, int i) /*-{\r
+                                                                                                                       var x = s.charCodeAt(i) & 0xff;\r
+                                                                                                                       if (x > 127) x -= 256;\r
+                                                                                                                       return x;\r
+                                                                                                                       }-*/;\r
+\r
+       protected final int loadInt (int baseOffset) {\r
+               int bytes = 0;\r
+               for (int i = 3; i >= 0; i--) {\r
+                       bytes = bytes << 8;\r
+                       bytes = bytes | (get(baseOffset + i) & 0xFF);\r
+               }\r
+               return bytes;\r
+       }\r
+\r
+       protected final short loadShort (int baseOffset) {\r
+               short bytes = 0;\r
+               bytes = (short)(get(baseOffset + 1) << 8);\r
+               bytes |= (get(baseOffset) & 0xFF);\r
+               return bytes;\r
+       }\r
+}\r
index 0d590a3..cb2061c 100644 (file)
 package java.security;\r
 \r
 public class AccessControlException extends SecurityException {\r
-  private final Permission permission;\r
+       private final Permission permission;\r
 \r
-  public AccessControlException(String message) {\r
-    this(message, null);\r
-  }\r
+       public AccessControlException (String message) {\r
+               this(message, null);\r
+       }\r
 \r
-  public AccessControlException(String message, Permission permission) {\r
-    super(message);\r
-    this.permission = permission;\r
-  }\r
+       public AccessControlException (String message, Permission permission) {\r
+               super(message);\r
+               this.permission = permission;\r
+       }\r
 \r
-  public Permission getPermission() {\r
-    return permission;\r
-  }\r
+       public Permission getPermission () {\r
+               return permission;\r
+       }\r
 }\r
index a105f30..5bf96a0 100644 (file)
 package java.security;\r
 \r
 public abstract class Permission {\r
-  \r
-  protected String name;\r
-  \r
-  public Permission(String name) {\r
-    this.name = name;\r
-  }\r
-  \r
-  public String getName() {\r
-    return name;\r
-  }\r
-  \r
-  @Override\r
-  public String toString() {\r
-    return this.getClass().getName() + '['+name+']';\r
-  }\r
-  \r
-  public PermissionCollection newPermissionCollection() {\r
-    return null;\r
-  }\r
+\r
+       protected String name;\r
+\r
+       public Permission (String name) {\r
+               this.name = name;\r
+       }\r
+\r
+       public String getName () {\r
+               return name;\r
+       }\r
+\r
+       @Override\r
+       public String toString () {\r
+               return this.getClass().getName() + '[' + name + ']';\r
+       }\r
+\r
+       public PermissionCollection newPermissionCollection () {\r
+               return null;\r
+       }\r
 }\r
index 2ab1ab0..e88e408 100644 (file)
@@ -10,6 +10,6 @@
 \r
 package java.security;\r
 \r
-public abstract class PermissionCollection { \r
-  public abstract void add(Permission p);\r
+public abstract class PermissionCollection {\r
+       public abstract void add (Permission p);\r
 }\r
index 1828b12..0099ed2 100644 (file)
@@ -13,9 +13,8 @@
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package java.util;
 
-import java.util.NoSuchElementException;
+package java.util;
 
 public class StringTokenizer {
        private final String deli;
@@ -24,28 +23,28 @@ public class StringTokenizer {
 
        private int pos;
        private String next;
-       
-       public StringTokenizer(String s, String deli) {
+
+       public StringTokenizer (String s, String deli) {
                this.s = s;
                this.deli = deli;
                len = s.length();
        }
-       
-       public StringTokenizer(String s) {
+
+       public StringTokenizer (String s) {
                this(s, " \t\n\r\f");
-               
+
        }
-       
-       public String nextToken() {
-               if(!hasMoreTokens()) {
+
+       public String nextToken () {
+               if (!hasMoreTokens()) {
                        throw new NoSuchElementException();
                }
                String result = next;
                next = null;
                return result;
        }
-       
-       public boolean hasMoreTokens() {
+
+       public boolean hasMoreTokens () {
                if (next != null) {
                        return true;
                }
@@ -53,16 +52,16 @@ public class StringTokenizer {
                while (pos < len && deli.indexOf(s.charAt(pos)) != -1) {
                        pos++;
                }
-               
+
                if (pos >= len) {
                        return false;
                }
-               
+
                int p0 = pos++;
                while (pos < len && deli.indexOf(s.charAt(pos)) == -1) {
                        pos++;
                }
-               
+
                next = s.substring(p0, pos++);
                return true;
        }
index 1df8bdc..90ddcb1 100644 (file)
 \r
 package java.util.regex;\r
 \r
-\r
-/**\r
- * This is a work in progress.\r
+/** This is a work in progress.\r
  * \r
- * @author zsombor and others\r
- */\r
+ * @author zsombor and others */\r
 public class Matcher {\r
-  private final TestPattern pattern;\r
-  private CharSequence input;\r
-  private int start;\r
-  private int end;\r
-\r
-  Matcher(TestPattern pattern, CharSequence input) {\r
-    this.pattern = pattern;\r
-    this.input = input;\r
-  }\r
-\r
-  public boolean matches() {\r
-    if (pattern.pattern().equals(input.toString())) {\r
-      start = 0;\r
-      end = input.length();\r
-      return true;\r
-    } else {\r
-      return false;\r
-    }\r
-  }\r
-\r
-  public Matcher reset() {\r
-    return reset(input);\r
-  }\r
-\r
-  public Matcher reset(CharSequence input) {\r
-    this.input = input;\r
-    start = 0;\r
-    end = 0;\r
-    return this;\r
-  }\r
-\r
-  public int start() {\r
-    return start;\r
-  }\r
-\r
-  public String replaceAll(String replacement) {\r
-    return replace(replacement, Integer.MAX_VALUE);\r
-  }\r
-\r
-  public String replaceFirst(String replacement) {\r
-    return replace(replacement, 1);\r
-  }\r
-\r
-  private String replace(String replacement, int limit) {\r
-    reset();\r
-\r
-    StringBuilder sb = null;\r
-    int index = 0;\r
-    int count = 0;\r
-    while (count < limit && index < input.length()) {\r
-      if (find(index)) {\r
-        if (sb == null) {\r
-          sb = new StringBuilder();\r
-        }\r
-        if (start > index) {\r
-          sb.append(input.subSequence(index, start));\r
-        }\r
-        sb.append(replacement);\r
-        index = end;\r
-        ++ count;\r
-      } else if (index == 0) {\r
-        return input.toString();\r
-      } else {\r
-        break;\r
-      }\r
-    }\r
-    if (index < input.length()) {\r
-      sb.append(input.subSequence(index, input.length()));\r
-    }\r
-    return sb.toString();\r
-  }\r
-\r
-  public int end() {\r
-    return end;\r
-  }\r
-\r
-  public boolean find() {\r
-    return find(end);\r
-  }\r
-\r
-  public boolean find(int start) {\r
-    String p = pattern.pattern();\r
-    int i = TestPattern.indexOf(input, p, start);\r
-    if (i >= 0) {\r
-      this.start = i;\r
-      this.end = i + p.length();\r
-      return true;\r
-    } else {\r
-      return false;\r
-    }\r
-  }\r
+       private final TestPattern pattern;\r
+       private CharSequence input;\r
+       private int start;\r
+       private int end;\r
+\r
+       Matcher (TestPattern pattern, CharSequence input) {\r
+               this.pattern = pattern;\r
+               this.input = input;\r
+       }\r
+\r
+       public boolean matches () {\r
+               if (pattern.pattern().equals(input.toString())) {\r
+                       start = 0;\r
+                       end = input.length();\r
+                       return true;\r
+               } else {\r
+                       return false;\r
+               }\r
+       }\r
+\r
+       public Matcher reset () {\r
+               return reset(input);\r
+       }\r
+\r
+       public Matcher reset (CharSequence input) {\r
+               this.input = input;\r
+               start = 0;\r
+               end = 0;\r
+               return this;\r
+       }\r
+\r
+       public int start () {\r
+               return start;\r
+       }\r
+\r
+       public String replaceAll (String replacement) {\r
+               return replace(replacement, Integer.MAX_VALUE);\r
+       }\r
+\r
+       public String replaceFirst (String replacement) {\r
+               return replace(replacement, 1);\r
+       }\r
+\r
+       private String replace (String replacement, int limit) {\r
+               reset();\r
+\r
+               StringBuilder sb = null;\r
+               int index = 0;\r
+               int count = 0;\r
+               while (count < limit && index < input.length()) {\r
+                       if (find(index)) {\r
+                               if (sb == null) {\r
+                                       sb = new StringBuilder();\r
+                               }\r
+                               if (start > index) {\r
+                                       sb.append(input.subSequence(index, start));\r
+                               }\r
+                               sb.append(replacement);\r
+                               index = end;\r
+                               ++count;\r
+                       } else if (index == 0) {\r
+                               return input.toString();\r
+                       } else {\r
+                               break;\r
+                       }\r
+               }\r
+               if (index < input.length()) {\r
+                       sb.append(input.subSequence(index, input.length()));\r
+               }\r
+               return sb.toString();\r
+       }\r
+\r
+       public int end () {\r
+               return end;\r
+       }\r
+\r
+       public boolean find () {\r
+               return find(end);\r
+       }\r
+\r
+       public boolean find (int start) {\r
+               String p = pattern.pattern();\r
+               int i = TestPattern.indexOf(input, p, start);\r
+               if (i >= 0) {\r
+                       this.start = i;\r
+                       this.end = i + p.length();\r
+                       return true;\r
+               } else {\r
+                       return false;\r
+               }\r
+       }\r
 }\r
index d9ca09b..f577b9b 100644 (file)
 package java.util.regex;\r
 \r
 import java.util.Iterator;\r
-import java.util.List;\r
 import java.util.LinkedList;\r
+import java.util.List;\r
 \r
-/**\r
- * This is a work in progress.\r
- * \r
- * @author zsombor and others\r
+/** This is a work in progress.\r
  * \r
- */\r
+ * @author zsombor and others */\r
 public class TestPattern {\r
 \r
-  public static final int UNIX_LINES       = 1;\r
-  public static final int CASE_INSENSITIVE = 2;\r
-  public static final int COMMENTS         = 4;\r
-  public static final int MULTILINE        = 8;\r
-  public static final int LITERAL          = 16;\r
-  public static final int DOTALL           = 32;\r
-  public static final int UNICODE_CASE     = 64;\r
-  public static final int CANON_EQ         = 128;\r
-\r
-  private final int patternFlags;\r
-  private final String pattern;\r
-\r
-  protected TestPattern(String pattern, int flags) {\r
-    this.pattern = pattern;\r
-    this.patternFlags = flags;\r
-\r
-    if (! trivial(pattern)) {\r
-      throw new UnsupportedOperationException\r
-        ("only trivial regular expressions are supported so far");\r
-    }\r
-  }\r
-\r
-  private static boolean trivial(String pattern) {\r
-    for (int i = 0; i < pattern.length(); ++i) {\r
-      char c = pattern.charAt(i);\r
-      switch (c) {\r
-      case '\\':\r
-      case '.':\r
-      case '*':\r
-      case '+':\r
-      case '?':\r
-      case '|':\r
-      case '[':\r
-      case ']':\r
-      case '{':\r
-      case '}':\r
-      case '(':\r
-      case ')':\r
-      case '^':\r
-      case '$':\r
-        return false;\r
-      }\r
-    }\r
-    return true;\r
-  }\r
-\r
-  public static TestPattern compile(String regex) {\r
-    return new TestPattern(regex, 0);\r
-  }\r
-\r
-  public static TestPattern compile(String regex, int flags) {\r
-    return new TestPattern(regex, flags);\r
-  }\r
-\r
-  public int flags() {\r
-    return patternFlags;\r
-  }\r
-\r
-  public Matcher matcher(CharSequence input) {\r
-    return new Matcher(this, input);\r
-  }\r
-\r
-  public static boolean matches(String regex, CharSequence input) {\r
-    return TestPattern.compile(regex).matcher(input).matches();\r
-  }\r
-\r
-  public String pattern() {\r
-    return pattern;\r
-  }\r
-\r
-  public String[] split(CharSequence input) {\r
-    return split(input, 0);\r
-  }\r
-\r
-  public String[] split(CharSequence input, int limit) {\r
-    boolean strip;\r
-    if (limit < 0) {\r
-      strip = false;\r
-      limit = Integer.MAX_VALUE;\r
-    } else if (limit == 0) {\r
-      strip = true;\r
-      limit = Integer.MAX_VALUE;\r
-    } else {\r
-      strip = false;\r
-    }\r
-\r
-    List<CharSequence> list = new LinkedList();\r
-    int index = 0;\r
-    int trailing = 0;\r
-    int patternLength = pattern.length();\r
-    while (index < input.length() && list.size() < limit - 1) {\r
-      int i;\r
-      if (patternLength == 0) {\r
-        if (list.size() == 0) {\r
-          i = 0;\r
-        } else {\r
-          i = index + 1;\r
-        }\r
-      } else {\r
-        i = indexOf(input, pattern, index);\r
-      }\r
-\r
-      if (i >= 0) {\r
-        if (patternLength != 0 && i == index) {\r
-          ++ trailing;\r
-        } else {\r
-          trailing = 0;\r
-        }\r
-\r
-        list.add(input.subSequence(index, i));\r
-        index = i + patternLength;\r
-      } else {\r
-        break;\r
-      }\r
-    }\r
-\r
-    if (strip && index > 0 && index == input.length()) {\r
-      ++ trailing;\r
-    } else {\r
-      trailing = 0;\r
-    }\r
-    list.add(input.subSequence(index, input.length()));\r
-\r
-    String[] result = new String[list.size() - trailing];\r
-    int i = 0;\r
-    for (Iterator<CharSequence> it = list.iterator();\r
-         it.hasNext() && i < result.length; ++ i)\r
-    {\r
-      result[i] = it.next().toString();\r
-    }\r
-    return result;\r
-  }\r
-\r
-  static int indexOf(CharSequence haystack, CharSequence needle, int start) {\r
-    if (needle.length() == 0) return start;\r
-\r
-    for (int i = start; i < haystack.length() - needle.length() + 1; ++i) {\r
-      int j = 0;\r
-      for (; j < needle.length(); ++j) {\r
-        if (haystack.charAt(i + j) != needle.charAt(j)) {\r
-          break;\r
-        }\r
-      }\r
-      if (j == needle.length()) {\r
-        return i;\r
-      }\r
-    }\r
-\r
-    return -1;\r
-  }\r
+       public static final int UNIX_LINES = 1;\r
+       public static final int CASE_INSENSITIVE = 2;\r
+       public static final int COMMENTS = 4;\r
+       public static final int MULTILINE = 8;\r
+       public static final int LITERAL = 16;\r
+       public static final int DOTALL = 32;\r
+       public static final int UNICODE_CASE = 64;\r
+       public static final int CANON_EQ = 128;\r
+\r
+       private final int patternFlags;\r
+       private final String pattern;\r
+\r
+       protected TestPattern (String pattern, int flags) {\r
+               this.pattern = pattern;\r
+               this.patternFlags = flags;\r
+\r
+               if (!trivial(pattern)) {\r
+                       throw new UnsupportedOperationException("only trivial regular expressions are supported so far");\r
+               }\r
+       }\r
+\r
+       private static boolean trivial (String pattern) {\r
+               for (int i = 0; i < pattern.length(); ++i) {\r
+                       char c = pattern.charAt(i);\r
+                       switch (c) {\r
+                       case '\\':\r
+                       case '.':\r
+                       case '*':\r
+                       case '+':\r
+                       case '?':\r
+                       case '|':\r
+                       case '[':\r
+                       case ']':\r
+                       case '{':\r
+                       case '}':\r
+                       case '(':\r
+                       case ')':\r
+                       case '^':\r
+                       case '$':\r
+                               return false;\r
+                       }\r
+               }\r
+               return true;\r
+       }\r
+\r
+       public static TestPattern compile (String regex) {\r
+               return new TestPattern(regex, 0);\r
+       }\r
+\r
+       public static TestPattern compile (String regex, int flags) {\r
+               return new TestPattern(regex, flags);\r
+       }\r
+\r
+       public int flags () {\r
+               return patternFlags;\r
+       }\r
+\r
+       public Matcher matcher (CharSequence input) {\r
+               return new Matcher(this, input);\r
+       }\r
+\r
+       public static boolean matches (String regex, CharSequence input) {\r
+               return TestPattern.compile(regex).matcher(input).matches();\r
+       }\r
+\r
+       public String pattern () {\r
+               return pattern;\r
+       }\r
+\r
+       public String[] split (CharSequence input) {\r
+               return split(input, 0);\r
+       }\r
+\r
+       public String[] split (CharSequence input, int limit) {\r
+               boolean strip;\r
+               if (limit < 0) {\r
+                       strip = false;\r
+                       limit = Integer.MAX_VALUE;\r
+               } else if (limit == 0) {\r
+                       strip = true;\r
+                       limit = Integer.MAX_VALUE;\r
+               } else {\r
+                       strip = false;\r
+               }\r
+\r
+               List<CharSequence> list = new LinkedList();\r
+               int index = 0;\r
+               int trailing = 0;\r
+               int patternLength = pattern.length();\r
+               while (index < input.length() && list.size() < limit - 1) {\r
+                       int i;\r
+                       if (patternLength == 0) {\r
+                               if (list.size() == 0) {\r
+                                       i = 0;\r
+                               } else {\r
+                                       i = index + 1;\r
+                               }\r
+                       } else {\r
+                               i = indexOf(input, pattern, index);\r
+                       }\r
+\r
+                       if (i >= 0) {\r
+                               if (patternLength != 0 && i == index) {\r
+                                       ++trailing;\r
+                               } else {\r
+                                       trailing = 0;\r
+                               }\r
+\r
+                               list.add(input.subSequence(index, i));\r
+                               index = i + patternLength;\r
+                       } else {\r
+                               break;\r
+                       }\r
+               }\r
+\r
+               if (strip && index > 0 && index == input.length()) {\r
+                       ++trailing;\r
+               } else {\r
+                       trailing = 0;\r
+               }\r
+               list.add(input.subSequence(index, input.length()));\r
+\r
+               String[] result = new String[list.size() - trailing];\r
+               int i = 0;\r
+               for (Iterator<CharSequence> it = list.iterator(); it.hasNext() && i < result.length; ++i) {\r
+                       result[i] = it.next().toString();\r
+               }\r
+               return result;\r
+       }\r
+\r
+       static int indexOf (CharSequence haystack, CharSequence needle, int start) {\r
+               if (needle.length() == 0) return start;\r
+\r
+               for (int i = start; i < haystack.length() - needle.length() + 1; ++i) {\r
+                       int j = 0;\r
+                       for (; j < needle.length(); ++j) {\r
+                               if (haystack.charAt(i + j) != needle.charAt(j)) {\r
+                                       break;\r
+                               }\r
+                       }\r
+                       if (j == needle.length()) {\r
+                               return i;\r
+                       }\r
+               }\r
+\r
+               return -1;\r
+       }\r
 }\r
index f048d12..7929b2d 100644 (file)
 /**
  * Created at 4:25:42 AM Jul 15, 2010
  */
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.dynamics.Filter;
 import org.jbox2d.dynamics.Fixture;
 
 // updated to rev 100
-/**
- * Implement this class to provide collision filtering. In other words, you can implement
- * this class if you want finer control over contact creation.
- * @author Daniel Murphy
- */
+/** Implement this class to provide collision filtering. In other words, you can implement this class if you want finer control
+ * over contact creation.
+ * @author Daniel Murphy */
 public class ContactFilter {
 
-       /**
-        * Return true if contact calculations should be performed between these two shapes.
+       /** Return true if contact calculations should be performed between these two shapes.
         * @warning for performance reasons this is only called when the AABBs begin to overlap.
         * @param fixtureA
         * @param fixtureB
-        * @return
-        */
-       public boolean shouldCollide(Fixture fixtureA, Fixture fixtureB){
+        * @return */
+       public boolean shouldCollide (Fixture fixtureA, Fixture fixtureB) {
                Filter filterA = fixtureA.getFilterData();
                Filter filterB = fixtureB.getFilterData();
 
-               if (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0){
+               if (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0) {
                        return filterA.groupIndex > 0;
                }
 
-               boolean collide = (filterA.maskBits & filterB.categoryBits) != 0 &&
-                                                 (filterA.categoryBits & filterB.maskBits) != 0;
+               boolean collide = (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0;
                return collide;
        }
 }
index a0c0467..298b54b 100644 (file)
 /**
  * Created at 3:43:53 AM Jul 7, 2010
  */
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.common.Settings;
 
-/**
- * Contact impulses for reporting. Impulses are used instead of forces because sub-step forces may
- * approach infinity for rigid body collisions. These match up one-to-one with the contact points in
- * b2Manifold.
+/** Contact impulses for reporting. Impulses are used instead of forces because sub-step forces may approach infinity for rigid
+ * body collisions. These match up one-to-one with the contact points in b2Manifold.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class ContactImpulse {
-  public float[] normalImpulses = new float[Settings.maxManifoldPoints];
-  public float[] tangentImpulses = new float[Settings.maxManifoldPoints];
-  public int count;
+       public float[] normalImpulses = new float[Settings.maxManifoldPoints];
+       public float[] tangentImpulses = new float[Settings.maxManifoldPoints];
+       public int count;
 }
index ce063ad..04d5a4e 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.collision.Manifold;
 import org.jbox2d.dynamics.contacts.Contact;
 
 // updated to rev 100
-/**
- * Implement this class to get contact information. You can use these results for
- * things like sounds and game logic. You can also get contact results by
- * traversing the contact lists after the time step. However, you might miss
- * some contacts because continuous physics leads to sub-stepping.
- * Additionally you may receive multiple callbacks for the same contact in a
- * single time step.
- * You should strive to make your callbacks efficient because there may be
- * many callbacks per time step.
+/** Implement this class to get contact information. You can use these results for things like sounds and game logic. You can also
+ * get contact results by traversing the contact lists after the time step. However, you might miss some contacts because
+ * continuous physics leads to sub-stepping. Additionally you may receive multiple callbacks for the same contact in a single time
+ * step. You should strive to make your callbacks efficient because there may be many callbacks per time step.
  * @warning You cannot create/destroy Box2D entities inside these callbacks.
- * @author Daniel Murphy
- *
- */
+ * @author Daniel Murphy */
 public interface ContactListener {
 
-       /**
-        * Called when two fixtures begin to touch.
-        * @param contact
-        */
-       public void beginContact(Contact contact);
-       
-       /**
-        * Called when two fixtures cease to touch.
-        * @param contact
-        */
-       public void endContact(Contact contact);
-       
-       /**
-        * This is called after a contact is updated. This allows you to inspect a
-        * contact before it goes to the solver. If you are careful, you can modify the
-        * contact manifold (e.g. disable contact).
-        * A copy of the old manifold is provided so that you can detect changes.
-        * Note: this is called only for awake bodies.
-        * Note: this is called even when the number of contact points is zero.
-        * Note: this is not called for sensors.
-        * Note: if you set the number of contact points to zero, you will not
-        * get an EndContact callback. However, you may get a BeginContact callback
-        * the next step.
-        * Note: the oldManifold parameter is pooled, so it will be the same object for every callback
-        * for each thread.
+       /** Called when two fixtures begin to touch.
+        * @param contact */
+       public void beginContact (Contact contact);
+
+       /** Called when two fixtures cease to touch.
+        * @param contact */
+       public void endContact (Contact contact);
+
+       /** This is called after a contact is updated. This allows you to inspect a contact before it goes to the solver. If you are
+        * careful, you can modify the contact manifold (e.g. disable contact). A copy of the old manifold is provided so that you can
+        * detect changes. Note: this is called only for awake bodies. Note: this is called even when the number of contact points is
+        * zero. Note: this is not called for sensors. Note: if you set the number of contact points to zero, you will not get an
+        * EndContact callback. However, you may get a BeginContact callback the next step. Note: the oldManifold parameter is pooled,
+        * so it will be the same object for every callback for each thread.
         * @param contact
-        * @param oldManifold
-        */
-       public void preSolve(Contact contact, Manifold oldManifold);
-       
-       /**
-        * This lets you inspect a contact after the solver is finished. This is useful
-        * for inspecting impulses.
-        * Note: the contact manifold does not include time of impact impulses, which can be
-        * arbitrarily large if the sub-step is small. Hence the impulse is provided explicitly
-        * in a separate data structure.
-        * Note: this is only called for contacts that are touching, solid, and awake.
+        * @param oldManifold */
+       public void preSolve (Contact contact, Manifold oldManifold);
+
+       /** This lets you inspect a contact after the solver is finished. This is useful for inspecting impulses. Note: the contact
+        * manifold does not include time of impact impulses, which can be arbitrarily large if the sub-step is small. Hence the
+        * impulse is provided explicitly in a separate data structure. Note: this is only called for contacts that are touching,
+        * solid, and awake.
         * @param contact
-        * @param impulse this is usually a pooled variable, so it will be modified after
-        * this call
-        */
-       public void postSolve(Contact contact, ContactImpulse impulse);
+        * @param impulse this is usually a pooled variable, so it will be modified after this call */
+       public void postSolve (Contact contact, ContactImpulse impulse);
 }
index ef7f2dc..2c73b45 100644 (file)
@@ -24,6 +24,7 @@
 /**
  * Created at 4:35:29 AM Jul 15, 2010
  */
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.common.Color3f;
@@ -32,223 +33,179 @@ import org.jbox2d.common.Transform;
 import org.jbox2d.common.Vec2;
 
 // updated to rev 100
-/**
- * Implement this abstract class to allow JBox2d to 
- * automatically draw your physics for debugging purposes.
- * Not intended to replace your own custom rendering
- * routines!
- * @author Daniel Murphy
- */
+/** Implement this abstract class to allow JBox2d to automatically draw your physics for debugging purposes. Not intended to
+ * replace your own custom rendering routines!
+ * @author Daniel Murphy */
 public abstract class DebugDraw {
 
-       public static final int e_shapeBit                              = 0x0001; ///< draw shapes
-       public static final int e_jointBit                              = 0x0002; ///< draw joint connections
-       public static final int e_aabbBit                               = 0x0004; ///< draw core (TOI) shapes
-       public static final int e_pairBit                               = 0x0008; ///< draw axis aligned bounding boxes
-       public static final int e_centerOfMassBit               = 0x0010; ///< draw center of mass frame
-       public static final int e_dynamicTreeBit                = 0x0020; ///< draw dynamic tree.
-       
+       public static final int e_shapeBit = 0x0001; // /< draw shapes
+       public static final int e_jointBit = 0x0002; // /< draw joint connections
+       public static final int e_aabbBit = 0x0004; // /< draw core (TOI) shapes
+       public static final int e_pairBit = 0x0008; // /< draw axis aligned bounding boxes
+       public static final int e_centerOfMassBit = 0x0010; // /< draw center of mass frame
+       public static final int e_dynamicTreeBit = 0x0020; // /< draw dynamic tree.
+
        protected int m_drawFlags;
        protected final IViewportTransform viewportTransform;
 
-       public DebugDraw(IViewportTransform viewport) {
+       public DebugDraw (IViewportTransform viewport) {
                m_drawFlags = 0;
                viewportTransform = viewport;
        }
 
-       public void setFlags(int flags) {
+       public void setFlags (int flags) {
                m_drawFlags = flags;
        }
 
-       public int getFlags() {
+       public int getFlags () {
                return m_drawFlags;
        }
 
-       public void appendFlags(int flags) {
+       public void appendFlags (int flags) {
                m_drawFlags |= flags;
        }
 
-       public void clearFlags(int flags) {
+       public void clearFlags (int flags) {
                m_drawFlags &= ~flags;
        }
 
-       /**
-        * Draw a closed polygon provided in CCW order.  This implementation
-        * uses {@link #drawSegment(Vec2, Vec2, Color3f)} to draw each side of the
-        * polygon.
+       /** Draw a closed polygon provided in CCW order. This implementation uses {@link #drawSegment(Vec2, Vec2, Color3f)} to draw each
+        * side of the polygon.
         * @param vertices
         * @param vertexCount
-        * @param color
-        */
-       public void drawPolygon(Vec2[] vertices, int vertexCount, Color3f color){
-               if(vertexCount == 1){
+        * @param color */
+       public void drawPolygon (Vec2[] vertices, int vertexCount, Color3f color) {
+               if (vertexCount == 1) {
                        drawSegment(vertices[0], vertices[0], color);
                        return;
                }
-               
-               for(int i=0; i<vertexCount-1; i+=1){
-                       drawSegment(vertices[i], vertices[i+1], color);
+
+               for (int i = 0; i < vertexCount - 1; i += 1) {
+                       drawSegment(vertices[i], vertices[i + 1], color);
                }
-               
-               if(vertexCount > 2){
-                       drawSegment(vertices[vertexCount-1], vertices[0], color);
+
+               if (vertexCount > 2) {
+                       drawSegment(vertices[vertexCount - 1], vertices[0], color);
                }
        }
-       
-       public abstract void drawPoint(Vec2 argPoint, float argRadiusOnScreen, Color3f argColor);
 
-       /**
-        * Draw a solid closed polygon provided in CCW order.
+       public abstract void drawPoint (Vec2 argPoint, float argRadiusOnScreen, Color3f argColor);
+
+       /** Draw a solid closed polygon provided in CCW order.
         * @param vertices
         * @param vertexCount
-        * @param color
-        */
-       public abstract void drawSolidPolygon(Vec2[] vertices, int vertexCount, Color3f color);
+        * @param color */
+       public abstract void drawSolidPolygon (Vec2[] vertices, int vertexCount, Color3f color);
 
-       /**
-        * Draw a circle.
+       /** Draw a circle.
         * @param center
         * @param radius
-        * @param color
-        */
-       public abstract void drawCircle(Vec2 center, float radius, Color3f color);
-       
-       /**
-        * Draw a solid circle.
+        * @param color */
+       public abstract void drawCircle (Vec2 center, float radius, Color3f color);
+
+       /** Draw a solid circle.
         * @param center
         * @param radius
         * @param axis
-        * @param color
-        */
-       public abstract void drawSolidCircle(Vec2 center, float radius, Vec2 axis, Color3f color);
-       
-       /**
-        * Draw a line segment.
+        * @param color */
+       public abstract void drawSolidCircle (Vec2 center, float radius, Vec2 axis, Color3f color);
+
+       /** Draw a line segment.
         * @param p1
         * @param p2
-        * @param color
-        */
-       public abstract void drawSegment(Vec2 p1, Vec2 p2, Color3f color);
-
-       /**
-        * Draw a transform.  Choose your own length scale
-        * @param xf
-        */
-       public abstract void drawTransform(Transform xf);
-
-       /**
-        * Draw a string.
+        * @param color */
+       public abstract void drawSegment (Vec2 p1, Vec2 p2, Color3f color);
+
+       /** Draw a transform. Choose your own length scale
+        * @param xf */
+       public abstract void drawTransform (Transform xf);
+
+       /** Draw a string.
         * @param x
         * @param y
         * @param s
-        * @param color
-        */
-       public abstract void drawString(float x, float y, String s, Color3f color);
-       
-       public void drawString(Vec2 pos, String s, Color3f color) {
-         drawString(pos.x, pos.y, s, color);
-       }
-               
-       public IViewportTransform getViewportTranform(){
+        * @param color */
+       public abstract void drawString (float x, float y, String s, Color3f color);
+
+       public void drawString (Vec2 pos, String s, Color3f color) {
+               drawString(pos.x, pos.y, s, color);
+       }
+
+       public IViewportTransform getViewportTranform () {
                return viewportTransform;
        }
-       
-       /**
-        * @param x
+
+       /** @param x
         * @param y
         * @param scale
-        * @see IViewportTransform#setCamera(float, float, float)
-        */
-       public void setCamera(float x, float y, float scale){
-               viewportTransform.setCamera(x,y,scale);
-       }
-       
-       
-       /**
-        * @param argScreen
+        * @see IViewportTransform#setCamera(float, float, float) */
+       public void setCamera (float x, float y, float scale) {
+               viewportTransform.setCamera(x, y, scale);
+       }
+
+       /** @param argScreen
         * @param argWorld
-        * @see org.jbox2d.common.IViewportTransform#getScreenToWorld(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
-        */
-       public void getScreenToWorldToOut(Vec2 argScreen, Vec2 argWorld) {
+        * @see org.jbox2d.common.IViewportTransform#getScreenToWorld(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2) */
+       public void getScreenToWorldToOut (Vec2 argScreen, Vec2 argWorld) {
                viewportTransform.getScreenToWorld(argScreen, argWorld);
        }
 
-       /**
-        * @param argWorld
+       /** @param argWorld
         * @param argScreen
-        * @see org.jbox2d.common.IViewportTransform#getWorldToScreen(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2)
-        */
-       public void getWorldToScreenToOut(Vec2 argWorld, Vec2 argScreen) {
+        * @see org.jbox2d.common.IViewportTransform#getWorldToScreen(org.jbox2d.common.Vec2, org.jbox2d.common.Vec2) */
+       public void getWorldToScreenToOut (Vec2 argWorld, Vec2 argScreen) {
                viewportTransform.getWorldToScreen(argWorld, argScreen);
        }
-       
-       /**
-        * Takes the world coordinates and puts the corresponding screen
-        * coordinates in argScreen.
+
+       /** Takes the world coordinates and puts the corresponding screen coordinates in argScreen.
         * @param worldX
         * @param worldY
-        * @param argScreen
-        */
-       public void getWorldToScreenToOut(float worldX, float worldY, Vec2 argScreen){
-               argScreen.set(worldX,worldY);
+        * @param argScreen */
+       public void getWorldToScreenToOut (float worldX, float worldY, Vec2 argScreen) {
+               argScreen.set(worldX, worldY);
                viewportTransform.getWorldToScreen(argScreen, argScreen);
        }
-       
-       /**
-        * takes the world coordinate (argWorld) and returns
-        * the screen coordinates.
-        * @param argWorld
-        */
-       public Vec2 getWorldToScreen(Vec2 argWorld){
+
+       /** takes the world coordinate (argWorld) and returns the screen coordinates.
+        * @param argWorld */
+       public Vec2 getWorldToScreen (Vec2 argWorld) {
                Vec2 screen = new Vec2();
-               viewportTransform.getWorldToScreen( argWorld, screen);
+               viewportTransform.getWorldToScreen(argWorld, screen);
                return screen;
        }
-       
-       /**
-        * Takes the world coordinates and returns the screen
-        * coordinates.
+
+       /** Takes the world coordinates and returns the screen coordinates.
         * @param worldX
-        * @param worldY
-        */
-       public Vec2 getWorldToScreen(float worldX, float worldY){
+        * @param worldY */
+       public Vec2 getWorldToScreen (float worldX, float worldY) {
                Vec2 argScreen = new Vec2(worldX, worldY);
-               viewportTransform.getWorldToScreen( argScreen, argScreen);
+               viewportTransform.getWorldToScreen(argScreen, argScreen);
                return argScreen;
        }
-       
-       /**
-        * takes the screen coordinates and puts the corresponding 
-        * world coordinates in argWorld.
+
+       /** takes the screen coordinates and puts the corresponding world coordinates in argWorld.
         * @param screenX
         * @param screenY
-        * @param argWorld
-        */
-       public void getScreenToWorldToOut(float screenX, float screenY, Vec2 argWorld){
-               argWorld.set(screenX,screenY);
+        * @param argWorld */
+       public void getScreenToWorldToOut (float screenX, float screenY, Vec2 argWorld) {
+               argWorld.set(screenX, screenY);
                viewportTransform.getScreenToWorld(argWorld, argWorld);
        }
-       
-       /**
-        * takes the screen coordinates (argScreen) and returns
-        * the world coordinates
-        * @param argScreen
-        */
-       public Vec2 getScreenToWorld(Vec2 argScreen){
+
+       /** takes the screen coordinates (argScreen) and returns the world coordinates
+        * @param argScreen */
+       public Vec2 getScreenToWorld (Vec2 argScreen) {
                Vec2 world = new Vec2();
                viewportTransform.getScreenToWorld(argScreen, world);
                return world;
        }
-       
-       /**
-        * takes the screen coordinates and returns the
-        * world coordinates.
+
+       /** takes the screen coordinates and returns the world coordinates.
         * @param screenX
-        * @param screenY
-        */
-       public Vec2 getScreenToWorld(float screenX, float screenY){
+        * @param screenY */
+       public Vec2 getScreenToWorld (float screenX, float screenY) {
                Vec2 screen = new Vec2(screenX, screenY);
-               viewportTransform.getScreenToWorld( screen, screen);
+               viewportTransform.getScreenToWorld(screen, screen);
                return screen;
        }
 }
index 7fccfa9..76eb3c6 100644 (file)
 /**
  * Created at 4:23:30 AM Jul 15, 2010
  */
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.dynamics.Fixture;
 import org.jbox2d.dynamics.joints.Joint;
 
 // updated to rev 100
-/**
- * Joints and fixtures are destroyed when their associated
- * body is destroyed. Implement this listener so that you
- * may nullify references to these joints and shapes.
- * @author Daniel Murphy
- */
+/** Joints and fixtures are destroyed when their associated body is destroyed. Implement this listener so that you may nullify
+ * references to these joints and shapes.
+ * @author Daniel Murphy */
 public interface DestructionListener {
-       
-       /**
-        * Called when any joint is about to be destroyed due
-        * to the destruction of one of its attached bodies.
-        * @param joint
-        */
-       public void sayGoodbye(Joint joint);
-       
-       /**
-        * Called when any fixture is about to be destroyed due
-        * to the destruction of its parent body.
-        * @param fixture
-        */
-       public void sayGoodbye(Fixture fixture);
+
+       /** Called when any joint is about to be destroyed due to the destruction of one of its attached bodies.
+        * @param joint */
+       public void sayGoodbye (Joint joint);
+
+       /** Called when any fixture is about to be destroyed due to the destruction of its parent body.
+        * @param fixture */
+       public void sayGoodbye (Fixture fixture);
 }
index 6021ea9..da097f8 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.callbacks;
 
 // updated to rev 100
 public interface PairCallback {
-       public void addPair(Object userDataA, Object userDataB);
+       public void addPair (Object userDataA, Object userDataB);
 }
index 9313251..d8717be 100644 (file)
 /**
  * Created at 4:30:03 AM Jul 15, 2010
  */
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.dynamics.Fixture;
 
 // update to rev 100
-/**
- * Callback class for AABB queries.
- * See World.query
- * @author Daniel Murphy
- */
+/** Callback class for AABB queries. See World.query
+ * @author Daniel Murphy */
 public interface QueryCallback {
 
-       /**
-        * Called for each fixture found in the query AABB.
+       /** Called for each fixture found in the query AABB.
         * @param fixture
-        * @return false to terminate the query.
-        */
-       public boolean reportFixture(Fixture fixture);
+        * @return false to terminate the query. */
+       public boolean reportFixture (Fixture fixture);
 }
index 4e92fda..47ce1b5 100644 (file)
 /**
  * Created at 4:33:10 AM Jul 15, 2010
  */
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Fixture;
 
 // updated to rev 100;
-/**
- * Callback class for ray casts.
- * See World.rayCast
- * @author Daniel Murphy
- */
+/** Callback class for ray casts. See World.rayCast
+ * @author Daniel Murphy */
 public interface RayCastCallback {
 
-       /**
-        * Called for each fixture found in the query. You control how the ray cast
-        * proceeds by returning a float:
-        * return -1: ignore this fixture and continue
-        * return 0: terminate the ray cast
-        * return fraction: clip the ray to this point
-        * return 1: don't clip the ray and continue
+       /** Called for each fixture found in the query. You control how the ray cast proceeds by returning a float: return -1: ignore
+        * this fixture and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don't clip
+        * the ray and continue
         * @param fixture the fixture hit by the ray
         * @param point the point of initial intersection
         * @param normal the normal vector at the point of intersection
-        * @return -1 to filter, 0 to terminate, fraction to clip the ray for
-        * closest hit, 1 to continue
+        * @return -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue
         * @param fixture
         * @param point
         * @param normal
         * @param fraction
-        * @return
-        */
-       public float reportFixture(Fixture fixture, Vec2 point, Vec2 normal, float fraction);
+        * @return */
+       public float reportFixture (Fixture fixture, Vec2 point, Vec2 normal, float fraction);
 }
index a5d410a..13e19d9 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.collision.broadphase.DynamicTree;
-import org.jbox2d.collision.broadphase.TreeNode;
 
 // update to rev 100
-/**
- * callback for {@link DynamicTree}
- * @author Daniel Murphy
- *
- */
+/** callback for {@link DynamicTree}
+ * @author Daniel Murphy */
 public interface TreeCallback {
-       
-       /**
-        * Callback from a query request.  
+
+       /** Callback from a query request.
         * @param proxyId the id of the proxy
-        * @return if the query should be continued
-        */
-       public boolean treeCallback(int proxyId);
+        * @return if the query should be continued */
+       public boolean treeCallback (int proxyId);
 }
index 9bfd62e..48fb748 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.callbacks;
 
 import org.jbox2d.collision.RayCastInput;
 import org.jbox2d.collision.broadphase.DynamicTree;
-import org.jbox2d.collision.broadphase.TreeNode;
 
 // updated to rev 100
 
-/**
- * callback for {@link DynamicTree}
- * @author Daniel Murphy
- *
- */
+/** callback for {@link DynamicTree}
+ * @author Daniel Murphy */
 public interface TreeRayCastCallback {
-       /**
-        * 
-        * @param input
+       /** @param input
         * @param nodeId
-        * @return the fraction to the node
-        */
-       public float raycastCallback( RayCastInput input, int nodeId);
+        * @return the fraction to the node */
+       public float raycastCallback (RayCastInput input, int nodeId);
 }
index 39e8b6e..4939b5f 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.common.MathUtils;
@@ -31,296 +32,270 @@ import org.jbox2d.pooling.normal.DefaultWorldPool;
 
 /** An axis-aligned bounding box. */
 public class AABB {
-  /** Bottom left vertex of bounding box. */
-  public final Vec2 lowerBound;
-  /** Top right vertex of bounding box. */
-  public final Vec2 upperBound;
-
-  /**
-   * Creates the default object, with vertices at 0,0 and 0,0.
-   */
-  public AABB() {
-    lowerBound = new Vec2();
-    upperBound = new Vec2();
-  }
-
-  /**
-   * Copies from the given object
-   * 
-   * @param copy the object to copy from
-   */
-  public AABB(final AABB copy) {
-    this(copy.lowerBound, copy.upperBound);
-  }
-
-  /**
-   * Creates an AABB object using the given bounding vertices.
-   * 
-   * @param lowerVertex the bottom left vertex of the bounding box
-   * @param maxVertex the top right vertex of the bounding box
-   */
-  public AABB(final Vec2 lowerVertex, final Vec2 upperVertex) {
-    this.lowerBound = lowerVertex.clone(); // clone to be safe
-    this.upperBound = upperVertex.clone();
-  }
-
-  /**
-   * Sets this object from the given object
-   * 
-   * @param aabb the object to copy from
-   */
-  public final void set(final AABB aabb) {
-    Vec2 v = aabb.lowerBound;
-    lowerBound.x = v.x;
-    lowerBound.y = v.y;
-    Vec2 v1 = aabb.upperBound;
-    upperBound.x = v1.x;
-    upperBound.y = v1.y;
-  }
-
-  /** Verify that the bounds are sorted */
-  public final boolean isValid() {
-    final float dx = upperBound.x - lowerBound.x;
-    if (dx < 0f) {
-      return false;
-    }
-    final float dy = upperBound.y - lowerBound.y;
-    if (dy < 0) {
-      return false;
-    }
-    return lowerBound.isValid() && upperBound.isValid();
-  }
-
-  /**
-   * Get the center of the AABB
-   * 
-   * @return
-   */
-  public final Vec2 getCenter() {
-    final Vec2 center = new Vec2(lowerBound);
-    center.addLocal(upperBound);
-    center.mulLocal(.5f);
-    return center;
-  }
-
-  public final void getCenterToOut(final Vec2 out) {
-    out.x = (lowerBound.x + upperBound.x) * .5f;
-    out.y = (lowerBound.y + upperBound.y) * .5f;
-  }
-
-  /**
-   * Get the extents of the AABB (half-widths).
-   * 
-   * @return
-   */
-  public final Vec2 getExtents() {
-    final Vec2 center = new Vec2(upperBound);
-    center.subLocal(lowerBound);
-    center.mulLocal(.5f);
-    return center;
-  }
-
-  public final void getExtentsToOut(final Vec2 out) {
-    out.x = (upperBound.x - lowerBound.x) * .5f;
-    out.y = (upperBound.y - lowerBound.y) * .5f; // thanks FDN1
-  }
-
-  public final void getVertices(Vec2[] argRay) {
-    argRay[0].set(lowerBound);
-    argRay[1].set(lowerBound);
-    argRay[1].x += upperBound.x - lowerBound.x;
-    argRay[2].set(upperBound);
-    argRay[3].set(upperBound);
-    argRay[3].x -= upperBound.x - lowerBound.x;
-  }
-
-  /**
-   * Combine two AABBs into this one.
-   * 
-   * @param aabb1
-   * @param aab
-   */
-  public final void combine(final AABB aabb1, final AABB aab) {
-    lowerBound.x = aabb1.lowerBound.x < aab.lowerBound.x ? aabb1.lowerBound.x : aab.lowerBound.x;
-    lowerBound.y = aabb1.lowerBound.y < aab.lowerBound.y ? aabb1.lowerBound.y : aab.lowerBound.y;
-    upperBound.x = aabb1.upperBound.x > aab.upperBound.x ? aabb1.upperBound.x : aab.upperBound.x;
-    upperBound.y = aabb1.upperBound.y > aab.upperBound.y ? aabb1.upperBound.y : aab.upperBound.y;
-  }
-
-  /**
-   * Gets the perimeter length
-   * 
-   * @return
-   */
-  public final float getPerimeter() {
-    return 2.0f * (upperBound.x - lowerBound.x + upperBound.y - lowerBound.y);
-  }
-
-  /**
-   * Combines another aabb with this one
-   * 
-   * @param aabb
-   */
-  public final void combine(final AABB aabb) {
-    lowerBound.x = lowerBound.x < aabb.lowerBound.x ? lowerBound.x : aabb.lowerBound.x;
-    lowerBound.y = lowerBound.y < aabb.lowerBound.y ? lowerBound.y : aabb.lowerBound.y;
-    upperBound.x = upperBound.x > aabb.upperBound.x ? upperBound.x : aabb.upperBound.x;
-    upperBound.y = upperBound.y > aabb.upperBound.y ? upperBound.y : aabb.upperBound.y;
-  }
-
-  /**
-   * Does this aabb contain the provided AABB.
-   * 
-   * @return
-   */
-  public final boolean contains(final AABB aabb) {
-    /*
-     * boolean result = true; result = result && lowerBound.x <= aabb.lowerBound.x; result = result
-     * && lowerBound.y <= aabb.lowerBound.y; result = result && aabb.upperBound.x <= upperBound.x;
-     * result = result && aabb.upperBound.y <= upperBound.y; return result;
-     */
-    // djm: faster putting all of them together, as if one is false we leave the logic
-    // early
-    return lowerBound.x > aabb.lowerBound.x && lowerBound.y > aabb.lowerBound.y
-        && aabb.upperBound.x > upperBound.x && aabb.upperBound.y > upperBound.y;
-  }
-
-  /**
-   * @deprecated please use {@link #raycast(RayCastOutput, RayCastInput, IWorldPool)} for better
-   *             performance
-   * @param output
-   * @param input
-   * @return
-   */
-  public final boolean raycast(final RayCastOutput output, final RayCastInput input) {
-    return raycast(output, input, new DefaultWorldPool(4, 4));
-  }
-
-  /**
-   * From Real-time Collision Detection, p179.
-   * 
-   * @param output
-   * @param input
-   */
-  public final boolean raycast(final RayCastOutput output, final RayCastInput input,
-      IWorldPool argPool) {
-    float tmin = Float.MIN_VALUE;
-    float tmax = Float.MAX_VALUE;
-
-    final Vec2 p = argPool.popVec2();
-    final Vec2 d = argPool.popVec2();
-    final Vec2 absD = argPool.popVec2();
-    final Vec2 normal = argPool.popVec2();
-
-    p.set(input.p1);
-    d.set(input.p2).subLocal(input.p1);
-    Vec2.absToOut(d, absD);
-
-    // x then y
-    if (absD.x < Settings.EPSILON) {
-      // Parallel.
-      if (p.x < lowerBound.x || upperBound.x < p.x) {
-        argPool.pushVec2(4);
-        return false;
-      }
-    } else {
-      final float inv_d = 1.0f / d.x;
-      float t1 = (lowerBound.x - p.x) * inv_d;
-      float t2 = (upperBound.x - p.x) * inv_d;
-
-      // Sign of the normal vector.
-      float s = -1.0f;
-
-      if (t1 > t2) {
-        final float temp = t1;
-        t1 = t2;
-        t2 = temp;
-        s = 1.0f;
-      }
-
-      // Push the min up
-      if (t1 > tmin) {
-        normal.setZero();
-        normal.x = s;
-        tmin = t1;
-      }
-
-      // Pull the max down
-      tmax = MathUtils.min(tmax, t2);
-
-      if (tmin > tmax) {
-        argPool.pushVec2(4);
-        return false;
-      }
-    }
-
-    if (absD.y < Settings.EPSILON) {
-      // Parallel.
-      if (p.y < lowerBound.y || upperBound.y < p.y) {
-        argPool.pushVec2(4);
-        return false;
-      }
-    } else {
-      final float inv_d = 1.0f / d.y;
-      float t1 = (lowerBound.y - p.y) * inv_d;
-      float t2 = (upperBound.y - p.y) * inv_d;
-
-      // Sign of the normal vector.
-      float s = -1.0f;
-
-      if (t1 > t2) {
-        final float temp = t1;
-        t1 = t2;
-        t2 = temp;
-        s = 1.0f;
-      }
-
-      // Push the min up
-      if (t1 > tmin) {
-        normal.setZero();
-        normal.y = s;
-        tmin = t1;
-      }
-
-      // Pull the max down
-      tmax = MathUtils.min(tmax, t2);
-
-      if (tmin > tmax) {
-        argPool.pushVec2(4);
-        return false;
-      }
-    }
-
-    // Does the ray start inside the box?
-    // Does the ray intersect beyond the max fraction?
-    if (tmin < 0.0f || input.maxFraction < tmin) {
-      argPool.pushVec2(4);
-      return false;
-    }
-
-    // Intersection.
-    output.fraction = tmin;
-    output.normal.x = normal.x;
-    output.normal.y = normal.y;
-    argPool.pushVec2(4);
-    return true;
-  }
-
-  public static final boolean testOverlap(final AABB a, final AABB b) {
-    if (b.lowerBound.x - a.upperBound.x > 0.0f || b.lowerBound.y - a.upperBound.y > 0.0f) {
-      return false;
-    }
-
-    if (a.lowerBound.x - b.upperBound.x > 0.0f || a.lowerBound.y - b.upperBound.y > 0.0f) {
-      return false;
-    }
-
-    return true;
-  }
-
-  @Override
-  public final String toString() {
-    final String s = "AABB[" + lowerBound + " . " + upperBound + "]";
-    return s;
-  }
+       /** Bottom left vertex of bounding box. */
+       public final Vec2 lowerBound;
+       /** Top right vertex of bounding box. */
+       public final Vec2 upperBound;
+
+       /** Creates the default object, with vertices at 0,0 and 0,0. */
+       public AABB () {
+               lowerBound = new Vec2();
+               upperBound = new Vec2();
+       }
+
+       /** Copies from the given object
+        * 
+        * @param copy the object to copy from */
+       public AABB (final AABB copy) {
+               this(copy.lowerBound, copy.upperBound);
+       }
+
+       /** Creates an AABB object using the given bounding vertices.
+        * 
+        * @param lowerVertex the bottom left vertex of the bounding box
+        * @param maxVertex the top right vertex of the bounding box */
+       public AABB (final Vec2 lowerVertex, final Vec2 upperVertex) {
+               this.lowerBound = lowerVertex.clone(); // clone to be safe
+               this.upperBound = upperVertex.clone();
+       }
+
+       /** Sets this object from the given object
+        * 
+        * @param aabb the object to copy from */
+       public final void set (final AABB aabb) {
+               Vec2 v = aabb.lowerBound;
+               lowerBound.x = v.x;
+               lowerBound.y = v.y;
+               Vec2 v1 = aabb.upperBound;
+               upperBound.x = v1.x;
+               upperBound.y = v1.y;
+       }
+
+       /** Verify that the bounds are sorted */
+       public final boolean isValid () {
+               final float dx = upperBound.x - lowerBound.x;
+               if (dx < 0f) {
+                       return false;
+               }
+               final float dy = upperBound.y - lowerBound.y;
+               if (dy < 0) {
+                       return false;
+               }
+               return lowerBound.isValid() && upperBound.isValid();
+       }
+
+       /** Get the center of the AABB
+        * 
+        * @return */
+       public final Vec2 getCenter () {
+               final Vec2 center = new Vec2(lowerBound);
+               center.addLocal(upperBound);
+               center.mulLocal(.5f);
+               return center;
+       }
+
+       public final void getCenterToOut (final Vec2 out) {
+               out.x = (lowerBound.x + upperBound.x) * .5f;
+               out.y = (lowerBound.y + upperBound.y) * .5f;
+       }
+
+       /** Get the extents of the AABB (half-widths).
+        * 
+        * @return */
+       public final Vec2 getExtents () {
+               final Vec2 center = new Vec2(upperBound);
+               center.subLocal(lowerBound);
+               center.mulLocal(.5f);
+               return center;
+       }
+
+       public final void getExtentsToOut (final Vec2 out) {
+               out.x = (upperBound.x - lowerBound.x) * .5f;
+               out.y = (upperBound.y - lowerBound.y) * .5f; // thanks FDN1
+       }
+
+       public final void getVertices (Vec2[] argRay) {
+               argRay[0].set(lowerBound);
+               argRay[1].set(lowerBound);
+               argRay[1].x += upperBound.x - lowerBound.x;
+               argRay[2].set(upperBound);
+               argRay[3].set(upperBound);
+               argRay[3].x -= upperBound.x - lowerBound.x;
+       }
+
+       /** Combine two AABBs into this one.
+        * 
+        * @param aabb1
+        * @param aab */
+       public final void combine (final AABB aabb1, final AABB aab) {
+               lowerBound.x = aabb1.lowerBound.x < aab.lowerBound.x ? aabb1.lowerBound.x : aab.lowerBound.x;
+               lowerBound.y = aabb1.lowerBound.y < aab.lowerBound.y ? aabb1.lowerBound.y : aab.lowerBound.y;
+               upperBound.x = aabb1.upperBound.x > aab.upperBound.x ? aabb1.upperBound.x : aab.upperBound.x;
+               upperBound.y = aabb1.upperBound.y > aab.upperBound.y ? aabb1.upperBound.y : aab.upperBound.y;
+       }
+
+       /** Gets the perimeter length
+        * 
+        * @return */
+       public final float getPerimeter () {
+               return 2.0f * (upperBound.x - lowerBound.x + upperBound.y - lowerBound.y);
+       }
+
+       /** Combines another aabb with this one
+        * 
+        * @param aabb */
+       public final void combine (final AABB aabb) {
+               lowerBound.x = lowerBound.x < aabb.lowerBound.x ? lowerBound.x : aabb.lowerBound.x;
+               lowerBound.y = lowerBound.y < aabb.lowerBound.y ? lowerBound.y : aabb.lowerBound.y;
+               upperBound.x = upperBound.x > aabb.upperBound.x ? upperBound.x : aabb.upperBound.x;
+               upperBound.y = upperBound.y > aabb.upperBound.y ? upperBound.y : aabb.upperBound.y;
+       }
+
+       /** Does this aabb contain the provided AABB.
+        * 
+        * @return */
+       public final boolean contains (final AABB aabb) {
+               /*
+                * boolean result = true; result = result && lowerBound.x <= aabb.lowerBound.x; result = result && lowerBound.y <=
+                * aabb.lowerBound.y; result = result && aabb.upperBound.x <= upperBound.x; result = result && aabb.upperBound.y <=
+                * upperBound.y; return result;
+                */
+               // djm: faster putting all of them together, as if one is false we leave the logic
+               // early
+               return lowerBound.x > aabb.lowerBound.x && lowerBound.y > aabb.lowerBound.y && aabb.upperBound.x > upperBound.x
+                       && aabb.upperBound.y > upperBound.y;
+       }
+
+       /** @deprecated please use {@link #raycast(RayCastOutput, RayCastInput, IWorldPool)} for better performance
+        * @param output
+        * @param input
+        * @return */
+       public final boolean raycast (final RayCastOutput output, final RayCastInput input) {
+               return raycast(output, input, new DefaultWorldPool(4, 4));
+       }
+
+       /** From Real-time Collision Detection, p179.
+        * 
+        * @param output
+        * @param input */
+       public final boolean raycast (final RayCastOutput output, final RayCastInput input, IWorldPool argPool) {
+               float tmin = Float.MIN_VALUE;
+               float tmax = Float.MAX_VALUE;
+
+               final Vec2 p = argPool.popVec2();
+               final Vec2 d = argPool.popVec2();
+               final Vec2 absD = argPool.popVec2();
+               final Vec2 normal = argPool.popVec2();
+
+               p.set(input.p1);
+               d.set(input.p2).subLocal(input.p1);
+               Vec2.absToOut(d, absD);
+
+               // x then y
+               if (absD.x < Settings.EPSILON) {
+                       // Parallel.
+                       if (p.x < lowerBound.x || upperBound.x < p.x) {
+                               argPool.pushVec2(4);
+                               return false;
+                       }
+               } else {
+                       final float inv_d = 1.0f / d.x;
+                       float t1 = (lowerBound.x - p.x) * inv_d;
+                       float t2 = (upperBound.x - p.x) * inv_d;
+
+                       // Sign of the normal vector.
+                       float s = -1.0f;
+
+                       if (t1 > t2) {
+                               final float temp = t1;
+                               t1 = t2;
+                               t2 = temp;
+                               s = 1.0f;
+                       }
+
+                       // Push the min up
+                       if (t1 > tmin) {
+                               normal.setZero();
+                               normal.x = s;
+                               tmin = t1;
+                       }
+
+                       // Pull the max down
+                       tmax = MathUtils.min(tmax, t2);
+
+                       if (tmin > tmax) {
+                               argPool.pushVec2(4);
+                               return false;
+                       }
+               }
+
+               if (absD.y < Settings.EPSILON) {
+                       // Parallel.
+                       if (p.y < lowerBound.y || upperBound.y < p.y) {
+                               argPool.pushVec2(4);
+                               return false;
+                       }
+               } else {
+                       final float inv_d = 1.0f / d.y;
+                       float t1 = (lowerBound.y - p.y) * inv_d;
+                       float t2 = (upperBound.y - p.y) * inv_d;
+
+                       // Sign of the normal vector.
+                       float s = -1.0f;
+
+                       if (t1 > t2) {
+                               final float temp = t1;
+                               t1 = t2;
+                               t2 = temp;
+                               s = 1.0f;
+                       }
+
+                       // Push the min up
+                       if (t1 > tmin) {
+                               normal.setZero();
+                               normal.y = s;
+                               tmin = t1;
+                       }
+
+                       // Pull the max down
+                       tmax = MathUtils.min(tmax, t2);
+
+                       if (tmin > tmax) {
+                               argPool.pushVec2(4);
+                               return false;
+                       }
+               }
+
+               // Does the ray start inside the box?
+               // Does the ray intersect beyond the max fraction?
+               if (tmin < 0.0f || input.maxFraction < tmin) {
+                       argPool.pushVec2(4);
+                       return false;
+               }
+
+               // Intersection.
+               output.fraction = tmin;
+               output.normal.x = normal.x;
+               output.normal.y = normal.y;
+               argPool.pushVec2(4);
+               return true;
+       }
+
+       public static final boolean testOverlap (final AABB a, final AABB b) {
+               if (b.lowerBound.x - a.upperBound.x > 0.0f || b.lowerBound.y - a.upperBound.y > 0.0f) {
+                       return false;
+               }
+
+               if (a.lowerBound.x - b.upperBound.x > 0.0f || a.lowerBound.y - b.upperBound.y > 0.0f) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       @Override
+       public final String toString () {
+               final String s = "AABB[" + lowerBound + " . " + upperBound + "]";
+               return s;
+       }
 }
index 0f72db2..9fd4654 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.collision.Distance.SimplexCache;
@@ -29,1438 +30,1390 @@ import org.jbox2d.collision.shapes.CircleShape;
 import org.jbox2d.collision.shapes.EdgeShape;
 import org.jbox2d.collision.shapes.PolygonShape;
 import org.jbox2d.collision.shapes.Shape;
-import org.jbox2d.common.Rot;
 import org.jbox2d.common.MathUtils;
+import org.jbox2d.common.Rot;
 import org.jbox2d.common.Settings;
 import org.jbox2d.common.Transform;
 import org.jbox2d.common.Vec2;
 import org.jbox2d.pooling.IWorldPool;
 
-/**
- * Functions used for computing contact points, distance queries, and TOI queries. Collision methods
- * are non-static for pooling speed, retrieve a collision object from the {@link SingletonPool}.
- * Should not be finalructed.
+/** Functions used for computing contact points, distance queries, and TOI queries. Collision methods are non-static for pooling
+ * speed, retrieve a collision object from the {@link SingletonPool}. Should not be finalructed.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class Collision {
-  public static final int NULL_FEATURE = Integer.MAX_VALUE;
-
-  private final IWorldPool pool;
-
-  public Collision(IWorldPool argPool) {
-    incidentEdge[0] = new ClipVertex();
-    incidentEdge[1] = new ClipVertex();
-    clipPoints1[0] = new ClipVertex();
-    clipPoints1[1] = new ClipVertex();
-    clipPoints2[0] = new ClipVertex();
-    clipPoints2[1] = new ClipVertex();
-    pool = argPool;
-  }
-
-  private final DistanceInput input = new DistanceInput();
-  private final SimplexCache cache = new SimplexCache();
-  private final DistanceOutput output = new DistanceOutput();
-
-  /**
-   * Determine if two generic shapes overlap.
-   * 
-   * @param shapeA
-   * @param shapeB
-   * @param xfA
-   * @param xfB
-   * @return
-   */
-  public final boolean testOverlap(Shape shapeA, int indexA, Shape shapeB, int indexB,
-      Transform xfA, Transform xfB) {
-    input.proxyA.set(shapeA, indexA);
-    input.proxyB.set(shapeB, indexB);
-    input.transformA.set(xfA);
-    input.transformB.set(xfB);
-    input.useRadii = true;
-
-    cache.count = 0;
-
-    pool.getDistance().distance(output, cache, input);
-    // djm note: anything significant about 10.0f?
-    return output.distance < 10.0f * Settings.EPSILON;
-  }
-
-  /**
-   * Compute the point states given two manifolds. The states pertain to the transition from
-   * manifold1 to manifold2. So state1 is either persist or remove while state2 is either add or
-   * persist.
-   * 
-   * @param state1
-   * @param state2
-   * @param manifold1
-   * @param manifold2
-   */
-  public static final void getPointStates(final PointState[] state1, final PointState[] state2,
-      final Manifold manifold1, final Manifold manifold2) {
-
-    for (int i = 0; i < Settings.maxManifoldPoints; i++) {
-      state1[i] = PointState.NULL_STATE;
-      state2[i] = PointState.NULL_STATE;
-    }
-
-    // Detect persists and removes.
-    for (int i = 0; i < manifold1.pointCount; i++) {
-      ContactID id = manifold1.points[i].id;
-
-      state1[i] = PointState.REMOVE_STATE;
-
-      for (int j = 0; j < manifold2.pointCount; j++) {
-        if (manifold2.points[j].id.isEqual(id)) {
-          state1[i] = PointState.PERSIST_STATE;
-          break;
-        }
-      }
-    }
-
-    // Detect persists and adds
-    for (int i = 0; i < manifold2.pointCount; i++) {
-      ContactID id = manifold2.points[i].id;
-
-      state2[i] = PointState.ADD_STATE;
-
-      for (int j = 0; j < manifold1.pointCount; j++) {
-        if (manifold1.points[j].id.isEqual(id)) {
-          state2[i] = PointState.PERSIST_STATE;
-          break;
-        }
-      }
-    }
-  }
-
-  /**
-   * Clipping for contact manifolds. Sutherland-Hodgman clipping.
-   * 
-   * @param vOut
-   * @param vIn
-   * @param normal
-   * @param offset
-   * @return
-   */
-  public static final int clipSegmentToLine(final ClipVertex[] vOut, final ClipVertex[] vIn,
-      final Vec2 normal, float offset, int vertexIndexA) {
-
-    // Start with no output points
-    int numOut = 0;
-
-    // Calculate the distance of end points to the line
-    float distance0 = Vec2.dot(normal, vIn[0].v) - offset;
-    float distance1 = Vec2.dot(normal, vIn[1].v) - offset;
-
-    // If the points are behind the plane
-    if (distance0 <= 0.0f) {
-      vOut[numOut++].set(vIn[0]);
-    }
-    if (distance1 <= 0.0f) {
-      vOut[numOut++].set(vIn[1]);
-    }
-
-    // If the points are on different sides of the plane
-    if (distance0 * distance1 < 0.0f) {
-      // Find intersection point of edge and plane
-      float interp = distance0 / (distance0 - distance1);
-      // vOut[numOut].v = vIn[0].v + interp * (vIn[1].v - vIn[0].v);
-      vOut[numOut].v.set(vIn[1].v).subLocal(vIn[0].v).mulLocal(interp).addLocal(vIn[0].v);
-
-      // VertexA is hitting edgeB.
-      vOut[numOut].id.indexA = (byte) vertexIndexA;
-      vOut[numOut].id.indexB = vIn[0].id.indexB;
-      vOut[numOut].id.typeA = (byte) ContactID.Type.VERTEX.ordinal();
-      vOut[numOut].id.typeB = (byte) ContactID.Type.FACE.ordinal();
-      ++numOut;
-    }
-
-    return numOut;
-  }
-
-  // #### COLLISION STUFF (not from collision.h or collision.cpp) ####
-
-  // djm pooling
-  private static Vec2 pA = new Vec2();
-  private static Vec2 pB = new Vec2();
-  private static Vec2 d = new Vec2();
-
-  /**
-   * Compute the collision manifold between two circles.
-   * 
-   * @param manifold
-   * @param circle1
-   * @param xfA
-   * @param circle2
-   * @param xfB
-   */
-  public final void collideCircles(Manifold manifold, final CircleShape circle1,
-      final Transform xfA, final CircleShape circle2, final Transform xfB) {
-    manifold.pointCount = 0;
-
-    // before inline:
-    Transform.mulToOut(xfA, circle1.m_p, pA);
-    Transform.mulToOut(xfB, circle2.m_p, pB);
-    d.set(pB).subLocal(pA);
-    float distSqr = d.x * d.x + d.y * d.y;
-
-    // after inline:
-    // final Vec2 v = circle1.m_p;
-    // final float pAy = xfA.p.y + xfA.q.ex.y * v.x + xfA.q.ey.y * v.y;
-    // final float pAx = xfA.p.x + xfA.q.ex.x * v.x + xfA.q.ey.x * v.y;
-    //
-    // final Vec2 v1 = circle2.m_p;
-    // final float pBy = xfB.p.y + xfB.q.ex.y * v1.x + xfB.q.ey.y * v1.y;
-    // final float pBx = xfB.p.x + xfB.q.ex.x * v1.x + xfB.q.ey.x * v1.y;
-    //
-    // final float dx = pBx - pAx;
-    // final float dy = pBy - pAy;
-    //
-    // final float distSqr = dx * dx + dy * dy;
-    // end inline
-
-    final float radius = circle1.m_radius + circle2.m_radius;
-    if (distSqr > radius * radius) {
-      return;
-    }
-
-    manifold.type = ManifoldType.CIRCLES;
-    manifold.localPoint.set(circle1.m_p);
-    manifold.localNormal.setZero();
-    manifold.pointCount = 1;
-
-    manifold.points[0].localPoint.set(circle2.m_p);
-    manifold.points[0].id.zero();
-  }
-
-  // djm pooling, and from above
-  private static final Vec2 c = new Vec2();
-  private static final Vec2 cLocal = new Vec2();
-
-  /**
-   * Compute the collision manifold between a polygon and a circle.
-   * 
-   * @param manifold
-   * @param polygon
-   * @param xfA
-   * @param circle
-   * @param xfB
-   */
-  public final void collidePolygonAndCircle(Manifold manifold, final PolygonShape polygon,
-      final Transform xfA, final CircleShape circle, final Transform xfB) {
-    manifold.pointCount = 0;
-//    Vec2 v = circle.m_p;
-
-    // Compute circle position in the frame of the polygon.
-    // before inline:
-    Transform.mulToOut(xfB, circle.m_p, c);
-    Transform.mulTransToOut(xfA, c, cLocal);
-    final float cLocalx = cLocal.x;
-    final float cLocaly = cLocal.y;
-    // after inline:
-    // final float cy = xfB.p.y + xfB.q.ex.y * v.x + xfB.q.ey.y * v.y;
-    // final float cx = xfB.p.x + xfB.q.ex.x * v.x + xfB.q.ey.x * v.y;
-    // final float v1x = cx - xfA.p.x;
-    // final float v1y = cy - xfA.p.y;
-    // final Vec2 b = xfA.q.ex;
-    // final Vec2 b1 = xfA.q.ey;
-    // final float cLocaly = v1x * b1.x + v1y * b1.y;
-    // final float cLocalx = v1x * b.x + v1y * b.y;
-    // end inline
-
-    // Find the min separating edge.
-    int normalIndex = 0;
-    float separation = Float.MIN_VALUE;
-    final float radius = polygon.m_radius + circle.m_radius;
-    final int vertexCount = polygon.m_count;
-
-    final Vec2[] vertices = polygon.m_vertices;
-    final Vec2[] normals = polygon.m_normals;
-
-    for (int i = 0; i < vertexCount; i++) {
-      // before inline
-      // temp.set(cLocal).subLocal(vertices[i]);
-      // float s = Vec2.dot(normals[i], temp);
-      // after inline
-      final Vec2 vertex = vertices[i];
-      final float tempx = cLocalx - vertex.x;
-      final float tempy = cLocaly - vertex.y;
-      final Vec2 normal = normals[i];
-      final float s = normal.x * tempx + normal.y * tempy;
-
-
-      if (s > radius) {
-        // early out
-        return;
-      }
-
-      if (s > separation) {
-        separation = s;
-        normalIndex = i;
-      }
-    }
-
-    // Vertices that subtend the incident face.
-    final int vertIndex1 = normalIndex;
-    final int vertIndex2 = vertIndex1 + 1 < vertexCount ? vertIndex1 + 1 : 0;
-    final Vec2 v1 = vertices[vertIndex1];
-    final Vec2 v2 = vertices[vertIndex2];
-
-    // If the center is inside the polygon ...
-    if (separation < Settings.EPSILON) {
-      manifold.pointCount = 1;
-      manifold.type = ManifoldType.FACE_A;
-
-      // before inline:
-      // manifold.localNormal.set(normals[normalIndex]);
-      // manifold.localPoint.set(v1).addLocal(v2).mulLocal(.5f);
-      // manifold.points[0].localPoint.set(circle.m_p);
-      // after inline:
-      final Vec2 normal = normals[normalIndex];
-      manifold.localNormal.x = normal.x;
-      manifold.localNormal.y = normal.y;
-      manifold.localPoint.x = (v1.x + v2.x) * .5f;
-      manifold.localPoint.y = (v1.y + v2.y) * .5f;
-      final ManifoldPoint mpoint = manifold.points[0];
-      mpoint.localPoint.x = circle.m_p.x;
-      mpoint.localPoint.y = circle.m_p.y;
-      mpoint.id.zero();
-      // end inline
-      return;
-    }
-
-    // Compute barycentric coordinates
-    // before inline:
-    // temp.set(cLocal).subLocal(v1);
-    // temp2.set(v2).subLocal(v1);
-    // float u1 = Vec2.dot(temp, temp2);
-    // temp.set(cLocal).subLocal(v2);
-    // temp2.set(v1).subLocal(v2);
-    // float u2 = Vec2.dot(temp, temp2);
-    // after inline:
-    final float tempX = cLocalx - v1.x;
-    final float tempY = cLocaly - v1.y;
-    final float temp2X = v2.x - v1.x;
-    final float temp2Y = v2.y - v1.y;
-    final float u1 = tempX * temp2X + tempY * temp2Y;
-
-    final float temp3X = cLocalx - v2.x;
-    final float temp3Y = cLocaly - v2.y;
-    final float temp4X = v1.x - v2.x;
-    final float temp4Y = v1.y - v2.y;
-    final float u2 = temp3X * temp4X + temp3Y * temp4Y;
-    // end inline
-
-    if (u1 <= 0f) {
-      // inlined
-      final float dx = cLocalx - v1.x;
-      final float dy = cLocaly - v1.y;
-      if (dx * dx + dy * dy > radius * radius) {
-        return;
-      }
-
-      manifold.pointCount = 1;
-      manifold.type = ManifoldType.FACE_A;
-      // before inline:
-      // manifold.localNormal.set(cLocal).subLocal(v1);
-      // after inline:
-      manifold.localNormal.x = cLocalx - v1.x;
-      manifold.localNormal.y = cLocaly - v1.y;
-      // end inline
-      manifold.localNormal.normalize();
-      manifold.localPoint.set(v1);
-      manifold.points[0].localPoint.set(circle.m_p);
-      manifold.points[0].id.zero();
-    } else if (u2 <= 0.0f) {
-      // inlined
-      final float dx = cLocalx - v2.x;
-      final float dy = cLocaly - v2.y;
-      if (dx * dx + dy * dy > radius * radius) {
-        return;
-      }
-
-      manifold.pointCount = 1;
-      manifold.type = ManifoldType.FACE_A;
-      // before inline:
-      // manifold.localNormal.set(cLocal).subLocal(v2);
-      // after inline:
-      manifold.localNormal.x = cLocalx - v2.x;
-      manifold.localNormal.y = cLocaly - v2.y;
-      // end inline
-      manifold.localNormal.normalize();
-      manifold.localPoint.set(v2);
-      manifold.points[0].localPoint.set(circle.m_p);
-      manifold.points[0].id.zero();
-    } else {
-      // Vec2 faceCenter = 0.5f * (v1 + v2);
-      // (temp is faceCenter)
-      // before inline:
-      // temp.set(v1).addLocal(v2).mulLocal(.5f);
-      //
-      // temp2.set(cLocal).subLocal(temp);
-      // separation = Vec2.dot(temp2, normals[vertIndex1]);
-      // if (separation > radius) {
-      // return;
-      // }
-      // after inline:
-      final float fcx = (v1.x + v2.x) * .5f;
-      final float fcy = (v1.y + v2.y) * .5f;
-
-      final float tx = cLocalx - fcx;
-      final float ty = cLocaly - fcy;
-      final Vec2 normal = normals[vertIndex1];
-      separation = tx * normal.x + ty * normal.y;
-      if (separation > radius) {
-        return;
-      }
-      // end inline
-
-      manifold.pointCount = 1;
-      manifold.type = ManifoldType.FACE_A;
-      manifold.localNormal.set(normals[vertIndex1]);
-      manifold.localPoint.x = fcx; // (faceCenter)
-      manifold.localPoint.y = fcy;
-      manifold.points[0].localPoint.set(circle.m_p);
-      manifold.points[0].id.zero();
-    }
-  }
-
-  // djm pooling
-  private final Vec2 normal1 = new Vec2();
-  private final Vec2 normal1World = new Vec2();
-  private final Vec2 v1 = new Vec2();
-  private final Vec2 v2 = new Vec2();
-
-  /**
-   * Find the separation between poly1 and poly2 for a given edge normal on poly1.
-   * 
-   * @param poly1
-   * @param xf1
-   * @param edge1
-   * @param poly2
-   * @param xf2
-   */
-  public final float edgeSeparation(final PolygonShape poly1, final Transform xf1, final int edge1,
-      final PolygonShape poly2, final Transform xf2) {
-
-    final int count1 = poly1.m_count;
-    final Vec2[] vertices1 = poly1.m_vertices;
-    final Vec2[] normals1 = poly1.m_normals;
-
-    final int count2 = poly2.m_count;
-    final Vec2[] vertices2 = poly2.m_vertices;
-
-    assert (0 <= edge1 && edge1 < count1);
-    // Convert normal from poly1's frame into poly2's frame.
-    // before inline:
-    // Vec2 normal1World = Mul(xf1.R, normals1[edge1]);
-    Rot.mulToOutUnsafe(xf1.q, normals1[edge1], normal1World);
-    // Vec2 normal1 = MulT(xf2.R, normal1World);
-    Rot.mulTransUnsafe(xf2.q, normal1World, normal1);
-    final float normal1x = normal1.x;
-    final float normal1y = normal1.y;
-    final float normal1Worldx = normal1World.x;
-    final float normal1Worldy = normal1World.y;
-    // after inline:
-    // R.mulToOut(v,out);
-    // final Mat22 R = xf1.q;
-    // final Vec2 v = normals1[edge1];
-    // final float normal1Worldy = R.ex.y * v.x + R.ey.y * v.y;
-    // final float normal1Worldx = R.ex.x * v.x + R.ey.x * v.y;
-    // final Mat22 R1 = xf2.q;
-    // final float normal1x = normal1Worldx * R1.ex.x + normal1Worldy * R1.ex.y;
-    // final float normal1y = normal1Worldx * R1.ey.x + normal1Worldy * R1.ey.y;
-    // end inline
-
-    // Find support vertex on poly2 for -normal.
-    int index = 0;
-    float minDot = Float.MAX_VALUE;
-
-    for (int i = 0; i < count2; ++i) {
-      final Vec2 a = vertices2[i];
-      final float dot = a.x * normal1x + a.y * normal1y;
-      if (dot < minDot) {
-        minDot = dot;
-        index = i;
-      }
-    }
-
-    // Vec2 v1 = Mul(xf1, vertices1[edge1]);
-    // Vec2 v2 = Mul(xf2, vertices2[index]);
-    // before inline:
-    Transform.mulToOut(xf1, vertices1[edge1], v1);
-    Transform.mulToOut(xf2, vertices2[index], v2);
-
-    float separation = Vec2.dot(v2.subLocal(v1), normal1World);
-    return separation;
-
-    // after inline:
-    // final Vec2 v3 = vertices1[edge1];
-    // final float v1y = xf1.p.y + R.ex.y * v3.x + R.ey.y * v3.y;
-    // final float v1x = xf1.p.x + R.ex.x * v3.x + R.ey.x * v3.y;
-    // final Vec2 v4 = vertices2[index];
-    // final float v2y = xf2.p.y + R1.ex.y * v4.x + R1.ey.y * v4.y - v1y;
-    // final float v2x = xf2.p.x + R1.ex.x * v4.x + R1.ey.x * v4.y - v1x;
-    //
-    // return v2x * normal1Worldx + v2y * normal1Worldy;
-    // end inline
-  }
-
-  // djm pooling, and from above
-  private final Vec2 temp = new Vec2();
-  private final Vec2 dLocal1 = new Vec2();
-
-  /**
-   * Find the max separation between poly1 and poly2 using edge normals from poly1.
-   * 
-   * @param edgeIndex
-   * @param poly1
-   * @param xf1
-   * @param poly2
-   * @param xf2
-   * @return
-   */
-  public final void findMaxSeparation(EdgeResults results, final PolygonShape poly1,
-      final Transform xf1, final PolygonShape poly2, final Transform xf2) {
-    int count1 = poly1.m_count;
-    final Vec2[] normals1 = poly1.m_normals;
-//    Vec2 v = poly2.m_centroid;
-
-    // Vector pointing from the centroid of poly1 to the centroid of poly2.
-    // before inline:
-    Transform.mulToOutUnsafe(xf2, poly2.m_centroid, d);
-    Transform.mulToOutUnsafe(xf1, poly1.m_centroid, temp);
-    d.subLocal(temp);
-
-    Rot.mulTransUnsafe(xf1.q, d, dLocal1);
-    final float dLocal1x = dLocal1.x;
-    final float dLocal1y = dLocal1.y;
-    // after inline:
-    // final float predy = xf2.p.y + xf2.q.ex.y * v.x + xf2.q.ey.y * v.y;
-    // final float predx = xf2.p.x + xf2.q.ex.x * v.x + xf2.q.ey.x * v.y;
-    // final Vec2 v1 = poly1.m_centroid;
-    // final float tempy = xf1.p.y + xf1.q.ex.y * v1.x + xf1.q.ey.y * v1.y;
-    // final float tempx = xf1.p.x + xf1.q.ex.x * v1.x + xf1.q.ey.x * v1.y;
-    // final float dx = predx - tempx;
-    // final float dy = predy - tempy;
-    //
-    // final Mat22 R = xf1.q;
-    // final float dLocal1x = dx * R.ex.x + dy * R.ex.y;
-    // final float dLocal1y = dx * R.ey.x + dy * R.ey.y;
-    // end inline
-
-    // Find edge normal on poly1 that has the largest projection onto d.
-    int edge = 0;
-    float dot;
-    float maxDot = Float.MIN_VALUE;
-    for (int i = 0; i < count1; i++) {
-      final Vec2 normal = normals1[i];
-      dot = normal.x * dLocal1x + normal.y * dLocal1y;
-      if (dot > maxDot) {
-        maxDot = dot;
-        edge = i;
-      }
-    }
-
-    // Get the separation for the edge normal.
-    float s = edgeSeparation(poly1, xf1, edge, poly2, xf2);
-
-    // Check the separation for the previous edge normal.
-    int prevEdge = edge - 1 >= 0 ? edge - 1 : count1 - 1;
-    float sPrev = edgeSeparation(poly1, xf1, prevEdge, poly2, xf2);
-
-    // Check the separation for the next edge normal.
-    int nextEdge = edge + 1 < count1 ? edge + 1 : 0;
-    float sNext = edgeSeparation(poly1, xf1, nextEdge, poly2, xf2);
-
-    // Find the best edge and the search direction.
-    int bestEdge;
-    float bestSeparation;
-    int increment;
-    if (sPrev > s && sPrev > sNext) {
-      increment = -1;
-      bestEdge = prevEdge;
-      bestSeparation = sPrev;
-    } else if (sNext > s) {
-      increment = 1;
-      bestEdge = nextEdge;
-      bestSeparation = sNext;
-    } else {
-      results.edgeIndex = edge;
-      results.separation = s;
-      return;
-    }
-
-    // Perform a local search for the best edge normal.
-    for (;;) {
-      if (increment == -1) {
-        edge = bestEdge - 1 >= 0 ? bestEdge - 1 : count1 - 1;
-      } else {
-        edge = bestEdge + 1 < count1 ? bestEdge + 1 : 0;
-      }
-
-      s = edgeSeparation(poly1, xf1, edge, poly2, xf2);
-
-      if (s > bestSeparation) {
-        bestEdge = edge;
-        bestSeparation = s;
-      } else {
-        break;
-      }
-    }
-
-    results.edgeIndex = bestEdge;
-    results.separation = bestSeparation;
-  }
-
-  // djm pooling from above
-  public final void findIncidentEdge(final ClipVertex[] c, final PolygonShape poly1,
-      final Transform xf1, int edge1, final PolygonShape poly2, final Transform xf2) {
-    int count1 = poly1.m_count;
-    final Vec2[] normals1 = poly1.m_normals;
-
-    int count2 = poly2.m_count;
-    final Vec2[] vertices2 = poly2.m_vertices;
-    final Vec2[] normals2 = poly2.m_normals;
-
-    assert (0 <= edge1 && edge1 < count1);
-
-    // Get the normal of the reference edge in poly2's frame.
-    Rot.mulToOutUnsafe(xf1.q, normals1[edge1], normal1); // temporary
-    // Vec2 normal1 = MulT(xf2.R, Mul(xf1.R, normals1[edge1]));
-    Rot.mulTrans(xf2.q, normal1, normal1);
-
-    // Find the incident edge on poly2.
-    int index = 0;
-    float minDot = Float.MAX_VALUE;
-    for (int i = 0; i < count2; ++i) {
-      float dot = Vec2.dot(normal1, normals2[i]);
-      if (dot < minDot) {
-        minDot = dot;
-        index = i;
-      }
-    }
-
-    // Build the clip vertices for the incident edge.
-    int i1 = index;
-    int i2 = i1 + 1 < count2 ? i1 + 1 : 0;
-
-    Transform.mulToOutUnsafe(xf2, vertices2[i1], c[0].v); // = Mul(xf2, vertices2[i1]);
-    c[0].id.indexA = (byte) edge1;
-    c[0].id.indexB = (byte) i1;
-    c[0].id.typeA = (byte) ContactID.Type.FACE.ordinal();
-    c[0].id.typeB = (byte) ContactID.Type.VERTEX.ordinal();
-
-    Transform.mulToOutUnsafe(xf2, vertices2[i2], c[1].v); // = Mul(xf2, vertices2[i2]);
-    c[1].id.indexA = (byte) edge1;
-    c[1].id.indexB = (byte) i2;
-    c[1].id.typeA = (byte) ContactID.Type.FACE.ordinal();
-    c[1].id.typeB = (byte) ContactID.Type.VERTEX.ordinal();
-  }
-
-  private final EdgeResults results1 = new EdgeResults();
-  private final EdgeResults results2 = new EdgeResults();
-  private final ClipVertex[] incidentEdge = new ClipVertex[2];
-  private final Vec2 localTangent = new Vec2();
-  private final Vec2 localNormal = new Vec2();
-  private final Vec2 planePoint = new Vec2();
-  private final Vec2 tangent = new Vec2();
-  private final Vec2 normal = new Vec2();
-  private final Vec2 v11 = new Vec2();
-  private final Vec2 v12 = new Vec2();
-  private final ClipVertex[] clipPoints1 = new ClipVertex[2];
-  private final ClipVertex[] clipPoints2 = new ClipVertex[2];
-
-  /**
-   * Compute the collision manifold between two polygons.
-   * 
-   * @param manifold
-   * @param polygon1
-   * @param xf1
-   * @param polygon2
-   * @param xf2
-   */
-  public final void collidePolygons(Manifold manifold, final PolygonShape polyA,
-      final Transform xfA, final PolygonShape polyB, final Transform xfB) {
-    // Find edge normal of max separation on A - return if separating axis is found
-    // Find edge normal of max separation on B - return if separation axis is found
-    // Choose reference edge as min(minA, minB)
-    // Find incident edge
-    // Clip
-
-    // The normal points from 1 to 2
-
-    manifold.pointCount = 0;
-    float totalRadius = polyA.m_radius + polyB.m_radius;
-
-    findMaxSeparation(results1, polyA, xfA, polyB, xfB);
-    if (results1.separation > totalRadius) {
-      return;
-    }
-
-    findMaxSeparation(results2, polyB, xfB, polyA, xfA);
-    if (results2.separation > totalRadius) {
-      return;
-    }
-
-    final PolygonShape poly1; // reference polygon
-    final PolygonShape poly2; // incident polygon
-    Transform xf1, xf2;
-    int edge1; // reference edge
-    boolean flip;
-    final float k_relativeTol = 0.98f;
-    final float k_absoluteTol = 0.001f;
-
-    if (results2.separation > k_relativeTol * results1.separation + k_absoluteTol) {
-      poly1 = polyB;
-      poly2 = polyA;
-      xf1 = xfB;
-      xf2 = xfA;
-      edge1 = results2.edgeIndex;
-      manifold.type = ManifoldType.FACE_B;
-      flip = true;
-    } else {
-      poly1 = polyA;
-      poly2 = polyB;
-      xf1 = xfA;
-      xf2 = xfB;
-      edge1 = results1.edgeIndex;
-      manifold.type = ManifoldType.FACE_A;
-      flip = false;
-    }
-
-    findIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2);
-
-    int count1 = poly1.m_count;
-    final Vec2[] vertices1 = poly1.m_vertices;
-
-    final int iv1 = edge1;
-    final int iv2 = edge1 + 1 < count1 ? edge1 + 1 : 0;
-    v11.set(vertices1[iv1]);
-    v12.set(vertices1[iv2]);
-    localTangent.set(v12).subLocal(v11);
-    localTangent.normalize();
-
-    Vec2.crossToOutUnsafe(localTangent, 1f, localNormal); // Vec2 localNormal = Vec2.cross(dv,
-    // 1.0f);
-
-    planePoint.set(v11).addLocal(v12).mulLocal(.5f); // Vec2 planePoint = 0.5f * (v11
-    // + v12);
-
-    Rot.mulToOutUnsafe(xf1.q, localTangent, tangent); // Vec2 sideNormal = Mul(xf1.R, v12
-    // - v11);
-    Vec2.crossToOutUnsafe(tangent, 1f, normal); // Vec2 frontNormal = Vec2.cross(sideNormal,
-    // 1.0f);
-
-    Transform.mulToOut(xf1, v11, v11);
-    Transform.mulToOut(xf1, v12, v12);
-    // v11 = Mul(xf1, v11);
-    // v12 = Mul(xf1, v12);
-
-    // Face offset
-    float frontOffset = Vec2.dot(normal, v11);
-
-    // Side offsets, extended by polytope skin thickness.
-    float sideOffset1 = -Vec2.dot(tangent, v11) + totalRadius;
-    float sideOffset2 = Vec2.dot(tangent, v12) + totalRadius;
-
-    // Clip incident edge against extruded edge1 side edges.
-    // ClipVertex clipPoints1[2];
-    // ClipVertex clipPoints2[2];
-    int np;
-
-    // Clip to box side 1
-    // np = ClipSegmentToLine(clipPoints1, incidentEdge, -sideNormal, sideOffset1);
-    tangent.negateLocal();
-    np = clipSegmentToLine(clipPoints1, incidentEdge, tangent, sideOffset1, iv1);
-    tangent.negateLocal();
-
-    if (np < 2) {
-      return;
-    }
-
-    // Clip to negative box side 1
-    np = clipSegmentToLine(clipPoints2, clipPoints1, tangent, sideOffset2, iv2);
-
-    if (np < 2) {
-      return;
-    }
-
-    // Now clipPoints2 contains the clipped points.
-    manifold.localNormal.set(localNormal);
-    manifold.localPoint.set(planePoint);
-
-    int pointCount = 0;
-    for (int i = 0; i < Settings.maxManifoldPoints; ++i) {
-      float separation = Vec2.dot(normal, clipPoints2[i].v) - frontOffset;
-
-      if (separation <= totalRadius) {
-        ManifoldPoint cp = manifold.points[pointCount];
-        Transform.mulTransToOut(xf2, clipPoints2[i].v, cp.localPoint);
-        // cp.m_localPoint = MulT(xf2, clipPoints2[i].v);
-        cp.id.set(clipPoints2[i].id);
-        if (flip) {
-          // Swap features
-          cp.id.flip();
-        }
-        ++pointCount;
-      }
-    }
-
-    manifold.pointCount = pointCount;
-  }
-
-  private final Vec2 Q = new Vec2();
-  private final Vec2 e = new Vec2();
-  private final ContactID cf = new ContactID();
-  private final Vec2 e1 = new Vec2();
-  private final Vec2 P = new Vec2();
-  private final Vec2 n = new Vec2();
-
-  // Compute contact points for edge versus circle.
-  // This accounts for edge connectivity.
-  public void collideEdgeAndCircle(Manifold manifold, final EdgeShape edgeA, final Transform xfA,
-      final CircleShape circleB, final Transform xfB) {
-    manifold.pointCount = 0;
-
-
-    // Compute circle in frame of edge
-    // Vec2 Q = MulT(xfA, Mul(xfB, circleB.m_p));
-    Transform.mulToOutUnsafe(xfB, circleB.m_p, temp);
-    Transform.mulTransToOutUnsafe(xfA, temp, Q);
-
-    final Vec2 A = edgeA.m_vertex1;
-    final Vec2 B = edgeA.m_vertex2;
-    e.set(B).subLocal(A);
-
-    // Barycentric coordinates
-    float u = Vec2.dot(e, temp.set(B).subLocal(Q));
-    float v = Vec2.dot(e, temp.set(Q).subLocal(A));
-
-    float radius = edgeA.m_radius + circleB.m_radius;
-
-    // ContactFeature cf;
-    cf.indexB = 0;
-    cf.typeB = (byte) ContactID.Type.VERTEX.ordinal();
-
-    // Region A
-    if (v <= 0.0f) {
-      final Vec2 P = A;
-      d.set(Q).subLocal(P);
-      float dd = Vec2.dot(d, d);
-      if (dd > radius * radius) {
-        return;
-      }
-
-      // Is there an edge connected to A?
-      if (edgeA.m_hasVertex0) {
-        final Vec2 A1 = edgeA.m_vertex0;
-        final Vec2 B1 = A;
-        e1.set(B1).subLocal(A1);
-        float u1 = Vec2.dot(e1, temp.set(B1).subLocal(Q));
-
-        // Is the circle in Region AB of the previous edge?
-        if (u1 > 0.0f) {
-          return;
-        }
-      }
-
-      cf.indexA = 0;
-      cf.typeA = (byte) ContactID.Type.VERTEX.ordinal();
-      manifold.pointCount = 1;
-      manifold.type = Manifold.ManifoldType.CIRCLES;
-      manifold.localNormal.setZero();
-      manifold.localPoint.set(P);
-      // manifold.points[0].id.key = 0;
-      manifold.points[0].id.set(cf);
-      manifold.points[0].localPoint.set(circleB.m_p);
-      return;
-    }
-
-    // Region B
-    if (u <= 0.0f) {
-      Vec2 P = B;
-      d.set(Q).subLocal(P);
-      float dd = Vec2.dot(d, d);
-      if (dd > radius * radius) {
-        return;
-      }
-
-      // Is there an edge connected to B?
-      if (edgeA.m_hasVertex3) {
-        final Vec2 B2 = edgeA.m_vertex3;
-        final Vec2 A2 = B;
-        final Vec2 e2 = e1;
-        e2.set(B2).subLocal(A2);
-        float v2 = Vec2.dot(e2, temp.set(Q).subLocal(A2));
-
-        // Is the circle in Region AB of the next edge?
-        if (v2 > 0.0f) {
-          return;
-        }
-      }
-
-      cf.indexA = 1;
-      cf.typeA = (byte) ContactID.Type.VERTEX.ordinal();
-      manifold.pointCount = 1;
-      manifold.type = Manifold.ManifoldType.CIRCLES;
-      manifold.localNormal.setZero();
-      manifold.localPoint.set(P);
-      // manifold.points[0].id.key = 0;
-      manifold.points[0].id.set(cf);
-      manifold.points[0].localPoint.set(circleB.m_p);
-      return;
-    }
-
-    // Region AB
-    float den = Vec2.dot(e, e);
-    assert (den > 0.0f);
-
-    // Vec2 P = (1.0f / den) * (u * A + v * B);
-    P.set(A).mulLocal(u).addLocal(temp.set(B).mulLocal(v));
-    P.mulLocal(1.0f / den);
-    d.set(Q).subLocal(P);
-    float dd = Vec2.dot(d, d);
-    if (dd > radius * radius) {
-      return;
-    }
-
-    n.x = -e.y;
-    n.y = e.x;
-    if (Vec2.dot(n, temp.set(Q).subLocal(A)) < 0.0f) {
-      n.set(-n.x, -n.y);
-    }
-    n.normalize();
-
-    cf.indexA = 0;
-    cf.typeA = (byte) ContactID.Type.FACE.ordinal();
-    manifold.pointCount = 1;
-    manifold.type = Manifold.ManifoldType.FACE_A;
-    manifold.localNormal.set(n);
-    manifold.localPoint.set(A);
-    // manifold.points[0].id.key = 0;
-    manifold.points[0].id.set(cf);
-    manifold.points[0].localPoint.set(circleB.m_p);
-  }
-
-  private final EPCollider collider = new EPCollider();
-
-  public void collideEdgeAndPolygon(Manifold manifold, final EdgeShape edgeA, final Transform xfA,
-      final PolygonShape polygonB, final Transform xfB) {
-    collider.collide(manifold, edgeA, xfA, polygonB, xfB);
-  }
-
-
-
-  /**
-   * Java-specific class for returning edge results
-   */
-  private static class EdgeResults {
-    public float separation;
-    public int edgeIndex;
-  }
-
-  /**
-   * Used for computing contact manifolds.
-   */
-  public static class ClipVertex {
-    public final Vec2 v;
-    public final ContactID id;
-
-    public ClipVertex() {
-      v = new Vec2();
-      id = new ContactID();
-    }
-
-    public void set(final ClipVertex cv) {
-      v.set(cv.v);
-      id.set(cv.id);
-    }
-  }
-
-  /**
-   * This is used for determining the state of contact points.
-   * 
-   * @author Daniel Murphy
-   */
-  public static enum PointState {
-    /**
-     * point does not exist
-     */
-    NULL_STATE,
-    /**
-     * point was added in the update
-     */
-    ADD_STATE,
-    /**
-     * point persisted across the update
-     */
-    PERSIST_STATE,
-    /**
-     * point was removed in the update
-     */
-    REMOVE_STATE
-  }
-
-  /**
-   * This structure is used to keep track of the best separating axis.
-   */
-  static class EPAxis {
-    enum Type {
-      UNKNOWN, EDGE_A, EDGE_B
-    }
-
-    Type type;
-    int index;
-    float separation;
-  }
-
-  /**
-   * This holds polygon B expressed in frame A.
-   */
-  static class TempPolygon {
-    final Vec2[] vertices = new Vec2[Settings.maxPolygonVertices];
-    final Vec2[] normals = new Vec2[Settings.maxPolygonVertices];
-    int count;
-    
-    public TempPolygon() {
-      for(int i=0; i<vertices.length; i++) {
-        vertices[i] = new Vec2();
-        normals[i] = new Vec2();
-      }
-    }
-  }
-
-  /**
-   * Reference face used for clipping
-   */
-  static class ReferenceFace {
-    int i1, i2;
-    final Vec2 v1 = new Vec2();
-    final Vec2 v2 = new Vec2();
-    final Vec2 normal = new Vec2();
-
-    final Vec2 sideNormal1 = new Vec2();
-    float sideOffset1;
-
-    final Vec2 sideNormal2 = new Vec2();
-    float sideOffset2;
-  }
-
-  /**
-   * This class collides and edge and a polygon, taking into account edge adjacency.
-   */
-  static class EPCollider {
-    enum VertexType {
-      ISOLATED, CONCAVE, CONVEX
-    }
-
-    final TempPolygon m_polygonB = new TempPolygon();
-
-    final Transform m_xf = new Transform();
-    final Vec2 m_centroidB = new Vec2();
-    Vec2 m_v0 = new Vec2();
-    Vec2 m_v1 = new Vec2();
-    Vec2 m_v2 = new Vec2();
-    Vec2 m_v3 = new Vec2();
-    final Vec2 m_normal0 = new Vec2();
-    final Vec2 m_normal1 = new Vec2();
-    final Vec2 m_normal2 = new Vec2();
-    final Vec2 m_normal = new Vec2();
-
-    VertexType m_type1, m_type2;
-
-    final Vec2 m_lowerLimit = new Vec2();
-    final Vec2 m_upperLimit = new Vec2();
-    float m_radius;
-    boolean m_front;
-
-    public EPCollider() {
-      for(int i=0; i<2; i++) {
-        ie[i] = new ClipVertex();
-        clipPoints1[i] = new ClipVertex();
-        clipPoints2[i] = new ClipVertex();
-      }
-    }
-
-    private final Vec2 edge1 = new Vec2();
-    private final Vec2 temp = new Vec2();
-    private final Vec2 edge0 = new Vec2();
-    private final Vec2 edge2 = new Vec2();
-    private final ClipVertex[] ie = new ClipVertex[2];
-    private final ClipVertex[] clipPoints1 = new ClipVertex[2];
-    private final ClipVertex[] clipPoints2 = new ClipVertex[2];
-    private final ReferenceFace rf = new ReferenceFace();
-    private final EPAxis edgeAxis = new EPAxis();
-    private final EPAxis polygonAxis = new EPAxis();
-
-    public void collide(Manifold manifold, final EdgeShape edgeA, final Transform xfA,
-        final PolygonShape polygonB, final Transform xfB) {
-
-      Transform.mulTransToOutUnsafe(xfA, xfB, m_xf);
-      Transform.mulToOutUnsafe(m_xf, polygonB.m_centroid, m_centroidB);
-
-      m_v0 = edgeA.m_vertex0;
-      m_v1 = edgeA.m_vertex1;
-      m_v2 = edgeA.m_vertex2;
-      m_v3 = edgeA.m_vertex3;
-
-      boolean hasVertex0 = edgeA.m_hasVertex0;
-      boolean hasVertex3 = edgeA.m_hasVertex3;
-
-      edge1.set(m_v2).subLocal(m_v1);
-      edge1.normalize();
-      m_normal1.set(edge1.y, -edge1.x);
-      float offset1 = Vec2.dot(m_normal1, temp.set(m_centroidB).subLocal(m_v1));
-      float offset0 = 0.0f, offset2 = 0.0f;
-      boolean convex1 = false, convex2 = false;
-
-      // Is there a preceding edge?
-      if (hasVertex0) {
-        edge0.set(m_v1).subLocal(m_v0);
-        edge0.normalize();
-        m_normal0.set(edge0.y, -edge0.x);
-        convex1 = Vec2.cross(edge0, edge1) >= 0.0f;
-        offset0 = Vec2.dot(m_normal0, temp.set(m_centroidB).subLocal(m_v0));
-      }
-
-      // Is there a following edge?
-      if (hasVertex3) {
-        edge2.set(m_v3).subLocal(m_v2);
-        edge2.normalize();
-        m_normal2.set(edge2.y, -edge2.x);
-        convex2 = Vec2.cross(edge1, edge2) > 0.0f;
-        offset2 = Vec2.dot(m_normal2, temp.set(m_centroidB).subLocal(m_v2));
-      }
-
-      // Determine front or back collision. Determine collision normal limits.
-      if (hasVertex0 && hasVertex3) {
-        if (convex1 && convex2) {
-          m_front = offset0 >= 0.0f || offset1 >= 0.0f || offset2 >= 0.0f;
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal0);
-            m_upperLimit.set(m_normal2);
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal1).negateLocal();
-            m_upperLimit.set(m_normal1).negateLocal();
-          }
-        } else if (convex1) {
-          m_front = offset0 >= 0.0f || (offset1 >= 0.0f && offset2 >= 0.0f);
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal0);
-            m_upperLimit.set(m_normal1);
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal2).negateLocal();
-            m_upperLimit.set(m_normal1).negateLocal();
-          }
-        } else if (convex2) {
-          m_front = offset2 >= 0.0f || (offset0 >= 0.0f && offset1 >= 0.0f);
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal1);
-            m_upperLimit.set(m_normal2);
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal1).negateLocal();
-            m_upperLimit.set(m_normal0).negateLocal();
-          }
-        } else {
-          m_front = offset0 >= 0.0f && offset1 >= 0.0f && offset2 >= 0.0f;
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal1);
-            m_upperLimit.set(m_normal1);
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal2).negateLocal();
-            m_upperLimit.set(m_normal0).negateLocal();
-          }
-        }
-      } else if (hasVertex0) {
-        if (convex1) {
-          m_front = offset0 >= 0.0f || offset1 >= 0.0f;
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal0);
-            m_upperLimit.set(m_normal1).negateLocal();
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal1);
-            m_upperLimit.set(m_normal1).negateLocal();
-          }
-        } else {
-          m_front = offset0 >= 0.0f && offset1 >= 0.0f;
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal1);
-            m_upperLimit.set(m_normal1).negateLocal();
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal1);
-            m_upperLimit.set(m_normal0).negateLocal();
-          }
-        }
-      } else if (hasVertex3) {
-        if (convex2) {
-          m_front = offset1 >= 0.0f || offset2 >= 0.0f;
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal1).negateLocal();
-            m_upperLimit.set(m_normal2);
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal1).negateLocal();
-            m_upperLimit.set(m_normal1);
-          }
-        } else {
-          m_front = offset1 >= 0.0f && offset2 >= 0.0f;
-          if (m_front) {
-            m_normal.set(m_normal1);
-            m_lowerLimit.set(m_normal1).negateLocal();
-            m_upperLimit.set(m_normal1);
-          } else {
-            m_normal.set(m_normal1).negateLocal();
-            m_lowerLimit.set(m_normal2).negateLocal();
-            m_upperLimit.set(m_normal1);
-          }
-        }
-      } else {
-        m_front = offset1 >= 0.0f;
-        if (m_front) {
-          m_normal.set(m_normal1);
-          m_lowerLimit.set(m_normal1).negateLocal();
-          m_upperLimit.set(m_normal1).negateLocal();
-        } else {
-          m_normal.set(m_normal1).negateLocal();
-          m_lowerLimit.set(m_normal1);
-          m_upperLimit.set(m_normal1);
-        }
-      }
-
-      // Get polygonB in frameA
-      m_polygonB.count = polygonB.m_count;
-      for (int i = 0; i < polygonB.m_count; ++i) {
-        Transform.mulToOutUnsafe(m_xf, polygonB.m_vertices[i], m_polygonB.vertices[i]);
-        Rot.mulToOutUnsafe(m_xf.q, polygonB.m_normals[i], m_polygonB.normals[i]);
-      }
-
-      m_radius = 2.0f * Settings.polygonRadius;
-
-      manifold.pointCount = 0;
-
-      computeEdgeSeparation(edgeAxis);
-
-      // If no valid normal can be found than this edge should not collide.
-      if (edgeAxis.type == EPAxis.Type.UNKNOWN) {
-        return;
-      }
-
-      if (edgeAxis.separation > m_radius) {
-        return;
-      }
-
-      computePolygonSeparation(polygonAxis);
-      if (polygonAxis.type != EPAxis.Type.UNKNOWN && polygonAxis.separation > m_radius) {
-        return;
-      }
-
-      // Use hysteresis for jitter reduction.
-      final float k_relativeTol = 0.98f;
-      final float k_absoluteTol = 0.001f;
-
-      EPAxis primaryAxis;
-      if (polygonAxis.type == EPAxis.Type.UNKNOWN) {
-        primaryAxis = edgeAxis;
-      } else if (polygonAxis.separation > k_relativeTol * edgeAxis.separation + k_absoluteTol) {
-        primaryAxis = polygonAxis;
-      } else {
-        primaryAxis = edgeAxis;
-      }
-
-      // ClipVertex[] ie = new ClipVertex[2];
-      if (primaryAxis.type == EPAxis.Type.EDGE_A) {
-        manifold.type = Manifold.ManifoldType.FACE_A;
-
-        // Search for the polygon normal that is most anti-parallel to the edge normal.
-        int bestIndex = 0;
-        float bestValue = Vec2.dot(m_normal, m_polygonB.normals[0]);
-        for (int i = 1; i < m_polygonB.count; ++i) {
-          float value = Vec2.dot(m_normal, m_polygonB.normals[i]);
-          if (value < bestValue) {
-            bestValue = value;
-            bestIndex = i;
-          }
-        }
-
-        int i1 = bestIndex;
-        int i2 = i1 + 1 < m_polygonB.count ? i1 + 1 : 0;
-
-        ie[0].v.set(m_polygonB.vertices[i1]);
-        ie[0].id.indexA = 0;
-        ie[0].id.indexB = (byte) i1;
-        ie[0].id.typeA = (byte) ContactID.Type.FACE.ordinal();
-        ie[0].id.typeB = (byte) ContactID.Type.VERTEX.ordinal();
-
-        ie[1].v.set(m_polygonB.vertices[i2]);
-        ie[1].id.indexA = 0;
-        ie[1].id.indexB = (byte) i2;
-        ie[1].id.typeA = (byte) ContactID.Type.FACE.ordinal();
-        ie[1].id.typeB = (byte) ContactID.Type.VERTEX.ordinal();
-
-        if (m_front) {
-          rf.i1 = 0;
-          rf.i2 = 1;
-          rf.v1.set(m_v1);
-          rf.v2.set(m_v2);
-          rf.normal.set(m_normal1);
-        } else {
-          rf.i1 = 1;
-          rf.i2 = 0;
-          rf.v1.set(m_v2);
-          rf.v2.set(m_v1);
-          rf.normal.set(m_normal1).negateLocal();
-        }
-      } else {
-        manifold.type = Manifold.ManifoldType.FACE_B;
-
-        ie[0].v.set(m_v1);
-        ie[0].id.indexA = 0;
-        ie[0].id.indexB = (byte) primaryAxis.index;
-        ie[0].id.typeA = (byte) ContactID.Type.VERTEX.ordinal();
-        ie[0].id.typeB = (byte) ContactID.Type.FACE.ordinal();
-
-        ie[1].v.set(m_v2);
-        ie[1].id.indexA = 0;
-        ie[1].id.indexB = (byte) primaryAxis.index;
-        ie[1].id.typeA = (byte) ContactID.Type.VERTEX.ordinal();
-        ie[1].id.typeB = (byte) ContactID.Type.FACE.ordinal();
-
-        rf.i1 = primaryAxis.index;
-        rf.i2 = rf.i1 + 1 < m_polygonB.count ? rf.i1 + 1 : 0;
-        rf.v1.set(m_polygonB.vertices[rf.i1]);
-        rf.v2.set(m_polygonB.vertices[rf.i2]);
-        rf.normal.set(m_polygonB.normals[rf.i1]);
-      }
-
-      rf.sideNormal1.set(rf.normal.y, -rf.normal.x);
-      rf.sideNormal2.set(rf.sideNormal1).negateLocal();
-      rf.sideOffset1 = Vec2.dot(rf.sideNormal1, rf.v1);
-      rf.sideOffset2 = Vec2.dot(rf.sideNormal2, rf.v2);
-
-      // Clip incident edge against extruded edge1 side edges.
-      int np;
-
-      // Clip to box side 1
-      np = clipSegmentToLine(clipPoints1, ie, rf.sideNormal1, rf.sideOffset1, rf.i1);
-
-      if (np < Settings.maxManifoldPoints) {
-        return;
-      }
-
-      // Clip to negative box side 1
-      np = clipSegmentToLine(clipPoints2, clipPoints1, rf.sideNormal2, rf.sideOffset2, rf.i2);
-
-      if (np < Settings.maxManifoldPoints) {
-        return;
-      }
-
-      // Now clipPoints2 contains the clipped points.
-      if (primaryAxis.type == EPAxis.Type.EDGE_A) {
-        manifold.localNormal.set(rf.normal);
-        manifold.localPoint.set(rf.v1);
-      } else {
-        manifold.localNormal.set(polygonB.m_normals[rf.i1]);
-        manifold.localPoint.set(polygonB.m_vertices[rf.i1]);
-      }
-
-      int pointCount = 0;
-      for (int i = 0; i < Settings.maxManifoldPoints; ++i) {
-        float separation;
-
-        separation = Vec2.dot(rf.normal, temp.set(clipPoints2[i].v).subLocal(rf.v1));
-
-        if (separation <= m_radius) {
-          ManifoldPoint cp = manifold.points[pointCount];
-
-          if (primaryAxis.type == EPAxis.Type.EDGE_A) {
-            // cp.localPoint = MulT(m_xf, clipPoints2[i].v);
-            Transform.mulTransToOutUnsafe(m_xf, clipPoints2[i].v, cp.localPoint);
-            cp.id.set(clipPoints2[i].id);
-          } else {
-            cp.localPoint.set(clipPoints2[i].v);
-            cp.id.typeA = clipPoints2[i].id.typeB;
-            cp.id.typeB = clipPoints2[i].id.typeA;
-            cp.id.indexA = clipPoints2[i].id.indexB;
-            cp.id.indexB = clipPoints2[i].id.indexA;
-          }
-
-          ++pointCount;
-        }
-      }
-
-      manifold.pointCount = pointCount;
-    }
-
-
-    public void computeEdgeSeparation(EPAxis axis) {
-      axis.type = EPAxis.Type.EDGE_A;
-      axis.index = m_front ? 0 : 1;
-      axis.separation = Float.MAX_VALUE;
-
-      for (int i = 0; i < m_polygonB.count; ++i) {
-        float s = Vec2.dot(m_normal, temp.set(m_polygonB.vertices[i]).subLocal(m_v1));
-        if (s < axis.separation) {
-          axis.separation = s;
-        }
-      }
-    }
-
-    private final Vec2 perp = new Vec2();
-    private final Vec2 n = new Vec2();
-
-    public void computePolygonSeparation(EPAxis axis) {
-      axis.type = EPAxis.Type.UNKNOWN;
-      axis.index = -1;
-      axis.separation = Float.MIN_VALUE;
-
-      perp.set(-m_normal.y, m_normal.x);
-
-      for (int i = 0; i < m_polygonB.count; ++i) {
-        n.set(m_polygonB.normals[i]).negateLocal();
-
-        float s1 = Vec2.dot(n, temp.set(m_polygonB.vertices[i]).subLocal(m_v1));
-        float s2 = Vec2.dot(n, temp.set(m_polygonB.vertices[i]).subLocal(m_v2));
-        float s = MathUtils.min(s1, s2);
-
-        if (s > m_radius) {
-          // No collision
-          axis.type = EPAxis.Type.EDGE_B;
-          axis.index = i;
-          axis.separation = s;
-          return;
-        }
-
-        // Adjacency
-        if (Vec2.dot(n, perp) >= 0.0f) {
-          if (Vec2.dot(temp.set(n).subLocal(m_upperLimit), m_normal) < -Settings.angularSlop) {
-            continue;
-          }
-        } else {
-          if (Vec2.dot(temp.set(n).subLocal(m_lowerLimit), m_normal) < -Settings.angularSlop) {
-            continue;
-          }
-        }
-
-        if (s > axis.separation) {
-          axis.type = EPAxis.Type.EDGE_B;
-          axis.index = i;
-          axis.separation = s;
-        }
-      }
-    }
-  }
+       public static final int NULL_FEATURE = Integer.MAX_VALUE;
+
+       private final IWorldPool pool;
+
+       public Collision (IWorldPool argPool) {
+               incidentEdge[0] = new ClipVertex();
+               incidentEdge[1] = new ClipVertex();
+               clipPoints1[0] = new ClipVertex();
+               clipPoints1[1] = new ClipVertex();
+               clipPoints2[0] = new ClipVertex();
+               clipPoints2[1] = new ClipVertex();
+               pool = argPool;
+       }
+
+       private final DistanceInput input = new DistanceInput();
+       private final SimplexCache cache = new SimplexCache();
+       private final DistanceOutput output = new DistanceOutput();
+
+       /** Determine if two generic shapes overlap.
+        * 
+        * @param shapeA
+        * @param shapeB
+        * @param xfA
+        * @param xfB
+        * @return */
+       public final boolean testOverlap (Shape shapeA, int indexA, Shape shapeB, int indexB, Transform xfA, Transform xfB) {
+               input.proxyA.set(shapeA, indexA);
+               input.proxyB.set(shapeB, indexB);
+               input.transformA.set(xfA);
+               input.transformB.set(xfB);
+               input.useRadii = true;
+
+               cache.count = 0;
+
+               pool.getDistance().distance(output, cache, input);
+               // djm note: anything significant about 10.0f?
+               return output.distance < 10.0f * Settings.EPSILON;
+       }
+
+       /** Compute the point states given two manifolds. The states pertain to the transition from manifold1 to manifold2. So state1 is
+        * either persist or remove while state2 is either add or persist.
+        * 
+        * @param state1
+        * @param state2
+        * @param manifold1
+        * @param manifold2 */
+       public static final void getPointStates (final PointState[] state1, final PointState[] state2, final Manifold manifold1,
+               final Manifold manifold2) {
+
+               for (int i = 0; i < Settings.maxManifoldPoints; i++) {
+                       state1[i] = PointState.NULL_STATE;
+                       state2[i] = PointState.NULL_STATE;
+               }
+
+               // Detect persists and removes.
+               for (int i = 0; i < manifold1.pointCount; i++) {
+                       ContactID id = manifold1.points[i].id;
+
+                       state1[i] = PointState.REMOVE_STATE;
+
+                       for (int j = 0; j < manifold2.pointCount; j++) {
+                               if (manifold2.points[j].id.isEqual(id)) {
+                                       state1[i] = PointState.PERSIST_STATE;
+                                       break;
+                               }
+                       }
+               }
+
+               // Detect persists and adds
+               for (int i = 0; i < manifold2.pointCount; i++) {
+                       ContactID id = manifold2.points[i].id;
+
+                       state2[i] = PointState.ADD_STATE;
+
+                       for (int j = 0; j < manifold1.pointCount; j++) {
+                               if (manifold1.points[j].id.isEqual(id)) {
+                                       state2[i] = PointState.PERSIST_STATE;
+                                       break;
+                               }
+                       }
+               }
+       }
+
+       /** Clipping for contact manifolds. Sutherland-Hodgman clipping.
+        * 
+        * @param vOut
+        * @param vIn
+        * @param normal
+        * @param offset
+        * @return */
+       public static final int clipSegmentToLine (final ClipVertex[] vOut, final ClipVertex[] vIn, final Vec2 normal, float offset,
+               int vertexIndexA) {
+
+               // Start with no output points
+               int numOut = 0;
+
+               // Calculate the distance of end points to the line
+               float distance0 = Vec2.dot(normal, vIn[0].v) - offset;
+               float distance1 = Vec2.dot(normal, vIn[1].v) - offset;
+
+               // If the points are behind the plane
+               if (distance0 <= 0.0f) {
+                       vOut[numOut++].set(vIn[0]);
+               }
+               if (distance1 <= 0.0f) {
+                       vOut[numOut++].set(vIn[1]);
+               }
+
+               // If the points are on different sides of the plane
+               if (distance0 * distance1 < 0.0f) {
+                       // Find intersection point of edge and plane
+                       float interp = distance0 / (distance0 - distance1);
+                       // vOut[numOut].v = vIn[0].v + interp * (vIn[1].v - vIn[0].v);
+                       vOut[numOut].v.set(vIn[1].v).subLocal(vIn[0].v).mulLocal(interp).addLocal(vIn[0].v);
+
+                       // VertexA is hitting edgeB.
+                       vOut[numOut].id.indexA = (byte)vertexIndexA;
+                       vOut[numOut].id.indexB = vIn[0].id.indexB;
+                       vOut[numOut].id.typeA = (byte)ContactID.Type.VERTEX.ordinal();
+                       vOut[numOut].id.typeB = (byte)ContactID.Type.FACE.ordinal();
+                       ++numOut;
+               }
+
+               return numOut;
+       }
+
+       // #### COLLISION STUFF (not from collision.h or collision.cpp) ####
+
+       // djm pooling
+       private static Vec2 pA = new Vec2();
+       private static Vec2 pB = new Vec2();
+       private static Vec2 d = new Vec2();
+
+       /** Compute the collision manifold between two circles.
+        * 
+        * @param manifold
+        * @param circle1
+        * @param xfA
+        * @param circle2
+        * @param xfB */
+       public final void collideCircles (Manifold manifold, final CircleShape circle1, final Transform xfA,
+               final CircleShape circle2, final Transform xfB) {
+               manifold.pointCount = 0;
+
+               // before inline:
+               Transform.mulToOut(xfA, circle1.m_p, pA);
+               Transform.mulToOut(xfB, circle2.m_p, pB);
+               d.set(pB).subLocal(pA);
+               float distSqr = d.x * d.x + d.y * d.y;
+
+               // after inline:
+               // final Vec2 v = circle1.m_p;
+               // final float pAy = xfA.p.y + xfA.q.ex.y * v.x + xfA.q.ey.y * v.y;
+               // final float pAx = xfA.p.x + xfA.q.ex.x * v.x + xfA.q.ey.x * v.y;
+               //
+               // final Vec2 v1 = circle2.m_p;
+               // final float pBy = xfB.p.y + xfB.q.ex.y * v1.x + xfB.q.ey.y * v1.y;
+               // final float pBx = xfB.p.x + xfB.q.ex.x * v1.x + xfB.q.ey.x * v1.y;
+               //
+               // final float dx = pBx - pAx;
+               // final float dy = pBy - pAy;
+               //
+               // final float distSqr = dx * dx + dy * dy;
+               // end inline
+
+               final float radius = circle1.m_radius + circle2.m_radius;
+               if (distSqr > radius * radius) {
+                       return;
+               }
+
+               manifold.type = ManifoldType.CIRCLES;
+               manifold.localPoint.set(circle1.m_p);
+               manifold.localNormal.setZero();
+               manifold.pointCount = 1;
+
+               manifold.points[0].localPoint.set(circle2.m_p);
+               manifold.points[0].id.zero();
+       }
+
+       // djm pooling, and from above
+       private static final Vec2 c = new Vec2();
+       private static final Vec2 cLocal = new Vec2();
+
+       /** Compute the collision manifold between a polygon and a circle.
+        * 
+        * @param manifold
+        * @param polygon
+        * @param xfA
+        * @param circle
+        * @param xfB */
+       public final void collidePolygonAndCircle (Manifold manifold, final PolygonShape polygon, final Transform xfA,
+               final CircleShape circle, final Transform xfB) {
+               manifold.pointCount = 0;
+// Vec2 v = circle.m_p;
+
+               // Compute circle position in the frame of the polygon.
+               // before inline:
+               Transform.mulToOut(xfB, circle.m_p, c);
+               Transform.mulTransToOut(xfA, c, cLocal);
+               final float cLocalx = cLocal.x;
+               final float cLocaly = cLocal.y;
+               // after inline:
+               // final float cy = xfB.p.y + xfB.q.ex.y * v.x + xfB.q.ey.y * v.y;
+               // final float cx = xfB.p.x + xfB.q.ex.x * v.x + xfB.q.ey.x * v.y;
+               // final float v1x = cx - xfA.p.x;
+               // final float v1y = cy - xfA.p.y;
+               // final Vec2 b = xfA.q.ex;
+               // final Vec2 b1 = xfA.q.ey;
+               // final float cLocaly = v1x * b1.x + v1y * b1.y;
+               // final float cLocalx = v1x * b.x + v1y * b.y;
+               // end inline
+
+               // Find the min separating edge.
+               int normalIndex = 0;
+               float separation = Float.MIN_VALUE;
+               final float radius = polygon.m_radius + circle.m_radius;
+               final int vertexCount = polygon.m_count;
+
+               final Vec2[] vertices = polygon.m_vertices;
+               final Vec2[] normals = polygon.m_normals;
+
+               for (int i = 0; i < vertexCount; i++) {
+                       // before inline
+                       // temp.set(cLocal).subLocal(vertices[i]);
+                       // float s = Vec2.dot(normals[i], temp);
+                       // after inline
+                       final Vec2 vertex = vertices[i];
+                       final float tempx = cLocalx - vertex.x;
+                       final float tempy = cLocaly - vertex.y;
+                       final Vec2 normal = normals[i];
+                       final float s = normal.x * tempx + normal.y * tempy;
+
+                       if (s > radius) {
+                               // early out
+                               return;
+                       }
+
+                       if (s > separation) {
+                               separation = s;
+                               normalIndex = i;
+                       }
+               }
+
+               // Vertices that subtend the incident face.
+               final int vertIndex1 = normalIndex;
+               final int vertIndex2 = vertIndex1 + 1 < vertexCount ? vertIndex1 + 1 : 0;
+               final Vec2 v1 = vertices[vertIndex1];
+               final Vec2 v2 = vertices[vertIndex2];
+
+               // If the center is inside the polygon ...
+               if (separation < Settings.EPSILON) {
+                       manifold.pointCount = 1;
+                       manifold.type = ManifoldType.FACE_A;
+
+                       // before inline:
+                       // manifold.localNormal.set(normals[normalIndex]);
+                       // manifold.localPoint.set(v1).addLocal(v2).mulLocal(.5f);
+                       // manifold.points[0].localPoint.set(circle.m_p);
+                       // after inline:
+                       final Vec2 normal = normals[normalIndex];
+                       manifold.localNormal.x = normal.x;
+                       manifold.localNormal.y = normal.y;
+                       manifold.localPoint.x = (v1.x + v2.x) * .5f;
+                       manifold.localPoint.y = (v1.y + v2.y) * .5f;
+                       final ManifoldPoint mpoint = manifold.points[0];
+                       mpoint.localPoint.x = circle.m_p.x;
+                       mpoint.localPoint.y = circle.m_p.y;
+                       mpoint.id.zero();
+                       // end inline
+                       return;
+               }
+
+               // Compute barycentric coordinates
+               // before inline:
+               // temp.set(cLocal).subLocal(v1);
+               // temp2.set(v2).subLocal(v1);
+               // float u1 = Vec2.dot(temp, temp2);
+               // temp.set(cLocal).subLocal(v2);
+               // temp2.set(v1).subLocal(v2);
+               // float u2 = Vec2.dot(temp, temp2);
+               // after inline:
+               final float tempX = cLocalx - v1.x;
+               final float tempY = cLocaly - v1.y;
+               final float temp2X = v2.x - v1.x;
+               final float temp2Y = v2.y - v1.y;
+               final float u1 = tempX * temp2X + tempY * temp2Y;
+
+               final float temp3X = cLocalx - v2.x;
+               final float temp3Y = cLocaly - v2.y;
+               final float temp4X = v1.x - v2.x;
+               final float temp4Y = v1.y - v2.y;
+               final float u2 = temp3X * temp4X + temp3Y * temp4Y;
+               // end inline
+
+               if (u1 <= 0f) {
+                       // inlined
+                       final float dx = cLocalx - v1.x;
+                       final float dy = cLocaly - v1.y;
+                       if (dx * dx + dy * dy > radius * radius) {
+                               return;
+                       }
+
+                       manifold.pointCount = 1;
+                       manifold.type = ManifoldType.FACE_A;
+                       // before inline:
+                       // manifold.localNormal.set(cLocal).subLocal(v1);
+                       // after inline:
+                       manifold.localNormal.x = cLocalx - v1.x;
+                       manifold.localNormal.y = cLocaly - v1.y;
+                       // end inline
+                       manifold.localNormal.normalize();
+                       manifold.localPoint.set(v1);
+                       manifold.points[0].localPoint.set(circle.m_p);
+                       manifold.points[0].id.zero();
+               } else if (u2 <= 0.0f) {
+                       // inlined
+                       final float dx = cLocalx - v2.x;
+                       final float dy = cLocaly - v2.y;
+                       if (dx * dx + dy * dy > radius * radius) {
+                               return;
+                       }
+
+                       manifold.pointCount = 1;
+                       manifold.type = ManifoldType.FACE_A;
+                       // before inline:
+                       // manifold.localNormal.set(cLocal).subLocal(v2);
+                       // after inline:
+                       manifold.localNormal.x = cLocalx - v2.x;
+                       manifold.localNormal.y = cLocaly - v2.y;
+                       // end inline
+                       manifold.localNormal.normalize();
+                       manifold.localPoint.set(v2);
+                       manifold.points[0].localPoint.set(circle.m_p);
+                       manifold.points[0].id.zero();
+               } else {
+                       // Vec2 faceCenter = 0.5f * (v1 + v2);
+                       // (temp is faceCenter)
+                       // before inline:
+                       // temp.set(v1).addLocal(v2).mulLocal(.5f);
+                       //
+                       // temp2.set(cLocal).subLocal(temp);
+                       // separation = Vec2.dot(temp2, normals[vertIndex1]);
+                       // if (separation > radius) {
+                       // return;
+                       // }
+                       // after inline:
+                       final float fcx = (v1.x + v2.x) * .5f;
+                       final float fcy = (v1.y + v2.y) * .5f;
+
+                       final float tx = cLocalx - fcx;
+                       final float ty = cLocaly - fcy;
+                       final Vec2 normal = normals[vertIndex1];
+                       separation = tx * normal.x + ty * normal.y;
+                       if (separation > radius) {
+                               return;
+                       }
+                       // end inline
+
+                       manifold.pointCount = 1;
+                       manifold.type = ManifoldType.FACE_A;
+                       manifold.localNormal.set(normals[vertIndex1]);
+                       manifold.localPoint.x = fcx; // (faceCenter)
+                       manifold.localPoint.y = fcy;
+                       manifold.points[0].localPoint.set(circle.m_p);
+                       manifold.points[0].id.zero();
+               }
+       }
+
+       // djm pooling
+       private final Vec2 normal1 = new Vec2();
+       private final Vec2 normal1World = new Vec2();
+       private final Vec2 v1 = new Vec2();
+       private final Vec2 v2 = new Vec2();
+
+       /** Find the separation between poly1 and poly2 for a given edge normal on poly1.
+        * 
+        * @param poly1
+        * @param xf1
+        * @param edge1
+        * @param poly2
+        * @param xf2 */
+       public final float edgeSeparation (final PolygonShape poly1, final Transform xf1, final int edge1, final PolygonShape poly2,
+               final Transform xf2) {
+
+               final int count1 = poly1.m_count;
+               final Vec2[] vertices1 = poly1.m_vertices;
+               final Vec2[] normals1 = poly1.m_normals;
+
+               final int count2 = poly2.m_count;
+               final Vec2[] vertices2 = poly2.m_vertices;
+
+               assert (0 <= edge1 && edge1 < count1);
+               // Convert normal from poly1's frame into poly2's frame.
+               // before inline:
+               // Vec2 normal1World = Mul(xf1.R, normals1[edge1]);
+               Rot.mulToOutUnsafe(xf1.q, normals1[edge1], normal1World);
+               // Vec2 normal1 = MulT(xf2.R, normal1World);
+               Rot.mulTransUnsafe(xf2.q, normal1World, normal1);
+               final float normal1x = normal1.x;
+               final float normal1y = normal1.y;
+               final float normal1Worldx = normal1World.x;
+               final float normal1Worldy = normal1World.y;
+               // after inline:
+               // R.mulToOut(v,out);
+               // final Mat22 R = xf1.q;
+               // final Vec2 v = normals1[edge1];
+               // final float normal1Worldy = R.ex.y * v.x + R.ey.y * v.y;
+               // final float normal1Worldx = R.ex.x * v.x + R.ey.x * v.y;
+               // final Mat22 R1 = xf2.q;
+               // final float normal1x = normal1Worldx * R1.ex.x + normal1Worldy * R1.ex.y;
+               // final float normal1y = normal1Worldx * R1.ey.x + normal1Worldy * R1.ey.y;
+               // end inline
+
+               // Find support vertex on poly2 for -normal.
+               int index = 0;
+               float minDot = Float.MAX_VALUE;
+
+               for (int i = 0; i < count2; ++i) {
+                       final Vec2 a = vertices2[i];
+                       final float dot = a.x * normal1x + a.y * normal1y;
+                       if (dot < minDot) {
+                               minDot = dot;
+                               index = i;
+                       }
+               }
+
+               // Vec2 v1 = Mul(xf1, vertices1[edge1]);
+               // Vec2 v2 = Mul(xf2, vertices2[index]);
+               // before inline:
+               Transform.mulToOut(xf1, vertices1[edge1], v1);
+               Transform.mulToOut(xf2, vertices2[index], v2);
+
+               float separation = Vec2.dot(v2.subLocal(v1), normal1World);
+               return separation;
+
+               // after inline:
+               // final Vec2 v3 = vertices1[edge1];
+               // final float v1y = xf1.p.y + R.ex.y * v3.x + R.ey.y * v3.y;
+               // final float v1x = xf1.p.x + R.ex.x * v3.x + R.ey.x * v3.y;
+               // final Vec2 v4 = vertices2[index];
+               // final float v2y = xf2.p.y + R1.ex.y * v4.x + R1.ey.y * v4.y - v1y;
+               // final float v2x = xf2.p.x + R1.ex.x * v4.x + R1.ey.x * v4.y - v1x;
+               //
+               // return v2x * normal1Worldx + v2y * normal1Worldy;
+               // end inline
+       }
+
+       // djm pooling, and from above
+       private final Vec2 temp = new Vec2();
+       private final Vec2 dLocal1 = new Vec2();
+
+       /** Find the max separation between poly1 and poly2 using edge normals from poly1.
+        * 
+        * @param edgeIndex
+        * @param poly1
+        * @param xf1
+        * @param poly2
+        * @param xf2
+        * @return */
+       public final void findMaxSeparation (EdgeResults results, final PolygonShape poly1, final Transform xf1,
+               final PolygonShape poly2, final Transform xf2) {
+               int count1 = poly1.m_count;
+               final Vec2[] normals1 = poly1.m_normals;
+// Vec2 v = poly2.m_centroid;
+
+               // Vector pointing from the centroid of poly1 to the centroid of poly2.
+               // before inline:
+               Transform.mulToOutUnsafe(xf2, poly2.m_centroid, d);
+               Transform.mulToOutUnsafe(xf1, poly1.m_centroid, temp);
+               d.subLocal(temp);
+
+               Rot.mulTransUnsafe(xf1.q, d, dLocal1);
+               final float dLocal1x = dLocal1.x;
+               final float dLocal1y = dLocal1.y;
+               // after inline:
+               // final float predy = xf2.p.y + xf2.q.ex.y * v.x + xf2.q.ey.y * v.y;
+               // final float predx = xf2.p.x + xf2.q.ex.x * v.x + xf2.q.ey.x * v.y;
+               // final Vec2 v1 = poly1.m_centroid;
+               // final float tempy = xf1.p.y + xf1.q.ex.y * v1.x + xf1.q.ey.y * v1.y;
+               // final float tempx = xf1.p.x + xf1.q.ex.x * v1.x + xf1.q.ey.x * v1.y;
+               // final float dx = predx - tempx;
+               // final float dy = predy - tempy;
+               //
+               // final Mat22 R = xf1.q;
+               // final float dLocal1x = dx * R.ex.x + dy * R.ex.y;
+               // final float dLocal1y = dx * R.ey.x + dy * R.ey.y;
+               // end inline
+
+               // Find edge normal on poly1 that has the largest projection onto d.
+               int edge = 0;
+               float dot;
+               float maxDot = Float.MIN_VALUE;
+               for (int i = 0; i < count1; i++) {
+                       final Vec2 normal = normals1[i];
+                       dot = normal.x * dLocal1x + normal.y * dLocal1y;
+                       if (dot > maxDot) {
+                               maxDot = dot;
+                               edge = i;
+                       }
+               }
+
+               // Get the separation for the edge normal.
+               float s = edgeSeparation(poly1, xf1, edge, poly2, xf2);
+
+               // Check the separation for the previous edge normal.
+               int prevEdge = edge - 1 >= 0 ? edge - 1 : count1 - 1;
+               float sPrev = edgeSeparation(poly1, xf1, prevEdge, poly2, xf2);
+
+               // Check the separation for the next edge normal.
+               int nextEdge = edge + 1 < count1 ? edge + 1 : 0;
+               float sNext = edgeSeparation(poly1, xf1, nextEdge, poly2, xf2);
+
+               // Find the best edge and the search direction.
+               int bestEdge;
+               float bestSeparation;
+               int increment;
+               if (sPrev > s && sPrev > sNext) {
+                       increment = -1;
+                       bestEdge = prevEdge;
+                       bestSeparation = sPrev;
+               } else if (sNext > s) {
+                       increment = 1;
+                       bestEdge = nextEdge;
+                       bestSeparation = sNext;
+               } else {
+                       results.edgeIndex = edge;
+                       results.separation = s;
+                       return;
+               }
+
+               // Perform a local search for the best edge normal.
+               for (;;) {
+                       if (increment == -1) {
+                               edge = bestEdge - 1 >= 0 ? bestEdge - 1 : count1 - 1;
+                       } else {
+                               edge = bestEdge + 1 < count1 ? bestEdge + 1 : 0;
+                       }
+
+                       s = edgeSeparation(poly1, xf1, edge, poly2, xf2);
+
+                       if (s > bestSeparation) {
+                               bestEdge = edge;
+                               bestSeparation = s;
+                       } else {
+                               break;
+                       }
+               }
+
+               results.edgeIndex = bestEdge;
+               results.separation = bestSeparation;
+       }
+
+       // djm pooling from above
+       public final void findIncidentEdge (final ClipVertex[] c, final PolygonShape poly1, final Transform xf1, int edge1,
+               final PolygonShape poly2, final Transform xf2) {
+               int count1 = poly1.m_count;
+               final Vec2[] normals1 = poly1.m_normals;
+
+               int count2 = poly2.m_count;
+               final Vec2[] vertices2 = poly2.m_vertices;
+               final Vec2[] normals2 = poly2.m_normals;
+
+               assert (0 <= edge1 && edge1 < count1);
+
+               // Get the normal of the reference edge in poly2's frame.
+               Rot.mulToOutUnsafe(xf1.q, normals1[edge1], normal1); // temporary
+               // Vec2 normal1 = MulT(xf2.R, Mul(xf1.R, normals1[edge1]));
+               Rot.mulTrans(xf2.q, normal1, normal1);
+
+               // Find the incident edge on poly2.
+               int index = 0;
+               float minDot = Float.MAX_VALUE;
+               for (int i = 0; i < count2; ++i) {
+                       float dot = Vec2.dot(normal1, normals2[i]);
+                       if (dot < minDot) {
+                               minDot = dot;
+                               index = i;
+                       }
+               }
+
+               // Build the clip vertices for the incident edge.
+               int i1 = index;
+               int i2 = i1 + 1 < count2 ? i1 + 1 : 0;
+
+               Transform.mulToOutUnsafe(xf2, vertices2[i1], c[0].v); // = Mul(xf2, vertices2[i1]);
+               c[0].id.indexA = (byte)edge1;
+               c[0].id.indexB = (byte)i1;
+               c[0].id.typeA = (byte)ContactID.Type.FACE.ordinal();
+               c[0].id.typeB = (byte)ContactID.Type.VERTEX.ordinal();
+
+               Transform.mulToOutUnsafe(xf2, vertices2[i2], c[1].v); // = Mul(xf2, vertices2[i2]);
+               c[1].id.indexA = (byte)edge1;
+               c[1].id.indexB = (byte)i2;
+               c[1].id.typeA = (byte)ContactID.Type.FACE.ordinal();
+               c[1].id.typeB = (byte)ContactID.Type.VERTEX.ordinal();
+       }
+
+       private final EdgeResults results1 = new EdgeResults();
+       private final EdgeResults results2 = new EdgeResults();
+       private final ClipVertex[] incidentEdge = new ClipVertex[2];
+       private final Vec2 localTangent = new Vec2();
+       private final Vec2 localNormal = new Vec2();
+       private final Vec2 planePoint = new Vec2();
+       private final Vec2 tangent = new Vec2();
+       private final Vec2 normal = new Vec2();
+       private final Vec2 v11 = new Vec2();
+       private final Vec2 v12 = new Vec2();
+       private final ClipVertex[] clipPoints1 = new ClipVertex[2];
+       private final ClipVertex[] clipPoints2 = new ClipVertex[2];
+
+       /** Compute the collision manifold between two polygons.
+        * 
+        * @param manifold
+        * @param polygon1
+        * @param xf1
+        * @param polygon2
+        * @param xf2 */
+       public final void collidePolygons (Manifold manifold, final PolygonShape polyA, final Transform xfA, final PolygonShape polyB,
+               final Transform xfB) {
+               // Find edge normal of max separation on A - return if separating axis is found
+               // Find edge normal of max separation on B - return if separation axis is found
+               // Choose reference edge as min(minA, minB)
+               // Find incident edge
+               // Clip
+
+               // The normal points from 1 to 2
+
+               manifold.pointCount = 0;
+               float totalRadius = polyA.m_radius + polyB.m_radius;
+
+               findMaxSeparation(results1, polyA, xfA, polyB, xfB);
+               if (results1.separation > totalRadius) {
+                       return;
+               }
+
+               findMaxSeparation(results2, polyB, xfB, polyA, xfA);
+               if (results2.separation > totalRadius) {
+                       return;
+               }
+
+               final PolygonShape poly1; // reference polygon
+               final PolygonShape poly2; // incident polygon
+               Transform xf1, xf2;
+               int edge1; // reference edge
+               boolean flip;
+               final float k_relativeTol = 0.98f;
+               final float k_absoluteTol = 0.001f;
+
+               if (results2.separation > k_relativeTol * results1.separation + k_absoluteTol) {
+                       poly1 = polyB;
+                       poly2 = polyA;
+                       xf1 = xfB;
+                       xf2 = xfA;
+                       edge1 = results2.edgeIndex;
+                       manifold.type = ManifoldType.FACE_B;
+                       flip = true;
+               } else {
+                       poly1 = polyA;
+                       poly2 = polyB;
+                       xf1 = xfA;
+                       xf2 = xfB;
+                       edge1 = results1.edgeIndex;
+                       manifold.type = ManifoldType.FACE_A;
+                       flip = false;
+               }
+
+               findIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2);
+
+               int count1 = poly1.m_count;
+               final Vec2[] vertices1 = poly1.m_vertices;
+
+               final int iv1 = edge1;
+               final int iv2 = edge1 + 1 < count1 ? edge1 + 1 : 0;
+               v11.set(vertices1[iv1]);
+               v12.set(vertices1[iv2]);
+               localTangent.set(v12).subLocal(v11);
+               localTangent.normalize();
+
+               Vec2.crossToOutUnsafe(localTangent, 1f, localNormal); // Vec2 localNormal = Vec2.cross(dv,
+               // 1.0f);
+
+               planePoint.set(v11).addLocal(v12).mulLocal(.5f); // Vec2 planePoint = 0.5f * (v11
+               // + v12);
+
+               Rot.mulToOutUnsafe(xf1.q, localTangent, tangent); // Vec2 sideNormal = Mul(xf1.R, v12
+               // - v11);
+               Vec2.crossToOutUnsafe(tangent, 1f, normal); // Vec2 frontNormal = Vec2.cross(sideNormal,
+               // 1.0f);
+
+               Transform.mulToOut(xf1, v11, v11);
+               Transform.mulToOut(xf1, v12, v12);
+               // v11 = Mul(xf1, v11);
+               // v12 = Mul(xf1, v12);
+
+               // Face offset
+               float frontOffset = Vec2.dot(normal, v11);
+
+               // Side offsets, extended by polytope skin thickness.
+               float sideOffset1 = -Vec2.dot(tangent, v11) + totalRadius;
+               float sideOffset2 = Vec2.dot(tangent, v12) + totalRadius;
+
+               // Clip incident edge against extruded edge1 side edges.
+               // ClipVertex clipPoints1[2];
+               // ClipVertex clipPoints2[2];
+               int np;
+
+               // Clip to box side 1
+               // np = ClipSegmentToLine(clipPoints1, incidentEdge, -sideNormal, sideOffset1);
+               tangent.negateLocal();
+               np = clipSegmentToLine(clipPoints1, incidentEdge, tangent, sideOffset1, iv1);
+               tangent.negateLocal();
+
+               if (np < 2) {
+                       return;
+               }
+
+               // Clip to negative box side 1
+               np = clipSegmentToLine(clipPoints2, clipPoints1, tangent, sideOffset2, iv2);
+
+               if (np < 2) {
+                       return;
+               }
+
+               // Now clipPoints2 contains the clipped points.
+               manifold.localNormal.set(localNormal);
+               manifold.localPoint.set(planePoint);
+
+               int pointCount = 0;
+               for (int i = 0; i < Settings.maxManifoldPoints; ++i) {
+                       float separation = Vec2.dot(normal, clipPoints2[i].v) - frontOffset;
+
+                       if (separation <= totalRadius) {
+                               ManifoldPoint cp = manifold.points[pointCount];
+                               Transform.mulTransToOut(xf2, clipPoints2[i].v, cp.localPoint);
+                               // cp.m_localPoint = MulT(xf2, clipPoints2[i].v);
+                               cp.id.set(clipPoints2[i].id);
+                               if (flip) {
+                                       // Swap features
+                                       cp.id.flip();
+                               }
+                               ++pointCount;
+                       }
+               }
+
+               manifold.pointCount = pointCount;
+       }
+
+       private final Vec2 Q = new Vec2();
+       private final Vec2 e = new Vec2();
+       private final ContactID cf = new ContactID();
+       private final Vec2 e1 = new Vec2();
+       private final Vec2 P = new Vec2();
+       private final Vec2 n = new Vec2();
+
+       // Compute contact points for edge versus circle.
+       // This accounts for edge connectivity.
+       public void collideEdgeAndCircle (Manifold manifold, final EdgeShape edgeA, final Transform xfA, final CircleShape circleB,
+               final Transform xfB) {
+               manifold.pointCount = 0;
+
+               // Compute circle in frame of edge
+               // Vec2 Q = MulT(xfA, Mul(xfB, circleB.m_p));
+               Transform.mulToOutUnsafe(xfB, circleB.m_p, temp);
+               Transform.mulTransToOutUnsafe(xfA, temp, Q);
+
+               final Vec2 A = edgeA.m_vertex1;
+               final Vec2 B = edgeA.m_vertex2;
+               e.set(B).subLocal(A);
+
+               // Barycentric coordinates
+               float u = Vec2.dot(e, temp.set(B).subLocal(Q));
+               float v = Vec2.dot(e, temp.set(Q).subLocal(A));
+
+               float radius = edgeA.m_radius + circleB.m_radius;
+
+               // ContactFeature cf;
+               cf.indexB = 0;
+               cf.typeB = (byte)ContactID.Type.VERTEX.ordinal();
+
+               // Region A
+               if (v <= 0.0f) {
+                       final Vec2 P = A;
+                       d.set(Q).subLocal(P);
+                       float dd = Vec2.dot(d, d);
+                       if (dd > radius * radius) {
+                               return;
+                       }
+
+                       // Is there an edge connected to A?
+                       if (edgeA.m_hasVertex0) {
+                               final Vec2 A1 = edgeA.m_vertex0;
+                               final Vec2 B1 = A;
+                               e1.set(B1).subLocal(A1);
+                               float u1 = Vec2.dot(e1, temp.set(B1).subLocal(Q));
+
+                               // Is the circle in Region AB of the previous edge?
+                               if (u1 > 0.0f) {
+                                       return;
+                               }
+                       }
+
+                       cf.indexA = 0;
+                       cf.typeA = (byte)ContactID.Type.VERTEX.ordinal();
+                       manifold.pointCount = 1;
+                       manifold.type = Manifold.ManifoldType.CIRCLES;
+                       manifold.localNormal.setZero();
+                       manifold.localPoint.set(P);
+                       // manifold.points[0].id.key = 0;
+                       manifold.points[0].id.set(cf);
+                       manifold.points[0].localPoint.set(circleB.m_p);
+                       return;
+               }
+
+               // Region B
+               if (u <= 0.0f) {
+                       Vec2 P = B;
+                       d.set(Q).subLocal(P);
+                       float dd = Vec2.dot(d, d);
+                       if (dd > radius * radius) {
+                               return;
+                       }
+
+                       // Is there an edge connected to B?
+                       if (edgeA.m_hasVertex3) {
+                               final Vec2 B2 = edgeA.m_vertex3;
+                               final Vec2 A2 = B;
+                               final Vec2 e2 = e1;
+                               e2.set(B2).subLocal(A2);
+                               float v2 = Vec2.dot(e2, temp.set(Q).subLocal(A2));
+
+                               // Is the circle in Region AB of the next edge?
+                               if (v2 > 0.0f) {
+                                       return;
+                               }
+                       }
+
+                       cf.indexA = 1;
+                       cf.typeA = (byte)ContactID.Type.VERTEX.ordinal();
+                       manifold.pointCount = 1;
+                       manifold.type = Manifold.ManifoldType.CIRCLES;
+                       manifold.localNormal.setZero();
+                       manifold.localPoint.set(P);
+                       // manifold.points[0].id.key = 0;
+                       manifold.points[0].id.set(cf);
+                       manifold.points[0].localPoint.set(circleB.m_p);
+                       return;
+               }
+
+               // Region AB
+               float den = Vec2.dot(e, e);
+               assert (den > 0.0f);
+
+               // Vec2 P = (1.0f / den) * (u * A + v * B);
+               P.set(A).mulLocal(u).addLocal(temp.set(B).mulLocal(v));
+               P.mulLocal(1.0f / den);
+               d.set(Q).subLocal(P);
+               float dd = Vec2.dot(d, d);
+               if (dd > radius * radius) {
+                       return;
+               }
+
+               n.x = -e.y;
+               n.y = e.x;
+               if (Vec2.dot(n, temp.set(Q).subLocal(A)) < 0.0f) {
+                       n.set(-n.x, -n.y);
+               }
+               n.normalize();
+
+               cf.indexA = 0;
+               cf.typeA = (byte)ContactID.Type.FACE.ordinal();
+               manifold.pointCount = 1;
+               manifold.type = Manifold.ManifoldType.FACE_A;
+               manifold.localNormal.set(n);
+               manifold.localPoint.set(A);
+               // manifold.points[0].id.key = 0;
+               manifold.points[0].id.set(cf);
+               manifold.points[0].localPoint.set(circleB.m_p);
+       }
+
+       private final EPCollider collider = new EPCollider();
+
+       public void collideEdgeAndPolygon (Manifold manifold, final EdgeShape edgeA, final Transform xfA, final PolygonShape polygonB,
+               final Transform xfB) {
+               collider.collide(manifold, edgeA, xfA, polygonB, xfB);
+       }
+
+       /** Java-specific class for returning edge results */
+       private static class EdgeResults {
+               public float separation;
+               public int edgeIndex;
+       }
+
+       /** Used for computing contact manifolds. */
+       public static class ClipVertex {
+               public final Vec2 v;
+               public final ContactID id;
+
+               public ClipVertex () {
+                       v = new Vec2();
+                       id = new ContactID();
+               }
+
+               public void set (final ClipVertex cv) {
+                       v.set(cv.v);
+                       id.set(cv.id);
+               }
+       }
+
+       /** This is used for determining the state of contact points.
+        * 
+        * @author Daniel Murphy */
+       public static enum PointState {
+               /** point does not exist */
+               NULL_STATE,
+               /** point was added in the update */
+               ADD_STATE,
+               /** point persisted across the update */
+               PERSIST_STATE,
+               /** point was removed in the update */
+               REMOVE_STATE
+       }
+
+       /** This structure is used to keep track of the best separating axis. */
+       static class EPAxis {
+               enum Type {
+                       UNKNOWN, EDGE_A, EDGE_B
+               }
+
+               Type type;
+               int index;
+               float separation;
+       }
+
+       /** This holds polygon B expressed in frame A. */
+       static class TempPolygon {
+               final Vec2[] vertices = new Vec2[Settings.maxPolygonVertices];
+               final Vec2[] normals = new Vec2[Settings.maxPolygonVertices];
+               int count;
+
+               public TempPolygon () {
+                       for (int i = 0; i < vertices.length; i++) {
+                               vertices[i] = new Vec2();
+                               normals[i] = new Vec2();
+                       }
+               }
+       }
+
+       /** Reference face used for clipping */
+       static class ReferenceFace {
+               int i1, i2;
+               final Vec2 v1 = new Vec2();
+               final Vec2 v2 = new Vec2();
+               final Vec2 normal = new Vec2();
+
+               final Vec2 sideNormal1 = new Vec2();
+               float sideOffset1;
+
+               final Vec2 sideNormal2 = new Vec2();
+               float sideOffset2;
+       }
+
+       /** This class collides and edge and a polygon, taking into account edge adjacency. */
+       static class EPCollider {
+               enum VertexType {
+                       ISOLATED, CONCAVE, CONVEX
+               }
+
+               final TempPolygon m_polygonB = new TempPolygon();
+
+               final Transform m_xf = new Transform();
+               final Vec2 m_centroidB = new Vec2();
+               Vec2 m_v0 = new Vec2();
+               Vec2 m_v1 = new Vec2();
+               Vec2 m_v2 = new Vec2();
+               Vec2 m_v3 = new Vec2();
+               final Vec2 m_normal0 = new Vec2();
+               final Vec2 m_normal1 = new Vec2();
+               final Vec2 m_normal2 = new Vec2();
+               final Vec2 m_normal = new Vec2();
+
+               VertexType m_type1, m_type2;
+
+               final Vec2 m_lowerLimit = new Vec2();
+               final Vec2 m_upperLimit = new Vec2();
+               float m_radius;
+               boolean m_front;
+
+               public EPCollider () {
+                       for (int i = 0; i < 2; i++) {
+                               ie[i] = new ClipVertex();
+                               clipPoints1[i] = new ClipVertex();
+                               clipPoints2[i] = new ClipVertex();
+                       }
+               }
+
+               private final Vec2 edge1 = new Vec2();
+               private final Vec2 temp = new Vec2();
+               private final Vec2 edge0 = new Vec2();
+               private final Vec2 edge2 = new Vec2();
+               private final ClipVertex[] ie = new ClipVertex[2];
+               private final ClipVertex[] clipPoints1 = new ClipVertex[2];
+               private final ClipVertex[] clipPoints2 = new ClipVertex[2];
+               private final ReferenceFace rf = new ReferenceFace();
+               private final EPAxis edgeAxis = new EPAxis();
+               private final EPAxis polygonAxis = new EPAxis();
+
+               public void collide (Manifold manifold, final EdgeShape edgeA, final Transform xfA, final PolygonShape polygonB,
+                       final Transform xfB) {
+
+                       Transform.mulTransToOutUnsafe(xfA, xfB, m_xf);
+                       Transform.mulToOutUnsafe(m_xf, polygonB.m_centroid, m_centroidB);
+
+                       m_v0 = edgeA.m_vertex0;
+                       m_v1 = edgeA.m_vertex1;
+                       m_v2 = edgeA.m_vertex2;
+                       m_v3 = edgeA.m_vertex3;
+
+                       boolean hasVertex0 = edgeA.m_hasVertex0;
+                       boolean hasVertex3 = edgeA.m_hasVertex3;
+
+                       edge1.set(m_v2).subLocal(m_v1);
+                       edge1.normalize();
+                       m_normal1.set(edge1.y, -edge1.x);
+                       float offset1 = Vec2.dot(m_normal1, temp.set(m_centroidB).subLocal(m_v1));
+                       float offset0 = 0.0f, offset2 = 0.0f;
+                       boolean convex1 = false, convex2 = false;
+
+                       // Is there a preceding edge?
+                       if (hasVertex0) {
+                               edge0.set(m_v1).subLocal(m_v0);
+                               edge0.normalize();
+                               m_normal0.set(edge0.y, -edge0.x);
+                               convex1 = Vec2.cross(edge0, edge1) >= 0.0f;
+                               offset0 = Vec2.dot(m_normal0, temp.set(m_centroidB).subLocal(m_v0));
+                       }
+
+                       // Is there a following edge?
+                       if (hasVertex3) {
+                               edge2.set(m_v3).subLocal(m_v2);
+                               edge2.normalize();
+                               m_normal2.set(edge2.y, -edge2.x);
+                               convex2 = Vec2.cross(edge1, edge2) > 0.0f;
+                               offset2 = Vec2.dot(m_normal2, temp.set(m_centroidB).subLocal(m_v2));
+                       }
+
+                       // Determine front or back collision. Determine collision normal limits.
+                       if (hasVertex0 && hasVertex3) {
+                               if (convex1 && convex2) {
+                                       m_front = offset0 >= 0.0f || offset1 >= 0.0f || offset2 >= 0.0f;
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal0);
+                                               m_upperLimit.set(m_normal2);
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal1).negateLocal();
+                                               m_upperLimit.set(m_normal1).negateLocal();
+                                       }
+                               } else if (convex1) {
+                                       m_front = offset0 >= 0.0f || (offset1 >= 0.0f && offset2 >= 0.0f);
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal0);
+                                               m_upperLimit.set(m_normal1);
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal2).negateLocal();
+                                               m_upperLimit.set(m_normal1).negateLocal();
+                                       }
+                               } else if (convex2) {
+                                       m_front = offset2 >= 0.0f || (offset0 >= 0.0f && offset1 >= 0.0f);
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal1);
+                                               m_upperLimit.set(m_normal2);
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal1).negateLocal();
+                                               m_upperLimit.set(m_normal0).negateLocal();
+                                       }
+                               } else {
+                                       m_front = offset0 >= 0.0f && offset1 >= 0.0f && offset2 >= 0.0f;
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal1);
+                                               m_upperLimit.set(m_normal1);
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal2).negateLocal();
+                                               m_upperLimit.set(m_normal0).negateLocal();
+                                       }
+                               }
+                       } else if (hasVertex0) {
+                               if (convex1) {
+                                       m_front = offset0 >= 0.0f || offset1 >= 0.0f;
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal0);
+                                               m_upperLimit.set(m_normal1).negateLocal();
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal1);
+                                               m_upperLimit.set(m_normal1).negateLocal();
+                                       }
+                               } else {
+                                       m_front = offset0 >= 0.0f && offset1 >= 0.0f;
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal1);
+                                               m_upperLimit.set(m_normal1).negateLocal();
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal1);
+                                               m_upperLimit.set(m_normal0).negateLocal();
+                                       }
+                               }
+                       } else if (hasVertex3) {
+                               if (convex2) {
+                                       m_front = offset1 >= 0.0f || offset2 >= 0.0f;
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal1).negateLocal();
+                                               m_upperLimit.set(m_normal2);
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal1).negateLocal();
+                                               m_upperLimit.set(m_normal1);
+                                       }
+                               } else {
+                                       m_front = offset1 >= 0.0f && offset2 >= 0.0f;
+                                       if (m_front) {
+                                               m_normal.set(m_normal1);
+                                               m_lowerLimit.set(m_normal1).negateLocal();
+                                               m_upperLimit.set(m_normal1);
+                                       } else {
+                                               m_normal.set(m_normal1).negateLocal();
+                                               m_lowerLimit.set(m_normal2).negateLocal();
+                                               m_upperLimit.set(m_normal1);
+                                       }
+                               }
+                       } else {
+                               m_front = offset1 >= 0.0f;
+                               if (m_front) {
+                                       m_normal.set(m_normal1);
+                                       m_lowerLimit.set(m_normal1).negateLocal();
+                                       m_upperLimit.set(m_normal1).negateLocal();
+                               } else {
+                                       m_normal.set(m_normal1).negateLocal();
+                                       m_lowerLimit.set(m_normal1);
+                                       m_upperLimit.set(m_normal1);
+                               }
+                       }
+
+                       // Get polygonB in frameA
+                       m_polygonB.count = polygonB.m_count;
+                       for (int i = 0; i < polygonB.m_count; ++i) {
+                               Transform.mulToOutUnsafe(m_xf, polygonB.m_vertices[i], m_polygonB.vertices[i]);
+                               Rot.mulToOutUnsafe(m_xf.q, polygonB.m_normals[i], m_polygonB.normals[i]);
+                       }
+
+                       m_radius = 2.0f * Settings.polygonRadius;
+
+                       manifold.pointCount = 0;
+
+                       computeEdgeSeparation(edgeAxis);
+
+                       // If no valid normal can be found than this edge should not collide.
+                       if (edgeAxis.type == EPAxis.Type.UNKNOWN) {
+                               return;
+                       }
+
+                       if (edgeAxis.separation > m_radius) {
+                               return;
+                       }
+
+                       computePolygonSeparation(polygonAxis);
+                       if (polygonAxis.type != EPAxis.Type.UNKNOWN && polygonAxis.separation > m_radius) {
+                               return;
+                       }
+
+                       // Use hysteresis for jitter reduction.
+                       final float k_relativeTol = 0.98f;
+                       final float k_absoluteTol = 0.001f;
+
+                       EPAxis primaryAxis;
+                       if (polygonAxis.type == EPAxis.Type.UNKNOWN) {
+                               primaryAxis = edgeAxis;
+                       } else if (polygonAxis.separation > k_relativeTol * edgeAxis.separation + k_absoluteTol) {
+                               primaryAxis = polygonAxis;
+                       } else {
+                               primaryAxis = edgeAxis;
+                       }
+
+                       // ClipVertex[] ie = new ClipVertex[2];
+                       if (primaryAxis.type == EPAxis.Type.EDGE_A) {
+                               manifold.type = Manifold.ManifoldType.FACE_A;
+
+                               // Search for the polygon normal that is most anti-parallel to the edge normal.
+                               int bestIndex = 0;
+                               float bestValue = Vec2.dot(m_normal, m_polygonB.normals[0]);
+                               for (int i = 1; i < m_polygonB.count; ++i) {
+                                       float value = Vec2.dot(m_normal, m_polygonB.normals[i]);
+                                       if (value < bestValue) {
+                                               bestValue = value;
+                                               bestIndex = i;
+                                       }
+                               }
+
+                               int i1 = bestIndex;
+                               int i2 = i1 + 1 < m_polygonB.count ? i1 + 1 : 0;
+
+                               ie[0].v.set(m_polygonB.vertices[i1]);
+                               ie[0].id.indexA = 0;
+                               ie[0].id.indexB = (byte)i1;
+                               ie[0].id.typeA = (byte)ContactID.Type.FACE.ordinal();
+                               ie[0].id.typeB = (byte)ContactID.Type.VERTEX.ordinal();
+
+                               ie[1].v.set(m_polygonB.vertices[i2]);
+                               ie[1].id.indexA = 0;
+                               ie[1].id.indexB = (byte)i2;
+                               ie[1].id.typeA = (byte)ContactID.Type.FACE.ordinal();
+                               ie[1].id.typeB = (byte)ContactID.Type.VERTEX.ordinal();
+
+                               if (m_front) {
+                                       rf.i1 = 0;
+                                       rf.i2 = 1;
+                                       rf.v1.set(m_v1);
+                                       rf.v2.set(m_v2);
+                                       rf.normal.set(m_normal1);
+                               } else {
+                                       rf.i1 = 1;
+                                       rf.i2 = 0;
+                                       rf.v1.set(m_v2);
+                                       rf.v2.set(m_v1);
+                                       rf.normal.set(m_normal1).negateLocal();
+                               }
+                       } else {
+                               manifold.type = Manifold.ManifoldType.FACE_B;
+
+                               ie[0].v.set(m_v1);
+                               ie[0].id.indexA = 0;
+                               ie[0].id.indexB = (byte)primaryAxis.index;
+                               ie[0].id.typeA = (byte)ContactID.Type.VERTEX.ordinal();
+                               ie[0].id.typeB = (byte)ContactID.Type.FACE.ordinal();
+
+                               ie[1].v.set(m_v2);
+                               ie[1].id.indexA = 0;
+                               ie[1].id.indexB = (byte)primaryAxis.index;
+                               ie[1].id.typeA = (byte)ContactID.Type.VERTEX.ordinal();
+                               ie[1].id.typeB = (byte)ContactID.Type.FACE.ordinal();
+
+                               rf.i1 = primaryAxis.index;
+                               rf.i2 = rf.i1 + 1 < m_polygonB.count ? rf.i1 + 1 : 0;
+                               rf.v1.set(m_polygonB.vertices[rf.i1]);
+                               rf.v2.set(m_polygonB.vertices[rf.i2]);
+                               rf.normal.set(m_polygonB.normals[rf.i1]);
+                       }
+
+                       rf.sideNormal1.set(rf.normal.y, -rf.normal.x);
+                       rf.sideNormal2.set(rf.sideNormal1).negateLocal();
+                       rf.sideOffset1 = Vec2.dot(rf.sideNormal1, rf.v1);
+                       rf.sideOffset2 = Vec2.dot(rf.sideNormal2, rf.v2);
+
+                       // Clip incident edge against extruded edge1 side edges.
+                       int np;
+
+                       // Clip to box side 1
+                       np = clipSegmentToLine(clipPoints1, ie, rf.sideNormal1, rf.sideOffset1, rf.i1);
+
+                       if (np < Settings.maxManifoldPoints) {
+                               return;
+                       }
+
+                       // Clip to negative box side 1
+                       np = clipSegmentToLine(clipPoints2, clipPoints1, rf.sideNormal2, rf.sideOffset2, rf.i2);
+
+                       if (np < Settings.maxManifoldPoints) {
+                               return;
+                       }
+
+                       // Now clipPoints2 contains the clipped points.
+                       if (primaryAxis.type == EPAxis.Type.EDGE_A) {
+                               manifold.localNormal.set(rf.normal);
+                               manifold.localPoint.set(rf.v1);
+                       } else {
+                               manifold.localNormal.set(polygonB.m_normals[rf.i1]);
+                               manifold.localPoint.set(polygonB.m_vertices[rf.i1]);
+                       }
+
+                       int pointCount = 0;
+                       for (int i = 0; i < Settings.maxManifoldPoints; ++i) {
+                               float separation;
+
+                               separation = Vec2.dot(rf.normal, temp.set(clipPoints2[i].v).subLocal(rf.v1));
+
+                               if (separation <= m_radius) {
+                                       ManifoldPoint cp = manifold.points[pointCount];
+
+                                       if (primaryAxis.type == EPAxis.Type.EDGE_A) {
+                                               // cp.localPoint = MulT(m_xf, clipPoints2[i].v);
+                                               Transform.mulTransToOutUnsafe(m_xf, clipPoints2[i].v, cp.localPoint);
+                                               cp.id.set(clipPoints2[i].id);
+                                       } else {
+                                               cp.localPoint.set(clipPoints2[i].v);
+                                               cp.id.typeA = clipPoints2[i].id.typeB;
+                                               cp.id.typeB = clipPoints2[i].id.typeA;
+                                               cp.id.indexA = clipPoints2[i].id.indexB;
+                                               cp.id.indexB = clipPoints2[i].id.indexA;
+                                       }
+
+                                       ++pointCount;
+                               }
+                       }
+
+                       manifold.pointCount = pointCount;
+               }
+
+               public void computeEdgeSeparation (EPAxis axis) {
+                       axis.type = EPAxis.Type.EDGE_A;
+                       axis.index = m_front ? 0 : 1;
+                       axis.separation = Float.MAX_VALUE;
+
+                       for (int i = 0; i < m_polygonB.count; ++i) {
+                               float s = Vec2.dot(m_normal, temp.set(m_polygonB.vertices[i]).subLocal(m_v1));
+                               if (s < axis.separation) {
+                                       axis.separation = s;
+                               }
+                       }
+               }
+
+               private final Vec2 perp = new Vec2();
+               private final Vec2 n = new Vec2();
+
+               public void computePolygonSeparation (EPAxis axis) {
+                       axis.type = EPAxis.Type.UNKNOWN;
+                       axis.index = -1;
+                       axis.separation = Float.MIN_VALUE;
+
+                       perp.set(-m_normal.y, m_normal.x);
+
+                       for (int i = 0; i < m_polygonB.count; ++i) {
+                               n.set(m_polygonB.normals[i]).negateLocal();
+
+                               float s1 = Vec2.dot(n, temp.set(m_polygonB.vertices[i]).subLocal(m_v1));
+                               float s2 = Vec2.dot(n, temp.set(m_polygonB.vertices[i]).subLocal(m_v2));
+                               float s = MathUtils.min(s1, s2);
+
+                               if (s > m_radius) {
+                                       // No collision
+                                       axis.type = EPAxis.Type.EDGE_B;
+                                       axis.index = i;
+                                       axis.separation = s;
+                                       return;
+                               }
+
+                               // Adjacency
+                               if (Vec2.dot(n, perp) >= 0.0f) {
+                                       if (Vec2.dot(temp.set(n).subLocal(m_upperLimit), m_normal) < -Settings.angularSlop) {
+                                               continue;
+                                       }
+                               } else {
+                                       if (Vec2.dot(temp.set(n).subLocal(m_lowerLimit), m_normal) < -Settings.angularSlop) {
+                                               continue;
+                                       }
+                               }
+
+                               if (s > axis.separation) {
+                                       axis.type = EPAxis.Type.EDGE_B;
+                                       axis.index = i;
+                                       axis.separation = s;
+                               }
+                       }
+               }
+       }
 }
index 66fd2a5..9f34593 100644 (file)
  * misrepresented as being the original software.
  * 3. This notice may not be removed or altered from any source distribution.
  */
+
 package org.jbox2d.collision;
 
-/**
- * Contact ids to facilitate warm starting. Note: the ContactFeatures class is just embedded in here
- */
+/** Contact ids to facilitate warm starting. Note: the ContactFeatures class is just embedded in here */
 public class ContactID implements Comparable<ContactID> {
 
-  public static enum Type {
-    VERTEX, FACE
-  }
+       public static enum Type {
+               VERTEX, FACE
+       }
 
-  public byte indexA;
-  public byte indexB;
-  public byte typeA;
-  public byte typeB;
+       public byte indexA;
+       public byte indexB;
+       public byte typeA;
+       public byte typeB;
 
-  public int getKey() {
-    return ((int) indexA) << 24 | ((int) indexB) << 16 | ((int) typeA) << 8 | ((int) typeB);
-  }
+       public int getKey () {
+               return ((int)indexA) << 24 | ((int)indexB) << 16 | ((int)typeA) << 8 | ((int)typeB);
+       }
 
-  public boolean isEqual(final ContactID cid) {
-    return getKey() == cid.getKey();
-  }
+       public boolean isEqual (final ContactID cid) {
+               return getKey() == cid.getKey();
+       }
 
-  public ContactID() {}
+       public ContactID () {
+       }
 
-  public ContactID(final ContactID c) {
-    set(c);
-  }
+       public ContactID (final ContactID c) {
+               set(c);
+       }
 
-  public void set(final ContactID c) {
-    indexA = c.indexA;
-    indexB = c.indexA;
-    typeA = c.typeA;
-    typeB = c.typeB;
-  }
+       public void set (final ContactID c) {
+               indexA = c.indexA;
+               indexB = c.indexA;
+               typeA = c.typeA;
+               typeB = c.typeB;
+       }
 
-  public void flip() {
-    byte tempA = indexA;
-    indexA = indexB;
-    indexB = tempA;
-    tempA = typeA;
-    typeA = typeB;
-    typeB = tempA;
-  }
+       public void flip () {
+               byte tempA = indexA;
+               indexA = indexB;
+               indexB = tempA;
+               tempA = typeA;
+               typeA = typeB;
+               typeB = tempA;
+       }
 
-  /**
-   * zeros out the data
-   */
-  public void zero() {
-    indexA = 0;
-    indexB = 0;
-    typeA = 0;
-    typeB = 0;
-  }
+       /** zeros out the data */
+       public void zero () {
+               indexA = 0;
+               indexB = 0;
+               typeA = 0;
+               typeB = 0;
+       }
 
-  @Override
-  public int compareTo(ContactID o) {
-    return getKey() - o.getKey();
-  }
+       @Override
+       public int compareTo (ContactID o) {
+               return getKey() - o.getKey();
+       }
 }
index 335d99e..d91c597 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.collision.shapes.ChainShape;
@@ -31,742 +32,711 @@ import org.jbox2d.collision.shapes.Shape;
 import org.jbox2d.common.MathUtils;
 import org.jbox2d.common.Rot;
 import org.jbox2d.common.Settings;
-import org.jbox2d.common.Vec2;
 import org.jbox2d.common.Transform;
+import org.jbox2d.common.Vec2;
 
 // updated to rev 100
-/**
- * This is non-static for faster pooling. To get an instance, use the {@link SingletonPool}, don't
- * construct a distance object.
+/** This is non-static for faster pooling. To get an instance, use the {@link SingletonPool}, don't construct a distance object.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class Distance {
 
-  public static int GJK_CALLS = 0;
-  public static int GJK_ITERS = 0;
-  public static int GJK_MAX_ITERS = 20;
-
-  /**
-   * GJK using Voronoi regions (Christer Ericson) and Barycentric coordinates.
-   */
-  private class SimplexVertex {
-    public final Vec2 wA = new Vec2(); // support point in shapeA
-    public final Vec2 wB = new Vec2(); // support point in shapeB
-    public final Vec2 w = new Vec2(); // wB - wA
-    public float a; // barycentric coordinate for closest point
-    public int indexA; // wA index
-    public int indexB; // wB index
-
-    public void set(SimplexVertex sv) {
-      wA.set(sv.wA);
-      wB.set(sv.wB);
-      w.set(sv.w);
-      a = sv.a;
-      indexA = sv.indexA;
-      indexB = sv.indexB;
-    }
-  }
-
-  /**
-   * Used to warm start Distance. Set count to zero on first call.
-   * 
-   * @author daniel
-   */
-  public static class SimplexCache {
-    /** length or area */
-    public float metric;
-    public int count;
-    /** vertices on shape A */
-    public final int indexA[] = new int[3];
-    /** vertices on shape B */
-    public final int indexB[] = new int[3];
-
-    public SimplexCache() {
-      metric = 0;
-      count = 0;
-      indexA[0] = Integer.MAX_VALUE;
-      indexA[1] = Integer.MAX_VALUE;
-      indexA[2] = Integer.MAX_VALUE;
-      indexB[0] = Integer.MAX_VALUE;
-      indexB[1] = Integer.MAX_VALUE;
-      indexB[2] = Integer.MAX_VALUE;
-    }
-
-    public void set(SimplexCache sc) {
-      System.arraycopy(sc.indexA, 0, indexA, 0, indexA.length);
-      System.arraycopy(sc.indexB, 0, indexB, 0, indexB.length);
-      metric = sc.metric;
-      count = sc.count;
-    }
-  }
-
-  private class Simplex {
-    public final SimplexVertex m_v1 = new SimplexVertex();
-    public final SimplexVertex m_v2 = new SimplexVertex();
-    public final SimplexVertex m_v3 = new SimplexVertex();
-    public final SimplexVertex vertices[] = {m_v1, m_v2, m_v3};
-    public int m_count;
-
-    public void readCache(SimplexCache cache, DistanceProxy proxyA, Transform transformA,
-        DistanceProxy proxyB, Transform transformB) {
-      assert (cache.count <= 3);
-
-      // Copy data from cache.
-      m_count = cache.count;
-
-      for (int i = 0; i < m_count; ++i) {
-        SimplexVertex v = vertices[i];
-        v.indexA = cache.indexA[i];
-        v.indexB = cache.indexB[i];
-        Vec2 wALocal = proxyA.getVertex(v.indexA);
-        Vec2 wBLocal = proxyB.getVertex(v.indexB);
-        Transform.mulToOutUnsafe(transformA, wALocal, v.wA);
-        Transform.mulToOutUnsafe(transformB, wBLocal, v.wB);
-        v.w.set(v.wB).subLocal(v.wA);
-        v.a = 0.0f;
-      }
-
-      // Compute the new simplex metric, if it is substantially different than
-      // old metric then flush the simplex.
-      if (m_count > 1) {
-        float metric1 = cache.metric;
-        float metric2 = getMetric();
-        if (metric2 < 0.5f * metric1 || 2.0f * metric1 < metric2 || metric2 < Settings.EPSILON) {
-          // Reset the simplex.
-          m_count = 0;
-        }
-      }
-
-      // If the cache is empty or invalid ...
-      if (m_count == 0) {
-        SimplexVertex v = vertices[0];
-        v.indexA = 0;
-        v.indexB = 0;
-        Vec2 wALocal = proxyA.getVertex(0);
-        Vec2 wBLocal = proxyB.getVertex(0);
-        Transform.mulToOutUnsafe(transformA, wALocal, v.wA);
-        Transform.mulToOutUnsafe(transformB, wBLocal, v.wB);
-        v.w.set(v.wB).subLocal(v.wA);
-        m_count = 1;
-      }
-    }
-
-    public void writeCache(SimplexCache cache) {
-      cache.metric = getMetric();
-      cache.count = m_count;
-
-      for (int i = 0; i < m_count; ++i) {
-        cache.indexA[i] = (vertices[i].indexA);
-        cache.indexB[i] = (vertices[i].indexB);
-      }
-    }
-
-    private final Vec2 e12 = new Vec2();
-
-    public final void getSearchDirection(final Vec2 out) {
-      switch (m_count) {
-        case 1:
-          out.set(m_v1.w).negateLocal();
-          return;
-        case 2:
-          e12.set(m_v2.w).subLocal(m_v1.w);
-          // use out for a temp variable real quick
-          out.set(m_v1.w).negateLocal();
-          float sgn = Vec2.cross(e12, out);
-
-          if (sgn > 0f) {
-            // Origin is left of e12.
-            Vec2.crossToOutUnsafe(1f, e12, out);
-            return;
-          } else {
-            // Origin is right of e12.
-            Vec2.crossToOutUnsafe(e12, 1f, out);
-            return;
-          }
-        default:
-          assert (false);
-          out.setZero();
-          return;
-      }
-    }
-
-    // djm pooled
-    private final Vec2 case2 = new Vec2();
-    private final Vec2 case22 = new Vec2();
-
-    /**
-     * this returns pooled objects. don't keep or modify them
-     * 
-     * @return
-     */
-    public void getClosestPoint(final Vec2 out) {
-      switch (m_count) {
-        case 0:
-          assert (false);
-          out.setZero();
-          return;
-        case 1:
-          out.set(m_v1.w);
-          return;
-        case 2:
-          case22.set(m_v2.w).mulLocal(m_v2.a);
-          case2.set(m_v1.w).mulLocal(m_v1.a).addLocal(case22);
-          out.set(case2);
-          return;
-        case 3:
-          out.setZero();
-          return;
-        default:
-          assert (false);
-          out.setZero();
-          return;
-      }
-    }
-
-    // djm pooled, and from above
-    private final Vec2 case3 = new Vec2();
-    private final Vec2 case33 = new Vec2();
-
-    public void getWitnessPoints(Vec2 pA, Vec2 pB) {
-      switch (m_count) {
-        case 0:
-          assert (false);
-          break;
-
-        case 1:
-          pA.set(m_v1.wA);
-          pB.set(m_v1.wB);
-          break;
-
-        case 2:
-          case2.set(m_v1.wA).mulLocal(m_v1.a);
-          pA.set(m_v2.wA).mulLocal(m_v2.a).addLocal(case2);
-          // m_v1.a * m_v1.wA + m_v2.a * m_v2.wA;
-          // *pB = m_v1.a * m_v1.wB + m_v2.a * m_v2.wB;
-          case2.set(m_v1.wB).mulLocal(m_v1.a);
-          pB.set(m_v2.wB).mulLocal(m_v2.a).addLocal(case2);
-
-          break;
-
-        case 3:
-          pA.set(m_v1.wA).mulLocal(m_v1.a);
-          case3.set(m_v2.wA).mulLocal(m_v2.a);
-          case33.set(m_v3.wA).mulLocal(m_v3.a);
-          pA.addLocal(case3).addLocal(case33);
-          pB.set(pA);
-          // *pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA + m_v3.a * m_v3.wA;
-          // *pB = *pA;
-          break;
-
-        default:
-          assert (false);
-          break;
-      }
-    }
-
-    // djm pooled, from above
-    public float getMetric() {
-      switch (m_count) {
-        case 0:
-          assert (false);
-          return 0.0f;
-
-        case 1:
-          return 0.0f;
-
-        case 2:
-          return MathUtils.distance(m_v1.w, m_v2.w);
-
-        case 3:
-          case3.set(m_v2.w).subLocal(m_v1.w);
-          case33.set(m_v3.w).subLocal(m_v1.w);
-          // return Vec2.cross(m_v2.w - m_v1.w, m_v3.w - m_v1.w);
-          return Vec2.cross(case3, case33);
-
-        default:
-          assert (false);
-          return 0.0f;
-      }
-    }
-
-    // djm pooled from above
-    /**
-     * Solve a line segment using barycentric coordinates.
-     */
-    public void solve2() {
-      // Solve a line segment using barycentric coordinates.
-      //
-      // p = a1 * w1 + a2 * w2
-      // a1 + a2 = 1
-      //
-      // The vector from the origin to the closest point on the line is
-      // perpendicular to the line.
-      // e12 = w2 - w1
-      // dot(p, e) = 0
-      // a1 * dot(w1, e) + a2 * dot(w2, e) = 0
-      //
-      // 2-by-2 linear system
-      // [1 1 ][a1] = [1]
-      // [w1.e12 w2.e12][a2] = [0]
-      //
-      // Define
-      // d12_1 = dot(w2, e12)
-      // d12_2 = -dot(w1, e12)
-      // d12 = d12_1 + d12_2
-      //
-      // Solution
-      // a1 = d12_1 / d12
-      // a2 = d12_2 / d12
-      final Vec2 w1 = m_v1.w;
-      final Vec2 w2 = m_v2.w;
-      e12.set(w2).subLocal(w1);
-
-      // w1 region
-      float d12_2 = -Vec2.dot(w1, e12);
-      if (d12_2 <= 0.0f) {
-        // a2 <= 0, so we clamp it to 0
-        m_v1.a = 1.0f;
-        m_count = 1;
-        return;
-      }
-
-      // w2 region
-      float d12_1 = Vec2.dot(w2, e12);
-      if (d12_1 <= 0.0f) {
-        // a1 <= 0, so we clamp it to 0
-        m_v2.a = 1.0f;
-        m_count = 1;
-        m_v1.set(m_v2);
-        return;
-      }
-
-      // Must be in e12 region.
-      float inv_d12 = 1.0f / (d12_1 + d12_2);
-      m_v1.a = d12_1 * inv_d12;
-      m_v2.a = d12_2 * inv_d12;
-      m_count = 2;
-    }
-
-    // djm pooled, and from above
-    private final Vec2 e13 = new Vec2();
-    private final Vec2 e23 = new Vec2();
-    private final Vec2 w1 = new Vec2();
-    private final Vec2 w2 = new Vec2();
-    private final Vec2 w3 = new Vec2();
-
-    /**
-     * Solve a line segment using barycentric coordinates.<br/>
-     * Possible regions:<br/>
-     * - points[2]<br/>
-     * - edge points[0]-points[2]<br/>
-     * - edge points[1]-points[2]<br/>
-     * - inside the triangle
-     */
-    public void solve3() {
-      w1.set(m_v1.w);
-      w2.set(m_v2.w);
-      w3.set(m_v3.w);
-
-      // Edge12
-      // [1 1 ][a1] = [1]
-      // [w1.e12 w2.e12][a2] = [0]
-      // a3 = 0
-      e12.set(w2).subLocal(w1);
-      float w1e12 = Vec2.dot(w1, e12);
-      float w2e12 = Vec2.dot(w2, e12);
-      float d12_1 = w2e12;
-      float d12_2 = -w1e12;
-
-      // Edge13
-      // [1 1 ][a1] = [1]
-      // [w1.e13 w3.e13][a3] = [0]
-      // a2 = 0
-      e13.set(w3).subLocal(w1);
-      float w1e13 = Vec2.dot(w1, e13);
-      float w3e13 = Vec2.dot(w3, e13);
-      float d13_1 = w3e13;
-      float d13_2 = -w1e13;
-
-      // Edge23
-      // [1 1 ][a2] = [1]
-      // [w2.e23 w3.e23][a3] = [0]
-      // a1 = 0
-      e23.set(w3).subLocal(w2);
-      float w2e23 = Vec2.dot(w2, e23);
-      float w3e23 = Vec2.dot(w3, e23);
-      float d23_1 = w3e23;
-      float d23_2 = -w2e23;
-
-      // Triangle123
-      float n123 = Vec2.cross(e12, e13);
-
-      float d123_1 = n123 * Vec2.cross(w2, w3);
-      float d123_2 = n123 * Vec2.cross(w3, w1);
-      float d123_3 = n123 * Vec2.cross(w1, w2);
-
-      // w1 region
-      if (d12_2 <= 0.0f && d13_2 <= 0.0f) {
-        m_v1.a = 1.0f;
-        m_count = 1;
-        return;
-      }
-
-      // e12
-      if (d12_1 > 0.0f && d12_2 > 0.0f && d123_3 <= 0.0f) {
-        float inv_d12 = 1.0f / (d12_1 + d12_2);
-        m_v1.a = d12_1 * inv_d12;
-        m_v2.a = d12_2 * inv_d12;
-        m_count = 2;
-        return;
-      }
-
-      // e13
-      if (d13_1 > 0.0f && d13_2 > 0.0f && d123_2 <= 0.0f) {
-        float inv_d13 = 1.0f / (d13_1 + d13_2);
-        m_v1.a = d13_1 * inv_d13;
-        m_v3.a = d13_2 * inv_d13;
-        m_count = 2;
-        m_v2.set(m_v3);
-        return;
-      }
-
-      // w2 region
-      if (d12_1 <= 0.0f && d23_2 <= 0.0f) {
-        m_v2.a = 1.0f;
-        m_count = 1;
-        m_v1.set(m_v2);
-        return;
-      }
-
-      // w3 region
-      if (d13_1 <= 0.0f && d23_1 <= 0.0f) {
-        m_v3.a = 1.0f;
-        m_count = 1;
-        m_v1.set(m_v3);
-        return;
-      }
-
-      // e23
-      if (d23_1 > 0.0f && d23_2 > 0.0f && d123_1 <= 0.0f) {
-        float inv_d23 = 1.0f / (d23_1 + d23_2);
-        m_v2.a = d23_1 * inv_d23;
-        m_v3.a = d23_2 * inv_d23;
-        m_count = 2;
-        m_v1.set(m_v3);
-        return;
-      }
-
-      // Must be in triangle123
-      float inv_d123 = 1.0f / (d123_1 + d123_2 + d123_3);
-      m_v1.a = d123_1 * inv_d123;
-      m_v2.a = d123_2 * inv_d123;
-      m_v3.a = d123_3 * inv_d123;
-      m_count = 3;
-    }
-  }
-
-  /**
-   * A distance proxy is used by the GJK algorithm. It encapsulates any shape. TODO: see if we can
-   * just do assignments with m_vertices, instead of copying stuff over
-   * 
-   * @author daniel
-   */
-  public static class DistanceProxy {
-    public final Vec2[] m_vertices;
-    public int m_count;
-    public float m_radius;
-    public final Vec2[] m_buffer;
-
-    public DistanceProxy() {
-      m_vertices = new Vec2[Settings.maxPolygonVertices];
-      for (int i = 0; i < m_vertices.length; i++) {
-        m_vertices[i] = new Vec2();
-      }
-      m_buffer = new Vec2[2];
-      m_count = 0;
-      m_radius = 0f;
-    }
-
-    /**
-     * Initialize the proxy using the given shape. The shape must remain in scope while the proxy is
-     * in use.
-     */
-    public final void set(final Shape shape, int index) {
-      switch (shape.getType()) {
-        case CIRCLE:
-          final CircleShape circle = (CircleShape) shape;
-          m_vertices[0].set(circle.m_p);
-          m_count = 1;
-          m_radius = circle.m_radius;
-
-          break;
-        case POLYGON:
-          final PolygonShape poly = (PolygonShape) shape;
-          m_count = poly.m_count;
-          m_radius = poly.m_radius;
-          for (int i = 0; i < m_count; i++) {
-            m_vertices[i].set(poly.m_vertices[i]);
-          }
-          break;
-        case CHAIN:
-          final ChainShape chain = (ChainShape) shape;
-          assert (0 <= index && index < chain.m_count);
-
-          m_buffer[0] = chain.m_vertices[index];
-          if (index + 1 < chain.m_count) {
-            m_buffer[1] = chain.m_vertices[index + 1];
-          } else {
-            m_buffer[1] = chain.m_vertices[0];
-          }
-
-          m_vertices[0].set(m_buffer[0]);
-          m_vertices[1].set(m_buffer[1]);
-          m_count = 2;
-          m_radius = chain.m_radius;
-          break;
-        case EDGE:
-          EdgeShape edge = (EdgeShape) shape;
-          m_vertices[0].set(edge.m_vertex1);
-          m_vertices[1].set(edge.m_vertex2);
-          m_count = 2;
-          m_radius = edge.m_radius;
-          break;
-        default:
-          assert (false);
-      }
-    }
-
-    /**
-     * Get the supporting vertex index in the given direction.
-     * 
-     * @param d
-     * @return
-     */
-    public final int getSupport(final Vec2 d) {
-      int bestIndex = 0;
-      float bestValue = Vec2.dot(m_vertices[0], d);
-      for (int i = 1; i < m_count; i++) {
-        float value = Vec2.dot(m_vertices[i], d);
-        if (value > bestValue) {
-          bestIndex = i;
-          bestValue = value;
-        }
-      }
-
-      return bestIndex;
-    }
-
-    /**
-     * Get the supporting vertex in the given direction.
-     * 
-     * @param d
-     * @return
-     */
-    public final Vec2 getSupportVertex(final Vec2 d) {
-      int bestIndex = 0;
-      float bestValue = Vec2.dot(m_vertices[0], d);
-      for (int i = 1; i < m_count; i++) {
-        float value = Vec2.dot(m_vertices[i], d);
-        if (value > bestValue) {
-          bestIndex = i;
-          bestValue = value;
-        }
-      }
-
-      return m_vertices[bestIndex];
-    }
-
-    /**
-     * Get the vertex count.
-     * 
-     * @return
-     */
-    public final int getVertexCount() {
-      return m_count;
-    }
-
-    /**
-     * Get a vertex by index. Used by Distance.
-     * 
-     * @param index
-     * @return
-     */
-    public final Vec2 getVertex(int index) {
-      assert (0 <= index && index < m_count);
-      return m_vertices[index];
-    }
-  }
-
-  private Simplex simplex = new Simplex();
-  private int[] saveA = new int[3];
-  private int[] saveB = new int[3];
-  private Vec2 closestPoint = new Vec2();
-  private Vec2 d = new Vec2();
-  private Vec2 temp = new Vec2();
-  private Vec2 normal = new Vec2();
-
-  /**
-   * Compute the closest points between two shapes. Supports any combination of: CircleShape and
-   * PolygonShape. The simplex cache is input/output. On the first call set SimplexCache.count to
-   * zero.
-   * 
-   * @param output
-   * @param cache
-   * @param input
-   */
-  public final void distance(final DistanceOutput output, final SimplexCache cache,
-      final DistanceInput input) {
-    GJK_CALLS++;
-
-    final DistanceProxy proxyA = input.proxyA;
-    final DistanceProxy proxyB = input.proxyB;
-
-    Transform transformA = input.transformA;
-    Transform transformB = input.transformB;
-
-    // Initialize the simplex.
-    simplex.readCache(cache, proxyA, transformA, proxyB, transformB);
-
-    // Get simplex vertices as an array.
-    SimplexVertex[] vertices = simplex.vertices;
-
-    // These store the vertices of the last simplex so that we
-    // can check for duplicates and prevent cycling.
-    // (pooled above)
-    int saveCount = 0;
-
-    simplex.getClosestPoint(closestPoint);
-    float distanceSqr1 = closestPoint.lengthSquared();
-    float distanceSqr2 = distanceSqr1;
-
-    // Main iteration loop
-    int iter = 0;
-    while (iter < GJK_MAX_ITERS) {
-
-      // Copy simplex so we can identify duplicates.
-      saveCount = simplex.m_count;
-      for (int i = 0; i < saveCount; i++) {
-        saveA[i] = vertices[i].indexA;
-        saveB[i] = vertices[i].indexB;
-      }
-
-      switch (simplex.m_count) {
-        case 1:
-          break;
-        case 2:
-          simplex.solve2();
-          break;
-        case 3:
-          simplex.solve3();
-          break;
-        default:
-          assert (false);
-      }
-
-      // If we have 3 points, then the origin is in the corresponding triangle.
-      if (simplex.m_count == 3) {
-        break;
-      }
-
-      // Compute closest point.
-      simplex.getClosestPoint(closestPoint);
-      distanceSqr2 = closestPoint.lengthSquared();
-
-      // ensure progress
-      if (distanceSqr2 >= distanceSqr1) {
-        // break;
-      }
-      distanceSqr1 = distanceSqr2;
-
-      // get search direction;
-      simplex.getSearchDirection(d);
-
-      // Ensure the search direction is numerically fit.
-      if (d.lengthSquared() < Settings.EPSILON * Settings.EPSILON) {
-        // The origin is probably contained by a line segment
-        // or triangle. Thus the shapes are overlapped.
-
-        // We can't return zero here even though there may be overlap.
-        // In case the simplex is a point, segment, or triangle it is difficult
-        // to determine if the origin is contained in the CSO or very close to it.
-        break;
-      }
-      /*
-       * SimplexVertex* vertex = vertices + simplex.m_count; vertex.indexA =
-       * proxyA.GetSupport(MulT(transformA.R, -d)); vertex.wA = Mul(transformA,
-       * proxyA.GetVertex(vertex.indexA)); Vec2 wBLocal; vertex.indexB =
-       * proxyB.GetSupport(MulT(transformB.R, d)); vertex.wB = Mul(transformB,
-       * proxyB.GetVertex(vertex.indexB)); vertex.w = vertex.wB - vertex.wA;
-       */
-
-      // Compute a tentative new simplex vertex using support points.
-      SimplexVertex vertex = vertices[simplex.m_count];
-
-      Rot.mulTransUnsafe(transformA.q, d.negateLocal(), temp);
-      vertex.indexA = proxyA.getSupport(temp);
-      Transform.mulToOutUnsafe(transformA, proxyA.getVertex(vertex.indexA), vertex.wA);
-      // Vec2 wBLocal;
-      Rot.mulTransUnsafe(transformB.q, d.negateLocal(), temp);
-      vertex.indexB = proxyB.getSupport(temp);
-      Transform.mulToOutUnsafe(transformB, proxyB.getVertex(vertex.indexB), vertex.wB);
-      vertex.w.set(vertex.wB).subLocal(vertex.wA);
-
-      // Iteration count is equated to the number of support point calls.
-      ++iter;
-      ++GJK_ITERS;
-
-      // Check for duplicate support points. This is the main termination criteria.
-      boolean duplicate = false;
-      for (int i = 0; i < saveCount; ++i) {
-        if (vertex.indexA == saveA[i] && vertex.indexB == saveB[i]) {
-          duplicate = true;
-          break;
-        }
-      }
-
-      // If we found a duplicate support point we must exit to avoid cycling.
-      if (duplicate) {
-        break;
-      }
-
-      // New vertex is ok and needed.
-      ++simplex.m_count;
-    }
-
-    GJK_MAX_ITERS = MathUtils.max(GJK_MAX_ITERS, iter);
-
-    // Prepare output.
-    simplex.getWitnessPoints(output.pointA, output.pointB);
-    output.distance = MathUtils.distance(output.pointA, output.pointB);
-    output.iterations = iter;
-
-    // Cache the simplex.
-    simplex.writeCache(cache);
-
-    // Apply radii if requested.
-    if (input.useRadii) {
-      float rA = proxyA.m_radius;
-      float rB = proxyB.m_radius;
-
-      if (output.distance > rA + rB && output.distance > Settings.EPSILON) {
-        // Shapes are still no overlapped.
-        // Move the witness points to the outer surface.
-        output.distance -= rA + rB;
-        normal.set(output.pointB).subLocal(output.pointA);
-        normal.normalize();
-        temp.set(normal).mulLocal(rA);
-        output.pointA.addLocal(temp);
-        temp.set(normal).mulLocal(rB);
-        output.pointB.subLocal(temp);
-      } else {
-        // Shapes are overlapped when radii are considered.
-        // Move the witness points to the middle.
-        // Vec2 p = 0.5f * (output.pointA + output.pointB);
-        output.pointA.addLocal(output.pointB).mulLocal(.5f);
-        output.pointB.set(output.pointA);
-        output.distance = 0.0f;
-      }
-    }
-  }
+       public static int GJK_CALLS = 0;
+       public static int GJK_ITERS = 0;
+       public static int GJK_MAX_ITERS = 20;
+
+       /** GJK using Voronoi regions (Christer Ericson) and Barycentric coordinates. */
+       private class SimplexVertex {
+               public final Vec2 wA = new Vec2(); // support point in shapeA
+               public final Vec2 wB = new Vec2(); // support point in shapeB
+               public final Vec2 w = new Vec2(); // wB - wA
+               public float a; // barycentric coordinate for closest point
+               public int indexA; // wA index
+               public int indexB; // wB index
+
+               public void set (SimplexVertex sv) {
+                       wA.set(sv.wA);
+                       wB.set(sv.wB);
+                       w.set(sv.w);
+                       a = sv.a;
+                       indexA = sv.indexA;
+                       indexB = sv.indexB;
+               }
+       }
+
+       /** Used to warm start Distance. Set count to zero on first call.
+        * 
+        * @author daniel */
+       public static class SimplexCache {
+               /** length or area */
+               public float metric;
+               public int count;
+               /** vertices on shape A */
+               public final int indexA[] = new int[3];
+               /** vertices on shape B */
+               public final int indexB[] = new int[3];
+
+               public SimplexCache () {
+                       metric = 0;
+                       count = 0;
+                       indexA[0] = Integer.MAX_VALUE;
+                       indexA[1] = Integer.MAX_VALUE;
+                       indexA[2] = Integer.MAX_VALUE;
+                       indexB[0] = Integer.MAX_VALUE;
+                       indexB[1] = Integer.MAX_VALUE;
+                       indexB[2] = Integer.MAX_VALUE;
+               }
+
+               public void set (SimplexCache sc) {
+                       System.arraycopy(sc.indexA, 0, indexA, 0, indexA.length);
+                       System.arraycopy(sc.indexB, 0, indexB, 0, indexB.length);
+                       metric = sc.metric;
+                       count = sc.count;
+               }
+       }
+
+       private class Simplex {
+               public final SimplexVertex m_v1 = new SimplexVertex();
+               public final SimplexVertex m_v2 = new SimplexVertex();
+               public final SimplexVertex m_v3 = new SimplexVertex();
+               public final SimplexVertex vertices[] = {m_v1, m_v2, m_v3};
+               public int m_count;
+
+               public void readCache (SimplexCache cache, DistanceProxy proxyA, Transform transformA, DistanceProxy proxyB,
+                       Transform transformB) {
+                       assert (cache.count <= 3);
+
+                       // Copy data from cache.
+                       m_count = cache.count;
+
+                       for (int i = 0; i < m_count; ++i) {
+                               SimplexVertex v = vertices[i];
+                               v.indexA = cache.indexA[i];
+                               v.indexB = cache.indexB[i];
+                               Vec2 wALocal = proxyA.getVertex(v.indexA);
+                               Vec2 wBLocal = proxyB.getVertex(v.indexB);
+                               Transform.mulToOutUnsafe(transformA, wALocal, v.wA);
+                               Transform.mulToOutUnsafe(transformB, wBLocal, v.wB);
+                               v.w.set(v.wB).subLocal(v.wA);
+                               v.a = 0.0f;
+                       }
+
+                       // Compute the new simplex metric, if it is substantially different than
+                       // old metric then flush the simplex.
+                       if (m_count > 1) {
+                               float metric1 = cache.metric;
+                               float metric2 = getMetric();
+                               if (metric2 < 0.5f * metric1 || 2.0f * metric1 < metric2 || metric2 < Settings.EPSILON) {
+                                       // Reset the simplex.
+                                       m_count = 0;
+                               }
+                       }
+
+                       // If the cache is empty or invalid ...
+                       if (m_count == 0) {
+                               SimplexVertex v = vertices[0];
+                               v.indexA = 0;
+                               v.indexB = 0;
+                               Vec2 wALocal = proxyA.getVertex(0);
+                               Vec2 wBLocal = proxyB.getVertex(0);
+                               Transform.mulToOutUnsafe(transformA, wALocal, v.wA);
+                               Transform.mulToOutUnsafe(transformB, wBLocal, v.wB);
+                               v.w.set(v.wB).subLocal(v.wA);
+                               m_count = 1;
+                       }
+               }
+
+               public void writeCache (SimplexCache cache) {
+                       cache.metric = getMetric();
+                       cache.count = m_count;
+
+                       for (int i = 0; i < m_count; ++i) {
+                               cache.indexA[i] = (vertices[i].indexA);
+                               cache.indexB[i] = (vertices[i].indexB);
+                       }
+               }
+
+               private final Vec2 e12 = new Vec2();
+
+               public final void getSearchDirection (final Vec2 out) {
+                       switch (m_count) {
+                       case 1:
+                               out.set(m_v1.w).negateLocal();
+                               return;
+                       case 2:
+                               e12.set(m_v2.w).subLocal(m_v1.w);
+                               // use out for a temp variable real quick
+                               out.set(m_v1.w).negateLocal();
+                               float sgn = Vec2.cross(e12, out);
+
+                               if (sgn > 0f) {
+                                       // Origin is left of e12.
+                                       Vec2.crossToOutUnsafe(1f, e12, out);
+                                       return;
+                               } else {
+                                       // Origin is right of e12.
+                                       Vec2.crossToOutUnsafe(e12, 1f, out);
+                                       return;
+                               }
+                       default:
+                               assert (false);
+                               out.setZero();
+                               return;
+                       }
+               }
+
+               // djm pooled
+               private final Vec2 case2 = new Vec2();
+               private final Vec2 case22 = new Vec2();
+
+               /** this returns pooled objects. don't keep or modify them
+                * 
+                * @return */
+               public void getClosestPoint (final Vec2 out) {
+                       switch (m_count) {
+                       case 0:
+                               assert (false);
+                               out.setZero();
+                               return;
+                       case 1:
+                               out.set(m_v1.w);
+                               return;
+                       case 2:
+                               case22.set(m_v2.w).mulLocal(m_v2.a);
+                               case2.set(m_v1.w).mulLocal(m_v1.a).addLocal(case22);
+                               out.set(case2);
+                               return;
+                       case 3:
+                               out.setZero();
+                               return;
+                       default:
+                               assert (false);
+                               out.setZero();
+                               return;
+                       }
+               }
+
+               // djm pooled, and from above
+               private final Vec2 case3 = new Vec2();
+               private final Vec2 case33 = new Vec2();
+
+               public void getWitnessPoints (Vec2 pA, Vec2 pB) {
+                       switch (m_count) {
+                       case 0:
+                               assert (false);
+                               break;
+
+                       case 1:
+                               pA.set(m_v1.wA);
+                               pB.set(m_v1.wB);
+                               break;
+
+                       case 2:
+                               case2.set(m_v1.wA).mulLocal(m_v1.a);
+                               pA.set(m_v2.wA).mulLocal(m_v2.a).addLocal(case2);
+                               // m_v1.a * m_v1.wA + m_v2.a * m_v2.wA;
+                               // *pB = m_v1.a * m_v1.wB + m_v2.a * m_v2.wB;
+                               case2.set(m_v1.wB).mulLocal(m_v1.a);
+                               pB.set(m_v2.wB).mulLocal(m_v2.a).addLocal(case2);
+
+                               break;
+
+                       case 3:
+                               pA.set(m_v1.wA).mulLocal(m_v1.a);
+                               case3.set(m_v2.wA).mulLocal(m_v2.a);
+                               case33.set(m_v3.wA).mulLocal(m_v3.a);
+                               pA.addLocal(case3).addLocal(case33);
+                               pB.set(pA);
+                               // *pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA + m_v3.a * m_v3.wA;
+                               // *pB = *pA;
+                               break;
+
+                       default:
+                               assert (false);
+                               break;
+                       }
+               }
+
+               // djm pooled, from above
+               public float getMetric () {
+                       switch (m_count) {
+                       case 0:
+                               assert (false);
+                               return 0.0f;
+
+                       case 1:
+                               return 0.0f;
+
+                       case 2:
+                               return MathUtils.distance(m_v1.w, m_v2.w);
+
+                       case 3:
+                               case3.set(m_v2.w).subLocal(m_v1.w);
+                               case33.set(m_v3.w).subLocal(m_v1.w);
+                               // return Vec2.cross(m_v2.w - m_v1.w, m_v3.w - m_v1.w);
+                               return Vec2.cross(case3, case33);
+
+                       default:
+                               assert (false);
+                               return 0.0f;
+                       }
+               }
+
+               // djm pooled from above
+               /** Solve a line segment using barycentric coordinates. */
+               public void solve2 () {
+                       // Solve a line segment using barycentric coordinates.
+                       //
+                       // p = a1 * w1 + a2 * w2
+                       // a1 + a2 = 1
+                       //
+                       // The vector from the origin to the closest point on the line is
+                       // perpendicular to the line.
+                       // e12 = w2 - w1
+                       // dot(p, e) = 0
+                       // a1 * dot(w1, e) + a2 * dot(w2, e) = 0
+                       //
+                       // 2-by-2 linear system
+                       // [1 1 ][a1] = [1]
+                       // [w1.e12 w2.e12][a2] = [0]
+                       //
+                       // Define
+                       // d12_1 = dot(w2, e12)
+                       // d12_2 = -dot(w1, e12)
+                       // d12 = d12_1 + d12_2
+                       //
+                       // Solution
+                       // a1 = d12_1 / d12
+                       // a2 = d12_2 / d12
+                       final Vec2 w1 = m_v1.w;
+                       final Vec2 w2 = m_v2.w;
+                       e12.set(w2).subLocal(w1);
+
+                       // w1 region
+                       float d12_2 = -Vec2.dot(w1, e12);
+                       if (d12_2 <= 0.0f) {
+                               // a2 <= 0, so we clamp it to 0
+                               m_v1.a = 1.0f;
+                               m_count = 1;
+                               return;
+                       }
+
+                       // w2 region
+                       float d12_1 = Vec2.dot(w2, e12);
+                       if (d12_1 <= 0.0f) {
+                               // a1 <= 0, so we clamp it to 0
+                               m_v2.a = 1.0f;
+                               m_count = 1;
+                               m_v1.set(m_v2);
+                               return;
+                       }
+
+                       // Must be in e12 region.
+                       float inv_d12 = 1.0f / (d12_1 + d12_2);
+                       m_v1.a = d12_1 * inv_d12;
+                       m_v2.a = d12_2 * inv_d12;
+                       m_count = 2;
+               }
+
+               // djm pooled, and from above
+               private final Vec2 e13 = new Vec2();
+               private final Vec2 e23 = new Vec2();
+               private final Vec2 w1 = new Vec2();
+               private final Vec2 w2 = new Vec2();
+               private final Vec2 w3 = new Vec2();
+
+               /** Solve a line segment using barycentric coordinates.<br/>
+                * Possible regions:<br/>
+                * - points[2]<br/>
+                * - edge points[0]-points[2]<br/>
+                * - edge points[1]-points[2]<br/>
+                * - inside the triangle */
+               public void solve3 () {
+                       w1.set(m_v1.w);
+                       w2.set(m_v2.w);
+                       w3.set(m_v3.w);
+
+                       // Edge12
+                       // [1 1 ][a1] = [1]
+                       // [w1.e12 w2.e12][a2] = [0]
+                       // a3 = 0
+                       e12.set(w2).subLocal(w1);
+                       float w1e12 = Vec2.dot(w1, e12);
+                       float w2e12 = Vec2.dot(w2, e12);
+                       float d12_1 = w2e12;
+                       float d12_2 = -w1e12;
+
+                       // Edge13
+                       // [1 1 ][a1] = [1]
+                       // [w1.e13 w3.e13][a3] = [0]
+                       // a2 = 0
+                       e13.set(w3).subLocal(w1);
+                       float w1e13 = Vec2.dot(w1, e13);
+                       float w3e13 = Vec2.dot(w3, e13);
+                       float d13_1 = w3e13;
+                       float d13_2 = -w1e13;
+
+                       // Edge23
+                       // [1 1 ][a2] = [1]
+                       // [w2.e23 w3.e23][a3] = [0]
+                       // a1 = 0
+                       e23.set(w3).subLocal(w2);
+                       float w2e23 = Vec2.dot(w2, e23);
+                       float w3e23 = Vec2.dot(w3, e23);
+                       float d23_1 = w3e23;
+                       float d23_2 = -w2e23;
+
+                       // Triangle123
+                       float n123 = Vec2.cross(e12, e13);
+
+                       float d123_1 = n123 * Vec2.cross(w2, w3);
+                       float d123_2 = n123 * Vec2.cross(w3, w1);
+                       float d123_3 = n123 * Vec2.cross(w1, w2);
+
+                       // w1 region
+                       if (d12_2 <= 0.0f && d13_2 <= 0.0f) {
+                               m_v1.a = 1.0f;
+                               m_count = 1;
+                               return;
+                       }
+
+                       // e12
+                       if (d12_1 > 0.0f && d12_2 > 0.0f && d123_3 <= 0.0f) {
+                               float inv_d12 = 1.0f / (d12_1 + d12_2);
+                               m_v1.a = d12_1 * inv_d12;
+                               m_v2.a = d12_2 * inv_d12;
+                               m_count = 2;
+                               return;
+                       }
+
+                       // e13
+                       if (d13_1 > 0.0f && d13_2 > 0.0f && d123_2 <= 0.0f) {
+                               float inv_d13 = 1.0f / (d13_1 + d13_2);
+                               m_v1.a = d13_1 * inv_d13;
+                               m_v3.a = d13_2 * inv_d13;
+                               m_count = 2;
+                               m_v2.set(m_v3);
+                               return;
+                       }
+
+                       // w2 region
+                       if (d12_1 <= 0.0f && d23_2 <= 0.0f) {
+                               m_v2.a = 1.0f;
+                               m_count = 1;
+                               m_v1.set(m_v2);
+                               return;
+                       }
+
+                       // w3 region
+                       if (d13_1 <= 0.0f && d23_1 <= 0.0f) {
+                               m_v3.a = 1.0f;
+                               m_count = 1;
+                               m_v1.set(m_v3);
+                               return;
+                       }
+
+                       // e23
+                       if (d23_1 > 0.0f && d23_2 > 0.0f && d123_1 <= 0.0f) {
+                               float inv_d23 = 1.0f / (d23_1 + d23_2);
+                               m_v2.a = d23_1 * inv_d23;
+                               m_v3.a = d23_2 * inv_d23;
+                               m_count = 2;
+                               m_v1.set(m_v3);
+                               return;
+                       }
+
+                       // Must be in triangle123
+                       float inv_d123 = 1.0f / (d123_1 + d123_2 + d123_3);
+                       m_v1.a = d123_1 * inv_d123;
+                       m_v2.a = d123_2 * inv_d123;
+                       m_v3.a = d123_3 * inv_d123;
+                       m_count = 3;
+               }
+       }
+
+       /** A distance proxy is used by the GJK algorithm. It encapsulates any shape. TODO: see if we can just do assignments with
+        * m_vertices, instead of copying stuff over
+        * 
+        * @author daniel */
+       public static class DistanceProxy {
+               public final Vec2[] m_vertices;
+               public int m_count;
+               public float m_radius;
+               public final Vec2[] m_buffer;
+
+               public DistanceProxy () {
+                       m_vertices = new Vec2[Settings.maxPolygonVertices];
+                       for (int i = 0; i < m_vertices.length; i++) {
+                               m_vertices[i] = new Vec2();
+                       }
+                       m_buffer = new Vec2[2];
+                       m_count = 0;
+                       m_radius = 0f;
+               }
+
+               /** Initialize the proxy using the given shape. The shape must remain in scope while the proxy is in use. */
+               public final void set (final Shape shape, int index) {
+                       switch (shape.getType()) {
+                       case CIRCLE:
+                               final CircleShape circle = (CircleShape)shape;
+                               m_vertices[0].set(circle.m_p);
+                               m_count = 1;
+                               m_radius = circle.m_radius;
+
+                               break;
+                       case POLYGON:
+                               final PolygonShape poly = (PolygonShape)shape;
+                               m_count = poly.m_count;
+                               m_radius = poly.m_radius;
+                               for (int i = 0; i < m_count; i++) {
+                                       m_vertices[i].set(poly.m_vertices[i]);
+                               }
+                               break;
+                       case CHAIN:
+                               final ChainShape chain = (ChainShape)shape;
+                               assert (0 <= index && index < chain.m_count);
+
+                               m_buffer[0] = chain.m_vertices[index];
+                               if (index + 1 < chain.m_count) {
+                                       m_buffer[1] = chain.m_vertices[index + 1];
+                               } else {
+                                       m_buffer[1] = chain.m_vertices[0];
+                               }
+
+                               m_vertices[0].set(m_buffer[0]);
+                               m_vertices[1].set(m_buffer[1]);
+                               m_count = 2;
+                               m_radius = chain.m_radius;
+                               break;
+                       case EDGE:
+                               EdgeShape edge = (EdgeShape)shape;
+                               m_vertices[0].set(edge.m_vertex1);
+                               m_vertices[1].set(edge.m_vertex2);
+                               m_count = 2;
+                               m_radius = edge.m_radius;
+                               break;
+                       default:
+                               assert (false);
+                       }
+               }
+
+               /** Get the supporting vertex index in the given direction.
+                * 
+                * @param d
+                * @return */
+               public final int getSupport (final Vec2 d) {
+                       int bestIndex = 0;
+                       float bestValue = Vec2.dot(m_vertices[0], d);
+                       for (int i = 1; i < m_count; i++) {
+                               float value = Vec2.dot(m_vertices[i], d);
+                               if (value > bestValue) {
+                                       bestIndex = i;
+                                       bestValue = value;
+                               }
+                       }
+
+                       return bestIndex;
+               }
+
+               /** Get the supporting vertex in the given direction.
+                * 
+                * @param d
+                * @return */
+               public final Vec2 getSupportVertex (final Vec2 d) {
+                       int bestIndex = 0;
+                       float bestValue = Vec2.dot(m_vertices[0], d);
+                       for (int i = 1; i < m_count; i++) {
+                               float value = Vec2.dot(m_vertices[i], d);
+                               if (value > bestValue) {
+                                       bestIndex = i;
+                                       bestValue = value;
+                               }
+                       }
+
+                       return m_vertices[bestIndex];
+               }
+
+               /** Get the vertex count.
+                * 
+                * @return */
+               public final int getVertexCount () {
+                       return m_count;
+               }
+
+               /** Get a vertex by index. Used by Distance.
+                * 
+                * @param index
+                * @return */
+               public final Vec2 getVertex (int index) {
+                       assert (0 <= index && index < m_count);
+                       return m_vertices[index];
+               }
+       }
+
+       private Simplex simplex = new Simplex();
+       private int[] saveA = new int[3];
+       private int[] saveB = new int[3];
+       private Vec2 closestPoint = new Vec2();
+       private Vec2 d = new Vec2();
+       private Vec2 temp = new Vec2();
+       private Vec2 normal = new Vec2();
+
+       /** Compute the closest points between two shapes. Supports any combination of: CircleShape and PolygonShape. The simplex cache
+        * is input/output. On the first call set SimplexCache.count to zero.
+        * 
+        * @param output
+        * @param cache
+        * @param input */
+       public final void distance (final DistanceOutput output, final SimplexCache cache, final DistanceInput input) {
+               GJK_CALLS++;
+
+               final DistanceProxy proxyA = input.proxyA;
+               final DistanceProxy proxyB = input.proxyB;
+
+               Transform transformA = input.transformA;
+               Transform transformB = input.transformB;
+
+               // Initialize the simplex.
+               simplex.readCache(cache, proxyA, transformA, proxyB, transformB);
+
+               // Get simplex vertices as an array.
+               SimplexVertex[] vertices = simplex.vertices;
+
+               // These store the vertices of the last simplex so that we
+               // can check for duplicates and prevent cycling.
+               // (pooled above)
+               int saveCount = 0;
+
+               simplex.getClosestPoint(closestPoint);
+               float distanceSqr1 = closestPoint.lengthSquared();
+               float distanceSqr2 = distanceSqr1;
+
+               // Main iteration loop
+               int iter = 0;
+               while (iter < GJK_MAX_ITERS) {
+
+                       // Copy simplex so we can identify duplicates.
+                       saveCount = simplex.m_count;
+                       for (int i = 0; i < saveCount; i++) {
+                               saveA[i] = vertices[i].indexA;
+                               saveB[i] = vertices[i].indexB;
+                       }
+
+                       switch (simplex.m_count) {
+                       case 1:
+                               break;
+                       case 2:
+                               simplex.solve2();
+                               break;
+                       case 3:
+                               simplex.solve3();
+                               break;
+                       default:
+                               assert (false);
+                       }
+
+                       // If we have 3 points, then the origin is in the corresponding triangle.
+                       if (simplex.m_count == 3) {
+                               break;
+                       }
+
+                       // Compute closest point.
+                       simplex.getClosestPoint(closestPoint);
+                       distanceSqr2 = closestPoint.lengthSquared();
+
+                       // ensure progress
+                       if (distanceSqr2 >= distanceSqr1) {
+                               // break;
+                       }
+                       distanceSqr1 = distanceSqr2;
+
+                       // get search direction;
+                       simplex.getSearchDirection(d);
+
+                       // Ensure the search direction is numerically fit.
+                       if (d.lengthSquared() < Settings.EPSILON * Settings.EPSILON) {
+                               // The origin is probably contained by a line segment
+                               // or triangle. Thus the shapes are overlapped.
+
+                               // We can't return zero here even though there may be overlap.
+                               // In case the simplex is a point, segment, or triangle it is difficult
+                               // to determine if the origin is contained in the CSO or very close to it.
+                               break;
+                       }
+                       /*
+                        * SimplexVertex* vertex = vertices + simplex.m_count; vertex.indexA = proxyA.GetSupport(MulT(transformA.R, -d));
+                        * vertex.wA = Mul(transformA, proxyA.GetVertex(vertex.indexA)); Vec2 wBLocal; vertex.indexB =
+                        * proxyB.GetSupport(MulT(transformB.R, d)); vertex.wB = Mul(transformB, proxyB.GetVertex(vertex.indexB)); vertex.w =
+                        * vertex.wB - vertex.wA;
+                        */
+
+                       // Compute a tentative new simplex vertex using support points.
+                       SimplexVertex vertex = vertices[simplex.m_count];
+
+                       Rot.mulTransUnsafe(transformA.q, d.negateLocal(), temp);
+                       vertex.indexA = proxyA.getSupport(temp);
+                       Transform.mulToOutUnsafe(transformA, proxyA.getVertex(vertex.indexA), vertex.wA);
+                       // Vec2 wBLocal;
+                       Rot.mulTransUnsafe(transformB.q, d.negateLocal(), temp);
+                       vertex.indexB = proxyB.getSupport(temp);
+                       Transform.mulToOutUnsafe(transformB, proxyB.getVertex(vertex.indexB), vertex.wB);
+                       vertex.w.set(vertex.wB).subLocal(vertex.wA);
+
+                       // Iteration count is equated to the number of support point calls.
+                       ++iter;
+                       ++GJK_ITERS;
+
+                       // Check for duplicate support points. This is the main termination criteria.
+                       boolean duplicate = false;
+                       for (int i = 0; i < saveCount; ++i) {
+                               if (vertex.indexA == saveA[i] && vertex.indexB == saveB[i]) {
+                                       duplicate = true;
+                                       break;
+                               }
+                       }
+
+                       // If we found a duplicate support point we must exit to avoid cycling.
+                       if (duplicate) {
+                               break;
+                       }
+
+                       // New vertex is ok and needed.
+                       ++simplex.m_count;
+               }
+
+               GJK_MAX_ITERS = MathUtils.max(GJK_MAX_ITERS, iter);
+
+               // Prepare output.
+               simplex.getWitnessPoints(output.pointA, output.pointB);
+               output.distance = MathUtils.distance(output.pointA, output.pointB);
+               output.iterations = iter;
+
+               // Cache the simplex.
+               simplex.writeCache(cache);
+
+               // Apply radii if requested.
+               if (input.useRadii) {
+                       float rA = proxyA.m_radius;
+                       float rB = proxyB.m_radius;
+
+                       if (output.distance > rA + rB && output.distance > Settings.EPSILON) {
+                               // Shapes are still no overlapped.
+                               // Move the witness points to the outer surface.
+                               output.distance -= rA + rB;
+                               normal.set(output.pointB).subLocal(output.pointA);
+                               normal.normalize();
+                               temp.set(normal).mulLocal(rA);
+                               output.pointA.addLocal(temp);
+                               temp.set(normal).mulLocal(rB);
+                               output.pointB.subLocal(temp);
+                       } else {
+                               // Shapes are overlapped when radii are considered.
+                               // Move the witness points to the middle.
+                               // Vec2 p = 0.5f * (output.pointA + output.pointB);
+                               output.pointA.addLocal(output.pointB).mulLocal(.5f);
+                               output.pointB.set(output.pointA);
+                               output.distance = 0.0f;
+                       }
+               }
+       }
 }
index bab81ab..f4ecc78 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.collision.Distance.DistanceProxy;
 import org.jbox2d.common.Transform;
 
-/**
- * Input for Distance.
- * You have to option to use the shape radii
- * in the computation.
- *
- */
+/** Input for Distance. You have to option to use the shape radii in the computation. */
 public class DistanceInput {
        public DistanceProxy proxyA = new DistanceProxy();
        public DistanceProxy proxyB = new DistanceProxy();
index 4f18b64..b19ea72 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.common.Vec2;
 
-/**
- * Output for Distance.
- * @author Daniel
- */
+/** Output for Distance.
+ * @author Daniel */
 public class DistanceOutput {
        /** Closest point on shapeA */
        public final Vec2 pointA = new Vec2();
-       
+
        /** Closest point on shapeB */
        public final Vec2 pointB = new Vec2();
-       
+
        public float distance;
-       
+
        /** number of gjk iterations used */
        public int iterations;
 }
index 29798e5..04f3b01 100644 (file)
@@ -27,8 +27,7 @@ package org.jbox2d.collision;
 import org.jbox2d.common.Settings;
 import org.jbox2d.common.Vec2;
 
-/**
- * A manifold for two touching convex shapes. Box2D supports multiple types of contact:
+/** A manifold for two touching convex shapes. Box2D supports multiple types of contact:
  * <ul>
  * <li>clip point versus plane with radius</li>
  * <li>point versus point with radius (circles)</li>
@@ -45,73 +44,65 @@ import org.jbox2d.common.Vec2;
  * <li>e_faceA: the normal on polygonA</li>
  * <li>e_faceB: the normal on polygonB</li>
  * </ul>
- * We store contacts in this way so that position correction can account for movement, which is
- * critical for continuous physics. All contact scenarios must be expressed in one of these types.
- * This structure is stored across time steps, so we keep it small.
- */
+ * We store contacts in this way so that position correction can account for movement, which is critical for continuous physics.
+ * All contact scenarios must be expressed in one of these types. This structure is stored across time steps, so we keep it small. */
 public class Manifold {
 
-  public static enum ManifoldType {
-    CIRCLES, FACE_A, FACE_B
-  }
+       public static enum ManifoldType {
+               CIRCLES, FACE_A, FACE_B
+       }
 
-  /** The points of contact. */
-  public final ManifoldPoint[] points;
+       /** The points of contact. */
+       public final ManifoldPoint[] points;
 
-  /** not use for Type::e_points */
-  public final Vec2 localNormal;
+       /** not use for Type::e_points */
+       public final Vec2 localNormal;
 
-  /** usage depends on manifold type */
-  public final Vec2 localPoint;
+       /** usage depends on manifold type */
+       public final Vec2 localPoint;
 
-  public ManifoldType type;
+       public ManifoldType type;
 
-  /** The number of manifold points. */
-  public int pointCount;
+       /** The number of manifold points. */
+       public int pointCount;
 
-  /**
-   * creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints.
-   */
-  public Manifold() {
-    points = new ManifoldPoint[Settings.maxManifoldPoints];
-    for (int i = 0; i < Settings.maxManifoldPoints; i++) {
-      points[i] = new ManifoldPoint();
-    }
-    localNormal = new Vec2();
-    localPoint = new Vec2();
-    pointCount = 0;
-  }
+       /** creates a manifold with 0 points, with it's points array full of instantiated ManifoldPoints. */
+       public Manifold () {
+               points = new ManifoldPoint[Settings.maxManifoldPoints];
+               for (int i = 0; i < Settings.maxManifoldPoints; i++) {
+                       points[i] = new ManifoldPoint();
+               }
+               localNormal = new Vec2();
+               localPoint = new Vec2();
+               pointCount = 0;
+       }
 
-  /**
-   * Creates this manifold as a copy of the other
-   * 
-   * @param other
-   */
-  public Manifold(Manifold other) {
-    points = new ManifoldPoint[Settings.maxManifoldPoints];
-    localNormal = other.localNormal.clone();
-    localPoint = other.localPoint.clone();
-    pointCount = other.pointCount;
-    type = other.type;
-    // djm: this is correct now
-    for (int i = 0; i < Settings.maxManifoldPoints; i++) {
-      points[i] = new ManifoldPoint(other.points[i]);
-    }
-  }
+       /** Creates this manifold as a copy of the other
+        * 
+        * @param other */
+       public Manifold (Manifold other) {
+               points = new ManifoldPoint[Settings.maxManifoldPoints];
+               localNormal = other.localNormal.clone();
+               localPoint = other.localPoint.clone();
+               pointCount = other.pointCount;
+               type = other.type;
+               // djm: this is correct now
+               for (int i = 0; i < Settings.maxManifoldPoints; i++) {
+                       points[i] = new ManifoldPoint(other.points[i]);
+               }
+       }
 
-  /**
-   * copies this manifold from the given one
-   * 
-   * @param cp manifold to copy from
-   */
-  public void set(Manifold cp) {
-    for (int i = 0; i < cp.pointCount; i++) {
-      points[i].set(cp.points[i]);
-    }
+       /** copies this manifold from the given one
+        * 
+        * @param cp manifold to copy from */
+       public void set (Manifold cp) {
+               for (int i = 0; i < cp.pointCount; i++) {
+                       points[i].set(cp.points[i]);
+               }
 
-    type = cp.type;
-    localNormal.set(cp.localNormal);
-    localPoint.set(cp.localPoint);
-    pointCount = cp.pointCount;
-  }
+               type = cp.type;
+               localNormal.set(cp.localNormal);
+               localPoint.set(cp.localPoint);
+               pointCount = cp.pointCount;
+       }
 }
index 3a2ec48..0144d5d 100644 (file)
@@ -49,18 +49,16 @@ package org.jbox2d.collision;
 import org.jbox2d.common.Vec2;
 
 // updated to rev 100
-/**
- * A manifold point is a contact point belonging to a contact
- * manifold. It holds details related to the geometry and dynamics
- * of the contact points.
- * The local point usage depends on the manifold type:
- * <ul><li>e_circles: the local center of circleB</li>
+/** A manifold point is a contact point belonging to a contact manifold. It holds details related to the geometry and dynamics of
+ * the contact points. The local point usage depends on the manifold type:
+ * <ul>
+ * <li>e_circles: the local center of circleB</li>
  * <li>e_faceA: the local center of cirlceB or the clip point of polygonB</li>
- * <li>e_faceB: the clip point of polygonA</li></ul>
+ * <li>e_faceB: the clip point of polygonA</li>
+ * </ul>
  * This structure is stored across time steps, so we keep it small.<br/>
- * Note: the impulses are used for internal caching and may not
- * provide reliable contact forces, especially for high speed collisions.
- */
+ * Note: the impulses are used for internal caching and may not provide reliable contact forces, especially for high speed
+ * collisions. */
 public class ManifoldPoint {
        /** usage depends on manifold type */
        public final Vec2 localPoint;
@@ -71,31 +69,25 @@ public class ManifoldPoint {
        /** uniquely identifies a contact point between two shapes */
        public final ContactID id;
 
-       /**
-        * Blank manifold point with everything zeroed out.
-        */
-       public ManifoldPoint() {
+       /** Blank manifold point with everything zeroed out. */
+       public ManifoldPoint () {
                localPoint = new Vec2();
                normalImpulse = tangentImpulse = 0f;
                id = new ContactID();
        }
 
-       /**
-        * Creates a manifold point as a copy of the given point
-        * @param cp point to copy from
-        */
-       public ManifoldPoint(final ManifoldPoint cp) {
+       /** Creates a manifold point as a copy of the given point
+        * @param cp point to copy from */
+       public ManifoldPoint (final ManifoldPoint cp) {
                localPoint = cp.localPoint.clone();
                normalImpulse = cp.normalImpulse;
                tangentImpulse = cp.tangentImpulse;
                id = new ContactID(cp.id);
        }
 
-       /**
-        * Sets this manifold point form the given one
-        * @param cp the point to copy from
-        */
-       public void set(final ManifoldPoint cp){
+       /** Sets this manifold point form the given one
+        * @param cp the point to copy from */
+       public void set (final ManifoldPoint cp) {
                localPoint.set(cp.localPoint);
                normalImpulse = cp.normalImpulse;
                tangentImpulse = cp.tangentImpulse;
index 326c4ed..1b10d92 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.common.Vec2;
 
 // updated to rev 100
-/**
- * Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
- */
-public class RayCastInput{
+/** Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). */
+public class RayCastInput {
        public final Vec2 p1, p2;
        public float maxFraction;
 
-       public RayCastInput(){
+       public RayCastInput () {
                p1 = new Vec2();
                p2 = new Vec2();
                maxFraction = 0;
        }
 
-       public void set(final RayCastInput rci){
+       public void set (final RayCastInput rci) {
                p1.set(rci.p1);
                p2.set(rci.p2);
                maxFraction = rci.maxFraction;
index dfe6df6..8b601a8 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.common.Vec2;
 
 // updated to rev 100
-/**
- * Ray-cast output data. The ray hits at p1 + fraction * (p2 - p1), where p1 and p2
- * come from b2RayCastInput.
- */
-public class RayCastOutput{
+/** Ray-cast output data. The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 come from b2RayCastInput. */
+public class RayCastOutput {
        public final Vec2 normal;
        public float fraction;
 
-       public RayCastOutput(){
+       public RayCastOutput () {
                normal = new Vec2();
                fraction = 0;
        }
 
-       public void set(final RayCastOutput rco){
+       public void set (final RayCastOutput rco) {
                normal.set(rco.normal);
                fraction = rco.fraction;
        }
index fc59bce..9709943 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.collision.Distance.DistanceProxy;
 import org.jbox2d.collision.Distance.SimplexCache;
-import org.jbox2d.common.Mat22;
 import org.jbox2d.common.MathUtils;
 import org.jbox2d.common.Rot;
 import org.jbox2d.common.Settings;
@@ -34,512 +34,497 @@ import org.jbox2d.common.Transform;
 import org.jbox2d.common.Vec2;
 import org.jbox2d.pooling.IWorldPool;
 
-/**
- * Class used for computing the time of impact. This class should not be constructed usually, just
- * retrieve from the {@link SingletonPool#getTOI()}.
+/** Class used for computing the time of impact. This class should not be constructed usually, just retrieve from the
+ * {@link SingletonPool#getTOI()}.
  * 
- * @author daniel
- */
+ * @author daniel */
 public class TimeOfImpact {
-  public static final int MAX_ITERATIONS = 1000;
-
-  public static int toiCalls = 0;
-  public static int toiIters = 0;
-  public static int toiMaxIters = 0;
-  public static int toiRootIters = 0;
-  public static int toiMaxRootIters = 0;
-
-  /**
-   * Input parameters for TOI
-   * 
-   * @author Daniel Murphy
-   */
-  public static class TOIInput {
-    public final DistanceProxy proxyA = new DistanceProxy();
-    public final DistanceProxy proxyB = new DistanceProxy();
-    public final Sweep sweepA = new Sweep();
-    public final Sweep sweepB = new Sweep();
-    /**
-     * defines sweep interval [0, tMax]
-     */
-    public float tMax;
-  }
-
-  public static enum TOIOutputState {
-    UNKNOWN, FAILED, OVERLAPPED, TOUCHING, SEPARATED
-  }
-
-  /**
-   * Output parameters for TimeOfImpact
-   * 
-   * @author daniel
-   */
-  public static class TOIOutput {
-    public TOIOutputState state;
-    public float t;
-  }
-
-
-  // djm pooling
-  private final SimplexCache cache = new SimplexCache();
-  private final DistanceInput distanceInput = new DistanceInput();
-  private final Transform xfA = new Transform();
-  private final Transform xfB = new Transform();
-  private final DistanceOutput distanceOutput = new DistanceOutput();
-  private final SeparationFunction fcn = new SeparationFunction();
-  private final int[] indexes = new int[2];
-  private final Sweep sweepA = new Sweep();
-  private final Sweep sweepB = new Sweep();
-
-
-  private final IWorldPool pool;
-
-  public TimeOfImpact(IWorldPool argPool) {
-    pool = argPool;
-  }
-
-  /**
-   * Compute the upper bound on time before two shapes penetrate. Time is represented as a fraction
-   * between [0,tMax]. This uses a swept separating axis and may miss some intermediate,
-   * non-tunneling collision. If you change the time interval, you should call this function again.
-   * Note: use Distance to compute the contact point and normal at the time of impact.
-   * 
-   * @param output
-   * @param input
-   */
-  public final void timeOfImpact(TOIOutput output, TOIInput input) {
-    // CCD via the local separating axis method. This seeks progression
-    // by computing the largest time at which separation is maintained.
-
-    ++toiCalls;
-
-    output.state = TOIOutputState.UNKNOWN;
-    output.t = input.tMax;
-
-    final DistanceProxy proxyA = input.proxyA;
-    final DistanceProxy proxyB = input.proxyB;
-
-    sweepA.set(input.sweepA);
-    sweepB.set(input.sweepB);
-
-    // Large rotations can make the root finder fail, so we normalize the
-    // sweep angles.
-    sweepA.normalize();
-    sweepB.normalize();
-
-    float tMax = input.tMax;
-
-    float totalRadius = proxyA.m_radius + proxyB.m_radius;
-    // djm: whats with all these constants?
-    float target = MathUtils.max(Settings.linearSlop, totalRadius - 3.0f * Settings.linearSlop);
-    float tolerance = 0.25f * Settings.linearSlop;
-
-    assert (target > tolerance);
-
-    float t1 = 0f;
-    int iter = 0;
-
-    cache.count = 0;
-    distanceInput.proxyA = input.proxyA;
-    distanceInput.proxyB = input.proxyB;
-    distanceInput.useRadii = false;
-
-    // The outer loop progressively attempts to compute new separating axes.
-    // This loop terminates when an axis is repeated (no progress is made).
-    for (;;) {
-      sweepA.getTransform(xfA, t1);
-      sweepB.getTransform(xfB, t1);
-      // System.out.printf("sweepA: %f, %f, sweepB: %f, %f\n",
-      // sweepA.c.x, sweepA.c.y, sweepB.c.x, sweepB.c.y);
-      // Get the distance between shapes. We can also use the results
-      // to get a separating axis
-      distanceInput.transformA = xfA;
-      distanceInput.transformB = xfB;
-      pool.getDistance().distance(distanceOutput, cache, distanceInput);
-
-      // System.out.printf("Dist: %f at points %f, %f and %f, %f.  %d iterations\n",
-      // distanceOutput.distance, distanceOutput.pointA.x, distanceOutput.pointA.y,
-      // distanceOutput.pointB.x, distanceOutput.pointB.y,
-      // distanceOutput.iterations);
-
-      // If the shapes are overlapped, we give up on continuous collision.
-      if (distanceOutput.distance <= 0f) {
-        // System.out.println("failure, overlapped");
-        // Failure!
-        output.state = TOIOutputState.OVERLAPPED;
-        output.t = 0f;
-        break;
-      }
-
-      if (distanceOutput.distance < target + tolerance) {
-        // System.out.println("touching, victory");
-        // Victory!
-        output.state = TOIOutputState.TOUCHING;
-        output.t = t1;
-        break;
-      }
-
-      // Initialize the separating axis.
-      fcn.initialize(cache, proxyA, sweepA, proxyB, sweepB, t1);
-
-      // Compute the TOI on the separating axis. We do this by successively
-      // resolving the deepest point. This loop is bounded by the number of
-      // vertices.
-      boolean done = false;
-      float t2 = tMax;
-      int pushBackIter = 0;
-      for (;;) {
-
-        // Find the deepest point at t2. Store the witness point indices.
-        float s2 = fcn.findMinSeparation(indexes, t2);
-        // System.out.printf("s2: %f\n", s2);
-        // Is the final configuration separated?
-        if (s2 > target + tolerance) {
-          // Victory!
-          // System.out.println("separated");
-          output.state = TOIOutputState.SEPARATED;
-          output.t = tMax;
-          done = true;
-          break;
-        }
-
-        // Has the separation reached tolerance?
-        if (s2 > target - tolerance) {
-          // System.out.println("advancing");
-          // Advance the sweeps
-          t1 = t2;
-          break;
-        }
-
-        // Compute the initial separation of the witness points.
-        float s1 = fcn.evaluate(indexes[0], indexes[1], t1);
-        // Check for initial overlap. This might happen if the root finder
-        // runs out of iterations.
-        // System.out.printf("s1: %f, target: %f, tolerance: %f\n", s1, target,
-        // tolerance);
-        if (s1 < target - tolerance) {
-          // System.out.println("failed?");
-          output.state = TOIOutputState.FAILED;
-          output.t = t1;
-          done = true;
-          break;
-        }
-
-        // Check for touching
-        if (s1 <= target + tolerance) {
-          // System.out.println("touching?");
-          // Victory! t1 should hold the TOI (could be 0.0).
-          output.state = TOIOutputState.TOUCHING;
-          output.t = t1;
-          done = true;
-          break;
-        }
-
-        // Compute 1D root of: f(x) - target = 0
-        int rootIterCount = 0;
-        float a1 = t1, a2 = t2;
-        for (;;) {
-          // Use a mix of the secant rule and bisection.
-          float t;
-          if ((rootIterCount & 1) == 1) {
-            // Secant rule to improve convergence.
-            t = a1 + (target - s1) * (a2 - a1) / (s2 - s1);
-          } else {
-            // Bisection to guarantee progress.
-            t = 0.5f * (a1 + a2);
-          }
-
-          float s = fcn.evaluate(indexes[0], indexes[1], t);
-
-          if (MathUtils.abs(s - target) < tolerance) {
-            // t2 holds a tentative value for t1
-            t2 = t;
-            break;
-          }
-
-          // Ensure we continue to bracket the root.
-          if (s > target) {
-            a1 = t;
-            s1 = s;
-          } else {
-            a2 = t;
-            s2 = s;
-          }
-
-          ++rootIterCount;
-          ++toiRootIters;
-
-          // djm: whats with this? put in settings?
-          if (rootIterCount == 50) {
-            break;
-          }
-        }
-
-        toiMaxRootIters = MathUtils.max(toiMaxRootIters, rootIterCount);
-
-        ++pushBackIter;
-
-        if (pushBackIter == Settings.maxPolygonVertices) {
-          break;
-        }
-      }
-
-      ++iter;
-      ++toiIters;
-
-      if (done) {
-        // System.out.println("done");
-        break;
-      }
-
-      if (iter == MAX_ITERATIONS) {
-        // System.out.println("failed, root finder stuck");
-        // Root finder got stuck. Semi-victory.
-        output.state = TOIOutputState.FAILED;
-        output.t = t1;
-        break;
-      }
-    }
-
-    // System.out.printf("final sweeps: %f, %f, %f; %f, %f, %f", input.s)
-    toiMaxIters = MathUtils.max(toiMaxIters, iter);
-  }
+       public static final int MAX_ITERATIONS = 1000;
+
+       public static int toiCalls = 0;
+       public static int toiIters = 0;
+       public static int toiMaxIters = 0;
+       public static int toiRootIters = 0;
+       public static int toiMaxRootIters = 0;
+
+       /** Input parameters for TOI
+        * 
+        * @author Daniel Murphy */
+       public static class TOIInput {
+               public final DistanceProxy proxyA = new DistanceProxy();
+               public final DistanceProxy proxyB = new DistanceProxy();
+               public final Sweep sweepA = new Sweep();
+               public final Sweep sweepB = new Sweep();
+               /** defines sweep interval [0, tMax] */
+               public float tMax;
+       }
+
+       public static enum TOIOutputState {
+               UNKNOWN, FAILED, OVERLAPPED, TOUCHING, SEPARATED
+       }
+
+       /** Output parameters for TimeOfImpact
+        * 
+        * @author daniel */
+       public static class TOIOutput {
+               public TOIOutputState state;
+               public float t;
+       }
+
+       // djm pooling
+       private final SimplexCache cache = new SimplexCache();
+       private final DistanceInput distanceInput = new DistanceInput();
+       private final Transform xfA = new Transform();
+       private final Transform xfB = new Transform();
+       private final DistanceOutput distanceOutput = new DistanceOutput();
+       private final SeparationFunction fcn = new SeparationFunction();
+       private final int[] indexes = new int[2];
+       private final Sweep sweepA = new Sweep();
+       private final Sweep sweepB = new Sweep();
+
+       private final IWorldPool pool;
+
+       public TimeOfImpact (IWorldPool argPool) {
+               pool = argPool;
+       }
+
+       /** Compute the upper bound on time before two shapes penetrate. Time is represented as a fraction between [0,tMax]. This uses a
+        * swept separating axis and may miss some intermediate, non-tunneling collision. If you change the time interval, you should
+        * call this function again. Note: use Distance to compute the contact point and normal at the time of impact.
+        * 
+        * @param output
+        * @param input */
+       public final void timeOfImpact (TOIOutput output, TOIInput input) {
+               // CCD via the local separating axis method. This seeks progression
+               // by computing the largest time at which separation is maintained.
+
+               ++toiCalls;
+
+               output.state = TOIOutputState.UNKNOWN;
+               output.t = input.tMax;
+
+               final DistanceProxy proxyA = input.proxyA;
+               final DistanceProxy proxyB = input.proxyB;
+
+               sweepA.set(input.sweepA);
+               sweepB.set(input.sweepB);
+
+               // Large rotations can make the root finder fail, so we normalize the
+               // sweep angles.
+               sweepA.normalize();
+               sweepB.normalize();
+
+               float tMax = input.tMax;
+
+               float totalRadius = proxyA.m_radius + proxyB.m_radius;
+               // djm: whats with all these constants?
+               float target = MathUtils.max(Settings.linearSlop, totalRadius - 3.0f * Settings.linearSlop);
+               float tolerance = 0.25f * Settings.linearSlop;
+
+               assert (target > tolerance);
+
+               float t1 = 0f;
+               int iter = 0;
+
+               cache.count = 0;
+               distanceInput.proxyA = input.proxyA;
+               distanceInput.proxyB = input.proxyB;
+               distanceInput.useRadii = false;
+
+               // The outer loop progressively attempts to compute new separating axes.
+               // This loop terminates when an axis is repeated (no progress is made).
+               for (;;) {
+                       sweepA.getTransform(xfA, t1);
+                       sweepB.getTransform(xfB, t1);
+                       // System.out.printf("sweepA: %f, %f, sweepB: %f, %f\n",
+                       // sweepA.c.x, sweepA.c.y, sweepB.c.x, sweepB.c.y);
+                       // Get the distance between shapes. We can also use the results
+                       // to get a separating axis
+                       distanceInput.transformA = xfA;
+                       distanceInput.transformB = xfB;
+                       pool.getDistance().distance(distanceOutput, cache, distanceInput);
+
+                       // System.out.printf("Dist: %f at points %f, %f and %f, %f.  %d iterations\n",
+                       // distanceOutput.distance, distanceOutput.pointA.x, distanceOutput.pointA.y,
+                       // distanceOutput.pointB.x, distanceOutput.pointB.y,
+                       // distanceOutput.iterations);
+
+                       // If the shapes are overlapped, we give up on continuous collision.
+                       if (distanceOutput.distance <= 0f) {
+                               // System.out.println("failure, overlapped");
+                               // Failure!
+                               output.state = TOIOutputState.OVERLAPPED;
+                               output.t = 0f;
+                               break;
+                       }
+
+                       if (distanceOutput.distance < target + tolerance) {
+                               // System.out.println("touching, victory");
+                               // Victory!
+                               output.state = TOIOutputState.TOUCHING;
+                               output.t = t1;
+                               break;
+                       }
+
+                       // Initialize the separating axis.
+                       fcn.initialize(cache, proxyA, sweepA, proxyB, sweepB, t1);
+
+                       // Compute the TOI on the separating axis. We do this by successively
+                       // resolving the deepest point. This loop is bounded by the number of
+                       // vertices.
+                       boolean done = false;
+                       float t2 = tMax;
+                       int pushBackIter = 0;
+                       for (;;) {
+
+                               // Find the deepest point at t2. Store the witness point indices.
+                               float s2 = fcn.findMinSeparation(indexes, t2);
+                               // System.out.printf("s2: %f\n", s2);
+                               // Is the final configuration separated?
+                               if (s2 > target + tolerance) {
+                                       // Victory!
+                                       // System.out.println("separated");
+                                       output.state = TOIOutputState.SEPARATED;
+                                       output.t = tMax;
+                                       done = true;
+                                       break;
+                               }
+
+                               // Has the separation reached tolerance?
+                               if (s2 > target - tolerance) {
+                                       // System.out.println("advancing");
+                                       // Advance the sweeps
+                                       t1 = t2;
+                                       break;
+                               }
+
+                               // Compute the initial separation of the witness points.
+                               float s1 = fcn.evaluate(indexes[0], indexes[1], t1);
+                               // Check for initial overlap. This might happen if the root finder
+                               // runs out of iterations.
+                               // System.out.printf("s1: %f, target: %f, tolerance: %f\n", s1, target,
+                               // tolerance);
+                               if (s1 < target - tolerance) {
+                                       // System.out.println("failed?");
+                                       output.state = TOIOutputState.FAILED;
+                                       output.t = t1;
+                                       done = true;
+                                       break;
+                               }
+
+                               // Check for touching
+                               if (s1 <= target + tolerance) {
+                                       // System.out.println("touching?");
+                                       // Victory! t1 should hold the TOI (could be 0.0).
+                                       output.state = TOIOutputState.TOUCHING;
+                                       output.t = t1;
+                                       done = true;
+                                       break;
+                               }
+
+                               // Compute 1D root of: f(x) - target = 0
+                               int rootIterCount = 0;
+                               float a1 = t1, a2 = t2;
+                               for (;;) {
+                                       // Use a mix of the secant rule and bisection.
+                                       float t;
+                                       if ((rootIterCount & 1) == 1) {
+                                               // Secant rule to improve convergence.
+                                               t = a1 + (target - s1) * (a2 - a1) / (s2 - s1);
+                                       } else {
+                                               // Bisection to guarantee progress.
+                                               t = 0.5f * (a1 + a2);
+                                       }
+
+                                       float s = fcn.evaluate(indexes[0], indexes[1], t);
+
+                                       if (MathUtils.abs(s - target) < tolerance) {
+                                               // t2 holds a tentative value for t1
+                                               t2 = t;
+                                               break;
+                                       }
+
+                                       // Ensure we continue to bracket the root.
+                                       if (s > target) {
+                                               a1 = t;
+                                               s1 = s;
+                                       } else {
+                                               a2 = t;
+                                               s2 = s;
+                                       }
+
+                                       ++rootIterCount;
+                                       ++toiRootIters;
+
+                                       // djm: whats with this? put in settings?
+                                       if (rootIterCount == 50) {
+                                               break;
+                                       }
+                               }
+
+                               toiMaxRootIters = MathUtils.max(toiMaxRootIters, rootIterCount);
+
+                               ++pushBackIter;
+
+                               if (pushBackIter == Settings.maxPolygonVertices) {
+                                       break;
+                               }
+                       }
+
+                       ++iter;
+                       ++toiIters;
+
+                       if (done) {
+                               // System.out.println("done");
+                               break;
+                       }
+
+                       if (iter == MAX_ITERATIONS) {
+                               // System.out.println("failed, root finder stuck");
+                               // Root finder got stuck. Semi-victory.
+                               output.state = TOIOutputState.FAILED;
+                               output.t = t1;
+                               break;
+                       }
+               }
+
+               // System.out.printf("final sweeps: %f, %f, %f; %f, %f, %f", input.s)
+               toiMaxIters = MathUtils.max(toiMaxIters, iter);
+       }
 }
 
-
 enum Type {
-  POINTS, FACE_A, FACE_B;
+       POINTS, FACE_A, FACE_B;
 }
 
-
 class SeparationFunction {
 
-  public DistanceProxy m_proxyA;
-  public DistanceProxy m_proxyB;
-  public Type m_type;
-  public final Vec2 m_localPoint = new Vec2();
-  public final Vec2 m_axis = new Vec2();
-  public Sweep m_sweepA;
-  public Sweep m_sweepB;
-
-  // djm pooling
-  private final Vec2 localPointA = new Vec2();
-  private final Vec2 localPointB = new Vec2();
-  private final Vec2 pointA = new Vec2();
-  private final Vec2 pointB = new Vec2();
-  private final Vec2 localPointA1 = new Vec2();
-  private final Vec2 localPointA2 = new Vec2();
-  private final Vec2 normal = new Vec2();
-  private final Vec2 localPointB1 = new Vec2();
-  private final Vec2 localPointB2 = new Vec2();
-  private final Vec2 temp = new Vec2();
-  private final Transform xfa = new Transform();
-  private final Transform xfb = new Transform();
-
-  // TODO_ERIN might not need to return the separation
-
-  public float initialize(final SimplexCache cache, final DistanceProxy proxyA, final Sweep sweepA,
-      final DistanceProxy proxyB, final Sweep sweepB, float t1) {
-    m_proxyA = proxyA;
-    m_proxyB = proxyB;
-    int count = cache.count;
-    assert (0 < count && count < 3);
-
-    m_sweepA = sweepA;
-    m_sweepB = sweepB;
-
-    m_sweepA.getTransform(xfa, t1);
-    m_sweepB.getTransform(xfb, t1);
-
-    // log.debug("initializing separation.\n" +
-    // "cache: "+cache.count+"-"+cache.metric+"-"+cache.indexA+"-"+cache.indexB+"\n"
-    // "distance: "+proxyA.
-
-    if (count == 1) {
-      m_type = Type.POINTS;
-      /*
-       * Vec2 localPointA = m_proxyA.GetVertex(cache.indexA[0]); Vec2 localPointB =
-       * m_proxyB.GetVertex(cache.indexB[0]); Vec2 pointA = Mul(transformA, localPointA); Vec2
-       * pointB = Mul(transformB, localPointB); m_axis = pointB - pointA; m_axis.Normalize();
-       */
-      localPointA.set(m_proxyA.getVertex(cache.indexA[0]));
-      localPointB.set(m_proxyB.getVertex(cache.indexB[0]));
-      Transform.mulToOutUnsafe(xfa, localPointA, pointA);
-      Transform.mulToOutUnsafe(xfb, localPointB, pointB);
-      m_axis.set(pointB).subLocal(pointA);
-      float s = m_axis.normalize();
-      return s;
-    } else if (cache.indexA[0] == cache.indexA[1]) {
-      // Two points on B and one on A.
-      m_type = Type.FACE_B;
-
-      localPointB1.set(m_proxyB.getVertex(cache.indexB[0]));
-      localPointB2.set(m_proxyB.getVertex(cache.indexB[1]));
-
-      temp.set(localPointB2).subLocal(localPointB1);
-      Vec2.crossToOutUnsafe(temp, 1f, m_axis);
-      m_axis.normalize();
-
-      Rot.mulToOutUnsafe(xfb.q, m_axis, normal);
-
-      m_localPoint.set(localPointB1).addLocal(localPointB2).mulLocal(.5f);
-      Transform.mulToOutUnsafe(xfb, m_localPoint, pointB);
-
-      localPointA.set(proxyA.getVertex(cache.indexA[0]));
-      Transform.mulToOutUnsafe(xfa, localPointA, pointA);
-
-      temp.set(pointA).subLocal(pointB);
-      float s = Vec2.dot(temp, normal);
-      if (s < 0.0f) {
-        m_axis.negateLocal();
-        s = -s;
-      }
-      return s;
-    } else {
-      // Two points on A and one or two points on B.
-      m_type = Type.FACE_A;
-
-      localPointA1.set(m_proxyA.getVertex(cache.indexA[0]));
-      localPointA2.set(m_proxyA.getVertex(cache.indexA[1]));
-
-      temp.set(localPointA2).subLocal(localPointA1);
-      Vec2.crossToOutUnsafe(temp, 1.0f, m_axis);
-      m_axis.normalize();
-
-      Rot.mulToOutUnsafe(xfa.q, m_axis, normal);
-
-      m_localPoint.set(localPointA1).addLocal(localPointA2).mulLocal(.5f);
-      Transform.mulToOutUnsafe(xfa, m_localPoint, pointA);
-
-      localPointB.set(m_proxyB.getVertex(cache.indexB[0]));
-      Transform.mulToOutUnsafe(xfb, localPointB, pointB);
-
-      temp.set(pointB).subLocal(pointA);
-      float s = Vec2.dot(temp, normal);
-      if (s < 0.0f) {
-        m_axis.negateLocal();
-        s = -s;
-      }
-      return s;
-    }
-  }
-
-  private final Vec2 axisA = new Vec2();
-  private final Vec2 axisB = new Vec2();
-
-  // float FindMinSeparation(int* indexA, int* indexB, float t) const
-  public float findMinSeparation(int[] indexes, float t) {
-
-    m_sweepA.getTransform(xfa, t);
-    m_sweepB.getTransform(xfb, t);
-
-    switch (m_type) {
-      case POINTS: {
-        Rot.mulTransUnsafe(xfa.q, m_axis, axisA);
-        Rot.mulTransUnsafe(xfb.q, m_axis.negateLocal(), axisB);
-        m_axis.negateLocal();
-
-        indexes[0] = m_proxyA.getSupport(axisA);
-        indexes[1] = m_proxyB.getSupport(axisB);
-
-        localPointA.set(m_proxyA.getVertex(indexes[0]));
-        localPointB.set(m_proxyB.getVertex(indexes[1]));
-
-        Transform.mulToOutUnsafe(xfa, localPointA, pointA);
-        Transform.mulToOutUnsafe(xfb, localPointB, pointB);
-
-        float separation = Vec2.dot(pointB.subLocal(pointA), m_axis);
-        return separation;
-      }
-      case FACE_A: {
-        Rot.mulToOutUnsafe(xfa.q, m_axis, normal);
-        Transform.mulToOutUnsafe(xfa, m_localPoint, pointA);
-
-        Rot.mulTransUnsafe(xfb.q, normal.negateLocal(), axisB);
-        normal.negateLocal();
-
-        indexes[0] = -1;
-        indexes[1] = m_proxyB.getSupport(axisB);
-
-        localPointB.set(m_proxyB.getVertex(indexes[1]));
-        Transform.mulToOutUnsafe(xfb, localPointB, pointB);
-
-        float separation = Vec2.dot(pointB.subLocal(pointA), normal);
-        return separation;
-      }
-      case FACE_B: {
-        Rot.mulToOutUnsafe(xfb.q, m_axis, normal);
-        Transform.mulToOutUnsafe(xfb, m_localPoint, pointB);
-
-        Rot.mulTransUnsafe(xfa.q, normal.negateLocal(), axisA);
-        normal.negateLocal();
-
-        indexes[1] = -1;
-        indexes[0] = m_proxyA.getSupport(axisA);
-
-        localPointA.set(m_proxyA.getVertex(indexes[0]));
-        Transform.mulToOutUnsafe(xfa, localPointA, pointA);
-
-        float separation = Vec2.dot(pointA.subLocal(pointB), normal);
-        return separation;
-      }
-      default:
-        assert (false);
-        indexes[0] = -1;
-        indexes[1] = -1;
-        return 0f;
-    }
-  }
-
-  public float evaluate(int indexA, int indexB, float t) {
-    m_sweepA.getTransform(xfa, t);
-    m_sweepB.getTransform(xfb, t);
-
-    switch (m_type) {
-      case POINTS: {
-        Rot.mulTransUnsafe(xfa.q, m_axis, axisA);
-        Rot.mulTransUnsafe(xfb.q, m_axis.negateLocal(), axisB);
-        m_axis.negateLocal();
-
-        localPointA.set(m_proxyA.getVertex(indexA));
-        localPointB.set(m_proxyB.getVertex(indexB));
-
-        Transform.mulToOutUnsafe(xfa, localPointA, pointA);
-        Transform.mulToOutUnsafe(xfb, localPointB, pointB);
-
-        float separation = Vec2.dot(pointB.subLocal(pointA), m_axis);
-        return separation;
-      }
-      case FACE_A: {
-        // System.out.printf("We're faceA\n");
-        Rot.mulToOutUnsafe(xfa.q, m_axis, normal);
-        Transform.mulToOutUnsafe(xfa, m_localPoint, pointA);
-
-        Rot.mulTransUnsafe(xfb.q, normal.negateLocal(), axisB);
-        normal.negateLocal();
-
-        localPointB.set(m_proxyB.getVertex(indexB));
-        Transform.mulToOutUnsafe(xfb, localPointB, pointB);
-        float separation = Vec2.dot(pointB.subLocal(pointA), normal);
-        return separation;
-      }
-      case FACE_B: {
-        // System.out.printf("We're faceB\n");
-        Rot.mulToOutUnsafe(xfb.q, m_axis, normal);
-        Transform.mulToOutUnsafe(xfb, m_localPoint, pointB);
-
-        Rot.mulTransUnsafe(xfa.q, normal.negateLocal(), axisA);
-        normal.negateLocal();
-
-        localPointA.set(m_proxyA.getVertex(indexA));
-        Transform.mulToOutUnsafe(xfa, localPointA, pointA);
-
-        float separation = Vec2.dot(pointA.subLocal(pointB), normal);
-        return separation;
-      }
-      default:
-        assert (false);
-        return 0f;
-    }
-  }
+       public DistanceProxy m_proxyA;
+       public DistanceProxy m_proxyB;
+       public Type m_type;
+       public final Vec2 m_localPoint = new Vec2();
+       public final Vec2 m_axis = new Vec2();
+       public Sweep m_sweepA;
+       public Sweep m_sweepB;
+
+       // djm pooling
+       private final Vec2 localPointA = new Vec2();
+       private final Vec2 localPointB = new Vec2();
+       private final Vec2 pointA = new Vec2();
+       private final Vec2 pointB = new Vec2();
+       private final Vec2 localPointA1 = new Vec2();
+       private final Vec2 localPointA2 = new Vec2();
+       private final Vec2 normal = new Vec2();
+       private final Vec2 localPointB1 = new Vec2();
+       private final Vec2 localPointB2 = new Vec2();
+       private final Vec2 temp = new Vec2();
+       private final Transform xfa = new Transform();
+       private final Transform xfb = new Transform();
+
+       // TODO_ERIN might not need to return the separation
+
+       public float initialize (final SimplexCache cache, final DistanceProxy proxyA, final Sweep sweepA, final DistanceProxy proxyB,
+               final Sweep sweepB, float t1) {
+               m_proxyA = proxyA;
+               m_proxyB = proxyB;
+               int count = cache.count;
+               assert (0 < count && count < 3);
+
+               m_sweepA = sweepA;
+               m_sweepB = sweepB;
+
+               m_sweepA.getTransform(xfa, t1);
+               m_sweepB.getTransform(xfb, t1);
+
+               // log.debug("initializing separation.\n" +
+               // "cache: "+cache.count+"-"+cache.metric+"-"+cache.indexA+"-"+cache.indexB+"\n"
+               // "distance: "+proxyA.
+
+               if (count == 1) {
+                       m_type = Type.POINTS;
+                       /*
+                        * Vec2 localPointA = m_proxyA.GetVertex(cache.indexA[0]); Vec2 localPointB = m_proxyB.GetVertex(cache.indexB[0]); Vec2
+                        * pointA = Mul(transformA, localPointA); Vec2 pointB = Mul(transformB, localPointB); m_axis = pointB - pointA;
+                        * m_axis.Normalize();
+                        */
+                       localPointA.set(m_proxyA.getVertex(cache.indexA[0]));
+                       localPointB.set(m_proxyB.getVertex(cache.indexB[0]));
+                       Transform.mulToOutUnsafe(xfa, localPointA, pointA);
+                       Transform.mulToOutUnsafe(xfb, localPointB, pointB);
+                       m_axis.set(pointB).subLocal(pointA);
+                       float s = m_axis.normalize();
+                       return s;
+               } else if (cache.indexA[0] == cache.indexA[1]) {
+                       // Two points on B and one on A.
+                       m_type = Type.FACE_B;
+
+                       localPointB1.set(m_proxyB.getVertex(cache.indexB[0]));
+                       localPointB2.set(m_proxyB.getVertex(cache.indexB[1]));
+
+                       temp.set(localPointB2).subLocal(localPointB1);
+                       Vec2.crossToOutUnsafe(temp, 1f, m_axis);
+                       m_axis.normalize();
+
+                       Rot.mulToOutUnsafe(xfb.q, m_axis, normal);
+
+                       m_localPoint.set(localPointB1).addLocal(localPointB2).mulLocal(.5f);
+                       Transform.mulToOutUnsafe(xfb, m_localPoint, pointB);
+
+                       localPointA.set(proxyA.getVertex(cache.indexA[0]));
+                       Transform.mulToOutUnsafe(xfa, localPointA, pointA);
+
+                       temp.set(pointA).subLocal(pointB);
+                       float s = Vec2.dot(temp, normal);
+                       if (s < 0.0f) {
+                               m_axis.negateLocal();
+                               s = -s;
+                       }
+                       return s;
+               } else {
+                       // Two points on A and one or two points on B.
+                       m_type = Type.FACE_A;
+
+                       localPointA1.set(m_proxyA.getVertex(cache.indexA[0]));
+                       localPointA2.set(m_proxyA.getVertex(cache.indexA[1]));
+
+                       temp.set(localPointA2).subLocal(localPointA1);
+                       Vec2.crossToOutUnsafe(temp, 1.0f, m_axis);
+                       m_axis.normalize();
+
+                       Rot.mulToOutUnsafe(xfa.q, m_axis, normal);
+
+                       m_localPoint.set(localPointA1).addLocal(localPointA2).mulLocal(.5f);
+                       Transform.mulToOutUnsafe(xfa, m_localPoint, pointA);
+
+                       localPointB.set(m_proxyB.getVertex(cache.indexB[0]));
+                       Transform.mulToOutUnsafe(xfb, localPointB, pointB);
+
+                       temp.set(pointB).subLocal(pointA);
+                       float s = Vec2.dot(temp, normal);
+                       if (s < 0.0f) {
+                               m_axis.negateLocal();
+                               s = -s;
+                       }
+                       return s;
+               }
+       }
+
+       private final Vec2 axisA = new Vec2();
+       private final Vec2 axisB = new Vec2();
+
+       // float FindMinSeparation(int* indexA, int* indexB, float t) const
+       public float findMinSeparation (int[] indexes, float t) {
+
+               m_sweepA.getTransform(xfa, t);
+               m_sweepB.getTransform(xfb, t);
+
+               switch (m_type) {
+               case POINTS: {
+                       Rot.mulTransUnsafe(xfa.q, m_axis, axisA);
+                       Rot.mulTransUnsafe(xfb.q, m_axis.negateLocal(), axisB);
+                       m_axis.negateLocal();
+
+                       indexes[0] = m_proxyA.getSupport(axisA);
+                       indexes[1] = m_proxyB.getSupport(axisB);
+
+                       localPointA.set(m_proxyA.getVertex(indexes[0]));
+                       localPointB.set(m_proxyB.getVertex(indexes[1]));
+
+                       Transform.mulToOutUnsafe(xfa, localPointA, pointA);
+                       Transform.mulToOutUnsafe(xfb, localPointB, pointB);
+
+                       float separation = Vec2.dot(pointB.subLocal(pointA), m_axis);
+                       return separation;
+               }
+               case FACE_A: {
+                       Rot.mulToOutUnsafe(xfa.q, m_axis, normal);
+                       Transform.mulToOutUnsafe(xfa, m_localPoint, pointA);
+
+                       Rot.mulTransUnsafe(xfb.q, normal.negateLocal(), axisB);
+                       normal.negateLocal();
+
+                       indexes[0] = -1;
+                       indexes[1] = m_proxyB.getSupport(axisB);
+
+                       localPointB.set(m_proxyB.getVertex(indexes[1]));
+                       Transform.mulToOutUnsafe(xfb, localPointB, pointB);
+
+                       float separation = Vec2.dot(pointB.subLocal(pointA), normal);
+                       return separation;
+               }
+               case FACE_B: {
+                       Rot.mulToOutUnsafe(xfb.q, m_axis, normal);
+                       Transform.mulToOutUnsafe(xfb, m_localPoint, pointB);
+
+                       Rot.mulTransUnsafe(xfa.q, normal.negateLocal(), axisA);
+                       normal.negateLocal();
+
+                       indexes[1] = -1;
+                       indexes[0] = m_proxyA.getSupport(axisA);
+
+                       localPointA.set(m_proxyA.getVertex(indexes[0]));
+                       Transform.mulToOutUnsafe(xfa, localPointA, pointA);
+
+                       float separation = Vec2.dot(pointA.subLocal(pointB), normal);
+                       return separation;
+               }
+               default:
+                       assert (false);
+                       indexes[0] = -1;
+                       indexes[1] = -1;
+                       return 0f;
+               }
+       }
+
+       public float evaluate (int indexA, int indexB, float t) {
+               m_sweepA.getTransform(xfa, t);
+               m_sweepB.getTransform(xfb, t);
+
+               switch (m_type) {
+               case POINTS: {
+                       Rot.mulTransUnsafe(xfa.q, m_axis, axisA);
+                       Rot.mulTransUnsafe(xfb.q, m_axis.negateLocal(), axisB);
+                       m_axis.negateLocal();
+
+                       localPointA.set(m_proxyA.getVertex(indexA));
+                       localPointB.set(m_proxyB.getVertex(indexB));
+
+                       Transform.mulToOutUnsafe(xfa, localPointA, pointA);
+                       Transform.mulToOutUnsafe(xfb, localPointB, pointB);
+
+                       float separation = Vec2.dot(pointB.subLocal(pointA), m_axis);
+                       return separation;
+               }
+               case FACE_A: {
+                       // System.out.printf("We're faceA\n");
+                       Rot.mulToOutUnsafe(xfa.q, m_axis, normal);
+                       Transform.mulToOutUnsafe(xfa, m_localPoint, pointA);
+
+                       Rot.mulTransUnsafe(xfb.q, normal.negateLocal(), axisB);
+                       normal.negateLocal();
+
+                       localPointB.set(m_proxyB.getVertex(indexB));
+                       Transform.mulToOutUnsafe(xfb, localPointB, pointB);
+                       float separation = Vec2.dot(pointB.subLocal(pointA), normal);
+                       return separation;
+               }
+               case FACE_B: {
+                       // System.out.printf("We're faceB\n");
+                       Rot.mulToOutUnsafe(xfb.q, m_axis, normal);
+                       Transform.mulToOutUnsafe(xfb, m_localPoint, pointB);
+
+                       Rot.mulTransUnsafe(xfa.q, normal.negateLocal(), axisA);
+                       normal.negateLocal();
+
+                       localPointA.set(m_proxyA.getVertex(indexA));
+                       Transform.mulToOutUnsafe(xfa, localPointA, pointA);
+
+                       float separation = Vec2.dot(pointA.subLocal(pointB), normal);
+                       return separation;
+               }
+               default:
+                       assert (false);
+                       return 0f;
+               }
+       }
 }
index 8a57f45..0bccaf9 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision;
 
 import org.jbox2d.common.MathUtils;
@@ -29,180 +30,167 @@ import org.jbox2d.common.Settings;
 import org.jbox2d.common.Transform;
 import org.jbox2d.common.Vec2;
 
-/**
- * This is used to compute the current state of a contact manifold.
+/** This is used to compute the current state of a contact manifold.
  * 
- * @author daniel
- */
+ * @author daniel */
 public class WorldManifold {
-  /**
-   * World vector pointing from A to B
-   */
-  public final Vec2 normal;
-
-  /**
-   * World contact point (point of intersection)
-   */
-  public final Vec2[] points;
-
-  public WorldManifold() {
-    normal = new Vec2();
-    points = new Vec2[Settings.maxManifoldPoints];
-    for (int i = 0; i < Settings.maxManifoldPoints; i++) {
-      points[i] = new Vec2();
-    }
-  }
-
-  private final Vec2 pool3 = new Vec2();
-  private final Vec2 pool4 = new Vec2();
-
-  public final void initialize(final Manifold manifold, final Transform xfA, float radiusA,
-      final Transform xfB, float radiusB) {
-    if (manifold.pointCount == 0) {
-      return;
-    }
-
-    switch (manifold.type) {
-      case CIRCLES: {
-        // final Vec2 pointA = pool3;
-        // final Vec2 pointB = pool4;
-        //
-        // normal.set(1, 0);
-        // Transform.mulToOut(xfA, manifold.localPoint, pointA);
-        // Transform.mulToOut(xfB, manifold.points[0].localPoint, pointB);
-        //
-        // if (MathUtils.distanceSquared(pointA, pointB) > Settings.EPSILON * Settings.EPSILON) {
-        // normal.set(pointB).subLocal(pointA);
-        // normal.normalize();
-        // }
-        //
-        // cA.set(normal).mulLocal(radiusA).addLocal(pointA);
-        // cB.set(normal).mulLocal(radiusB).subLocal(pointB).negateLocal();
-        // points[0].set(cA).addLocal(cB).mulLocal(0.5f);
-        final Vec2 pointA = pool3;
-        final Vec2 pointB = pool4;
-
-        normal.x = 1;
-        normal.y = 0;
-        // pointA.x = xfA.p.x + xfA.q.ex.x * manifold.localPoint.x + xfA.q.ey.x *
-        // manifold.localPoint.y;
-        // pointA.y = xfA.p.y + xfA.q.ex.y * manifold.localPoint.x + xfA.q.ey.y *
-        // manifold.localPoint.y;
-        // pointB.x = xfB.p.x + xfB.q.ex.x * manifold.points[0].localPoint.x + xfB.q.ey.x *
-        // manifold.points[0].localPoint.y;
-        // pointB.y = xfB.p.y + xfB.q.ex.y * manifold.points[0].localPoint.x + xfB.q.ey.y *
-        // manifold.points[0].localPoint.y;
-        Transform.mulToOut(xfA, manifold.localPoint, pointA);
-        Transform.mulToOut(xfB, manifold.points[0].localPoint, pointB);
-
-        if (MathUtils.distanceSquared(pointA, pointB) > Settings.EPSILON * Settings.EPSILON) {
-          normal.x = pointB.x - pointA.x;
-          normal.y = pointB.y - pointA.y;
-          normal.normalize();
-        }
-
-        final float cAx = normal.x * radiusA + pointA.x;
-        final float cAy = normal.y * radiusA + pointA.y;
-
-        final float cBx = -normal.x * radiusB + pointB.x;
-        final float cBy = -normal.y * radiusB + pointB.y;
-
-        points[0].x = (cAx + cBx) * .5f;
-        points[0].y = (cAy + cBy) * .5f;
-      }
-        break;
-      case FACE_A: {
-        final Vec2 planePoint = pool3;
-
-        Rot.mulToOutUnsafe(xfA.q, manifold.localNormal, normal);
-        Transform.mulToOut(xfA, manifold.localPoint, planePoint);
-
-        final Vec2 clipPoint = pool4;
-
-        for (int i = 0; i < manifold.pointCount; i++) {
-          // b2Vec2 clipPoint = b2Mul(xfB, manifold->points[i].localPoint);
-          // b2Vec2 cA = clipPoint + (radiusA - b2Dot(clipPoint - planePoint,
-          // normal)) * normal;
-          // b2Vec2 cB = clipPoint - radiusB * normal;
-          // points[i] = 0.5f * (cA + cB);
-          Transform.mulToOut(xfB, manifold.points[i].localPoint, clipPoint);
-          // use cA as temporary for now
-          // cA.set(clipPoint).subLocal(planePoint);
-          // float scalar = radiusA - Vec2.dot(cA, normal);
-          // cA.set(normal).mulLocal(scalar).addLocal(clipPoint);
-          // cB.set(normal).mulLocal(radiusB).subLocal(clipPoint).negateLocal();
-          // points[i].set(cA).addLocal(cB).mulLocal(0.5f);
-
-          final float scalar =
-              radiusA
-                  - ((clipPoint.x - planePoint.x) * normal.x + (clipPoint.y - planePoint.y)
-                      * normal.y);
-
-          final float cAx = normal.x * scalar + clipPoint.x;
-          final float cAy = normal.y * scalar + clipPoint.y;
-
-          final float cBx = -normal.x * radiusB + clipPoint.x;
-          final float cBy = -normal.y * radiusB + clipPoint.y;
-
-          points[i].x = (cAx + cBx) * .5f;
-          points[i].y = (cAy + cBy) * .5f;
-        }
-      }
-        break;
-      case FACE_B:
-        final Vec2 planePoint = pool3;
-        Rot.mulToOutUnsafe(xfB.q, manifold.localNormal, normal);
-        Transform.mulToOut(xfB, manifold.localPoint, planePoint);
-
-        // final Mat22 R = xfB.q;
-        // normal.x = R.ex.x * manifold.localNormal.x + R.ey.x * manifold.localNormal.y;
-        // normal.y = R.ex.y * manifold.localNormal.x + R.ey.y * manifold.localNormal.y;
-        // final Vec2 v = manifold.localPoint;
-        // planePoint.x = xfB.p.x + xfB.q.ex.x * v.x + xfB.q.ey.x * v.y;
-        // planePoint.y = xfB.p.y + xfB.q.ex.y * v.x + xfB.q.ey.y * v.y;
-
-        final Vec2 clipPoint = pool4;
-
-        for (int i = 0; i < manifold.pointCount; i++) {
-          // b2Vec2 clipPoint = b2Mul(xfA, manifold->points[i].localPoint);
-          // b2Vec2 cB = clipPoint + (radiusB - b2Dot(clipPoint - planePoint,
-          // normal)) * normal;
-          // b2Vec2 cA = clipPoint - radiusA * normal;
-          // points[i] = 0.5f * (cA + cB);
-
-          Transform.mulToOut(xfA, manifold.points[i].localPoint, clipPoint);
-          // cB.set(clipPoint).subLocal(planePoint);
-          // float scalar = radiusB - Vec2.dot(cB, normal);
-          // cB.set(normal).mulLocal(scalar).addLocal(clipPoint);
-          // cA.set(normal).mulLocal(radiusA).subLocal(clipPoint).negateLocal();
-          // points[i].set(cA).addLocal(cB).mulLocal(0.5f);
-
-          // points[i] = 0.5f * (cA + cB);
-
-          //
-          // clipPoint.x = xfA.p.x + xfA.q.ex.x * manifold.points[i].localPoint.x + xfA.q.ey.x *
-          // manifold.points[i].localPoint.y;
-          // clipPoint.y = xfA.p.y + xfA.q.ex.y * manifold.points[i].localPoint.x + xfA.q.ey.y *
-          // manifold.points[i].localPoint.y;
-
-          final float scalar =
-              radiusB
-                  - ((clipPoint.x - planePoint.x) * normal.x + (clipPoint.y - planePoint.y)
-                      * normal.y);
-
-          final float cBx = normal.x * scalar + clipPoint.x;
-          final float cBy = normal.y * scalar + clipPoint.y;
-
-          final float cAx = -normal.x * radiusA + clipPoint.x;
-          final float cAy = -normal.y * radiusA + clipPoint.y;
-
-          points[i].x = (cAx + cBx) * .5f;
-          points[i].y = (cAy + cBy) * .5f;
-        }
-        // Ensure normal points from A to B.
-        normal.x = -normal.x;
-        normal.y = -normal.y;
-        break;
-    }
-  }
+       /** World vector pointing from A to B */
+       public final Vec2 normal;
+
+       /** World contact point (point of intersection) */
+       public final Vec2[] points;
+
+       public WorldManifold () {
+               normal = new Vec2();
+               points = new Vec2[Settings.maxManifoldPoints];
+               for (int i = 0; i < Settings.maxManifoldPoints; i++) {
+                       points[i] = new Vec2();
+               }
+       }
+
+       private final Vec2 pool3 = new Vec2();
+       private final Vec2 pool4 = new Vec2();
+
+       public final void initialize (final Manifold manifold, final Transform xfA, float radiusA, final Transform xfB, float radiusB) {
+               if (manifold.pointCount == 0) {
+                       return;
+               }
+
+               switch (manifold.type) {
+               case CIRCLES: {
+                       // final Vec2 pointA = pool3;
+                       // final Vec2 pointB = pool4;
+                       //
+                       // normal.set(1, 0);
+                       // Transform.mulToOut(xfA, manifold.localPoint, pointA);
+                       // Transform.mulToOut(xfB, manifold.points[0].localPoint, pointB);
+                       //
+                       // if (MathUtils.distanceSquared(pointA, pointB) > Settings.EPSILON * Settings.EPSILON) {
+                       // normal.set(pointB).subLocal(pointA);
+                       // normal.normalize();
+                       // }
+                       //
+                       // cA.set(normal).mulLocal(radiusA).addLocal(pointA);
+                       // cB.set(normal).mulLocal(radiusB).subLocal(pointB).negateLocal();
+                       // points[0].set(cA).addLocal(cB).mulLocal(0.5f);
+                       final Vec2 pointA = pool3;
+                       final Vec2 pointB = pool4;
+
+                       normal.x = 1;
+                       normal.y = 0;
+                       // pointA.x = xfA.p.x + xfA.q.ex.x * manifold.localPoint.x + xfA.q.ey.x *
+                       // manifold.localPoint.y;
+                       // pointA.y = xfA.p.y + xfA.q.ex.y * manifold.localPoint.x + xfA.q.ey.y *
+                       // manifold.localPoint.y;
+                       // pointB.x = xfB.p.x + xfB.q.ex.x * manifold.points[0].localPoint.x + xfB.q.ey.x *
+                       // manifold.points[0].localPoint.y;
+                       // pointB.y = xfB.p.y + xfB.q.ex.y * manifold.points[0].localPoint.x + xfB.q.ey.y *
+                       // manifold.points[0].localPoint.y;
+                       Transform.mulToOut(xfA, manifold.localPoint, pointA);
+                       Transform.mulToOut(xfB, manifold.points[0].localPoint, pointB);
+
+                       if (MathUtils.distanceSquared(pointA, pointB) > Settings.EPSILON * Settings.EPSILON) {
+                               normal.x = pointB.x - pointA.x;
+                               normal.y = pointB.y - pointA.y;
+                               normal.normalize();
+                       }
+
+                       final float cAx = normal.x * radiusA + pointA.x;
+                       final float cAy = normal.y * radiusA + pointA.y;
+
+                       final float cBx = -normal.x * radiusB + pointB.x;
+                       final float cBy = -normal.y * radiusB + pointB.y;
+
+                       points[0].x = (cAx + cBx) * .5f;
+                       points[0].y = (cAy + cBy) * .5f;
+               }
+                       break;
+               case FACE_A: {
+                       final Vec2 planePoint = pool3;
+
+                       Rot.mulToOutUnsafe(xfA.q, manifold.localNormal, normal);
+                       Transform.mulToOut(xfA, manifold.localPoint, planePoint);
+
+                       final Vec2 clipPoint = pool4;
+
+                       for (int i = 0; i < manifold.pointCount; i++) {
+                               // b2Vec2 clipPoint = b2Mul(xfB, manifold->points[i].localPoint);
+                               // b2Vec2 cA = clipPoint + (radiusA - b2Dot(clipPoint - planePoint,
+                               // normal)) * normal;
+                               // b2Vec2 cB = clipPoint - radiusB * normal;
+                               // points[i] = 0.5f * (cA + cB);
+                               Transform.mulToOut(xfB, manifold.points[i].localPoint, clipPoint);
+                               // use cA as temporary for now
+                               // cA.set(clipPoint).subLocal(planePoint);
+                               // float scalar = radiusA - Vec2.dot(cA, normal);
+                               // cA.set(normal).mulLocal(scalar).addLocal(clipPoint);
+                               // cB.set(normal).mulLocal(radiusB).subLocal(clipPoint).negateLocal();
+                               // points[i].set(cA).addLocal(cB).mulLocal(0.5f);
+
+                               final float scalar = radiusA - ((clipPoint.x - planePoint.x) * normal.x + (clipPoint.y - planePoint.y) * normal.y);
+
+                               final float cAx = normal.x * scalar + clipPoint.x;
+                               final float cAy = normal.y * scalar + clipPoint.y;
+
+                               final float cBx = -normal.x * radiusB + clipPoint.x;
+                               final float cBy = -normal.y * radiusB + clipPoint.y;
+
+                               points[i].x = (cAx + cBx) * .5f;
+                               points[i].y = (cAy + cBy) * .5f;
+                       }
+               }
+                       break;
+               case FACE_B:
+                       final Vec2 planePoint = pool3;
+                       Rot.mulToOutUnsafe(xfB.q, manifold.localNormal, normal);
+                       Transform.mulToOut(xfB, manifold.localPoint, planePoint);
+
+                       // final Mat22 R = xfB.q;
+                       // normal.x = R.ex.x * manifold.localNormal.x + R.ey.x * manifold.localNormal.y;
+                       // normal.y = R.ex.y * manifold.localNormal.x + R.ey.y * manifold.localNormal.y;
+                       // final Vec2 v = manifold.localPoint;
+                       // planePoint.x = xfB.p.x + xfB.q.ex.x * v.x + xfB.q.ey.x * v.y;
+                       // planePoint.y = xfB.p.y + xfB.q.ex.y * v.x + xfB.q.ey.y * v.y;
+
+                       final Vec2 clipPoint = pool4;
+
+                       for (int i = 0; i < manifold.pointCount; i++) {
+                               // b2Vec2 clipPoint = b2Mul(xfA, manifold->points[i].localPoint);
+                               // b2Vec2 cB = clipPoint + (radiusB - b2Dot(clipPoint - planePoint,
+                               // normal)) * normal;
+                               // b2Vec2 cA = clipPoint - radiusA * normal;
+                               // points[i] = 0.5f * (cA + cB);
+
+                               Transform.mulToOut(xfA, manifold.points[i].localPoint, clipPoint);
+                               // cB.set(clipPoint).subLocal(planePoint);
+                               // float scalar = radiusB - Vec2.dot(cB, normal);
+                               // cB.set(normal).mulLocal(scalar).addLocal(clipPoint);
+                               // cA.set(normal).mulLocal(radiusA).subLocal(clipPoint).negateLocal();
+                               // points[i].set(cA).addLocal(cB).mulLocal(0.5f);
+
+                               // points[i] = 0.5f * (cA + cB);
+
+                               //
+                               // clipPoint.x = xfA.p.x + xfA.q.ex.x * manifold.points[i].localPoint.x + xfA.q.ey.x *
+                               // manifold.points[i].localPoint.y;
+                               // clipPoint.y = xfA.p.y + xfA.q.ex.y * manifold.points[i].localPoint.x + xfA.q.ey.y *
+                               // manifold.points[i].localPoint.y;
+
+                               final float scalar = radiusB - ((clipPoint.x - planePoint.x) * normal.x + (clipPoint.y - planePoint.y) * normal.y);
+
+                               final float cBx = normal.x * scalar + clipPoint.x;
+                               final float cBy = normal.y * scalar + clipPoint.y;
+
+                               final float cAx = -normal.x * radiusA + clipPoint.x;
+                               final float cAy = -normal.y * radiusA + clipPoint.y;
+
+                               points[i].x = (cAx + cBx) * .5f;
+                               points[i].y = (cAy + cBy) * .5f;
+                       }
+                       // Ensure normal points from A to B.
+                       normal.x = -normal.x;
+                       normal.y = -normal.y;
+                       break;
+               }
+       }
 }
index 77a8a7d..5771734 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision.broadphase;
 
 import java.util.Arrays;
@@ -33,280 +34,258 @@ import org.jbox2d.collision.AABB;
 import org.jbox2d.collision.RayCastInput;
 import org.jbox2d.common.Vec2;
 
-/**
- * The broad-phase is used for computing pairs and performing volume queries and ray casts. This
- * broad-phase does not persist pairs. Instead, this reports potentially new pairs. It is up to the
- * client to consume the new pairs and to track subsequent overlap.
+/** The broad-phase is used for computing pairs and performing volume queries and ray casts. This broad-phase does not persist
+ * pairs. Instead, this reports potentially new pairs. It is up to the client to consume the new pairs and to track subsequent
+ * overlap.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class BroadPhase implements TreeCallback {
 
-  public static final int NULL_PROXY = -1;
-
-  private final DynamicTree m_tree;
-
-  private int m_proxyCount;
-
-  private int[] m_moveBuffer;
-  private int m_moveCapacity;
-  private int m_moveCount;
-
-  private Pair[] m_pairBuffer;
-  private int m_pairCapacity;
-  private int m_pairCount;
-
-  private int m_queryProxyId;
-
-  public BroadPhase() {
-    m_proxyCount = 0;
-
-    m_pairCapacity = 16;
-    m_pairCount = 0;
-    m_pairBuffer = new Pair[m_pairCapacity];
-    for (int i = 0; i < m_pairCapacity; i++) {
-      m_pairBuffer[i] = new Pair();
-    }
-
-    m_moveCapacity = 16;
-    m_moveCount = 0;
-    m_moveBuffer = new int[m_moveCapacity];
-
-    m_tree = new DynamicTree();
-    m_queryProxyId = NULL_PROXY;
-  }
-
-  /**
-   * Create a proxy with an initial AABB. Pairs are not reported until updatePairs is called.
-   * 
-   * @param aabb
-   * @param userData
-   * @return
-   */
-  public final int createProxy(final AABB aabb, Object userData) {
-    int proxyId = m_tree.createProxy(aabb, userData);
-    ++m_proxyCount;
-    bufferMove(proxyId);
-    return proxyId;
-  }
-
-  /**
-   * Destroy a proxy. It is up to the client to remove any pairs.
-   * 
-   * @param proxyId
-   */
-  public final void destroyProxy(int proxyId) {
-    unbufferMove(proxyId);
-    --m_proxyCount;
-    m_tree.destroyProxy(proxyId);
-  }
-
-  /**
-   * Call MoveProxy as many times as you like, then when you are done call UpdatePairs to finalized
-   * the proxy pairs (for your time step).
-   */
-  public final void moveProxy(int proxyId, final AABB aabb, final Vec2 displacement) {
-    boolean buffer = m_tree.moveProxy(proxyId, aabb, displacement);
-    if (buffer) {
-      bufferMove(proxyId);
-    }
-  }
-
-  public void touchProxy(int proxyId) {
-    bufferMove(proxyId);
-  }
-
-  public Object getUserData(int proxyId) {
-    return m_tree.getUserData(proxyId);
-  }
-
-  public AABB getFatAABB(int proxyId) {
-    return m_tree.getFatAABB(proxyId);
-  }
-
-  public boolean testOverlap(int proxyIdA, int proxyIdB) {
-    // return AABB.testOverlap(proxyA.aabb, proxyB.aabb);
-    final AABB a = m_tree.getFatAABB(proxyIdA);
-    final AABB b = m_tree.getFatAABB(proxyIdB);
-    if (b.lowerBound.x - a.upperBound.x > 0.0f || b.lowerBound.y - a.upperBound.y > 0.0f) {
-      return false;
-    }
-
-    if (a.lowerBound.x - b.upperBound.x > 0.0f || a.lowerBound.y - b.upperBound.y > 0.0f) {
-      return false;
-    }
-
-    return true;
-  }
-
-  /**
-   * Get the number of proxies.
-   * 
-   * @return
-   */
-  public final int getProxyCount() {
-    return m_proxyCount;
-  }
-
-  public void drawTree(DebugDraw argDraw) {
-    m_tree.drawTree(argDraw);
-  }
-
-  /**
-   * Update the pairs. This results in pair callbacks. This can only add pairs.
-   * 
-   * @param callback
-   */
-  public final void updatePairs(PairCallback callback) {
-    // log.debug("beginning to update pairs");
-    // Reset pair buffer
-    m_pairCount = 0;
-
-    // Perform tree queries for all moving proxies.
-    for (int i = 0; i < m_moveCount; ++i) {
-      m_queryProxyId = m_moveBuffer[i];
-      if (m_queryProxyId == NULL_PROXY) {
-        continue;
-      }
-
-      // We have to query the tree with the fat AABB so that
-      // we don't fail to create a pair that may touch later.
-      final AABB fatAABB = m_tree.getFatAABB(m_queryProxyId);
-
-      // Query tree, create pairs and add them pair buffer.
-      // log.debug("quering aabb: "+m_queryProxy.aabb);
-      m_tree.query(this, fatAABB);
-    }
-    // log.debug("Number of pairs found: "+m_pairCount);
-
-    // Reset move buffer
-    m_moveCount = 0;
-
-    // Sort the pair buffer to expose duplicates.
-    Arrays.sort(m_pairBuffer, 0, m_pairCount);
-
-    // Send the pairs back to the client.
-    int i = 0;
-    while (i < m_pairCount) {
-      Pair primaryPair = m_pairBuffer[i];
-      Object userDataA = m_tree.getUserData(primaryPair.proxyIdA);
-      Object userDataB = m_tree.getUserData(primaryPair.proxyIdB);
-
-      // log.debug("returning pair: "+userDataA+", "+userDataB);
-      callback.addPair(userDataA, userDataB);
-      ++i;
-
-      // Skip any duplicate pairs.
-      while (i < m_pairCount) {
-        Pair pair = m_pairBuffer[i];
-        if (pair.proxyIdA != primaryPair.proxyIdA || pair.proxyIdB != primaryPair.proxyIdB) {
-          break;
-        }
-        // log.debug("skipping duplicate");
-        ++i;
-      }
-    }
-
-    // Try to keep the tree balanced.
-    // m_tree.rebalance(Settings.TREE_REBALANCE_STEPS);
-  }
-
-  /**
-   * Query an AABB for overlapping proxies. The callback class is called for each proxy that
-   * overlaps the supplied AABB.
-   * 
-   * @param callback
-   * @param aabb
-   */
-  public final void query(final TreeCallback callback, final AABB aabb) {
-    m_tree.query(callback, aabb);
-  }
-
-  /**
-   * Ray-cast against the proxies in the tree. This relies on the callback to perform a exact
-   * ray-cast in the case were the proxy contains a shape. The callback also performs the any
-   * collision filtering. This has performance roughly equal to k * log(n), where k is the number of
-   * collisions and n is the number of proxies in the tree.
-   * 
-   * @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
-   * @param callback a callback class that is called for each proxy that is hit by the ray.
-   */
-  public final void raycast(final TreeRayCastCallback callback, final RayCastInput input) {
-    m_tree.raycast(callback, input);
-  }
-
-  /**
-   * Get the height of the embedded tree.
-   * 
-   * @return
-   */
-  public final int getTreeHeight() {
-    return m_tree.computeHeight();
-  }
-
-  public int getTreeBalance() {
-    return m_tree.getMaxBalance();
-  }
-
-  public float getTreeQuality() {
-    return m_tree.getAreaRatio();
-  }
-
-  protected final void bufferMove(int proxyId) {
-    if (m_moveCount == m_moveCapacity) {
-      int[] old = m_moveBuffer;
-      m_moveCapacity *= 2;
-      m_moveBuffer = new int[m_moveCapacity];
-      System.arraycopy(old, 0, m_moveBuffer, 0, old.length);
-    }
-
-    m_moveBuffer[m_moveCount] = proxyId;
-    ++m_moveCount;
-  }
-
-  protected final void unbufferMove(int proxyId) {
-    for (int i = 0; i < m_moveCount; i++) {
-      if (m_moveBuffer[i] == proxyId) {
-        m_moveBuffer[i] = NULL_PROXY;
-      }
-    }
-  }
-
-  // private final PairStack pairStack = new PairStack();
-  /**
-   * This is called from DynamicTree::query when we are gathering pairs.
-   */
-  public final boolean treeCallback(int proxyId) {
-
-    // log.debug("Got a proxy back: " + proxyId);
-    // A proxy cannot form a pair with itself.
-    if (proxyId == m_queryProxyId) {
-      // log.debug("It was us...");
-      return true;
-    }
-
-    // Grow the pair buffer as needed.
-    if (m_pairCount == m_pairCapacity) {
-      Pair[] oldBuffer = m_pairBuffer;
-      m_pairCapacity *= 2;
-      m_pairBuffer = new Pair[m_pairCapacity];
-      System.arraycopy(oldBuffer, 0, m_pairBuffer, 0, oldBuffer.length);
-      for (int i = oldBuffer.length; i < m_pairCapacity; i++) {
-        m_pairBuffer[i] = new Pair();
-      }
-    }
-
-    if (proxyId < m_queryProxyId) {
-      // log.debug("new proxy is first");
-      m_pairBuffer[m_pairCount].proxyIdA = proxyId;
-      m_pairBuffer[m_pairCount].proxyIdB = m_queryProxyId;
-    } else {
-      // log.debug("new proxy is second");
-      m_pairBuffer[m_pairCount].proxyIdA = m_queryProxyId;
-      m_pairBuffer[m_pairCount].proxyIdB = proxyId;
-    }
-
-    ++m_pairCount;
-    return true;
-  }
+       public static final int NULL_PROXY = -1;
+
+       private final DynamicTree m_tree;
+
+       private int m_proxyCount;
+
+       private int[] m_moveBuffer;
+       private int m_moveCapacity;
+       private int m_moveCount;
+
+       private Pair[] m_pairBuffer;
+       private int m_pairCapacity;
+       private int m_pairCount;
+
+       private int m_queryProxyId;
+
+       public BroadPhase () {
+               m_proxyCount = 0;
+
+               m_pairCapacity = 16;
+               m_pairCount = 0;
+               m_pairBuffer = new Pair[m_pairCapacity];
+               for (int i = 0; i < m_pairCapacity; i++) {
+                       m_pairBuffer[i] = new Pair();
+               }
+
+               m_moveCapacity = 16;
+               m_moveCount = 0;
+               m_moveBuffer = new int[m_moveCapacity];
+
+               m_tree = new DynamicTree();
+               m_queryProxyId = NULL_PROXY;
+       }
+
+       /** Create a proxy with an initial AABB. Pairs are not reported until updatePairs is called.
+        * 
+        * @param aabb
+        * @param userData
+        * @return */
+       public final int createProxy (final AABB aabb, Object userData) {
+               int proxyId = m_tree.createProxy(aabb, userData);
+               ++m_proxyCount;
+               bufferMove(proxyId);
+               return proxyId;
+       }
+
+       /** Destroy a proxy. It is up to the client to remove any pairs.
+        * 
+        * @param proxyId */
+       public final void destroyProxy (int proxyId) {
+               unbufferMove(proxyId);
+               --m_proxyCount;
+               m_tree.destroyProxy(proxyId);
+       }
+
+       /** Call MoveProxy as many times as you like, then when you are done call UpdatePairs to finalized the proxy pairs (for your
+        * time step). */
+       public final void moveProxy (int proxyId, final AABB aabb, final Vec2 displacement) {
+               boolean buffer = m_tree.moveProxy(proxyId, aabb, displacement);
+               if (buffer) {
+                       bufferMove(proxyId);
+               }
+       }
+
+       public void touchProxy (int proxyId) {
+               bufferMove(proxyId);
+       }
+
+       public Object getUserData (int proxyId) {
+               return m_tree.getUserData(proxyId);
+       }
+
+       public AABB getFatAABB (int proxyId) {
+               return m_tree.getFatAABB(proxyId);
+       }
+
+       public boolean testOverlap (int proxyIdA, int proxyIdB) {
+               // return AABB.testOverlap(proxyA.aabb, proxyB.aabb);
+               final AABB a = m_tree.getFatAABB(proxyIdA);
+               final AABB b = m_tree.getFatAABB(proxyIdB);
+               if (b.lowerBound.x - a.upperBound.x > 0.0f || b.lowerBound.y - a.upperBound.y > 0.0f) {
+                       return false;
+               }
+
+               if (a.lowerBound.x - b.upperBound.x > 0.0f || a.lowerBound.y - b.upperBound.y > 0.0f) {
+                       return false;
+               }
+
+               return true;
+       }
+
+       /** Get the number of proxies.
+        * 
+        * @return */
+       public final int getProxyCount () {
+               return m_proxyCount;
+       }
+
+       public void drawTree (DebugDraw argDraw) {
+               m_tree.drawTree(argDraw);
+       }
+
+       /** Update the pairs. This results in pair callbacks. This can only add pairs.
+        * 
+        * @param callback */
+       public final void updatePairs (PairCallback callback) {
+               // log.debug("beginning to update pairs");
+               // Reset pair buffer
+               m_pairCount = 0;
+
+               // Perform tree queries for all moving proxies.
+               for (int i = 0; i < m_moveCount; ++i) {
+                       m_queryProxyId = m_moveBuffer[i];
+                       if (m_queryProxyId == NULL_PROXY) {
+                               continue;
+                       }
+
+                       // We have to query the tree with the fat AABB so that
+                       // we don't fail to create a pair that may touch later.
+                       final AABB fatAABB = m_tree.getFatAABB(m_queryProxyId);
+
+                       // Query tree, create pairs and add them pair buffer.
+                       // log.debug("quering aabb: "+m_queryProxy.aabb);
+                       m_tree.query(this, fatAABB);
+               }
+               // log.debug("Number of pairs found: "+m_pairCount);
+
+               // Reset move buffer
+               m_moveCount = 0;
+
+               // Sort the pair buffer to expose duplicates.
+               Arrays.sort(m_pairBuffer, 0, m_pairCount);
+
+               // Send the pairs back to the client.
+               int i = 0;
+               while (i < m_pairCount) {
+                       Pair primaryPair = m_pairBuffer[i];
+                       Object userDataA = m_tree.getUserData(primaryPair.proxyIdA);
+                       Object userDataB = m_tree.getUserData(primaryPair.proxyIdB);
+
+                       // log.debug("returning pair: "+userDataA+", "+userDataB);
+                       callback.addPair(userDataA, userDataB);
+                       ++i;
+
+                       // Skip any duplicate pairs.
+                       while (i < m_pairCount) {
+                               Pair pair = m_pairBuffer[i];
+                               if (pair.proxyIdA != primaryPair.proxyIdA || pair.proxyIdB != primaryPair.proxyIdB) {
+                                       break;
+                               }
+                               // log.debug("skipping duplicate");
+                               ++i;
+                       }
+               }
+
+               // Try to keep the tree balanced.
+               // m_tree.rebalance(Settings.TREE_REBALANCE_STEPS);
+       }
+
+       /** Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.
+        * 
+        * @param callback
+        * @param aabb */
+       public final void query (final TreeCallback callback, final AABB aabb) {
+               m_tree.query(callback, aabb);
+       }
+
+       /** Ray-cast against the proxies in the tree. This relies on the callback to perform a exact ray-cast in the case were the proxy
+        * contains a shape. The callback also performs the any collision filtering. This has performance roughly equal to k * log(n),
+        * where k is the number of collisions and n is the number of proxies in the tree.
+        * 
+        * @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
+        * @param callback a callback class that is called for each proxy that is hit by the ray. */
+       public final void raycast (final TreeRayCastCallback callback, final RayCastInput input) {
+               m_tree.raycast(callback, input);
+       }
+
+       /** Get the height of the embedded tree.
+        * 
+        * @return */
+       public final int getTreeHeight () {
+               return m_tree.computeHeight();
+       }
+
+       public int getTreeBalance () {
+               return m_tree.getMaxBalance();
+       }
+
+       public float getTreeQuality () {
+               return m_tree.getAreaRatio();
+       }
+
+       protected final void bufferMove (int proxyId) {
+               if (m_moveCount == m_moveCapacity) {
+                       int[] old = m_moveBuffer;
+                       m_moveCapacity *= 2;
+                       m_moveBuffer = new int[m_moveCapacity];
+                       System.arraycopy(old, 0, m_moveBuffer, 0, old.length);
+               }
+
+               m_moveBuffer[m_moveCount] = proxyId;
+               ++m_moveCount;
+       }
+
+       protected final void unbufferMove (int proxyId) {
+               for (int i = 0; i < m_moveCount; i++) {
+                       if (m_moveBuffer[i] == proxyId) {
+                               m_moveBuffer[i] = NULL_PROXY;
+                       }
+               }
+       }
+
+       // private final PairStack pairStack = new PairStack();
+       /** This is called from DynamicTree::query when we are gathering pairs. */
+       public final boolean treeCallback (int proxyId) {
+
+               // log.debug("Got a proxy back: " + proxyId);
+               // A proxy cannot form a pair with itself.
+               if (proxyId == m_queryProxyId) {
+                       // log.debug("It was us...");
+                       return true;
+               }
+
+               // Grow the pair buffer as needed.
+               if (m_pairCount == m_pairCapacity) {
+                       Pair[] oldBuffer = m_pairBuffer;
+                       m_pairCapacity *= 2;
+                       m_pairBuffer = new Pair[m_pairCapacity];
+                       System.arraycopy(oldBuffer, 0, m_pairBuffer, 0, oldBuffer.length);
+                       for (int i = oldBuffer.length; i < m_pairCapacity; i++) {
+                               m_pairBuffer[i] = new Pair();
+                       }
+               }
+
+               if (proxyId < m_queryProxyId) {
+                       // log.debug("new proxy is first");
+                       m_pairBuffer[m_pairCount].proxyIdA = proxyId;
+                       m_pairBuffer[m_pairCount].proxyIdB = m_queryProxyId;
+               } else {
+                       // log.debug("new proxy is second");
+                       m_pairBuffer[m_pairCount].proxyIdA = m_queryProxyId;
+                       m_pairBuffer[m_pairCount].proxyIdB = proxyId;
+               }
+
+               ++m_pairCount;
+               return true;
+       }
 }
index 3688d17..0f4445d 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision.broadphase;
 
 import org.jbox2d.callbacks.DebugDraw;
 import org.jbox2d.callbacks.TreeCallback;
 import org.jbox2d.callbacks.TreeRayCastCallback;
 import org.jbox2d.collision.AABB;
-import static org.jbox2d.collision.broadphase.TreeNode.NULL_NODE;
 import org.jbox2d.collision.RayCastInput;
 import org.jbox2d.common.Color3f;
 import org.jbox2d.common.MathUtils;
@@ -35,876 +35,846 @@ import org.jbox2d.common.Settings;
 import org.jbox2d.common.Vec2;
 import org.jbox2d.pooling.stacks.DynamicIntStack;
 
+import static org.jbox2d.collision.broadphase.TreeNode.*;
+
 // updated to rev 100
-/**
- * A dynamic tree arranges data in a binary tree to accelerate queries such as volume queries and
- * ray casts. Leafs are proxies with an AABB. In the tree we expand the proxy AABB by _fatAABBFactor
- * so that the proxy AABB is bigger than the client object. This allows the client object to move by
- * small amounts without triggering a tree update.
+/** A dynamic tree arranges data in a binary tree to accelerate queries such as volume queries and ray casts. Leafs are proxies
+ * with an AABB. In the tree we expand the proxy AABB by _fatAABBFactor so that the proxy AABB is bigger than the client object.
+ * This allows the client object to move by small amounts without triggering a tree update.
  * 
- * @author daniel
- */
+ * @author daniel */
 public class DynamicTree {
-  public static final int MAX_STACK_SIZE = 64;
-
-  private int m_root;
-  private TreeNode[] m_nodes;
-  private int m_nodeCount;
-  private int m_nodeCapacity;
-
-  private int m_freeList;
-
-  private int m_insertionCount;
-
-  private final Vec2[] drawVecs = new Vec2[4];
-  private final DynamicIntStack intStack = new DynamicIntStack(10);
-
-  public DynamicTree() {
-    m_root = TreeNode.NULL_NODE;
-    m_nodeCount = 0;
-    m_nodeCapacity = 16;
-    m_nodes = new TreeNode[16];
-
-    // Build a linked list for the free list.
-    for (int i = 0; i < m_nodeCapacity; i++) {
-      m_nodes[i] = new TreeNode();
-      m_nodes[i].parent = i + 1;
-      m_nodes[i].height = -1;
-    }
-    m_nodes[m_nodeCapacity - 1].parent = TreeNode.NULL_NODE;
-    m_freeList = 0;
-
-    m_insertionCount = 0;
-
-    for (int i = 0; i < drawVecs.length; i++) {
-      drawVecs[i] = new Vec2();
-    }
-  }
-
-  /**
-   * Create a proxy. Provide a tight fitting AABB and a userData pointer.
-   * 
-   * @param aabb
-   * @param userData
-   * @return
-   */
-  public final int createProxy(final AABB aabb, Object userData) {
-    int proxyId = allocateNode();
-
-    // Fatten the aabb
-    final TreeNode node = m_nodes[proxyId];
-    node.aabb.lowerBound.x = aabb.lowerBound.x - Settings.aabbExtension;
-    node.aabb.lowerBound.y = aabb.lowerBound.y - Settings.aabbExtension;
-    node.aabb.upperBound.x = aabb.upperBound.x + Settings.aabbExtension;
-    node.aabb.upperBound.y = aabb.upperBound.y + Settings.aabbExtension;
-    node.userData = userData;
-
-    insertLeaf(proxyId);
-
-    return proxyId;
-  }
-
-  /**
-   * Destroy a proxy
-   * 
-   * @param proxyId
-   */
-  public final void destroyProxy(int proxyId) {
-    assert (0 <= proxyId && proxyId < m_nodeCapacity);
-    assert (m_nodes[proxyId].isLeaf());
-
-    removeLeaf(proxyId);
-    freeNode(proxyId);
-  }
-
-  // djm pooling
-  /**
-   * Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, then the
-   * proxy is removed from the tree and re-inserted. Otherwise the function returns immediately.
-   * 
-   * @return true if the proxy was re-inserted.
-   */
-  public final boolean moveProxy(int proxyId, final AABB aabb, Vec2 displacement) {
-    assert (0 <= proxyId && proxyId < m_nodeCapacity);
-    final TreeNode node = m_nodes[proxyId];
-    assert (node.isLeaf());
-
-    if (node.aabb.contains(aabb)) {
-      return false;
-    }
-
-    removeLeaf(proxyId);
-
-    // Extend AABB
-    final Vec2 lowerBound = aabb.lowerBound;
-    final Vec2 upperBound = aabb.upperBound;
-    lowerBound.x -= Settings.aabbExtension;
-    lowerBound.y -= Settings.aabbExtension;
-    upperBound.x += Settings.aabbExtension;
-    upperBound.y += Settings.aabbExtension;
-
-    
-    // Predict AABB displacement.
-    final float dx = displacement.x * Settings.aabbMultiplier;
-    final float dy = displacement.y * Settings.aabbMultiplier;
-    if (dx < 0.0f) {
-      lowerBound.x += dx;
-    } else {
-      upperBound.x += dx;
-    }
-
-    if (dy < 0.0f) {
-      lowerBound.y += dy;
-    } else {
-      upperBound.y += dy;
-    }
-    node.aabb.lowerBound.x = lowerBound.x;
-    node.aabb.lowerBound.y = lowerBound.y;
-    node.aabb.upperBound.x = upperBound.x;
-    node.aabb.upperBound.y = upperBound.y;
-
-    insertLeaf(proxyId);
-    return true;
-  }
-
-  public final Object getUserData(int proxyId) {
-    assert (0 <= proxyId && proxyId < m_nodeCapacity);
-    return m_nodes[proxyId].userData;
-  }
-
-  public final AABB getFatAABB(int proxyId) {
-    assert (0 <= proxyId && proxyId < m_nodeCapacity);
-    return m_nodes[proxyId].aabb;
-  }
-
-  /**
-   * Query an AABB for overlapping proxies. The callback class is called for each proxy that
-   * overlaps the supplied AABB.
-   * 
-   * @param callback
-   * @param araabbgAABB
-   */
-  public final void query(TreeCallback callback, AABB aabb) {
-    intStack.reset();
-    intStack.push(m_root);
-
-    while (intStack.getCount() > 0) {
-      int nodeId = intStack.pop();
-      if (nodeId == TreeNode.NULL_NODE) {
-        continue;
-      }
-
-      final TreeNode node = m_nodes[nodeId];
-
-      if (AABB.testOverlap(node.aabb, aabb)) {
-        if (node.isLeaf()) {
-          boolean proceed = callback.treeCallback(nodeId);
-          if (!proceed) {
-            return;
-          }
-        } else {
-          intStack.push(node.child1);
-          intStack.push(node.child2);
-        }
-      }
-    }
-  }
-
-  private final Vec2 r = new Vec2();
-  private final Vec2 v = new Vec2();
-  private final Vec2 absV = new Vec2();
-  private final Vec2 temp = new Vec2();
-  private final Vec2 c = new Vec2();
-  private final Vec2 h = new Vec2();
-  private final Vec2 t = new Vec2();
-  private final AABB aabb = new AABB();
-  private final RayCastInput subInput = new RayCastInput();
-
-  /**
-   * Ray-cast against the proxies in the tree. This relies on the callback to perform a exact
-   * ray-cast in the case were the proxy contains a shape. The callback also performs the any
-   * collision filtering. This has performance roughly equal to k * log(n), where k is the number of
-   * collisions and n is the number of proxies in the tree.
-   * 
-   * @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
-   * @param callback a callback class that is called for each proxy that is hit by the ray.
-   */
-  public void raycast(TreeRayCastCallback callback, RayCastInput input) {
-    final Vec2 p1 = input.p1;
-    final Vec2 p2 = input.p2;
-    r.set(p2).subLocal(p1);
-    assert (r.lengthSquared() > 0f);
-    r.normalize();
-
-    // v is perpendicular to the segment.
-    Vec2.crossToOutUnsafe(1f, r, v);
-    absV.set(v).absLocal();
-
-    // Separating axis for segment (Gino, p80).
-    // |dot(v, p1 - c)| > dot(|v|, h)
-
-    float maxFraction = input.maxFraction;
-
-    // Build a bounding box for the segment.
-    final AABB segAABB = aabb;
-    // Vec2 t = p1 + maxFraction * (p2 - p1);
-    temp.set(p2).subLocal(p1).mulLocal(maxFraction).addLocal(p1);
-    Vec2.minToOut(p1, temp, segAABB.lowerBound);
-    Vec2.maxToOut(p1, temp, segAABB.upperBound);
-
-    intStack.push(m_root);
-    while (intStack.getCount() > 0) {
-      int nodeId = intStack.pop();
-      if (nodeId == TreeNode.NULL_NODE) {
-        continue;
-      }
-
-      final TreeNode node = m_nodes[nodeId];
-
-      if (!AABB.testOverlap(node.aabb, segAABB)) {
-        continue;
-      }
-
-      // Separating axis for segment (Gino, p80).
-      // |dot(v, p1 - c)| > dot(|v|, h)
-      node.aabb.getCenterToOut(c);
-      node.aabb.getExtentsToOut(h);
-      temp.set(p1).subLocal(c);
-      float separation = MathUtils.abs(Vec2.dot(v, temp)) - Vec2.dot(absV, h);
-      if (separation > 0.0f) {
-        continue;
-      }
-
-      if (node.isLeaf()) {
-        subInput.p1.set(input.p1);
-        subInput.p2.set(input.p2);
-        subInput.maxFraction = maxFraction;
-
-        float value = callback.raycastCallback(subInput, nodeId);
-
-        if (value == 0.0f) {
-          // The client has terminated the ray cast.
-          return;
-        }
-
-        if (value > 0.0f) {
-          // Update segment bounding box.
-          maxFraction = value;
-          t.set(p2).subLocal(p1).mulLocal(maxFraction).addLocal(p1);
-          Vec2.minToOut(p1, t, segAABB.lowerBound);
-          Vec2.maxToOut(p1, t, segAABB.upperBound);
-        }
-      } else {
-        intStack.push(node.child1);
-        intStack.push(node.child2);
-      }
-    }
-  }
-
-  /**
-   * Compute the height of the tree.
-   */
-  public final int computeHeight() {
-    return computeHeight(m_root);
-  }
-
-  private final int computeHeight(int nodeId) {
-    assert (0 <= nodeId && nodeId < m_nodeCapacity);
-
-    final TreeNode node = m_nodes[nodeId];
-
-    if (node.isLeaf()) {
-      return 0;
-    }
-    int height1 = computeHeight(node.child1);
-    int height2 = computeHeight(node.child2);
-    return 1 + MathUtils.max(height1, height2);
-  }
-
-  /**
-   * Validate this tree. For testing.
-   */
-  public void validate() {
-    validateStructure(m_root);
-    validateMetrics(m_root);
-
-    int freeCount = 0;
-    int freeIndex = m_freeList;
-    while (freeIndex != NULL_NODE) {
-      assert (0 <= freeIndex && freeIndex < m_nodeCapacity);
-      freeIndex = m_nodes[freeIndex].parent;
-      ++freeCount;
-    }
-
-    assert (getHeight() == computeHeight());
-
-    assert (m_nodeCount + freeCount == m_nodeCapacity);
-  }
-
-  /**
-   * Compute the height of the binary tree in O(N) time. Should not be called often.
-   * 
-   * @return
-   */
-  public int getHeight() {
-    if (m_root == NULL_NODE) {
-      return 0;
-    }
-    return m_nodes[m_root].height;
-  }
-
-  /**
-   * Get the maximum balance of an node in the tree. The balance is the difference in height of the
-   * two children of a node.
-   * 
-   * @return
-   */
-  public int getMaxBalance() {
-    int maxBalance = 0;
-    for (int i = 0; i < m_nodeCapacity; ++i) {
-      final TreeNode node = m_nodes[i];
-      if (node.height <= 1) {
-        continue;
-      }
-
-      assert (node.isLeaf() == false);
-
-      int child1 = node.child1;
-      int child2 = node.child2;
-      int balance = MathUtils.abs(m_nodes[child2].height - m_nodes[child1].height);
-      maxBalance = MathUtils.max(maxBalance, balance);
-    }
-
-    return maxBalance;
-  }
-
-  /**
-   * Get the ratio of the sum of the node areas to the root area.
-   * 
-   * @return
-   */
-  public float getAreaRatio() {
-    if (m_root == NULL_NODE) {
-      return 0.0f;
-    }
-
-    final TreeNode root = m_nodes[m_root];
-    float rootArea = root.aabb.getPerimeter();
-
-    float totalArea = 0.0f;
-    for (int i = 0; i < m_nodeCapacity; ++i) {
-      final TreeNode node = m_nodes[i];
-      if (node.height < 0) {
-        // Free node in pool
-        continue;
-      }
-
-      totalArea += node.aabb.getPerimeter();
-    }
-
-    return totalArea / rootArea;
-  }
-
-  /**
-   * Build an optimal tree. Very expensive. For testing.
-   */
-  public void rebuildBottomUp() {
-    int[] nodes = new int[m_nodeCount];
-    int count = 0;
-
-    // Build array of leaves. Free the rest.
-    for (int i = 0; i < m_nodeCapacity; ++i) {
-      if (m_nodes[i].height < 0) {
-        // free node in pool
-        continue;
-      }
-
-      if (m_nodes[i].isLeaf()) {
-        m_nodes[i].parent = NULL_NODE;
-        nodes[count] = i;
-        ++count;
-      } else {
-        freeNode(i);
-      }
-    }
-
-    AABB b = new AABB();
-    while (count > 1) {
-      float minCost = Float.MAX_VALUE;
-      int iMin = -1, jMin = -1;
-      for (int i = 0; i < count; ++i) {
-        AABB aabbi = m_nodes[nodes[i]].aabb;
-
-        for (int j = i + 1; j < count; ++j) {
-          AABB aabbj = m_nodes[nodes[j]].aabb;
-          b.combine(aabbi, aabbj);
-          float cost = b.getPerimeter();
-          if (cost < minCost) {
-            iMin = i;
-            jMin = j;
-            minCost = cost;
-          }
-        }
-      }
-
-      int index1 = nodes[iMin];
-      int index2 = nodes[jMin];
-      TreeNode child1 = m_nodes[index1];
-      TreeNode child2 = m_nodes[index2];
-
-      int parentIndex = allocateNode();
-      TreeNode parent = m_nodes[parentIndex];
-      parent.child1 = index1;
-      parent.child2 = index2;
-      parent.height = 1 + MathUtils.max(child1.height, child2.height);
-      parent.aabb.combine(child1.aabb, child2.aabb);
-      parent.parent = NULL_NODE;
-
-      child1.parent = parentIndex;
-      child2.parent = parentIndex;
-
-      nodes[jMin] = nodes[count - 1];
-      nodes[iMin] = parentIndex;
-      --count;
-    }
-
-    m_root = nodes[0];
-
-    validate();
-  }
-
-  private final int allocateNode() {
-    if (m_freeList == NULL_NODE) {
-      assert (m_nodeCount == m_nodeCapacity);
-
-      TreeNode[] old = m_nodes;
-      m_nodeCapacity *= 2;
-      m_nodes = new TreeNode[m_nodeCapacity];
-      System.arraycopy(old, 0, m_nodes, 0, old.length);
-
-      // Build a linked list for the free list.
-      for (int i = m_nodeCount; i < m_nodeCapacity; i++) {
-        m_nodes[i] = new TreeNode();
-        m_nodes[i].parent = i + 1;
-        m_nodes[i].height = -1;
-      }
-      m_nodes[m_nodeCapacity - 1].parent = TreeNode.NULL_NODE;
-      m_freeList = m_nodeCount;
-    }
-    int nodeId = m_freeList;
-    m_freeList = m_nodes[nodeId].parent;
-
-    m_nodes[nodeId].parent = NULL_NODE;
-    m_nodes[nodeId].child1 = NULL_NODE;
-    m_nodes[nodeId].child2 = NULL_NODE;
-    m_nodes[nodeId].height = 0;
-    m_nodes[nodeId].userData = null;
-    ++m_nodeCount;
-    return nodeId;
-  }
-
-  /**
-   * returns a node to the pool
-   * 
-   * @param argNode
-   */
-  private final void freeNode(int nodeId) {
-    assert (nodeId != NULL_NODE);
-    assert (0 < m_nodeCount);
-    m_nodes[nodeId].parent = m_freeList;
-    m_nodes[nodeId].height = -1;
-    m_freeList = nodeId;
-    m_nodeCount--;
-  }
-
-
-  public int getInsertionCount() {
-    return m_insertionCount;
-  }
-
-  private final Vec2 center = new Vec2();
-  private final Vec2 delta1 = new Vec2();
-  private final Vec2 delta2 = new Vec2();
-  private final AABB combinedAABB = new AABB();
-
-  private final void insertLeaf(int leaf) {
-    m_insertionCount++;
-
-    if (m_root == NULL_NODE) {
-      m_root = leaf;
-      m_nodes[m_root].parent = NULL_NODE;
-      return;
-    }
-
-    // find the best sibling
-    AABB leafAABB = m_nodes[leaf].aabb;
-    int index = m_root;
-    while (m_nodes[index].isLeaf() == false) {
-      final TreeNode node = m_nodes[index];
-      int child1 = node.child1;
-      int child2 = node.child2;
-
-      float area = node.aabb.getPerimeter();
-
-      combinedAABB.combine(node.aabb, leafAABB);
-      float combinedArea = combinedAABB.getPerimeter();
-
-      // Cost of creating a new parent for this node and the new leaf
-      float cost = 2.0f * combinedArea;
-
-      // Minimum cost of pushing the leaf further down the tree
-      float inheritanceCost = 2.0f * (combinedArea - area);
-
-      // Cost of descending into child1
-      float cost1;
-      if (m_nodes[child1].isLeaf()) {
-        combinedAABB.combine(leafAABB, m_nodes[child1].aabb);
-        cost1 = combinedAABB.getPerimeter() + inheritanceCost;
-      } else {
-        combinedAABB.combine(leafAABB, m_nodes[child1].aabb);
-        float oldArea = m_nodes[child1].aabb.getPerimeter();
-        float newArea = combinedAABB.getPerimeter();
-        cost1 = (newArea - oldArea) + inheritanceCost;
-      }
-
-      // Cost of descending into child2
-      float cost2;
-      if (m_nodes[child2].isLeaf()) {
-        combinedAABB.combine(leafAABB, m_nodes[child2].aabb);
-        cost2 = combinedAABB.getPerimeter() + inheritanceCost;
-      } else {
-        combinedAABB.combine(leafAABB, m_nodes[child2].aabb);
-        float oldArea = m_nodes[child2].aabb.getPerimeter();
-        float newArea = combinedAABB.getPerimeter();
-        cost2 = newArea - oldArea + inheritanceCost;
-      }
-
-      // Descend according to the minimum cost.
-      if (cost < cost1 && cost < cost2) {
-        break;
-      }
-
-      // Descend
-      if (cost1 < cost2) {
-        index = child1;
-      } else {
-        index = child2;
-      }
-    }
-
-    int sibling = index;
-    int oldParent = m_nodes[sibling].parent;
-    int newParentId = allocateNode();
-    final TreeNode newParent = m_nodes[newParentId];
-    newParent.parent = oldParent;
-    newParent.userData = null;
-    newParent.aabb.combine(leafAABB, m_nodes[sibling].aabb);
-    newParent.height = m_nodes[sibling].height + 1;
-
-    if (oldParent != NULL_NODE) {
-      // The sibling was not the root.
-      if (m_nodes[oldParent].child1 == sibling) {
-        m_nodes[oldParent].child1 = newParentId;
-      } else {
-        m_nodes[oldParent].child2 = newParentId;
-      }
-
-      m_nodes[newParentId].child1 = sibling;
-      m_nodes[newParentId].child2 = leaf;
-      m_nodes[sibling].parent = newParentId;
-      m_nodes[leaf].parent = newParentId;
-    } else {
-      // The sibling was the root.
-      m_nodes[newParentId].child1 = sibling;
-      m_nodes[newParentId].child2 = leaf;
-      m_nodes[sibling].parent = newParentId;
-      m_nodes[leaf].parent = newParentId;
-      m_root = newParentId;
-    }
-
-    // Walk back up the tree fixing heights and AABBs
-    index = m_nodes[leaf].parent;
-    while (index != NULL_NODE) {
-      index = balance(index);
-
-      int child1 = m_nodes[index].child1;
-      int child2 = m_nodes[index].child2;
-
-      assert (child1 != NULL_NODE);
-      assert (child2 != NULL_NODE);
-
-      m_nodes[index].height = 1 + MathUtils.max(m_nodes[child1].height, m_nodes[child2].height);
-      m_nodes[index].aabb.combine(m_nodes[child1].aabb, m_nodes[child2].aabb);
-
-      index = m_nodes[index].parent;
-    }
-
-    // validate();
-  }
-
-  private final void removeLeaf(int leaf) {
-    if (leaf == m_root) {
-      m_root = NULL_NODE;
-      return;
-    }
-
-    int parent = m_nodes[leaf].parent;
-    int grandParent = m_nodes[parent].parent;
-    int sibling;
-    if (m_nodes[parent].child1 == leaf) {
-      sibling = m_nodes[parent].child2;
-    } else {
-      sibling = m_nodes[parent].child1;
-    }
-
-    if (grandParent != NULL_NODE) {
-      // Destroy parent and connect sibling to grandParent.
-      if (m_nodes[grandParent].child1 == parent) {
-        m_nodes[grandParent].child1 = sibling;
-      } else {
-        m_nodes[grandParent].child2 = sibling;
-      }
-      m_nodes[sibling].parent = grandParent;
-      freeNode(parent);
-
-      // Adjust ancestor bounds.
-      int index = grandParent;
-      while (index != NULL_NODE) {
-        index = balance(index);
-
-        int child1 = m_nodes[index].child1;
-        int child2 = m_nodes[index].child2;
-
-        m_nodes[index].aabb.combine(m_nodes[child1].aabb, m_nodes[child2].aabb);
-        m_nodes[index].height = 1 + MathUtils.max(m_nodes[child1].height, m_nodes[child2].height);
-
-        index = m_nodes[index].parent;
-      }
-    } else {
-      m_root = sibling;
-      m_nodes[sibling].parent = NULL_NODE;
-      freeNode(parent);
-    }
-
-    // validate();
-  }
-
-  // Perform a left or right rotation if node A is imbalanced.
-  // Returns the new root index.
-  private int balance(int iA) {
-    assert (iA != NULL_NODE);
-
-    TreeNode A = m_nodes[iA];
-    if (A.isLeaf() || A.height < 2) {
-      return iA;
-    }
-
-    int iB = A.child1;
-    int iC = A.child2;
-    assert (0 <= iB && iB < m_nodeCapacity);
-    assert (0 <= iC && iC < m_nodeCapacity);
-
-    TreeNode B = m_nodes[iB];
-    TreeNode C = m_nodes[iC];
-
-    int balance = C.height - B.height;
-
-    // Rotate C up
-    if (balance > 1) {
-      int iF = C.child1;
-      int iG = C.child2;
-      TreeNode F = m_nodes[iF];
-      TreeNode G = m_nodes[iG];
-      assert (0 <= iF && iF < m_nodeCapacity);
-      assert (0 <= iG && iG < m_nodeCapacity);
-
-      // Swap A and C
-      C.child1 = iA;
-      C.parent = A.parent;
-      A.parent = iC;
-
-      // A's old parent should point to C
-      if (C.parent != NULL_NODE) {
-        if (m_nodes[C.parent].child1 == iA) {
-          m_nodes[C.parent].child1 = iC;
-        } else {
-          assert (m_nodes[C.parent].child2 == iA);
-          m_nodes[C.parent].child2 = iC;
-        }
-      } else {
-        m_root = iC;
-      }
-
-      // Rotate
-      if (F.height > G.height) {
-        C.child2 = iF;
-        A.child2 = iG;
-        G.parent = iA;
-        A.aabb.combine(B.aabb, G.aabb);
-        C.aabb.combine(A.aabb, F.aabb);
-
-        A.height = 1 + MathUtils.max(B.height, G.height);
-        C.height = 1 + MathUtils.max(A.height, F.height);
-      } else {
-        C.child2 = iG;
-        A.child2 = iF;
-        F.parent = iA;
-        A.aabb.combine(B.aabb, F.aabb);
-        C.aabb.combine(A.aabb, G.aabb);
-
-        A.height = 1 + MathUtils.max(B.height, F.height);
-        C.height = 1 + MathUtils.max(A.height, G.height);
-      }
-
-      return iC;
-    }
-
-    // Rotate B up
-    if (balance < -1) {
-      int iD = B.child1;
-      int iE = B.child2;
-      TreeNode D = m_nodes[iD];
-      TreeNode E = m_nodes[iE];
-      assert (0 <= iD && iD < m_nodeCapacity);
-      assert (0 <= iE && iE < m_nodeCapacity);
-
-      // Swap A and B
-      B.child1 = iA;
-      B.parent = A.parent;
-      A.parent = iB;
-
-      // A's old parent should point to B
-      if (B.parent != NULL_NODE) {
-        if (m_nodes[B.parent].child1 == iA) {
-          m_nodes[B.parent].child1 = iB;
-        } else {
-          assert (m_nodes[B.parent].child2 == iA);
-          m_nodes[B.parent].child2 = iB;
-        }
-      } else {
-        m_root = iB;
-      }
-
-      // Rotate
-      if (D.height > E.height) {
-        B.child2 = iD;
-        A.child1 = iE;
-        E.parent = iA;
-        A.aabb.combine(C.aabb, E.aabb);
-        B.aabb.combine(A.aabb, D.aabb);
-
-        A.height = 1 + MathUtils.max(C.height, E.height);
-        B.height = 1 + MathUtils.max(A.height, D.height);
-      } else {
-        B.child2 = iE;
-        A.child1 = iD;
-        D.parent = iA;
-        A.aabb.combine(C.aabb, D.aabb);
-        B.aabb.combine(A.aabb, E.aabb);
-
-        A.height = 1 + MathUtils.max(C.height, D.height);
-        B.height = 1 + MathUtils.max(A.height, E.height);
-      }
-
-      return iB;
-    }
-
-    return iA;
-  }
-
-  private void validateStructure(int index) {
-    if (index == NULL_NODE) {
-      return;
-    }
-
-    if (index == m_root) {
-      assert (m_nodes[index].parent == NULL_NODE);
-    }
-
-    final TreeNode node = m_nodes[index];
-
-    int child1 = node.child1;
-    int child2 = node.child2;
-
-    if (node.isLeaf()) {
-      assert (child1 == NULL_NODE);
-      assert (child2 == NULL_NODE);
-      assert (node.height == 0);
-      return;
-    }
-
-    assert (0 <= child1 && child1 < m_nodeCapacity);
-    assert (0 <= child2 && child2 < m_nodeCapacity);
-
-    assert (m_nodes[child1].parent == index);
-    assert (m_nodes[child2].parent == index);
-
-    validateStructure(child1);
-    validateStructure(child2);
-  }
-
-  private void validateMetrics(int index) {
-    if (index == NULL_NODE) {
-      return;
-    }
-
-    final TreeNode node = m_nodes[index];
-
-    int child1 = node.child1;
-    int child2 = node.child2;
-
-    if (node.isLeaf()) {
-      assert (child1 == NULL_NODE);
-      assert (child2 == NULL_NODE);
-      assert (node.height == 0);
-      return;
-    }
-
-    assert (0 <= child1 && child1 < m_nodeCapacity);
-    assert (0 <= child2 && child2 < m_nodeCapacity);
-
-    int height1 = m_nodes[child1].height;
-    int height2 = m_nodes[child2].height;
-    int height;
-    height = 1 + MathUtils.max(height1, height2);
-    assert (node.height == height);
-
-    AABB aabb = new AABB();
-    aabb.combine(m_nodes[child1].aabb, m_nodes[child2].aabb);
-
-    assert (aabb.lowerBound.equals(node.aabb.lowerBound));
-    assert (aabb.upperBound.equals(node.aabb.upperBound));
-
-    validateMetrics(child1);
-    validateMetrics(child2);
-  }
-
-  public void drawTree(DebugDraw argDraw) {
-    if (m_root == NULL_NODE) {
-      return;
-    }
-    int height = computeHeight();
-    drawTree(argDraw, m_root, 0, height);
-  }
-
-  private final Color3f color = new Color3f();
-  private final Vec2 textVec = new Vec2();
-
-  public void drawTree(DebugDraw argDraw, int nodeId, int spot, int height) {
-    final TreeNode node = m_nodes[nodeId];
-    node.aabb.getVertices(drawVecs);
-
-    color.set(1, (height - spot) * 1f / height, (height - spot) * 1f / height);
-    argDraw.drawPolygon(drawVecs, 4, color);
-
-    argDraw.getViewportTranform().getWorldToScreen(node.aabb.upperBound, textVec);
-    argDraw.drawString(textVec.x, textVec.y, nodeId + "-" + (spot + 1) + "/" + height, color);
-
-    if (node.child1 != NULL_NODE) {
-      drawTree(argDraw, node.child1, spot + 1, height);
-    }
-    if (node.child2 != NULL_NODE) {
-      drawTree(argDraw, node.child2, spot + 1, height);
-    }
-  }
+       public static final int MAX_STACK_SIZE = 64;
+
+       private int m_root;
+       private TreeNode[] m_nodes;
+       private int m_nodeCount;
+       private int m_nodeCapacity;
+
+       private int m_freeList;
+
+       private int m_insertionCount;
+
+       private final Vec2[] drawVecs = new Vec2[4];
+       private final DynamicIntStack intStack = new DynamicIntStack(10);
+
+       public DynamicTree () {
+               m_root = TreeNode.NULL_NODE;
+               m_nodeCount = 0;
+               m_nodeCapacity = 16;
+               m_nodes = new TreeNode[16];
+
+               // Build a linked list for the free list.
+               for (int i = 0; i < m_nodeCapacity; i++) {
+                       m_nodes[i] = new TreeNode();
+                       m_nodes[i].parent = i + 1;
+                       m_nodes[i].height = -1;
+               }
+               m_nodes[m_nodeCapacity - 1].parent = TreeNode.NULL_NODE;
+               m_freeList = 0;
+
+               m_insertionCount = 0;
+
+               for (int i = 0; i < drawVecs.length; i++) {
+                       drawVecs[i] = new Vec2();
+               }
+       }
+
+       /** Create a proxy. Provide a tight fitting AABB and a userData pointer.
+        * 
+        * @param aabb
+        * @param userData
+        * @return */
+       public final int createProxy (final AABB aabb, Object userData) {
+               int proxyId = allocateNode();
+
+               // Fatten the aabb
+               final TreeNode node = m_nodes[proxyId];
+               node.aabb.lowerBound.x = aabb.lowerBound.x - Settings.aabbExtension;
+               node.aabb.lowerBound.y = aabb.lowerBound.y - Settings.aabbExtension;
+               node.aabb.upperBound.x = aabb.upperBound.x + Settings.aabbExtension;
+               node.aabb.upperBound.y = aabb.upperBound.y + Settings.aabbExtension;
+               node.userData = userData;
+
+               insertLeaf(proxyId);
+
+               return proxyId;
+       }
+
+       /** Destroy a proxy
+        * 
+        * @param proxyId */
+       public final void destroyProxy (int proxyId) {
+               assert (0 <= proxyId && proxyId < m_nodeCapacity);
+               assert (m_nodes[proxyId].isLeaf());
+
+               removeLeaf(proxyId);
+               freeNode(proxyId);
+       }
+
+       // djm pooling
+       /** Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, then the proxy is removed from the
+        * tree and re-inserted. Otherwise the function returns immediately.
+        * 
+        * @return true if the proxy was re-inserted. */
+       public final boolean moveProxy (int proxyId, final AABB aabb, Vec2 displacement) {
+               assert (0 <= proxyId && proxyId < m_nodeCapacity);
+               final TreeNode node = m_nodes[proxyId];
+               assert (node.isLeaf());
+
+               if (node.aabb.contains(aabb)) {
+                       return false;
+               }
+
+               removeLeaf(proxyId);
+
+               // Extend AABB
+               final Vec2 lowerBound = aabb.lowerBound;
+               final Vec2 upperBound = aabb.upperBound;
+               lowerBound.x -= Settings.aabbExtension;
+               lowerBound.y -= Settings.aabbExtension;
+               upperBound.x += Settings.aabbExtension;
+               upperBound.y += Settings.aabbExtension;
+
+               // Predict AABB displacement.
+               final float dx = displacement.x * Settings.aabbMultiplier;
+               final float dy = displacement.y * Settings.aabbMultiplier;
+               if (dx < 0.0f) {
+                       lowerBound.x += dx;
+               } else {
+                       upperBound.x += dx;
+               }
+
+               if (dy < 0.0f) {
+                       lowerBound.y += dy;
+               } else {
+                       upperBound.y += dy;
+               }
+               node.aabb.lowerBound.x = lowerBound.x;
+               node.aabb.lowerBound.y = lowerBound.y;
+               node.aabb.upperBound.x = upperBound.x;
+               node.aabb.upperBound.y = upperBound.y;
+
+               insertLeaf(proxyId);
+               return true;
+       }
+
+       public final Object getUserData (int proxyId) {
+               assert (0 <= proxyId && proxyId < m_nodeCapacity);
+               return m_nodes[proxyId].userData;
+       }
+
+       public final AABB getFatAABB (int proxyId) {
+               assert (0 <= proxyId && proxyId < m_nodeCapacity);
+               return m_nodes[proxyId].aabb;
+       }
+
+       /** Query an AABB for overlapping proxies. The callback class is called for each proxy that overlaps the supplied AABB.
+        * 
+        * @param callback
+        * @param araabbgAABB */
+       public final void query (TreeCallback callback, AABB aabb) {
+               intStack.reset();
+               intStack.push(m_root);
+
+               while (intStack.getCount() > 0) {
+                       int nodeId = intStack.pop();
+                       if (nodeId == TreeNode.NULL_NODE) {
+                               continue;
+                       }
+
+                       final TreeNode node = m_nodes[nodeId];
+
+                       if (AABB.testOverlap(node.aabb, aabb)) {
+                               if (node.isLeaf()) {
+                                       boolean proceed = callback.treeCallback(nodeId);
+                                       if (!proceed) {
+                                               return;
+                                       }
+                               } else {
+                                       intStack.push(node.child1);
+                                       intStack.push(node.child2);
+                               }
+                       }
+               }
+       }
+
+       private final Vec2 r = new Vec2();
+       private final Vec2 v = new Vec2();
+       private final Vec2 absV = new Vec2();
+       private final Vec2 temp = new Vec2();
+       private final Vec2 c = new Vec2();
+       private final Vec2 h = new Vec2();
+       private final Vec2 t = new Vec2();
+       private final AABB aabb = new AABB();
+       private final RayCastInput subInput = new RayCastInput();
+
+       /** Ray-cast against the proxies in the tree. This relies on the callback to perform a exact ray-cast in the case were the proxy
+        * contains a shape. The callback also performs the any collision filtering. This has performance roughly equal to k * log(n),
+        * where k is the number of collisions and n is the number of proxies in the tree.
+        * 
+        * @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1).
+        * @param callback a callback class that is called for each proxy that is hit by the ray. */
+       public void raycast (TreeRayCastCallback callback, RayCastInput input) {
+               final Vec2 p1 = input.p1;
+               final Vec2 p2 = input.p2;
+               r.set(p2).subLocal(p1);
+               assert (r.lengthSquared() > 0f);
+               r.normalize();
+
+               // v is perpendicular to the segment.
+               Vec2.crossToOutUnsafe(1f, r, v);
+               absV.set(v).absLocal();
+
+               // Separating axis for segment (Gino, p80).
+               // |dot(v, p1 - c)| > dot(|v|, h)
+
+               float maxFraction = input.maxFraction;
+
+               // Build a bounding box for the segment.
+               final AABB segAABB = aabb;
+               // Vec2 t = p1 + maxFraction * (p2 - p1);
+               temp.set(p2).subLocal(p1).mulLocal(maxFraction).addLocal(p1);
+               Vec2.minToOut(p1, temp, segAABB.lowerBound);
+               Vec2.maxToOut(p1, temp, segAABB.upperBound);
+
+               intStack.push(m_root);
+               while (intStack.getCount() > 0) {
+                       int nodeId = intStack.pop();
+                       if (nodeId == TreeNode.NULL_NODE) {
+                               continue;
+                       }
+
+                       final TreeNode node = m_nodes[nodeId];
+
+                       if (!AABB.testOverlap(node.aabb, segAABB)) {
+                               continue;
+                       }
+
+                       // Separating axis for segment (Gino, p80).
+                       // |dot(v, p1 - c)| > dot(|v|, h)
+                       node.aabb.getCenterToOut(c);
+                       node.aabb.getExtentsToOut(h);
+                       temp.set(p1).subLocal(c);
+                       float separation = MathUtils.abs(Vec2.dot(v, temp)) - Vec2.dot(absV, h);
+                       if (separation > 0.0f) {
+                               continue;
+                       }
+
+                       if (node.isLeaf()) {
+                               subInput.p1.set(input.p1);
+                               subInput.p2.set(input.p2);
+                               subInput.maxFraction = maxFraction;
+
+                               float value = callback.raycastCallback(subInput, nodeId);
+
+                               if (value == 0.0f) {
+                                       // The client has terminated the ray cast.
+                                       return;
+                               }
+
+                               if (value > 0.0f) {
+                                       // Update segment bounding box.
+                                       maxFraction = value;
+                                       t.set(p2).subLocal(p1).mulLocal(maxFraction).addLocal(p1);
+                                       Vec2.minToOut(p1, t, segAABB.lowerBound);
+                                       Vec2.maxToOut(p1, t, segAABB.upperBound);
+                               }
+                       } else {
+                               intStack.push(node.child1);
+                               intStack.push(node.child2);
+                       }
+               }
+       }
+
+       /** Compute the height of the tree. */
+       public final int computeHeight () {
+               return computeHeight(m_root);
+       }
+
+       private final int computeHeight (int nodeId) {
+               assert (0 <= nodeId && nodeId < m_nodeCapacity);
+
+               final TreeNode node = m_nodes[nodeId];
+
+               if (node.isLeaf()) {
+                       return 0;
+               }
+               int height1 = computeHeight(node.child1);
+               int height2 = computeHeight(node.child2);
+               return 1 + MathUtils.max(height1, height2);
+       }
+
+       /** Validate this tree. For testing. */
+       public void validate () {
+               validateStructure(m_root);
+               validateMetrics(m_root);
+
+               int freeCount = 0;
+               int freeIndex = m_freeList;
+               while (freeIndex != NULL_NODE) {
+                       assert (0 <= freeIndex && freeIndex < m_nodeCapacity);
+                       freeIndex = m_nodes[freeIndex].parent;
+                       ++freeCount;
+               }
+
+               assert (getHeight() == computeHeight());
+
+               assert (m_nodeCount + freeCount == m_nodeCapacity);
+       }
+
+       /** Compute the height of the binary tree in O(N) time. Should not be called often.
+        * 
+        * @return */
+       public int getHeight () {
+               if (m_root == NULL_NODE) {
+                       return 0;
+               }
+               return m_nodes[m_root].height;
+       }
+
+       /** Get the maximum balance of an node in the tree. The balance is the difference in height of the two children of a node.
+        * 
+        * @return */
+       public int getMaxBalance () {
+               int maxBalance = 0;
+               for (int i = 0; i < m_nodeCapacity; ++i) {
+                       final TreeNode node = m_nodes[i];
+                       if (node.height <= 1) {
+                               continue;
+                       }
+
+                       assert (node.isLeaf() == false);
+
+                       int child1 = node.child1;
+                       int child2 = node.child2;
+                       int balance = MathUtils.abs(m_nodes[child2].height - m_nodes[child1].height);
+                       maxBalance = MathUtils.max(maxBalance, balance);
+               }
+
+               return maxBalance;
+       }
+
+       /** Get the ratio of the sum of the node areas to the root area.
+        * 
+        * @return */
+       public float getAreaRatio () {
+               if (m_root == NULL_NODE) {
+                       return 0.0f;
+               }
+
+               final TreeNode root = m_nodes[m_root];
+               float rootArea = root.aabb.getPerimeter();
+
+               float totalArea = 0.0f;
+               for (int i = 0; i < m_nodeCapacity; ++i) {
+                       final TreeNode node = m_nodes[i];
+                       if (node.height < 0) {
+                               // Free node in pool
+                               continue;
+                       }
+
+                       totalArea += node.aabb.getPerimeter();
+               }
+
+               return totalArea / rootArea;
+       }
+
+       /** Build an optimal tree. Very expensive. For testing. */
+       public void rebuildBottomUp () {
+               int[] nodes = new int[m_nodeCount];
+               int count = 0;
+
+               // Build array of leaves. Free the rest.
+               for (int i = 0; i < m_nodeCapacity; ++i) {
+                       if (m_nodes[i].height < 0) {
+                               // free node in pool
+                               continue;
+                       }
+
+                       if (m_nodes[i].isLeaf()) {
+                               m_nodes[i].parent = NULL_NODE;
+                               nodes[count] = i;
+                               ++count;
+                       } else {
+                               freeNode(i);
+                       }
+               }
+
+               AABB b = new AABB();
+               while (count > 1) {
+                       float minCost = Float.MAX_VALUE;
+                       int iMin = -1, jMin = -1;
+                       for (int i = 0; i < count; ++i) {
+                               AABB aabbi = m_nodes[nodes[i]].aabb;
+
+                               for (int j = i + 1; j < count; ++j) {
+                                       AABB aabbj = m_nodes[nodes[j]].aabb;
+                                       b.combine(aabbi, aabbj);
+                                       float cost = b.getPerimeter();
+                                       if (cost < minCost) {
+                                               iMin = i;
+                                               jMin = j;
+                                               minCost = cost;
+                                       }
+                               }
+                       }
+
+                       int index1 = nodes[iMin];
+                       int index2 = nodes[jMin];
+                       TreeNode child1 = m_nodes[index1];
+                       TreeNode child2 = m_nodes[index2];
+
+                       int parentIndex = allocateNode();
+                       TreeNode parent = m_nodes[parentIndex];
+                       parent.child1 = index1;
+                       parent.child2 = index2;
+                       parent.height = 1 + MathUtils.max(child1.height, child2.height);
+                       parent.aabb.combine(child1.aabb, child2.aabb);
+                       parent.parent = NULL_NODE;
+
+                       child1.parent = parentIndex;
+                       child2.parent = parentIndex;
+
+                       nodes[jMin] = nodes[count - 1];
+                       nodes[iMin] = parentIndex;
+                       --count;
+               }
+
+               m_root = nodes[0];
+
+               validate();
+       }
+
+       private final int allocateNode () {
+               if (m_freeList == NULL_NODE) {
+                       assert (m_nodeCount == m_nodeCapacity);
+
+                       TreeNode[] old = m_nodes;
+                       m_nodeCapacity *= 2;
+                       m_nodes = new TreeNode[m_nodeCapacity];
+                       System.arraycopy(old, 0, m_nodes, 0, old.length);
+
+                       // Build a linked list for the free list.
+                       for (int i = m_nodeCount; i < m_nodeCapacity; i++) {
+                               m_nodes[i] = new TreeNode();
+                               m_nodes[i].parent = i + 1;
+                               m_nodes[i].height = -1;
+                       }
+                       m_nodes[m_nodeCapacity - 1].parent = TreeNode.NULL_NODE;
+                       m_freeList = m_nodeCount;
+               }
+               int nodeId = m_freeList;
+               m_freeList = m_nodes[nodeId].parent;
+
+               m_nodes[nodeId].parent = NULL_NODE;
+               m_nodes[nodeId].child1 = NULL_NODE;
+               m_nodes[nodeId].child2 = NULL_NODE;
+               m_nodes[nodeId].height = 0;
+               m_nodes[nodeId].userData = null;
+               ++m_nodeCount;
+               return nodeId;
+       }
+
+       /** returns a node to the pool
+        * 
+        * @param argNode */
+       private final void freeNode (int nodeId) {
+               assert (nodeId != NULL_NODE);
+               assert (0 < m_nodeCount);
+               m_nodes[nodeId].parent = m_freeList;
+               m_nodes[nodeId].height = -1;
+               m_freeList = nodeId;
+               m_nodeCount--;
+       }
+
+       public int getInsertionCount () {
+               return m_insertionCount;
+       }
+
+       private final Vec2 center = new Vec2();
+       private final Vec2 delta1 = new Vec2();
+       private final Vec2 delta2 = new Vec2();
+       private final AABB combinedAABB = new AABB();
+
+       private final void insertLeaf (int leaf) {
+               m_insertionCount++;
+
+               if (m_root == NULL_NODE) {
+                       m_root = leaf;
+                       m_nodes[m_root].parent = NULL_NODE;
+                       return;
+               }
+
+               // find the best sibling
+               AABB leafAABB = m_nodes[leaf].aabb;
+               int index = m_root;
+               while (m_nodes[index].isLeaf() == false) {
+                       final TreeNode node = m_nodes[index];
+                       int child1 = node.child1;
+                       int child2 = node.child2;
+
+                       float area = node.aabb.getPerimeter();
+
+                       combinedAABB.combine(node.aabb, leafAABB);
+                       float combinedArea = combinedAABB.getPerimeter();
+
+                       // Cost of creating a new parent for this node and the new leaf
+                       float cost = 2.0f * combinedArea;
+
+                       // Minimum cost of pushing the leaf further down the tree
+                       float inheritanceCost = 2.0f * (combinedArea - area);
+
+                       // Cost of descending into child1
+                       float cost1;
+                       if (m_nodes[child1].isLeaf()) {
+                               combinedAABB.combine(leafAABB, m_nodes[child1].aabb);
+                               cost1 = combinedAABB.getPerimeter() + inheritanceCost;
+                       } else {
+                               combinedAABB.combine(leafAABB, m_nodes[child1].aabb);
+                               float oldArea = m_nodes[child1].aabb.getPerimeter();
+                               float newArea = combinedAABB.getPerimeter();
+                               cost1 = (newArea - oldArea) + inheritanceCost;
+                       }
+
+                       // Cost of descending into child2
+                       float cost2;
+                       if (m_nodes[child2].isLeaf()) {
+                               combinedAABB.combine(leafAABB, m_nodes[child2].aabb);
+                               cost2 = combinedAABB.getPerimeter() + inheritanceCost;
+                       } else {
+                               combinedAABB.combine(leafAABB, m_nodes[child2].aabb);
+                               float oldArea = m_nodes[child2].aabb.getPerimeter();
+                               float newArea = combinedAABB.getPerimeter();
+                               cost2 = newArea - oldArea + inheritanceCost;
+                       }
+
+                       // Descend according to the minimum cost.
+                       if (cost < cost1 && cost < cost2) {
+                               break;
+                       }
+
+                       // Descend
+                       if (cost1 < cost2) {
+                               index = child1;
+                       } else {
+                               index = child2;
+                       }
+               }
+
+               int sibling = index;
+               int oldParent = m_nodes[sibling].parent;
+               int newParentId = allocateNode();
+               final TreeNode newParent = m_nodes[newParentId];
+               newParent.parent = oldParent;
+               newParent.userData = null;
+               newParent.aabb.combine(leafAABB, m_nodes[sibling].aabb);
+               newParent.height = m_nodes[sibling].height + 1;
+
+               if (oldParent != NULL_NODE) {
+                       // The sibling was not the root.
+                       if (m_nodes[oldParent].child1 == sibling) {
+                               m_nodes[oldParent].child1 = newParentId;
+                       } else {
+                               m_nodes[oldParent].child2 = newParentId;
+                       }
+
+                       m_nodes[newParentId].child1 = sibling;
+                       m_nodes[newParentId].child2 = leaf;
+                       m_nodes[sibling].parent = newParentId;
+                       m_nodes[leaf].parent = newParentId;
+               } else {
+                       // The sibling was the root.
+                       m_nodes[newParentId].child1 = sibling;
+                       m_nodes[newParentId].child2 = leaf;
+                       m_nodes[sibling].parent = newParentId;
+                       m_nodes[leaf].parent = newParentId;
+                       m_root = newParentId;
+               }
+
+               // Walk back up the tree fixing heights and AABBs
+               index = m_nodes[leaf].parent;
+               while (index != NULL_NODE) {
+                       index = balance(index);
+
+                       int child1 = m_nodes[index].child1;
+                       int child2 = m_nodes[index].child2;
+
+                       assert (child1 != NULL_NODE);
+                       assert (child2 != NULL_NODE);
+
+                       m_nodes[index].height = 1 + MathUtils.max(m_nodes[child1].height, m_nodes[child2].height);
+                       m_nodes[index].aabb.combine(m_nodes[child1].aabb, m_nodes[child2].aabb);
+
+                       index = m_nodes[index].parent;
+               }
+
+               // validate();
+       }
+
+       private final void removeLeaf (int leaf) {
+               if (leaf == m_root) {
+                       m_root = NULL_NODE;
+                       return;
+               }
+
+               int parent = m_nodes[leaf].parent;
+               int grandParent = m_nodes[parent].parent;
+               int sibling;
+               if (m_nodes[parent].child1 == leaf) {
+                       sibling = m_nodes[parent].child2;
+               } else {
+                       sibling = m_nodes[parent].child1;
+               }
+
+               if (grandParent != NULL_NODE) {
+                       // Destroy parent and connect sibling to grandParent.
+                       if (m_nodes[grandParent].child1 == parent) {
+                               m_nodes[grandParent].child1 = sibling;
+                       } else {
+                               m_nodes[grandParent].child2 = sibling;
+                       }
+                       m_nodes[sibling].parent = grandParent;
+                       freeNode(parent);
+
+                       // Adjust ancestor bounds.
+                       int index = grandParent;
+                       while (index != NULL_NODE) {
+                               index = balance(index);
+
+                               int child1 = m_nodes[index].child1;
+                               int child2 = m_nodes[index].child2;
+
+                               m_nodes[index].aabb.combine(m_nodes[child1].aabb, m_nodes[child2].aabb);
+                               m_nodes[index].height = 1 + MathUtils.max(m_nodes[child1].height, m_nodes[child2].height);
+
+                               index = m_nodes[index].parent;
+                       }
+               } else {
+                       m_root = sibling;
+                       m_nodes[sibling].parent = NULL_NODE;
+                       freeNode(parent);
+               }
+
+               // validate();
+       }
+
+       // Perform a left or right rotation if node A is imbalanced.
+       // Returns the new root index.
+       private int balance (int iA) {
+               assert (iA != NULL_NODE);
+
+               TreeNode A = m_nodes[iA];
+               if (A.isLeaf() || A.height < 2) {
+                       return iA;
+               }
+
+               int iB = A.child1;
+               int iC = A.child2;
+               assert (0 <= iB && iB < m_nodeCapacity);
+               assert (0 <= iC && iC < m_nodeCapacity);
+
+               TreeNode B = m_nodes[iB];
+               TreeNode C = m_nodes[iC];
+
+               int balance = C.height - B.height;
+
+               // Rotate C up
+               if (balance > 1) {
+                       int iF = C.child1;
+                       int iG = C.child2;
+                       TreeNode F = m_nodes[iF];
+                       TreeNode G = m_nodes[iG];
+                       assert (0 <= iF && iF < m_nodeCapacity);
+                       assert (0 <= iG && iG < m_nodeCapacity);
+
+                       // Swap A and C
+                       C.child1 = iA;
+                       C.parent = A.parent;
+                       A.parent = iC;
+
+                       // A's old parent should point to C
+                       if (C.parent != NULL_NODE) {
+                               if (m_nodes[C.parent].child1 == iA) {
+                                       m_nodes[C.parent].child1 = iC;
+                               } else {
+                                       assert (m_nodes[C.parent].child2 == iA);
+                                       m_nodes[C.parent].child2 = iC;
+                               }
+                       } else {
+                               m_root = iC;
+                       }
+
+                       // Rotate
+                       if (F.height > G.height) {
+                               C.child2 = iF;
+                               A.child2 = iG;
+                               G.parent = iA;
+                               A.aabb.combine(B.aabb, G.aabb);
+                               C.aabb.combine(A.aabb, F.aabb);
+
+                               A.height = 1 + MathUtils.max(B.height, G.height);
+                               C.height = 1 + MathUtils.max(A.height, F.height);
+                       } else {
+                               C.child2 = iG;
+                               A.child2 = iF;
+                               F.parent = iA;
+                               A.aabb.combine(B.aabb, F.aabb);
+                               C.aabb.combine(A.aabb, G.aabb);
+
+                               A.height = 1 + MathUtils.max(B.height, F.height);
+                               C.height = 1 + MathUtils.max(A.height, G.height);
+                       }
+
+                       return iC;
+               }
+
+               // Rotate B up
+               if (balance < -1) {
+                       int iD = B.child1;
+                       int iE = B.child2;
+                       TreeNode D = m_nodes[iD];
+                       TreeNode E = m_nodes[iE];
+                       assert (0 <= iD && iD < m_nodeCapacity);
+                       assert (0 <= iE && iE < m_nodeCapacity);
+
+                       // Swap A and B
+                       B.child1 = iA;
+                       B.parent = A.parent;
+                       A.parent = iB;
+
+                       // A's old parent should point to B
+                       if (B.parent != NULL_NODE) {
+                               if (m_nodes[B.parent].child1 == iA) {
+                                       m_nodes[B.parent].child1 = iB;
+                               } else {
+                                       assert (m_nodes[B.parent].child2 == iA);
+                                       m_nodes[B.parent].child2 = iB;
+                               }
+                       } else {
+                               m_root = iB;
+                       }
+
+                       // Rotate
+                       if (D.height > E.height) {
+                               B.child2 = iD;
+                               A.child1 = iE;
+                               E.parent = iA;
+                               A.aabb.combine(C.aabb, E.aabb);
+                               B.aabb.combine(A.aabb, D.aabb);
+
+                               A.height = 1 + MathUtils.max(C.height, E.height);
+                               B.height = 1 + MathUtils.max(A.height, D.height);
+                       } else {
+                               B.child2 = iE;
+                               A.child1 = iD;
+                               D.parent = iA;
+                               A.aabb.combine(C.aabb, D.aabb);
+                               B.aabb.combine(A.aabb, E.aabb);
+
+                               A.height = 1 + MathUtils.max(C.height, D.height);
+                               B.height = 1 + MathUtils.max(A.height, E.height);
+                       }
+
+                       return iB;
+               }
+
+               return iA;
+       }
+
+       private void validateStructure (int index) {
+               if (index == NULL_NODE) {
+                       return;
+               }
+
+               if (index == m_root) {
+                       assert (m_nodes[index].parent == NULL_NODE);
+               }
+
+               final TreeNode node = m_nodes[index];
+
+               int child1 = node.child1;
+               int child2 = node.child2;
+
+               if (node.isLeaf()) {
+                       assert (child1 == NULL_NODE);
+                       assert (child2 == NULL_NODE);
+                       assert (node.height == 0);
+                       return;
+               }
+
+               assert (0 <= child1 && child1 < m_nodeCapacity);
+               assert (0 <= child2 && child2 < m_nodeCapacity);
+
+               assert (m_nodes[child1].parent == index);
+               assert (m_nodes[child2].parent == index);
+
+               validateStructure(child1);
+               validateStructure(child2);
+       }
+
+       private void validateMetrics (int index) {
+               if (index == NULL_NODE) {
+                       return;
+               }
+
+               final TreeNode node = m_nodes[index];
+
+               int child1 = node.child1;
+               int child2 = node.child2;
+
+               if (node.isLeaf()) {
+                       assert (child1 == NULL_NODE);
+                       assert (child2 == NULL_NODE);
+                       assert (node.height == 0);
+                       return;
+               }
+
+               assert (0 <= child1 && child1 < m_nodeCapacity);
+               assert (0 <= child2 && child2 < m_nodeCapacity);
+
+               int height1 = m_nodes[child1].height;
+               int height2 = m_nodes[child2].height;
+               int height;
+               height = 1 + MathUtils.max(height1, height2);
+               assert (node.height == height);
+
+               AABB aabb = new AABB();
+               aabb.combine(m_nodes[child1].aabb, m_nodes[child2].aabb);
+
+               assert (aabb.lowerBound.equals(node.aabb.lowerBound));
+               assert (aabb.upperBound.equals(node.aabb.upperBound));
+
+               validateMetrics(child1);
+               validateMetrics(child2);
+       }
+
+       public void drawTree (DebugDraw argDraw) {
+               if (m_root == NULL_NODE) {
+                       return;
+               }
+               int height = computeHeight();
+               drawTree(argDraw, m_root, 0, height);
+       }
+
+       private final Color3f color = new Color3f();
+       private final Vec2 textVec = new Vec2();
+
+       public void drawTree (DebugDraw argDraw, int nodeId, int spot, int height) {
+               final TreeNode node = m_nodes[nodeId];
+               node.aabb.getVertices(drawVecs);
+
+               color.set(1, (height - spot) * 1f / height, (height - spot) * 1f / height);
+               argDraw.drawPolygon(drawVecs, 4, color);
+
+               argDraw.getViewportTranform().getWorldToScreen(node.aabb.upperBound, textVec);
+               argDraw.drawString(textVec.x, textVec.y, nodeId + "-" + (spot + 1) + "/" + height, color);
+
+               if (node.child1 != NULL_NODE) {
+                       drawTree(argDraw, node.child1, spot + 1, height);
+               }
+               if (node.child2 != NULL_NODE) {
+                       drawTree(argDraw, node.child2, spot + 1, height);
+               }
+       }
 }
index 7f98b38..acd0d8e 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package org.jbox2d.collision.broadphase;\r
 \r
 import org.jbox2d.callbacks.QueryCallback;\r
 import org.jbox2d.callbacks.RayCastCallback;\r
-import org.jbox2d.callbacks.TreeCallback;\r
 import org.jbox2d.collision.AABB;\r
 import org.jbox2d.collision.RayCastInput;\r
 \r
 public interface IBroadphase {\r
-  \r
-  int createProxy(AABB aabb, Object userData);\r
-  \r
-  void destroyProxy(int proxyId);\r
-  \r
-  void moveProxy(int proxyIdA, int proxyIdB);\r
-  \r
-  void touchProxy(int proxyId);\r
-  \r
-  AABB getFatAABB(int proxyId);\r
-  \r
-  Object getUserData(int proxyId);\r
-  \r
-  boolean testOverlap(int proxyIdA, int proxyIdB);\r
-  \r
-  int getProxyCount();\r
-  \r
-  void query(QueryCallback callback, AABB aabb);\r
-  \r
-  void raycast(RayCastCallback callback, RayCastInput input);\r
-  \r
-  int getTreeHeight();\r
-  \r
-  int getTreeBalance();\r
-  \r
-  float getTreeQuality();\r
-  \r
-}
\ No newline at end of file
+\r
+       int createProxy (AABB aabb, Object userData);\r
+\r
+       void destroyProxy (int proxyId);\r
+\r
+       void moveProxy (int proxyIdA, int proxyIdB);\r
+\r
+       void touchProxy (int proxyId);\r
+\r
+       AABB getFatAABB (int proxyId);\r
+\r
+       Object getUserData (int proxyId);\r
+\r
+       boolean testOverlap (int proxyIdA, int proxyIdB);\r
+\r
+       int getProxyCount ();\r
+\r
+       void query (QueryCallback callback, AABB aabb);\r
+\r
+       void raycast (RayCastCallback callback, RayCastInput input);\r
+\r
+       int getTreeHeight ();\r
+\r
+       int getTreeBalance ();\r
+\r
+       float getTreeQuality ();\r
+\r
+}\r
index 4b2e1ba..658fd10 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision.broadphase;
 
 // updated to rev 100
-/**
- * Java note: at the "creation" of each node, a random key is given to that node, and that's what we
- * sort from.
- */
+/** Java note: at the "creation" of each node, a random key is given to that node, and that's what we sort from. */
 public class Pair implements Comparable<Pair> {
-  public int proxyIdA;
-  public int proxyIdB;
+       public int proxyIdA;
+       public int proxyIdB;
 
-  public int compareTo(Pair pair2) {
-    if (this.proxyIdA < pair2.proxyIdA) {
-      return -1;
-    }
+       public int compareTo (Pair pair2) {
+               if (this.proxyIdA < pair2.proxyIdA) {
+                       return -1;
+               }
 
-    if (this.proxyIdA == pair2.proxyIdA) {
-      return proxyIdB < pair2.proxyIdB ? -1 : proxyIdB == pair2.proxyIdB ? 0 : 1;
-    }
+               if (this.proxyIdA == pair2.proxyIdA) {
+                       return proxyIdB < pair2.proxyIdB ? -1 : proxyIdB == pair2.proxyIdB ? 0 : 1;
+               }
 
-    return 1;
-  }
+               return 1;
+       }
 }
index f6b863a..daa9751 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.collision.broadphase;
 
 import org.jbox2d.collision.AABB;
 
 public class TreeNode {
-  public static final int NULL_NODE = -1;
-  /**
-   * Enlarged AABB
-   */
-  public final AABB aabb = new AABB();
+       public static final int NULL_NODE = -1;
+       /** Enlarged AABB */
+       public final AABB aabb = new AABB();
 
-  public Object userData;
+       public Object userData;
 
-  protected int parent;
+       protected int parent;
 
-  protected int child1;
-  protected int child2;
-  protected int height;
+       protected int child1;
+       protected int child2;
+       protected int height;
 
-  public final boolean isLeaf() {
-    return child1 == NULL_NODE;
-  }
+       public final boolean isLeaf () {
+               return child1 == NULL_NODE;
+       }
 
-  public Object getUserData() {
-    return userData;
-  }
+       public Object getUserData () {
+               return userData;
+       }
 
-  public void setUserData(Object argData) {
-    userData = argData;
-  }
+       public void setUserData (Object argData) {
+               userData = argData;
+       }
 
-  /**
-   * Should never be constructed outside the engine
-   */
-  protected TreeNode() {}
+       /** Should never be constructed outside the engine */
+       protected TreeNode () {
+       }
 }
index 1b6401f..f24e017 100644 (file)
@@ -24,7 +24,6 @@
 \r
 package org.jbox2d.collision.shapes;\r
 \r
-\r
 import org.jbox2d.collision.AABB;\r
 import org.jbox2d.collision.RayCastInput;\r
 import org.jbox2d.collision.RayCastOutput;\r
@@ -32,180 +31,168 @@ import org.jbox2d.common.Settings;
 import org.jbox2d.common.Transform;\r
 import org.jbox2d.common.Vec2;\r
 \r
-/**\r
- * A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you\r
- * can use inside and outside collision. Therefore, you may use any winding order. Since there may\r
- * be many vertices, they are allocated using Alloc. Connectivity information is used to create\r
- * smooth collisions. WARNING The chain will not collide properly if there are self-intersections.\r
+/** A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside and outside\r
+ * collision. Therefore, you may use any winding order. Since there may be many vertices, they are allocated using Alloc.\r
+ * Connectivity information is used to create smooth collisions. WARNING The chain will not collide properly if there are\r
+ * self-intersections.\r
  * \r
- * @author Daniel\r
- */\r
+ * @author Daniel */\r
 public class ChainShape extends Shape {\r
 \r
-  public Vec2[] m_vertices;\r
-  public int m_count;\r
-  public final Vec2 m_prevVertex = new Vec2(), m_nextVertex = new Vec2();\r
-  public boolean m_hasPrevVertex = false, m_hasNextVertex = false;\r
-\r
-  private final EdgeShape pool0 = new EdgeShape();\r
-  private final Vec2 pool1 = new Vec2();\r
-  private final Vec2 pool2 = new Vec2();\r
-\r
-  public ChainShape() {\r
-    super(ShapeType.CHAIN);\r
-    m_vertices = null;\r
-    m_radius = Settings.polygonRadius;\r
-    m_count = 0;\r
-  }\r
-\r
-  @Override\r
-  public int getChildCount() {\r
-    return m_count - 1;\r
-  }\r
-\r
-  /**\r
-   * Get a child edge.\r
-   */\r
-  public void getChildEdge(EdgeShape edge, int index) {\r
-    assert (0 <= index && index < m_count - 1);\r
-    edge.m_radius = m_radius;\r
-\r
-    edge.m_vertex1.set(m_vertices[index + 0]);\r
-    edge.m_vertex2.set(m_vertices[index + 1]);\r
-\r
-    if (index > 0) {\r
-      edge.m_vertex0.set(m_vertices[index - 1]);\r
-      edge.m_hasVertex0 = true;\r
-    } else {\r
-      edge.m_vertex0.set(m_prevVertex);\r
-      edge.m_hasVertex0 = m_hasPrevVertex;\r
-    }\r
-\r
-    if (index < m_count - 2) {\r
-      edge.m_vertex3.set(m_vertices[index + 2]);\r
-      edge.m_hasVertex3 = true;\r
-    } else {\r
-      edge.m_vertex3.set(m_nextVertex);\r
-      edge.m_hasVertex3 = m_hasNextVertex;\r
-    }\r
-  }\r
-\r
-  @Override\r
-  public boolean testPoint(Transform xf, Vec2 p) {\r
-    return false;\r
-  }\r
-\r
-  @Override\r
-  public boolean raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex) {\r
-    assert (childIndex < m_count);\r
-\r
-    final EdgeShape edgeShape = pool0;\r
-\r
-    int i1 = childIndex;\r
-    int i2 = childIndex + 1;\r
-    if (i2 == m_count) {\r
-      i2 = 0;\r
-    }\r
-\r
-    edgeShape.m_vertex1.set(m_vertices[i1]);\r
-    edgeShape.m_vertex2.set(m_vertices[i2]);\r
-\r
-    return edgeShape.raycast(output, input, xf, 0);\r
-  }\r
-\r
-  @Override\r
-  public void computeAABB(AABB aabb, Transform xf, int childIndex) {\r
-    assert (childIndex < m_count);\r
-\r
-    int i1 = childIndex;\r
-    int i2 = childIndex + 1;\r
-    if (i2 == m_count) {\r
-      i2 = 0;\r
-    }\r
-\r
-    final Vec2 v1 = pool1;\r
-    final Vec2 v2 = pool2;\r
-    Transform.mulToOutUnsafe(xf, m_vertices[i1], v1);\r
-    Transform.mulToOutUnsafe(xf, m_vertices[i2], v2);\r
-\r
-    Vec2.minToOut(v1, v2, aabb.lowerBound);\r
-    Vec2.maxToOut(v1, v2, aabb.upperBound);\r
-  }\r
-\r
-  @Override\r
-  public void computeMass(MassData massData, float density) {\r
-    massData.mass = 0.0f;\r
-    massData.center.setZero();\r
-    massData.I = 0.0f;\r
-  }\r
-\r
-  @Override\r
-  public Shape clone() {\r
-    ChainShape clone = new ChainShape();\r
-    clone.createChain(m_vertices, m_count);\r
-    clone.m_prevVertex.set(m_prevVertex);\r
-    clone.m_nextVertex.set(m_nextVertex);\r
-    clone.m_hasPrevVertex = m_hasPrevVertex;\r
-    clone.m_hasNextVertex = m_hasNextVertex;\r
-    return clone;\r
-  }\r
-\r
-  /**\r
-   * Create a loop. This automatically adjusts connectivity.\r
-   * \r
-   * @param vertices an array of vertices, these are copied\r
-   * @param count the vertex count\r
-   */\r
-  public void createLoop(final Vec2[] vertices, int count) {\r
-    assert (m_vertices == null && m_count == 0);\r
-    assert (count >= 3);\r
-    m_count = count + 1;\r
-    m_vertices = new Vec2[m_count];\r
-    for (int i = 0; i < count; i++) {\r
-      m_vertices[i] = new Vec2(vertices[i]);\r
-    }\r
-    m_vertices[count] = m_vertices[0];\r
-    m_prevVertex.set(m_vertices[m_count - 2]);\r
-    m_nextVertex.set(m_vertices[1]);\r
-    m_hasPrevVertex = true;\r
-    m_hasNextVertex = true;\r
-  }\r
-\r
-  /**\r
-   * Create a chain with isolated end vertices.\r
-   * \r
-   * @param vertices an array of vertices, these are copied\r
-   * @param count the vertex count\r
-   */\r
-  public void createChain(final Vec2 vertices[], int count) {\r
-    assert (m_vertices == null && m_count == 0);\r
-    assert (count >= 2);\r
-    m_count = count;\r
-    m_vertices = new Vec2[m_count];\r
-    for (int i = 0; i < m_count; i++) {\r
-      m_vertices[i] = new Vec2(vertices[i]);\r
-    }\r
-    m_hasPrevVertex = false;\r
-    m_hasNextVertex = false;\r
-  }\r
-\r
-  /**\r
-   * Establish connectivity to a vertex that precedes the first vertex. Don't call this for loops.\r
-   * \r
-   * @param prevVertex\r
-   */\r
-  public void setPrevVertex(final Vec2 prevVertex) {\r
-    m_prevVertex.set(prevVertex);\r
-    m_hasPrevVertex = true;\r
-  }\r
-\r
-  /**\r
-   * Establish connectivity to a vertex that follows the last vertex. Don't call this for loops.\r
-   * \r
-   * @param nextVertex\r
-   */\r
-  public void setNextVertex(final Vec2 nextVertex) {\r
-    m_nextVertex.set(nextVertex);\r
-    m_hasNextVertex = true;\r
-  }\r
+       public Vec2[] m_vertices;\r
+       public int m_count;\r
+       public final Vec2 m_prevVertex = new Vec2(), m_nextVertex = new Vec2();\r
+       public boolean m_hasPrevVertex = false, m_hasNextVertex = false;\r
+\r
+       private final EdgeShape pool0 = new EdgeShape();\r
+       private final Vec2 pool1 = new Vec2();\r
+       private final Vec2 pool2 = new Vec2();\r
+\r
+       public ChainShape () {\r
+               super(ShapeType.CHAIN);\r
+               m_vertices = null;\r
+               m_radius = Settings.polygonRadius;\r
+               m_count = 0;\r
+       }\r
+\r
+       @Override\r
+       public int getChildCount () {\r
+               return m_count - 1;\r
+       }\r
+\r
+       /** Get a child edge. */\r
+       public void getChildEdge (EdgeShape edge, int index) {\r
+               assert (0 <= index && index < m_count - 1);\r
+               edge.m_radius = m_radius;\r
+\r
+               edge.m_vertex1.set(m_vertices[index + 0]);\r
+               edge.m_vertex2.set(m_vertices[index + 1]);\r
+\r
+               if (index > 0) {\r
+                       edge.m_vertex0.set(m_vertices[index - 1]);\r
+                       edge.m_hasVertex0 = true;\r
+               } else {\r
+                       edge.m_vertex0.set(m_prevVertex);\r
+                       edge.m_hasVertex0 = m_hasPrevVertex;\r
+               }\r
+\r
+               if (index < m_count - 2) {\r
+                       edge.m_vertex3.set(m_vertices[index + 2]);\r
+                       edge.m_hasVertex3 = true;\r
+               } else {\r
+                       edge.m_vertex3.set(m_nextVertex);\r
+                       edge.m_hasVertex3 = m_hasNextVertex;\r
+               }\r
+       }\r
+\r
+       @Override\r
+       public boolean testPoint (Transform xf, Vec2 p) {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean raycast (RayCastOutput output, RayCastInput input, Transform xf, int childIndex) {\r
+               assert (childIndex < m_count);\r
+\r
+               final EdgeShape edgeShape = pool0;\r
+\r
+               int i1 = childIndex;\r
+               int i2 = childIndex + 1;\r
+               if (i2 == m_count) {\r
+                       i2 = 0;\r
+               }\r
+\r
+               edgeShape.m_vertex1.set(m_vertices[i1]);\r
+               edgeShape.m_vertex2.set(m_vertices[i2]);\r
+\r
+               return edgeShape.raycast(output, input, xf, 0);\r
+       }\r
+\r
+       @Override\r
+       public void computeAABB (AABB aabb, Transform xf, int childIndex) {\r
+               assert (childIndex < m_count);\r
+\r
+               int i1 = childIndex;\r
+               int i2 = childIndex + 1;\r
+               if (i2 == m_count) {\r
+                       i2 = 0;\r
+               }\r
+\r
+               final Vec2 v1 = pool1;\r
+               final Vec2 v2 = pool2;\r
+               Transform.mulToOutUnsafe(xf, m_vertices[i1], v1);\r
+               Transform.mulToOutUnsafe(xf, m_vertices[i2], v2);\r
+\r
+               Vec2.minToOut(v1, v2, aabb.lowerBound);\r
+               Vec2.maxToOut(v1, v2, aabb.upperBound);\r
+       }\r
+\r
+       @Override\r
+       public void computeMass (MassData massData, float density) {\r
+               massData.mass = 0.0f;\r
+               massData.center.setZero();\r
+               massData.I = 0.0f;\r
+       }\r
+\r
+       @Override\r
+       public Shape clone () {\r
+               ChainShape clone = new ChainShape();\r
+               clone.createChain(m_vertices, m_count);\r
+               clone.m_prevVertex.set(m_prevVertex);\r
+               clone.m_nextVertex.set(m_nextVertex);\r
+               clone.m_hasPrevVertex = m_hasPrevVertex;\r
+               clone.m_hasNextVertex = m_hasNextVertex;\r
+               return clone;\r
+       }\r
+\r
+       /** Create a loop. This automatically adjusts connectivity.\r
+        * \r
+        * @param vertices an array of vertices, these are copied\r
+        * @param count the vertex count */\r
+       public void createLoop (final Vec2[] vertices, int count) {\r
+               assert (m_vertices == null && m_count == 0);\r
+               assert (count >= 3);\r
+               m_count = count + 1;\r
+               m_vertices = new Vec2[m_count];\r
+               for (int i = 0; i < count; i++) {\r
+                       m_vertices[i] = new Vec2(vertices[i]);\r
+               }\r
+               m_vertices[count] = m_vertices[0];\r
+               m_prevVertex.set(m_vertices[m_count - 2]);\r
+               m_nextVertex.set(m_vertices[1]);\r
+               m_hasPrevVertex = true;\r
+               m_hasNextVertex = true;\r
+       }\r
+\r
+       /** Create a chain with isolated end vertices.\r
+        * \r
+        * @param vertices an array of vertices, these are copied\r
+        * @param count the vertex count */\r
+       public void createChain (final Vec2 vertices[], int count) {\r
+               assert (m_vertices == null && m_count == 0);\r
+               assert (count >= 2);\r
+               m_count = count;\r
+               m_vertices = new Vec2[m_count];\r
+               for (int i = 0; i < m_count; i++) {\r
+                       m_vertices[i] = new Vec2(vertices[i]);\r
+               }\r
+               m_hasPrevVertex = false;\r
+               m_hasNextVertex = false;\r
+       }\r
+\r
+       /** Establish connectivity to a vertex that precedes the first vertex. Don't call this for loops.\r
+        * \r
+        * @param prevVertex */\r
+       public void setPrevVertex (final Vec2 prevVertex) {\r
+               m_prevVertex.set(prevVertex);\r
+               m_hasPrevVertex = true;\r
+       }\r
+\r
+       /** Establish connectivity to a vertex that follows the last vertex. Don't call this for loops.\r
+        * \r
+        * @param nextVertex */\r
+       public void setNextVertex (final Vec2 nextVertex) {\r
+               m_nextVertex.set(nextVertex);\r
+               m_hasNextVertex = true;\r
+       }\r
 }\r
index 2a8b390..1cbfef5 100644 (file)
@@ -27,122 +27,111 @@ package org.jbox2d.collision.shapes;
 import org.jbox2d.collision.AABB;
 import org.jbox2d.collision.RayCastInput;
 import org.jbox2d.collision.RayCastOutput;
-
 import org.jbox2d.common.MathUtils;
 import org.jbox2d.common.Rot;
 import org.jbox2d.common.Settings;
 import org.jbox2d.common.Transform;
 import org.jbox2d.common.Vec2;
 
-/**
- * A circle shape.
- */
+/** A circle shape. */
 public class CircleShape extends Shape {
-       
+
        public final Vec2 m_p;
-       
+
        private final Vec2 pool1 = new Vec2();
        private final Vec2 pool2 = new Vec2();
        private final Vec2 pool3 = new Vec2();
-       
-       public CircleShape() {
+
+       public CircleShape () {
                super(ShapeType.CIRCLE);
                m_p = new Vec2();
                m_radius = 0;
        }
-       
-       public final Shape clone() {
+
+       public final Shape clone () {
                CircleShape shape = new CircleShape();
                shape.m_p.set(m_p);
                shape.m_radius = m_radius;
                return shape;
        }
-       
-       public final int getChildCount() {
-         return 1;
+
+       public final int getChildCount () {
+               return 1;
        }
-       
-       /**
-        * Get the supporting vertex index in the given direction.
+
+       /** Get the supporting vertex index in the given direction.
         * 
         * @param d
-        * @return
-        */
-       public final int getSupport(final Vec2 d) {
+        * @return */
+       public final int getSupport (final Vec2 d) {
                return 0;
        }
-       
-       /**
-        * Get the supporting vertex in the given direction.
+
+       /** Get the supporting vertex in the given direction.
         * 
         * @param d
-        * @return
-        */
-       public final Vec2 getSupportVertex(final Vec2 d) {
+        * @return */
+       public final Vec2 getSupportVertex (final Vec2 d) {
                return m_p;
        }
-       
-       /**
-        * Get the vertex count.
+
+       /** Get the vertex count.
         * 
-        * @return
-        */
-       public final int getVertexCount() {
+        * @return */
+       public final int getVertexCount () {
                return 1;
        }
-       
-       /**
-        * Get a vertex by index.
+
+       /** Get a vertex by index.
         * 
         * @param index
-        * @return
-        */
-       public final Vec2 getVertex(final int index) {
+        * @return */
+       public final Vec2 getVertex (final int index) {
                assert (index == 0);
                return m_p;
        }
-       
+
        @Override
-       public final boolean testPoint(final Transform transform, final Vec2 p) {
+       public final boolean testPoint (final Transform transform, final Vec2 p) {
                final Vec2 center = pool1;
                Rot.mulToOutUnsafe(transform.q, m_p, center);
                center.addLocal(transform.p);
-               
+
                final Vec2 d = center.subLocal(p).negateLocal();
                return Vec2.dot(d, d) <= m_radius * m_radius;
        }
-       
+
        // Collision Detection in Interactive 3D Environments by Gino van den Bergen
        // From Section 3.1.2
        // x = s + a * r
        // norm(x) = radius
-       
+
        @Override
-       public final boolean raycast(RayCastOutput output, RayCastInput input, Transform transform, int childIndex) {
-               
+       public final boolean raycast (RayCastOutput output, RayCastInput input, Transform transform, int childIndex) {
+
                final Vec2 position = pool1;
                final Vec2 s = pool2;
                final Vec2 r = pool3;
-               
+
                Rot.mulToOutUnsafe(transform.q, m_p, position);
                position.addLocal(transform.p);
                s.set(input.p1).subLocal(position);
                final float b = Vec2.dot(s, s) - m_radius * m_radius;
-               
+
                // Solve quadratic equation.
                r.set(input.p2).subLocal(input.p1);
                final float c = Vec2.dot(s, r);
                final float rr = Vec2.dot(r, r);
                final float sigma = c * c - rr * b;
-               
+
                // Check for negative discriminant and short segment.
                if (sigma < 0.0f || rr < Settings.EPSILON) {
                        return false;
                }
-               
+
                // Find the point of intersection of the line with the circle.
                float a = -(c + MathUtils.sqrt(sigma));
-               
+
                // Is the intersection point on the segment?
                if (0.0f <= a && a <= input.maxFraction * rr) {
                        a /= rr;
@@ -152,59 +141,41 @@ public class CircleShape extends Shape {
                        output.normal.normalize();
                        return true;
                }
-               
+
                return false;
        }
-       
+
        @Override
-       public final void computeAABB(final AABB aabb, final Transform transform, int childIndex) {
+       public final void computeAABB (final AABB aabb, final Transform transform, int childIndex) {
                final Vec2 p = pool1;
                Rot.mulToOutUnsafe(transform.q, m_p, p);
                p.addLocal(transform.p);
-               
+
                aabb.lowerBound.x = p.x - m_radius;
                aabb.lowerBound.y = p.y - m_radius;
                aabb.upperBound.x = p.x + m_radius;
                aabb.upperBound.y = p.y + m_radius;
        }
-       
+
        @Override
-       public final void computeMass(final MassData massData, final float density) {
+       public final void computeMass (final MassData massData, final float density) {
                massData.mass = density * Settings.PI * m_radius * m_radius;
                massData.center.set(m_p);
-               
+
                // inertia about the local origin
                massData.I = massData.mass * (0.5f * m_radius * m_radius + Vec2.dot(m_p, m_p));
        }
-       
+
        // djm pooled from above
        /*
         * @see Shape#computeSubmergedArea(Vec2, float, Vec2, Vec2)
-        * @Override
-        * public final float computeSubmergedArea( final Vec2 normal, final float offset,
-        * final Transform xf, final Vec2 c) {
-        * final Vec2 p = tlp.get();
-        * Transform.mulToOut(xf,m_p, p);
-        * final float l = -( Vec2.dot(normal,p) - offset);
-        * if( l < -m_radius + Settings.EPSILON){
-        * //Completely dry
-        * return 0;
-        * }
-        * if(l > m_radius){
-        * //Completely wet
-        * c.set(p);
-        * return (float)Math.PI*m_radius*m_radius;
-        * }
-        * //Magic
-        * final float r2 = m_radius*m_radius;
-        * final float l2 = l*l;
-        * //Erin TODO: write Sqrt to handle fixed point case.
-        * final float area = (float) (r2 * (Math.asin(l/m_radius) + Math.PI/2)+ l *
-        * Math.sqrt(r2 - l2));
-        * final float com = (float) (-2.0/3.0* Math.pow(r2-l2,1.5f)/area);
-        * c.x = p.x + normal.x * com;
-        * c.y = p.y + normal.y * com;
-        * return area;
-        * }
+        * 
+        * @Override public final float computeSubmergedArea( final Vec2 normal, final float offset, final Transform xf, final Vec2 c)
+        * { final Vec2 p = tlp.get(); Transform.mulToOut(xf,m_p, p); final float l = -( Vec2.dot(normal,p) - offset); if( l <
+        * -m_radius + Settings.EPSILON){ //Completely dry return 0; } if(l > m_radius){ //Completely wet c.set(p); return
+        * (float)Math.PI*m_radius*m_radius; } //Magic final float r2 = m_radius*m_radius; final float l2 = l*l; //Erin TODO: write
+        * Sqrt to handle fixed point case. final float area = (float) (r2 * (Math.asin(l/m_radius) + Math.PI/2)+ l * Math.sqrt(r2 -
+        * l2)); final float com = (float) (-2.0/3.0* Math.pow(r2-l2,1.5f)/area); c.x = p.x + normal.x * com; c.y = p.y + normal.y *
+        * com; return area; }
         */
 }
index 6d13ee4..5a861e6 100644 (file)
@@ -32,159 +32,149 @@ import org.jbox2d.common.Settings;
 import org.jbox2d.common.Transform;\r
 import org.jbox2d.common.Vec2;\r
 \r
-/**\r
- * A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The\r
- * connectivity information is used to ensure correct contact normals.\r
+/** A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The connectivity information is\r
+ * used to ensure correct contact normals.\r
  * \r
- * @author Daniel\r
- */\r
+ * @author Daniel */\r
 public class EdgeShape extends Shape {\r
 \r
-  /**\r
-   * edge vertex 1\r
-   */\r
-  public final Vec2 m_vertex1 = new Vec2();\r
-  /**\r
-   * edge vertex 2\r
-   */\r
-  public final Vec2 m_vertex2 = new Vec2();\r
-\r
-  /**\r
-   * optional adjacent vertex 1. Used for smooth collision\r
-   */\r
-  public final Vec2 m_vertex0 = new Vec2();\r
-  /**\r
-   * optional adjacent vertex 2. Used for smooth collision\r
-   */\r
-  public final Vec2 m_vertex3 = new Vec2();\r
-  public boolean m_hasVertex0 = false, m_hasVertex3 = false;\r
-\r
-  private final Vec2 pool0 = new Vec2();\r
-  private final Vec2 pool1 = new Vec2();\r
-  private final Vec2 pool2 = new Vec2();\r
-  private final Vec2 pool3 = new Vec2();\r
-  private final Vec2 pool4 = new Vec2();\r
-  private final Vec2 pool5 = new Vec2();\r
-\r
-  public EdgeShape() {\r
-    super(ShapeType.EDGE);\r
-    m_radius = Settings.polygonRadius;\r
-  }\r
-\r
-  @Override\r
-  public int getChildCount() {\r
-    return 1;\r
-  }\r
-\r
-  public void set(Vec2 v1, Vec2 v2) {\r
-    m_vertex1.set(v1);\r
-    m_vertex2.set(v2);\r
-    m_hasVertex0 = m_hasVertex3 = false;\r
-  }\r
-\r
-  @Override\r
-  public boolean testPoint(Transform xf, Vec2 p) {\r
-    return false;\r
-  }\r
-\r
-  @Override\r
-  public boolean raycast(RayCastOutput output, RayCastInput input, Transform xf, int childIndex) {\r
-\r
-    // Put the ray into the edge's frame of reference.\r
-    final Vec2 p1 = pool0.set(input.p1).subLocal(xf.p);\r
-    Rot.mulTrans(xf.q, p1, p1);\r
-    final Vec2 p2 = pool1.set(input.p2).subLocal(xf.p);\r
-    Rot.mulTrans(xf.q, p1, p1);\r
-    final Vec2 d = p2.subLocal(p1); // we don't use p2 later\r
-\r
-    final Vec2 v1 = m_vertex1;\r
-    final Vec2 v2 = m_vertex2;\r
-    final Vec2 normal = pool2.set(v2).subLocal(v1);\r
-    normal.set(normal.y, -normal.x);\r
-    normal.normalize();\r
-\r
-    // q = p1 + t * d\r
-    // dot(normal, q - v1) = 0\r
-    // dot(normal, p1 - v1) + t * dot(normal, d) = 0\r
-    pool3.set(v1).subLocal(p1);\r
-    float numerator = Vec2.dot(normal, pool3);\r
-    float denominator = Vec2.dot(normal, d);\r
-\r
-    if (denominator == 0.0f) {\r
-      return false;\r
-    }\r
-\r
-    float t = numerator / denominator;\r
-    if (t < 0.0f || 1.0f < t) {\r
-      return false;\r
-    }\r
-\r
-    final Vec2 q = pool3;\r
-    final Vec2 r = pool4;\r
-\r
-    // Vec2 q = p1 + t * d;\r
-    q.set(d).mulLocal(t).addLocal(p1);\r
-\r
-    // q = v1 + s * r\r
-    // s = dot(q - v1, r) / dot(r, r)\r
-    // Vec2 r = v2 - v1;\r
-    r.set(v2).subLocal(v1);\r
-    float rr = Vec2.dot(r, r);\r
-    if (rr == 0.0f) {\r
-      return false;\r
-    }\r
-\r
-    pool5.set(q).subLocal(v1);\r
-    float s = Vec2.dot(pool5, r) / rr;\r
-    if (s < 0.0f || 1.0f < s) {\r
-      return false;\r
-    }\r
-\r
-    output.fraction = t;\r
-    if (numerator > 0.0f) {\r
-      // argOutput.normal = -normal;\r
-      output.normal.set(normal).negateLocal();\r
-    } else {\r
-      // output.normal = normal;\r
-      output.normal.set(normal);\r
-    }\r
-    return true;\r
-  }\r
-\r
-  @Override\r
-  public void computeAABB(AABB aabb, Transform xf, int childIndex) {\r
-    final Vec2 v1 = pool1;\r
-    final Vec2 v2 = pool2;\r
-\r
-    Transform.mulToOutUnsafe(xf, m_vertex1, v1);\r
-    Transform.mulToOutUnsafe(xf, m_vertex2, v2);\r
-\r
-    Vec2.minToOut(v1, v2, aabb.lowerBound);\r
-    Vec2.maxToOut(v1, v2, aabb.upperBound);\r
-\r
-    aabb.lowerBound.x -= m_radius;\r
-    aabb.lowerBound.y -= m_radius;\r
-    aabb.upperBound.x += m_radius;\r
-    aabb.upperBound.y += m_radius;\r
-  }\r
-\r
-  @Override\r
-  public void computeMass(MassData massData, float density) {\r
-    massData.mass = 0.0f;\r
-    massData.center.set(m_vertex1).addLocal(m_vertex2).mulLocal(0.5f);\r
-    massData.I = 0.0f;\r
-  }\r
-\r
-  @Override\r
-  public Shape clone() {\r
-    EdgeShape edge = new EdgeShape();\r
-    edge.m_radius = this.m_radius;\r
-    edge.m_hasVertex0 = this.m_hasVertex0;\r
-    edge.m_hasVertex3 = this.m_hasVertex3;\r
-    edge.m_vertex0.set(this.m_vertex0);\r
-    edge.m_vertex1.set(this.m_vertex1);\r
-    edge.m_vertex2.set(this.m_vertex2);\r
-    edge.m_vertex3.set(this.m_vertex3);\r
-    return edge;\r
-  }\r
+       /** edge vertex 1 */\r
+       public final Vec2 m_vertex1 = new Vec2();\r
+       /** edge vertex 2 */\r
+       public final Vec2 m_vertex2 = new Vec2();\r
+\r
+       /** optional adjacent vertex 1. Used for smooth collision */\r
+       public final Vec2 m_vertex0 = new Vec2();\r
+       /** optional adjacent vertex 2. Used for smooth collision */\r
+       public final Vec2 m_vertex3 = new Vec2();\r
+       public boolean m_hasVertex0 = false, m_hasVertex3 = false;\r
+\r
+       private final Vec2 pool0 = new Vec2();\r
+       private final Vec2 pool1 = new Vec2();\r
+       private final Vec2 pool2 = new Vec2();\r
+       private final Vec2 pool3 = new Vec2();\r
+       private final Vec2 pool4 = new Vec2();\r
+       private final Vec2 pool5 = new Vec2();\r
+\r
+       public EdgeShape () {\r
+               super(ShapeType.EDGE);\r
+               m_radius = Settings.polygonRadius;\r
+       }\r
+\r
+       @Override\r
+       public int getChildCount () {\r
+               return 1;\r
+       }\r
+\r
+       public void set (Vec2 v1, Vec2 v2) {\r
+               m_vertex1.set(v1);\r
+               m_vertex2.set(v2);\r
+               m_hasVertex0 = m_hasVertex3 = false;\r
+       }\r
+\r
+       @Override\r
+       public boolean testPoint (Transform xf, Vec2 p) {\r
+               return false;\r
+       }\r
+\r
+       @Override\r
+       public boolean raycast (RayCastOutput output, RayCastInput input, Transform xf, int childIndex) {\r
+\r
+               // Put the ray into the edge's frame of reference.\r
+               final Vec2 p1 = pool0.set(input.p1).subLocal(xf.p);\r
+               Rot.mulTrans(xf.q, p1, p1);\r
+               final Vec2 p2 = pool1.set(input.p2).subLocal(xf.p);\r
+               Rot.mulTrans(xf.q, p1, p1);\r
+               final Vec2 d = p2.subLocal(p1); // we don't use p2 later\r
+\r
+               final Vec2 v1 = m_vertex1;\r
+               final Vec2 v2 = m_vertex2;\r
+               final Vec2 normal = pool2.set(v2).subLocal(v1);\r
+               normal.set(normal.y, -normal.x);\r
+               normal.normalize();\r
+\r
+               // q = p1 + t * d\r
+               // dot(normal, q - v1) = 0\r
+               // dot(normal, p1 - v1) + t * dot(normal, d) = 0\r
+               pool3.set(v1).subLocal(p1);\r
+               float numerator = Vec2.dot(normal, pool3);\r
+               float denominator = Vec2.dot(normal, d);\r
+\r
+               if (denominator == 0.0f) {\r
+                       return false;\r
+               }\r
+\r
+               float t = numerator / denominator;\r
+               if (t < 0.0f || 1.0f < t) {\r
+                       return false;\r
+               }\r
+\r
+               final Vec2 q = pool3;\r
+               final Vec2 r = pool4;\r
+\r
+               // Vec2 q = p1 + t * d;\r
+               q.set(d).mulLocal(t).addLocal(p1);\r
+\r
+               // q = v1 + s * r\r
+               // s = dot(q - v1, r) / dot(r, r)\r
+               // Vec2 r = v2 - v1;\r
+               r.set(v2).subLocal(v1);\r
+               float rr = Vec2.dot(r, r);\r
+               if (rr == 0.0f) {\r
+                       return false;\r
+               }\r
+\r
+               pool5.set(q).subLocal(v1);\r
+               float s = Vec2.dot(pool5, r) / rr;\r
+               if (s < 0.0f || 1.0f < s) {\r
+                       return false;\r
+               }\r
+\r
+               output.fraction = t;\r
+               if (numerator > 0.0f) {\r
+                       // argOutput.normal = -normal;\r
+                       output.normal.set(normal).negateLocal();\r
+               } else {\r
+                       // output.normal = normal;\r
+                       output.normal.set(normal);\r
+               }\r
+               return true;\r
+       }\r
+\r
+       @Override\r
+       public void computeAABB (AABB aabb, Transform xf, int childIndex) {\r
+               final Vec2 v1 = pool1;\r
+               final Vec2 v2 = pool2;\r
+\r
+               Transform.mulToOutUnsafe(xf, m_vertex1, v1);\r
+               Transform.mulToOutUnsafe(xf, m_vertex2, v2);\r
+\r
+               Vec2.minToOut(v1, v2, aabb.lowerBound);\r
+               Vec2.maxToOut(v1, v2, aabb.upperBound);\r
+\r
+               aabb.lowerBound.x -= m_radius;\r
+               aabb.lowerBound.y -= m_radius;\r
+               aabb.upperBound.x += m_radius;\r
+               aabb.upperBound.y += m_radius;\r
+       }\r
+\r
+       @Override\r
+       public void computeMass (MassData massData, float density) {\r
+               massData.mass = 0.0f;\r
+               massData.center.set(m_vertex1).addLocal(m_vertex2).mulLocal(0.5f);\r
+               massData.I = 0.0f;\r
+       }\r
+\r
+       @Override\r
+       public Shape clone () {\r
+               EdgeShape edge = new EdgeShape();\r
+               edge.m_radius = this.m_radius;\r
+               edge.m_hasVertex0 = this.m_hasVertex0;\r
+               edge.m_hasVertex3 = this.m_hasVertex3;\r
+               edge.m_vertex0.set(this.m_vertex0);\r
+               edge.m_vertex1.set(this.m_vertex1);\r
+               edge.m_vertex2.set(this.m_vertex2);\r
+               edge.m_vertex3.set(this.m_vertex3);\r
+               return edge;\r
+       }\r
 }\r
index d1f41a1..343e5ef 100644 (file)
@@ -58,35 +58,30 @@ public class MassData {
        public final Vec2 center;
        /** The rotational inertia of the shape about the local origin. */
        public float I;
-       
-       /**
-        * Blank mass data
-        */
-       public MassData() {
+
+       /** Blank mass data */
+       public MassData () {
                mass = I = 0f;
                center = new Vec2();
        }
-       
-       /**
-        * Copies from the given mass data
+
+       /** Copies from the given mass data
         * 
-        * @param md
-        *            mass data to copy from
-        */
-       public MassData(MassData md) {
+        * @param md mass data to copy from */
+       public MassData (MassData md) {
                mass = md.mass;
                I = md.I;
                center = md.center.clone();
        }
-       
-       public void set(MassData md) {
+
+       public void set (MassData md) {
                mass = md.mass;
                I = md.I;
                center.set(md.center);
        }
-       
+
        /** Return a copy of this object. */
-       public MassData clone() {
+       public MassData clone () {
                return new MassData(this);
        }
 }
index eba543a..6b635a6 100644 (file)
@@ -22,7 +22,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
 
-
 package org.jbox2d.collision.shapes;
 
 import org.jbox2d.collision.AABB;
@@ -36,638 +35,592 @@ import org.jbox2d.common.Vec2;
 import org.jbox2d.pooling.arrays.IntArray;
 import org.jbox2d.pooling.arrays.Vec2Array;
 
-/**
- * A convex polygon shape. Polygons have a maximum number of vertices equal to _maxPolygonVertices.
- * In most cases you should not need many vertices for a convex polygon.
- */
+/** A convex polygon shape. Polygons have a maximum number of vertices equal to _maxPolygonVertices. In most cases you should not
+ * need many vertices for a convex polygon. */
 public class PolygonShape extends Shape {
-  /** Dump lots of debug information. */
-  private final static boolean m_debug = false;
-
-  /**
-   * Local position of the shape centroid in parent body frame.
-   */
-  public final Vec2 m_centroid = new Vec2();
-
-  /**
-   * The vertices of the shape. Note: use getVertexCount(), not m_vertices.length, to get number of
-   * active vertices.
-   */
-  public final Vec2 m_vertices[];
-
-  /**
-   * The normals of the shape. Note: use getVertexCount(), not m_normals.length, to get number of
-   * active normals.
-   */
-  public final Vec2 m_normals[];
-
-  /**
-   * Number of active vertices in the shape.
-   */
-  public int m_count;
-
-  // pooling
-  private final Vec2 pool1 = new Vec2();
-  private final Vec2 pool2 = new Vec2();
-  private final Vec2 pool3 = new Vec2();
-  private final Vec2 pool4 = new Vec2();
-  private Transform poolt1 = new Transform();
-
-  public PolygonShape() {
-    super(ShapeType.POLYGON);
-
-    m_count = 0;
-    m_vertices = new Vec2[Settings.maxPolygonVertices];
-    for (int i = 0; i < m_vertices.length; i++) {
-      m_vertices[i] = new Vec2();
-    }
-    m_normals = new Vec2[Settings.maxPolygonVertices];
-    for (int i = 0; i < m_normals.length; i++) {
-      m_normals[i] = new Vec2();
-    }
-    setRadius(Settings.polygonRadius);
-    m_centroid.setZero();
-  }
-
-  public final Shape clone() {
-    PolygonShape shape = new PolygonShape();
-    shape.m_centroid.set(this.m_centroid);
-    for (int i = 0; i < shape.m_normals.length; i++) {
-      shape.m_normals[i].set(m_normals[i]);
-      shape.m_vertices[i].set(m_vertices[i]);
-    }
-    shape.setRadius(this.getRadius());
-    shape.m_count = this.m_count;
-    return shape;
-  }
-  
-  /**
-   * Set this as a single edge.
-   * 
-   * @param v1
-   * @param v2
-   * @deprecated
-   */
-  public final void setAsEdge(final Vec2 v1, final Vec2 v2) {
-    m_count = 2;
-    m_vertices[0].set(v1);
-    m_vertices[1].set(v2);
-    m_centroid.set(v1).addLocal(v2).mulLocal(0.5f);
-    // = 0.5f * (v1 + v2);
-    m_normals[0].set(v2).subLocal(v1);
-    Vec2.crossToOut(m_normals[0], 1f, m_normals[0]);
-    // m_normals[0] = Cross(v2 - v1, 1.0f);
-    m_normals[0].normalize();
-    m_normals[1].set(m_normals[0]).negateLocal();
-  }
-
-  /**
-   * Create a convex hull from the given array of points. The count must be in the range [3,
-   * Settings.maxPolygonVertices].
-   * 
-   * @warning the points may be re-ordered, even if they form a convex polygon
-   * @warning collinear points are handled but not removed. Collinear points may lead to poor
-   *          stacking behavior.
-   */
-  public final void set(final Vec2[] vertices, final int count) {
-    set(vertices, count, null, null);
-  }
-
-  /**
-   * Create a convex hull from the given array of points. The count must be in the range [3,
-   * Settings.maxPolygonVertices]. This method takes an arraypool for pooling
-   * 
-   * @warning the points may be re-ordered, even if they form a convex polygon
-   * @warning collinear points are handled but not removed. Collinear points may lead to poor
-   *          stacking behavior.
-   */
-  public final void set(final Vec2[] verts, final int num, final Vec2Array vecPool,
-      final IntArray intPool) {
-    assert (3 <= num && num <= Settings.maxPolygonVertices);
-    if (num < 3) {
-      setAsBox(1.0f, 1.0f);
-      return;
-    }
-
-    int n = MathUtils.min(num, Settings.maxPolygonVertices);
-
-    // Copy the vertices into a local buffer
-    Vec2[] ps = (vecPool != null) ? vecPool.get(n) : new Vec2[n];
-    for (int i = 0; i < n; ++i) {
-      ps[i] = verts[i];
-    }
-
-    // Create the convex hull using the Gift wrapping algorithm
-    // http://en.wikipedia.org/wiki/Gift_wrapping_algorithm
-
-    // Find the right most point on the hull
-    int i0 = 0;
-    float x0 = ps[0].x;
-    for (int i = 1; i < num; ++i) {
-      float x = ps[i].x;
-      if (x > x0 || (x == x0 && ps[i].y < ps[i0].y)) {
-        i0 = i;
-        x0 = x;
-      }
-    }
-
-    int[] hull =
-        (intPool != null)
-            ? intPool.get(Settings.maxPolygonVertices)
-            : new int[Settings.maxPolygonVertices];
-    int m = 0;
-    int ih = i0;
-
-    while (true) {
-      hull[m] = ih;
-
-      int ie = 0;
-      for (int j = 1; j < n; ++j) {
-        if (ie == ih) {
-          ie = j;
-          continue;
-        }
-
-        Vec2 r = pool1.set(ps[ie]).subLocal(ps[hull[m]]);
-        Vec2 v = pool2.set(ps[j]).subLocal(ps[hull[m]]);
-        float c = Vec2.cross(r, v);
-        if (c < 0.0f) {
-          ie = j;
-        }
-
-        // Collinearity check
-        if (c == 0.0f && v.lengthSquared() > r.lengthSquared()) {
-          ie = j;
-        }
-      }
-
-      ++m;
-      ih = ie;
-
-      if (ie == i0) {
-        break;
-      }
-    }
-
-    this.m_count = m;
-
-    // Copy vertices.
-    for (int i = 0; i < m_count; ++i) {
-      if (m_vertices[i] == null) {
-        m_vertices[i] = new Vec2();
-      }
-      m_vertices[i].set(ps[hull[i]]);
-    }
-
-    final Vec2 edge = pool1;
-
-    // Compute normals. Ensure the edges have non-zero length.
-    for (int i = 0; i < m_count; ++i) {
-      final int i1 = i;
-      final int i2 = i + 1 < m_count ? i + 1 : 0;
-      edge.set(m_vertices[i2]).subLocal(m_vertices[i1]);
-
-      assert (edge.lengthSquared() > Settings.EPSILON * Settings.EPSILON);
-      Vec2.crossToOutUnsafe(edge, 1f, m_normals[i]);
-      m_normals[i].normalize();
-    }
-
-    // Compute the polygon centroid.
-    computeCentroidToOut(m_vertices, m_count, m_centroid);
-  }
-
-  /**
-   * Build vertices to represent an axis-aligned box.
-   * 
-   * @param hx the half-width.
-   * @param hy the half-height.
-   */
-  public final void setAsBox(final float hx, final float hy) {
-    m_count = 4;
-    m_vertices[0].set(-hx, -hy);
-    m_vertices[1].set(hx, -hy);
-    m_vertices[2].set(hx, hy);
-    m_vertices[3].set(-hx, hy);
-    m_normals[0].set(0.0f, -1.0f);
-    m_normals[1].set(1.0f, 0.0f);
-    m_normals[2].set(0.0f, 1.0f);
-    m_normals[3].set(-1.0f, 0.0f);
-    m_centroid.setZero();
-  }
-
-  /**
-   * Build vertices to represent an oriented box.
-   * 
-   * @param hx the half-width.
-   * @param hy the half-height.
-   * @param center the center of the box in local coordinates.
-   * @param angle the rotation of the box in local coordinates.
-   */
-  public final void setAsBox(final float hx, final float hy, final Vec2 center, final float angle) {
-    m_count = 4;
-    m_vertices[0].set(-hx, -hy);
-    m_vertices[1].set(hx, -hy);
-    m_vertices[2].set(hx, hy);
-    m_vertices[3].set(-hx, hy);
-    m_normals[0].set(0.0f, -1.0f);
-    m_normals[1].set(1.0f, 0.0f);
-    m_normals[2].set(0.0f, 1.0f);
-    m_normals[3].set(-1.0f, 0.0f);
-    m_centroid.set(center);
-
-    final Transform xf = poolt1;
-    xf.p.set(center);
-    xf.q.set(angle);
-
-    // Transform vertices and normals.
-    for (int i = 0; i < m_count; ++i) {
-      Transform.mulToOut(xf, m_vertices[i], m_vertices[i]);
-      Rot.mulToOut(xf.q, m_normals[i], m_normals[i]);
-    }
-  }
-
-  public int getChildCount() {
-    return 1;
-  }
-
-  @Override
-  public final boolean testPoint(final Transform xf, final Vec2 p) {
-
-    final Vec2 pLocal = pool1;
-    final Vec2 temp = pool2;
-
-    pLocal.set(p).subLocal(xf.p);
-    Rot.mulTransUnsafe(xf.q, pLocal, temp);
-    pLocal.set(temp);
-
-    if (m_debug) {
-      System.out.println("--testPoint debug--");
-      System.out.println("Vertices: ");
-      for (int i = 0; i < m_count; ++i) {
-        System.out.println(m_vertices[i]);
-      }
-      System.out.println("pLocal: " + pLocal);
-    }
-
-
-    for (int i = 0; i < m_count; ++i) {
-      temp.set(pLocal).subLocal(m_vertices[i]);
-      final float dot = Vec2.dot(m_normals[i], temp);
-      if (dot > 0.0f) {
-        return false;
-      }
-    }
-
-    return true;
-  }
-
-  @Override
-  public final void computeAABB(final AABB aabb, final Transform xf, int childIndex) {
-    final Vec2 v = pool1;
-    final Vec2 lower = aabb.lowerBound;
-    final Vec2 upper = aabb.upperBound;
-    final Vec2 v1 = m_vertices[0];
-    lower.x = (xf.q.c * v1.x - xf.q.s * v1.y) + xf.p.x;
-    lower.y = (xf.q.s * v1.x + xf.q.c * v1.y) + xf.p.y;
-    upper.set(lower);
-
-    for (int i = 1; i < m_count; ++i) {
-      Vec2 v2 = m_vertices[i];
-      v.x = (xf.q.c * v2.x - xf.q.s * v2.y) + xf.p.x;
-      v.y = (xf.q.s * v2.x + xf.q.c * v2.y) + xf.p.y;
-      // Vec2 v = Mul(xf, m_vertices[i]);
-      Vec2.minToOut(lower, v, lower);
-      Vec2.maxToOut(upper, v, upper);
-    }
-
-    // Vec2 r(m_radius, m_radius);
-    // aabb.lowerBound = lower - r;
-    // aabb.upperBound = upper + r;
-
-    aabb.lowerBound.x -= m_radius;
-    aabb.lowerBound.y -= m_radius;
-    aabb.upperBound.x += m_radius;
-    aabb.upperBound.y += m_radius;
-  }
-
-  // djm pooling, and from above
-  /*
-   * private static final TLVec2 tlNormalL = new TLVec2(); private static final TLMassData tlMd =
-   * new TLMassData(); private static final FloatArray tldepths = new FloatArray(); private static
-   * final TLVec2 tlIntoVec = new TLVec2(); private static final TLVec2 tlOutoVec = new TLVec2();
-   * private static final TLVec2 tlP2b = new TLVec2(); private static final TLVec2 tlP3 = new
-   * TLVec2(); private static final TLVec2 tlcenter = new TLVec2(); /*
-   * 
-   * @see Shape#computeSubmergedArea(Vec2, float, XForm, Vec2) public float
-   * computeSubmergedArea(final Vec2 normal, float offset, Transform xf, Vec2 c) { final Vec2
-   * normalL = tlNormalL.get(); final MassData md = tlMd.get(); //Transform plane into shape
-   * co-ordinates Mat22.mulTransToOut(xf.R,normal, normalL); float offsetL = offset -
-   * Vec2.dot(normal,xf.position); final Float[] depths = tldepths.get(Settings.maxPolygonVertices);
-   * int diveCount = 0; int intoIndex = -1; int outoIndex = -1; boolean lastSubmerged = false; int i
-   * = 0; for (i = 0; i < m_vertexCount; ++i){ depths[i] = Vec2.dot(normalL,m_vertices[i]) -
-   * offsetL; boolean isSubmerged = depths[i]<-Settings.EPSILON; if (i > 0){ if (isSubmerged){ if
-   * (!lastSubmerged){ intoIndex = i-1; diveCount++; } } else{ if (lastSubmerged){ outoIndex = i-1;
-   * diveCount++; } } } lastSubmerged = isSubmerged; } switch(diveCount){ case 0: if
-   * (lastSubmerged){ //Completely submerged computeMass(md, 1.0f); Transform.mulToOut(xf,md.center,
-   * c); return md.mass; } else{ return 0; } case 1: if(intoIndex==-1){ intoIndex = m_vertexCount-1;
-   * } else{ outoIndex = m_vertexCount-1; } break; } final Vec2 intoVec = tlIntoVec.get(); final
-   * Vec2 outoVec = tlOutoVec.get(); final Vec2 e1 = tle1.get(); final Vec2 e2 = tle2.get(); int
-   * intoIndex2 = (intoIndex+1) % m_vertexCount; int outoIndex2 = (outoIndex+1) % m_vertexCount;
-   * float intoLambda = (0 - depths[intoIndex]) / (depths[intoIndex2] - depths[intoIndex]); float
-   * outoLambda = (0 - depths[outoIndex]) / (depths[outoIndex2] - depths[outoIndex]);
-   * intoVec.set(m_vertices[intoIndex].x*(1-intoLambda)+m_vertices[intoIndex2].x*intoLambda ,
-   * m_vertices[intoIndex].y*(1-intoLambda)+m_vertices[intoIndex2].y*intoLambda);
-   * outoVec.set(m_vertices[outoIndex].x*(1-outoLambda)+m_vertices[outoIndex2].x*outoLambda ,
-   * m_vertices[outoIndex].y*(1-outoLambda)+m_vertices[outoIndex2].y*outoLambda); // Initialize
-   * accumulator float area = 0; final Vec2 center = tlcenter.get(); center.setZero(); final Vec2
-   * p2b = tlP2b.get().set(m_vertices[intoIndex2]); final Vec2 p3 = tlP3.get(); p3.setZero(); float
-   * k_inv3 = 1.0f / 3.0f; // An awkward loop from intoIndex2+1 to outIndex2 i = intoIndex2; while
-   * (i != outoIndex2){ i = (i+1) % m_vertexCount; if (i == outoIndex2){ p3.set(outoVec); } else{
-   * p3.set(m_vertices[i]); } // Add the triangle formed by intoVec,p2,p3 {
-   * e1.set(p2b).subLocal(intoVec); e2.set(p3).subLocal(intoVec); float D = Vec2.cross(e1, e2);
-   * float triangleArea = 0.5f * D; area += triangleArea; // Area weighted centroid center.x +=
-   * triangleArea * k_inv3 * (intoVec.x + p2b.x + p3.x); center.y += triangleArea * k_inv3 *
-   * (intoVec.y + p2b.y + p3.y); } // p2b.set(p3); } // Normalize and transform centroid center.x *=
-   * 1.0f / area; center.y *= 1.0f / area; Transform.mulToOut(xf, center, c); return area; }
-   */
-
-  /*
-   * Get the supporting vertex index in the given direction.
-   * 
-   * @param d
-   * 
-   * @return public final int getSupport( final Vec2 d){ int bestIndex = 0; float bestValue =
-   * Vec2.dot(m_vertices[0], d); for (int i = 1; i < m_vertexCount; ++i){ final float value =
-   * Vec2.dot(m_vertices[i], d); if (value > bestValue){ bestIndex = i; bestValue = value; } }
-   * return bestIndex; } /** Get the supporting vertex in the given direction.
-   * 
-   * @param d
-   * 
-   * @return public final Vec2 getSupportVertex( final Vec2 d){ int bestIndex = 0; float bestValue =
-   * Vec2.dot(m_vertices[0], d); for (int i = 1; i < m_vertexCount; ++i){ final float value =
-   * Vec2.dot(m_vertices[i], d); if (value > bestValue){ bestIndex = i; bestValue = value; } }
-   * return m_vertices[bestIndex]; }
-   */
-
-  /**
-   * Get the vertex count.
-   * 
-   * @return
-   */
-  public final int getVertexCount() {
-    return m_count;
-  }
-
-  /**
-   * Get a vertex by index.
-   * 
-   * @param index
-   * @return
-   */
-  public final Vec2 getVertex(final int index) {
-    assert (0 <= index && index < m_count);
-    return m_vertices[index];
-  }
-
-  @Override
-  public final boolean raycast(RayCastOutput output, RayCastInput input, Transform xf,
-      int childIndex) {
-    final Vec2 p1 = pool1;
-    final Vec2 p2 = pool2;
-    final Vec2 d = pool3;
-    final Vec2 temp = pool4;
-
-    p1.set(input.p1).subLocal(xf.p);
-    Rot.mulTrans(xf.q, p1, p1);
-    p2.set(input.p2).subLocal(xf.p);
-    Rot.mulTrans(xf.q, p2, p2);
-    d.set(p2).subLocal(p1);
-
-    // if (count == 2) {
-
-    // } else {
-
-    float lower = 0, upper = input.maxFraction;
-
-    int index = -1;
-
-    for (int i = 0; i < m_count; ++i) {
-      // p = p1 + a * d
-      // dot(normal, p - v) = 0
-      // dot(normal, p1 - v) + a * dot(normal, d) = 0
-      temp.set(m_vertices[i]).subLocal(p1);
-      final float numerator = Vec2.dot(m_normals[i], temp);
-      final float denominator = Vec2.dot(m_normals[i], d);
-
-      if (denominator == 0.0f) {
-        if (numerator < 0.0f) {
-          return false;
-        }
-      } else {
-        // Note: we want this predicate without division:
-        // lower < numerator / denominator, where denominator < 0
-        // Since denominator < 0, we have to flip the inequality:
-        // lower < numerator / denominator <==> denominator * lower >
-        // numerator.
-        if (denominator < 0.0f && numerator < lower * denominator) {
-          // Increase lower.
-          // The segment enters this half-space.
-          lower = numerator / denominator;
-          index = i;
-        } else if (denominator > 0.0f && numerator < upper * denominator) {
-          // Decrease upper.
-          // The segment exits this half-space.
-          upper = numerator / denominator;
-        }
-      }
-
-      if (upper < lower) {
-        return false;
-      }
-    }
-
-    assert (0.0f <= lower && lower <= input.maxFraction);
-
-    if (index >= 0) {
-      output.fraction = lower;
-      Rot.mulToOutUnsafe(xf.q, m_normals[index], output.normal);
-      // normal = Mul(xf.R, m_normals[index]);
-      return true;
-    }
-    return false;
-  }
-
-  public final void computeCentroidToOut(final Vec2[] vs, final int count, final Vec2 out) {
-    assert (count >= 3);
-
-    out.set(0.0f, 0.0f);
-    float area = 0.0f;
-
-    // pRef is the reference point for forming triangles.
-    // It's location doesn't change the result (except for rounding error).
-    final Vec2 pRef = pool1;
-    pRef.setZero();
-
-    final Vec2 e1 = pool2;
-    final Vec2 e2 = pool3;
-
-    final float inv3 = 1.0f / 3.0f;
-
-    for (int i = 0; i < count; ++i) {
-      // Triangle vertices.
-      final Vec2 p1 = pRef;
-      final Vec2 p2 = vs[i];
-      final Vec2 p3 = i + 1 < count ? vs[i + 1] : vs[0];
-
-      e1.set(p2).subLocal(p1);
-      e2.set(p3).subLocal(p1);
-
-      final float D = Vec2.cross(e1, e2);
-
-      final float triangleArea = 0.5f * D;
-      area += triangleArea;
-
-      // Area weighted centroid
-      e1.set(p1).addLocal(p2).addLocal(p3).mulLocal(triangleArea * inv3);
-      out.addLocal(e1);
-    }
-
-    // Centroid
-    assert (area > Settings.EPSILON);
-    out.mulLocal(1.0f / area);
-  }
-
-  public void computeMass(final MassData massData, float density) {
-    // Polygon mass, centroid, and inertia.
-    // Let rho be the polygon density in mass per unit area.
-    // Then:
-    // mass = rho * int(dA)
-    // centroid.x = (1/mass) * rho * int(x * dA)
-    // centroid.y = (1/mass) * rho * int(y * dA)
-    // I = rho * int((x*x + y*y) * dA)
-    //
-    // We can compute these integrals by summing all the integrals
-    // for each triangle of the polygon. To evaluate the integral
-    // for a single triangle, we make a change of variables to
-    // the (u,v) coordinates of the triangle:
-    // x = x0 + e1x * u + e2x * v
-    // y = y0 + e1y * u + e2y * v
-    // where 0 <= u && 0 <= v && u + v <= 1.
-    //
-    // We integrate u from [0,1-v] and then v from [0,1].
-    // We also need to use the Jacobian of the transformation:
-    // D = cross(e1, e2)
-    //
-    // Simplification: triangle centroid = (1/3) * (p1 + p2 + p3)
-    //
-    // The rest of the derivation is handled by computer algebra.
-
-    assert (m_count >= 3);
-
-    final Vec2 center = pool1;
-    center.setZero();
-    float area = 0.0f;
-    float I = 0.0f;
-
-    // pRef is the reference point for forming triangles.
-    // It's location doesn't change the result (except for rounding error).
-    final Vec2 s = pool2;
-    s.setZero();
-    // This code would put the reference point inside the polygon.
-    for (int i = 0; i < m_count; ++i) {
-      s.addLocal(m_vertices[i]);
-    }
-    s.mulLocal(1.0f / m_count);
-
-    final float k_inv3 = 1.0f / 3.0f;
-
-    final Vec2 e1 = pool3;
-    final Vec2 e2 = pool4;
-
-    for (int i = 0; i < m_count; ++i) {
-      // Triangle vertices.
-      e1.set(m_vertices[i]).subLocal(s);
-      e2.set(s).negateLocal().addLocal(i + 1 < m_count ? m_vertices[i + 1] : m_vertices[0]);
-
-      final float D = Vec2.cross(e1, e2);
-
-      final float triangleArea = 0.5f * D;
-      area += triangleArea;
-
-      // Area weighted centroid
-      center.x += triangleArea * k_inv3 * (e1.x + e2.x);
-      center.y += triangleArea * k_inv3 * (e1.y + e2.y);
-
-      final float ex1 = e1.x, ey1 = e1.y;
-      final float ex2 = e2.x, ey2 = e2.y;
-
-      float intx2 = ex1 * ex1 + ex2 * ex1 + ex2 * ex2;
-      float inty2 = ey1 * ey1 + ey2 * ey1 + ey2 * ey2;
-
-      I += (0.25f * k_inv3 * D) * (intx2 + inty2);
-    }
-
-    // Total mass
-    massData.mass = density * area;
-
-    // Center of mass
-    assert (area > Settings.EPSILON);
-    center.mulLocal(1.0f / area);
-    massData.center.set(center).addLocal(s);
-
-    // Inertia tensor relative to the local origin (point s)
-    massData.I = I * density;
-
-    // Shift to center of mass then to original body origin.
-    massData.I += massData.mass * (Vec2.dot(massData.center, massData.center));
-  }
-
-  /**
-   * Validate convexity. This is a very time consuming operation.
-   * 
-   * @return
-   */
-  public boolean validate() {
-    for (int i = 0; i < m_count; ++i) {
-      int i1 = i;
-      int i2 = i < m_count - 1 ? i1 + 1 : 0;
-      Vec2 p = m_vertices[i1];
-      Vec2 e = pool1.set(m_vertices[i2]).subLocal(p);
-
-      for (int j = 0; j < m_count; ++j) {
-        if (j == i1 || j == i2) {
-          continue;
-        }
-
-        Vec2 v = pool2.set(m_vertices[j]).subLocal(p);
-        float c = Vec2.cross(e, v);
-        if (c < 0.0f) {
-          return false;
-        }
-      }
-    }
-
-    return true;
-  }
-
-  /** Get the vertices in local coordinates. */
-  public Vec2[] getVertices() {
-    return m_vertices;
-  }
-
-  /** Get the edge normal vectors. There is one for each vertex. */
-  public Vec2[] getNormals() {
-    return m_normals;
-  }
-
-  /** Get the centroid and apply the supplied transform. */
-  public Vec2 centroid(final Transform xf) {
-    return Transform.mul(xf, m_centroid);
-  }
-
-  /** Get the centroid and apply the supplied transform. */
-  public Vec2 centroidToOut(final Transform xf, final Vec2 out) {
-    Transform.mulToOut(xf, m_centroid, out);
-    return out;
-  }
+       /** Dump lots of debug information. */
+       private final static boolean m_debug = false;
+
+       /** Local position of the shape centroid in parent body frame. */
+       public final Vec2 m_centroid = new Vec2();
+
+       /** The vertices of the shape. Note: use getVertexCount(), not m_vertices.length, to get number of active vertices. */
+       public final Vec2 m_vertices[];
+
+       /** The normals of the shape. Note: use getVertexCount(), not m_normals.length, to get number of active normals. */
+       public final Vec2 m_normals[];
+
+       /** Number of active vertices in the shape. */
+       public int m_count;
+
+       // pooling
+       private final Vec2 pool1 = new Vec2();
+       private final Vec2 pool2 = new Vec2();
+       private final Vec2 pool3 = new Vec2();
+       private final Vec2 pool4 = new Vec2();
+       private Transform poolt1 = new Transform();
+
+       public PolygonShape () {
+               super(ShapeType.POLYGON);
+
+               m_count = 0;
+               m_vertices = new Vec2[Settings.maxPolygonVertices];
+               for (int i = 0; i < m_vertices.length; i++) {
+                       m_vertices[i] = new Vec2();
+               }
+               m_normals = new Vec2[Settings.maxPolygonVertices];
+               for (int i = 0; i < m_normals.length; i++) {
+                       m_normals[i] = new Vec2();
+               }
+               setRadius(Settings.polygonRadius);
+               m_centroid.setZero();
+       }
+
+       public final Shape clone () {
+               PolygonShape shape = new PolygonShape();
+               shape.m_centroid.set(this.m_centroid);
+               for (int i = 0; i < shape.m_normals.length; i++) {
+                       shape.m_normals[i].set(m_normals[i]);
+                       shape.m_vertices[i].set(m_vertices[i]);
+               }
+               shape.setRadius(this.getRadius());
+               shape.m_count = this.m_count;
+               return shape;
+       }
+
+       /** Set this as a single edge.
+        * 
+        * @param v1
+        * @param v2
+        * @deprecated */
+       public final void setAsEdge (final Vec2 v1, final Vec2 v2) {
+               m_count = 2;
+               m_vertices[0].set(v1);
+               m_vertices[1].set(v2);
+               m_centroid.set(v1).addLocal(v2).mulLocal(0.5f);
+               // = 0.5f * (v1 + v2);
+               m_normals[0].set(v2).subLocal(v1);
+               Vec2.crossToOut(m_normals[0], 1f, m_normals[0]);
+               // m_normals[0] = Cross(v2 - v1, 1.0f);
+               m_normals[0].normalize();
+               m_normals[1].set(m_normals[0]).negateLocal();
+       }
+
+       /** Create a convex hull from the given array of points. The count must be in the range [3, Settings.maxPolygonVertices].
+        * 
+        * @warning the points may be re-ordered, even if they form a convex polygon
+        * @warning collinear points are handled but not removed. Collinear points may lead to poor stacking behavior. */
+       public final void set (final Vec2[] vertices, final int count) {
+               set(vertices, count, null, null);
+       }
+
+       /** Create a convex hull from the given array of points. The count must be in the range [3, Settings.maxPolygonVertices]. This
+        * method takes an arraypool for pooling
+        * 
+        * @warning the points may be re-ordered, even if they form a convex polygon
+        * @warning collinear points are handled but not removed. Collinear points may lead to poor stacking behavior. */
+       public final void set (final Vec2[] verts, final int num, final Vec2Array vecPool, final IntArray intPool) {
+               assert (3 <= num && num <= Settings.maxPolygonVertices);
+               if (num < 3) {
+                       setAsBox(1.0f, 1.0f);
+                       return;
+               }
+
+               int n = MathUtils.min(num, Settings.maxPolygonVertices);
+
+               // Copy the vertices into a local buffer
+               Vec2[] ps = (vecPool != null) ? vecPool.get(n) : new Vec2[n];
+               for (int i = 0; i < n; ++i) {
+                       ps[i] = verts[i];
+               }
+
+               // Create the convex hull using the Gift wrapping algorithm
+               // http://en.wikipedia.org/wiki/Gift_wrapping_algorithm
+
+               // Find the right most point on the hull
+               int i0 = 0;
+               float x0 = ps[0].x;
+               for (int i = 1; i < num; ++i) {
+                       float x = ps[i].x;
+                       if (x > x0 || (x == x0 && ps[i].y < ps[i0].y)) {
+                               i0 = i;
+                               x0 = x;
+                       }
+               }
+
+               int[] hull = (intPool != null) ? intPool.get(Settings.maxPolygonVertices) : new int[Settings.maxPolygonVertices];
+               int m = 0;
+               int ih = i0;
+
+               while (true) {
+                       hull[m] = ih;
+
+                       int ie = 0;
+                       for (int j = 1; j < n; ++j) {
+                               if (ie == ih) {
+                                       ie = j;
+                                       continue;
+                               }
+
+                               Vec2 r = pool1.set(ps[ie]).subLocal(ps[hull[m]]);
+                               Vec2 v = pool2.set(ps[j]).subLocal(ps[hull[m]]);
+                               float c = Vec2.cross(r, v);
+                               if (c < 0.0f) {
+                                       ie = j;
+                               }
+
+                               // Collinearity check
+                               if (c == 0.0f && v.lengthSquared() > r.lengthSquared()) {
+                                       ie = j;
+                               }
+                       }
+
+                       ++m;
+                       ih = ie;
+
+                       if (ie == i0) {
+                               break;
+                       }
+               }
+
+               this.m_count = m;
+
+               // Copy vertices.
+               for (int i = 0; i < m_count; ++i) {
+                       if (m_vertices[i] == null) {
+                               m_vertices[i] = new Vec2();
+                       }
+                       m_vertices[i].set(ps[hull[i]]);
+               }
+
+               final Vec2 edge = pool1;
+
+               // Compute normals. Ensure the edges have non-zero length.
+               for (int i = 0; i < m_count; ++i) {
+                       final int i1 = i;
+                       final int i2 = i + 1 < m_count ? i + 1 : 0;
+                       edge.set(m_vertices[i2]).subLocal(m_vertices[i1]);
+
+                       assert (edge.lengthSquared() > Settings.EPSILON * Settings.EPSILON);
+                       Vec2.crossToOutUnsafe(edge, 1f, m_normals[i]);
+                       m_normals[i].normalize();
+               }
+
+               // Compute the polygon centroid.
+               computeCentroidToOut(m_vertices, m_count, m_centroid);
+       }
+
+       /** Build vertices to represent an axis-aligned box.
+        * 
+        * @param hx the half-width.
+        * @param hy the half-height. */
+       public final void setAsBox (final float hx, final float hy) {
+               m_count = 4;
+               m_vertices[0].set(-hx, -hy);
+               m_vertices[1].set(hx, -hy);
+               m_vertices[2].set(hx, hy);
+               m_vertices[3].set(-hx, hy);
+               m_normals[0].set(0.0f, -1.0f);
+               m_normals[1].set(1.0f, 0.0f);
+               m_normals[2].set(0.0f, 1.0f);
+               m_normals[3].set(-1.0f, 0.0f);
+               m_centroid.setZero();
+       }
+
+       /** Build vertices to represent an oriented box.
+        * 
+        * @param hx the half-width.
+        * @param hy the half-height.
+        * @param center the center of the box in local coordinates.
+        * @param angle the rotation of the box in local coordinates. */
+       public final void setAsBox (final float hx, final float hy, final Vec2 center, final float angle) {
+               m_count = 4;
+               m_vertices[0].set(-hx, -hy);
+               m_vertices[1].set(hx, -hy);
+               m_vertices[2].set(hx, hy);
+               m_vertices[3].set(-hx, hy);
+               m_normals[0].set(0.0f, -1.0f);
+               m_normals[1].set(1.0f, 0.0f);
+               m_normals[2].set(0.0f, 1.0f);
+               m_normals[3].set(-1.0f, 0.0f);
+               m_centroid.set(center);
+
+               final Transform xf = poolt1;
+               xf.p.set(center);
+               xf.q.set(angle);
+
+               // Transform vertices and normals.
+               for (int i = 0; i < m_count; ++i) {
+                       Transform.mulToOut(xf, m_vertices[i], m_vertices[i]);
+                       Rot.mulToOut(xf.q, m_normals[i], m_normals[i]);
+               }
+       }
+
+       public int getChildCount () {
+               return 1;
+       }
+
+       @Override
+       public final boolean testPoint (final Transform xf, final Vec2 p) {
+
+               final Vec2 pLocal = pool1;
+               final Vec2 temp = pool2;
+
+               pLocal.set(p).subLocal(xf.p);
+               Rot.mulTransUnsafe(xf.q, pLocal, temp);
+               pLocal.set(temp);
+
+               if (m_debug) {
+                       System.out.println("--testPoint debug--");
+                       System.out.println("Vertices: ");
+                       for (int i = 0; i < m_count; ++i) {
+                               System.out.println(m_vertices[i]);
+                       }
+                       System.out.println("pLocal: " + pLocal);
+               }
+
+               for (int i = 0; i < m_count; ++i) {
+                       temp.set(pLocal).subLocal(m_vertices[i]);
+                       final float dot = Vec2.dot(m_normals[i], temp);
+                       if (dot > 0.0f) {
+                               return false;
+                       }
+               }
+
+               return true;
+       }
+
+       @Override
+       public final void computeAABB (final AABB aabb, final Transform xf, int childIndex) {
+               final Vec2 v = pool1;
+               final Vec2 lower = aabb.lowerBound;
+               final Vec2 upper = aabb.upperBound;
+               final Vec2 v1 = m_vertices[0];
+               lower.x = (xf.q.c * v1.x - xf.q.s * v1.y) + xf.p.x;
+               lower.y = (xf.q.s * v1.x + xf.q.c * v1.y) + xf.p.y;
+               upper.set(lower);
+
+               for (int i = 1; i < m_count; ++i) {
+                       Vec2 v2 = m_vertices[i];
+                       v.x = (xf.q.c * v2.x - xf.q.s * v2.y) + xf.p.x;
+                       v.y = (xf.q.s * v2.x + xf.q.c * v2.y) + xf.p.y;
+                       // Vec2 v = Mul(xf, m_vertices[i]);
+                       Vec2.minToOut(lower, v, lower);
+                       Vec2.maxToOut(upper, v, upper);
+               }
+
+               // Vec2 r(m_radius, m_radius);
+               // aabb.lowerBound = lower - r;
+               // aabb.upperBound = upper + r;
+
+               aabb.lowerBound.x -= m_radius;
+               aabb.lowerBound.y -= m_radius;
+               aabb.upperBound.x += m_radius;
+               aabb.upperBound.y += m_radius;
+       }
+
+       // djm pooling, and from above
+       /*
+        * private static final TLVec2 tlNormalL = new TLVec2(); private static final TLMassData tlMd = new TLMassData(); private
+        * static final FloatArray tldepths = new FloatArray(); private static final TLVec2 tlIntoVec = new TLVec2(); private static
+        * final TLVec2 tlOutoVec = new TLVec2(); private static final TLVec2 tlP2b = new TLVec2(); private static final TLVec2 tlP3 =
+        * new TLVec2(); private static final TLVec2 tlcenter = new TLVec2(); /*
+        * 
+        * @see Shape#computeSubmergedArea(Vec2, float, XForm, Vec2) public float computeSubmergedArea(final Vec2 normal, float offset,
+        * Transform xf, Vec2 c) { final Vec2 normalL = tlNormalL.get(); final MassData md = tlMd.get(); //Transform plane into shape
+        * co-ordinates Mat22.mulTransToOut(xf.R,normal, normalL); float offsetL = offset - Vec2.dot(normal,xf.position); final Float[]
+        * depths = tldepths.get(Settings.maxPolygonVertices); int diveCount = 0; int intoIndex = -1; int outoIndex = -1; boolean
+        * lastSubmerged = false; int i = 0; for (i = 0; i < m_vertexCount; ++i){ depths[i] = Vec2.dot(normalL,m_vertices[i]) -
+        * offsetL; boolean isSubmerged = depths[i]<-Settings.EPSILON; if (i > 0){ if (isSubmerged){ if (!lastSubmerged){ intoIndex =
+        * i-1; diveCount++; } } else{ if (lastSubmerged){ outoIndex = i-1; diveCount++; } } } lastSubmerged = isSubmerged; }
+        * switch(diveCount){ case 0: if (lastSubmerged){ //Completely submerged computeMass(md, 1.0f);
+        * Transform.mulToOut(xf,md.center, c); return md.mass; } else{ return 0; } case 1: if(intoIndex==-1){ intoIndex =
+        * m_vertexCount-1; } else{ outoIndex = m_vertexCount-1; } break; } final Vec2 intoVec = tlIntoVec.get(); final Vec2 outoVec =
+        * tlOutoVec.get(); final Vec2 e1 = tle1.get(); final Vec2 e2 = tle2.get(); int intoIndex2 = (intoIndex+1) % m_vertexCount; int
+        * outoIndex2 = (outoIndex+1) % m_vertexCount; float intoLambda = (0 - depths[intoIndex]) / (depths[intoIndex2] -
+        * depths[intoIndex]); float outoLambda = (0 - depths[outoIndex]) / (depths[outoIndex2] - depths[outoIndex]);
+        * intoVec.set(m_vertices[intoIndex].x*(1-intoLambda)+m_vertices[intoIndex2].x*intoLambda ,
+        * m_vertices[intoIndex].y*(1-intoLambda)+m_vertices[intoIndex2].y*intoLambda);
+        * outoVec.set(m_vertices[outoIndex].x*(1-outoLambda)+m_vertices[outoIndex2].x*outoLambda ,
+        * m_vertices[outoIndex].y*(1-outoLambda)+m_vertices[outoIndex2].y*outoLambda); // Initialize accumulator float area = 0; final
+        * Vec2 center = tlcenter.get(); center.setZero(); final Vec2 p2b = tlP2b.get().set(m_vertices[intoIndex2]); final Vec2 p3 =
+        * tlP3.get(); p3.setZero(); float k_inv3 = 1.0f / 3.0f; // An awkward loop from intoIndex2+1 to outIndex2 i = intoIndex2;
+        * while (i != outoIndex2){ i = (i+1) % m_vertexCount; if (i == outoIndex2){ p3.set(outoVec); } else{ p3.set(m_vertices[i]); }
+        * // Add the triangle formed by intoVec,p2,p3 { e1.set(p2b).subLocal(intoVec); e2.set(p3).subLocal(intoVec); float D =
+        * Vec2.cross(e1, e2); float triangleArea = 0.5f * D; area += triangleArea; // Area weighted centroid center.x += triangleArea
+        * * k_inv3 * (intoVec.x + p2b.x + p3.x); center.y += triangleArea * k_inv3 * (intoVec.y + p2b.y + p3.y); } // p2b.set(p3); }
+        * // Normalize and transform centroid center.x *= 1.0f / area; center.y *= 1.0f / area; Transform.mulToOut(xf, center, c);
+        * return area; }
+        */
+
+       /*
+        * Get the supporting vertex index in the given direction.
+        * 
+        * @param d
+        * 
+        * @return public final int getSupport( final Vec2 d){ int bestIndex = 0; float bestValue = Vec2.dot(m_vertices[0], d); for
+        * (int i = 1; i < m_vertexCount; ++i){ final float value = Vec2.dot(m_vertices[i], d); if (value > bestValue){ bestIndex = i;
+        * bestValue = value; } } return bestIndex; } /** Get the supporting vertex in the given direction.
+        * 
+        * @param d
+        * 
+        * @return public final Vec2 getSupportVertex( final Vec2 d){ int bestIndex = 0; float bestValue = Vec2.dot(m_vertices[0], d);
+        * for (int i = 1; i < m_vertexCount; ++i){ final float value = Vec2.dot(m_vertices[i], d); if (value > bestValue){ bestIndex =
+        * i; bestValue = value; } } return m_vertices[bestIndex]; }
+        */
+
+       /** Get the vertex count.
+        * 
+        * @return */
+       public final int getVertexCount () {
+               return m_count;
+       }
+
+       /** Get a vertex by index.
+        * 
+        * @param index
+        * @return */
+       public final Vec2 getVertex (final int index) {
+               assert (0 <= index && index < m_count);
+               return m_vertices[index];
+       }
+
+       @Override
+       public final boolean raycast (RayCastOutput output, RayCastInput input, Transform xf, int childIndex) {
+               final Vec2 p1 = pool1;
+               final Vec2 p2 = pool2;
+               final Vec2 d = pool3;
+               final Vec2 temp = pool4;
+
+               p1.set(input.p1).subLocal(xf.p);
+               Rot.mulTrans(xf.q, p1, p1);
+               p2.set(input.p2).subLocal(xf.p);
+               Rot.mulTrans(xf.q, p2, p2);
+               d.set(p2).subLocal(p1);
+
+               // if (count == 2) {
+
+               // } else {
+
+               float lower = 0, upper = input.maxFraction;
+
+               int index = -1;
+
+               for (int i = 0; i < m_count; ++i) {
+                       // p = p1 + a * d
+                       // dot(normal, p - v) = 0
+                       // dot(normal, p1 - v) + a * dot(normal, d) = 0
+                       temp.set(m_vertices[i]).subLocal(p1);
+                       final float numerator = Vec2.dot(m_normals[i], temp);
+                       final float denominator = Vec2.dot(m_normals[i], d);
+
+                       if (denominator == 0.0f) {
+                               if (numerator < 0.0f) {
+                                       return false;
+                               }
+                       } else {
+                               // Note: we want this predicate without division:
+                               // lower < numerator / denominator, where denominator < 0
+                               // Since denominator < 0, we have to flip the inequality:
+                               // lower < numerator / denominator <==> denominator * lower >
+                               // numerator.
+                               if (denominator < 0.0f && numerator < lower * denominator) {
+                                       // Increase lower.
+                                       // The segment enters this half-space.
+                                       lower = numerator / denominator;
+                                       index = i;
+                               } else if (denominator > 0.0f && numerator < upper * denominator) {
+                                       // Decrease upper.
+                                       // The segment exits this half-space.
+                                       upper = numerator / denominator;
+                               }
+                       }
+
+                       if (upper < lower) {
+                               return false;
+                       }
+               }
+
+               assert (0.0f <= lower && lower <= input.maxFraction);
+
+               if (index >= 0) {
+                       output.fraction = lower;
+                       Rot.mulToOutUnsafe(xf.q, m_normals[index], output.normal);
+                       // normal = Mul(xf.R, m_normals[index]);
+                       return true;
+               }
+               return false;
+       }
+
+       public final void computeCentroidToOut (final Vec2[] vs, final int count, final Vec2 out) {
+               assert (count >= 3);
+
+               out.set(0.0f, 0.0f);
+               float area = 0.0f;
+
+               // pRef is the reference point for forming triangles.
+               // It's location doesn't change the result (except for rounding error).
+               final Vec2 pRef = pool1;
+               pRef.setZero();
+
+               final Vec2 e1 = pool2;
+               final Vec2 e2 = pool3;
+
+               final float inv3 = 1.0f / 3.0f;
+
+               for (int i = 0; i < count; ++i) {
+                       // Triangle vertices.
+                       final Vec2 p1 = pRef;
+                       final Vec2 p2 = vs[i];
+                       final Vec2 p3 = i + 1 < count ? vs[i + 1] : vs[0];
+
+                       e1.set(p2).subLocal(p1);
+                       e2.set(p3).subLocal(p1);
+
+                       final float D = Vec2.cross(e1, e2);
+
+                       final float triangleArea = 0.5f * D;
+                       area += triangleArea;
+
+                       // Area weighted centroid
+                       e1.set(p1).addLocal(p2).addLocal(p3).mulLocal(triangleArea * inv3);
+                       out.addLocal(e1);
+               }
+
+               // Centroid
+               assert (area > Settings.EPSILON);
+               out.mulLocal(1.0f / area);
+       }
+
+       public void computeMass (final MassData massData, float density) {
+               // Polygon mass, centroid, and inertia.
+               // Let rho be the polygon density in mass per unit area.
+               // Then:
+               // mass = rho * int(dA)
+               // centroid.x = (1/mass) * rho * int(x * dA)
+               // centroid.y = (1/mass) * rho * int(y * dA)
+               // I = rho * int((x*x + y*y) * dA)
+               //
+               // We can compute these integrals by summing all the integrals
+               // for each triangle of the polygon. To evaluate the integral
+               // for a single triangle, we make a change of variables to
+               // the (u,v) coordinates of the triangle:
+               // x = x0 + e1x * u + e2x * v
+               // y = y0 + e1y * u + e2y * v
+               // where 0 <= u && 0 <= v && u + v <= 1.
+               //
+               // We integrate u from [0,1-v] and then v from [0,1].
+               // We also need to use the Jacobian of the transformation:
+               // D = cross(e1, e2)
+               //
+               // Simplification: triangle centroid = (1/3) * (p1 + p2 + p3)
+               //
+               // The rest of the derivation is handled by computer algebra.
+
+               assert (m_count >= 3);
+
+               final Vec2 center = pool1;
+               center.setZero();
+               float area = 0.0f;
+               float I = 0.0f;
+
+               // pRef is the reference point for forming triangles.
+               // It's location doesn't change the result (except for rounding error).
+               final Vec2 s = pool2;
+               s.setZero();
+               // This code would put the reference point inside the polygon.
+               for (int i = 0; i < m_count; ++i) {
+                       s.addLocal(m_vertices[i]);
+               }
+               s.mulLocal(1.0f / m_count);
+
+               final float k_inv3 = 1.0f / 3.0f;
+
+               final Vec2 e1 = pool3;
+               final Vec2 e2 = pool4;
+
+               for (int i = 0; i < m_count; ++i) {
+                       // Triangle vertices.
+                       e1.set(m_vertices[i]).subLocal(s);
+                       e2.set(s).negateLocal().addLocal(i + 1 < m_count ? m_vertices[i + 1] : m_vertices[0]);
+
+                       final float D = Vec2.cross(e1, e2);
+
+                       final float triangleArea = 0.5f * D;
+                       area += triangleArea;
+
+                       // Area weighted centroid
+                       center.x += triangleArea * k_inv3 * (e1.x + e2.x);
+                       center.y += triangleArea * k_inv3 * (e1.y + e2.y);
+
+                       final float ex1 = e1.x, ey1 = e1.y;
+                       final float ex2 = e2.x, ey2 = e2.y;
+
+                       float intx2 = ex1 * ex1 + ex2 * ex1 + ex2 * ex2;
+                       float inty2 = ey1 * ey1 + ey2 * ey1 + ey2 * ey2;
+
+                       I += (0.25f * k_inv3 * D) * (intx2 + inty2);
+               }
+
+               // Total mass
+               massData.mass = density * area;
+
+               // Center of mass
+               assert (area > Settings.EPSILON);
+               center.mulLocal(1.0f / area);
+               massData.center.set(center).addLocal(s);
+
+               // Inertia tensor relative to the local origin (point s)
+               massData.I = I * density;
+
+               // Shift to center of mass then to original body origin.
+               massData.I += massData.mass * (Vec2.dot(massData.center, massData.center));
+       }
+
+       /** Validate convexity. This is a very time consuming operation.
+        * 
+        * @return */
+       public boolean validate () {
+               for (int i = 0; i < m_count; ++i) {
+                       int i1 = i;
+                       int i2 = i < m_count - 1 ? i1 + 1 : 0;
+                       Vec2 p = m_vertices[i1];
+                       Vec2 e = pool1.set(m_vertices[i2]).subLocal(p);
+
+                       for (int j = 0; j < m_count; ++j) {
+                               if (j == i1 || j == i2) {
+                                       continue;
+                               }
+
+                               Vec2 v = pool2.set(m_vertices[j]).subLocal(p);
+                               float c = Vec2.cross(e, v);
+                               if (c < 0.0f) {
+                                       return false;
+                               }
+                       }
+               }
+
+               return true;
+       }
+
+       /** Get the vertices in local coordinates. */
+       public Vec2[] getVertices () {
+               return m_vertices;
+       }
+
+       /** Get the edge normal vectors. There is one for each vertex. */
+       public Vec2[] getNormals () {
+               return m_normals;
+       }
+
+       /** Get the centroid and apply the supplied transform. */
+       public Vec2 centroid (final Transform xf) {
+               return Transform.mul(xf, m_centroid);
+       }
+
+       /** Get the centroid and apply the supplied transform. */
+       public Vec2 centroidToOut (final Transform xf, final Vec2 out) {
+               Transform.mulToOut(xf, m_centroid, out);
+               return out;
+       }
 }
index c334076..7b03ee9 100644 (file)
@@ -30,109 +30,86 @@ import org.jbox2d.collision.RayCastOutput;
 import org.jbox2d.common.Transform;
 import org.jbox2d.common.Vec2;
 
-/**
- * A shape is used for collision detection. You can create a shape however you like. Shapes used for
- * simulation in World are created automatically when a Fixture is created. Shapes may encapsulate a
- * one or more child shapes.
- */
+/** A shape is used for collision detection. You can create a shape however you like. Shapes used for simulation in World are
+ * created automatically when a Fixture is created. Shapes may encapsulate a one or more child shapes. */
 public abstract class Shape {
 
-  public final ShapeType m_type;
-  public float m_radius;
-
-  public Shape(ShapeType type) {
-    this.m_type = type;
-  }
-
-  /**
-   * Get the type of this shape. You can use this to down cast to the concrete shape.
-   * 
-   * @return the shape type.
-   */
-  public ShapeType getType() {
-    return m_type;
-  }
-
-  /**
-   * The radius of the underlying shape. This can refer to different things depending on the shape
-   * implementation
-   * 
-   * @return
-   */
-  public float getRadius() {
-    return m_radius;
-  }
-
-  /**
-   * Sets the radius of the underlying shape. This can refer to different things depending on the
-   * implementation
-   * 
-   * @param radius
-   */
-  public void setRadius(float radius) {
-    this.m_radius = radius;
-  }
-
-  /**
-   * Get the number of child primitives
-   * 
-   * @return
-   */
-  public abstract int getChildCount();
-
-  /**
-   * Test a point for containment in this shape. This only works for convex shapes.
-   * 
-   * @param xf the shape world transform.
-   * @param p a point in world coordinates.
-   */
-  public abstract boolean testPoint(final Transform xf, final Vec2 p);
-
-  /**
-   * Cast a ray against a child shape.
-   * 
-   * @param argOutput the ray-cast results.
-   * @param argInput the ray-cast input parameters.
-   * @param argTransform the transform to be applied to the shape.
-   * @param argChildIndex the child shape index
-   * @return if hit
-   */
-  public abstract boolean raycast(RayCastOutput output, RayCastInput input, Transform transform,
-      int childIndex);
-
-
-  /**
-   * Given a transform, compute the associated axis aligned bounding box for a child shape.
-   * 
-   * @param argAabb returns the axis aligned box.
-   * @param argXf the world transform of the shape.
-   */
-  public abstract void computeAABB(final AABB aabb, final Transform xf, int childIndex);
-
-  /**
-   * Compute the mass properties of this shape using its dimensions and density. The inertia tensor
-   * is computed about the local origin.
-   * 
-   * @param massData returns the mass data for this shape.
-   * @param density the density in kilograms per meter squared.
-   */
-  public abstract void computeMass(final MassData massData, final float density);
-
-  /*
-   * Compute the volume and centroid of this shape intersected with a half plane
-   * 
-   * @param normal the surface normal
-   * 
-   * @param offset the surface offset along normal
-   * 
-   * @param xf the shape transform
-   * 
-   * @param c returns the centroid
-   * 
-   * @return the total volume less than offset along normal
-   * 
-   * public abstract float computeSubmergedArea(Vec2 normal, float offset, Transform xf, Vec2 c);
-   */
-
-  public abstract Shape clone();
+       public final ShapeType m_type;
+       public float m_radius;
+
+       public Shape (ShapeType type) {
+               this.m_type = type;
+       }
+
+       /** Get the type of this shape. You can use this to down cast to the concrete shape.
+        * 
+        * @return the shape type. */
+       public ShapeType getType () {
+               return m_type;
+       }
+
+       /** The radius of the underlying shape. This can refer to different things depending on the shape implementation
+        * 
+        * @return */
+       public float getRadius () {
+               return m_radius;
+       }
+
+       /** Sets the radius of the underlying shape. This can refer to different things depending on the implementation
+        * 
+        * @param radius */
+       public void setRadius (float radius) {
+               this.m_radius = radius;
+       }
+
+       /** Get the number of child primitives
+        * 
+        * @return */
+       public abstract int getChildCount ();
+
+       /** Test a point for containment in this shape. This only works for convex shapes.
+        * 
+        * @param xf the shape world transform.
+        * @param p a point in world coordinates. */
+       public abstract boolean testPoint (final Transform xf, final Vec2 p);
+
+       /** Cast a ray against a child shape.
+        * 
+        * @param argOutput the ray-cast results.
+        * @param argInput the ray-cast input parameters.
+        * @param argTransform the transform to be applied to the shape.
+        * @param argChildIndex the child shape index
+        * @return if hit */
+       public abstract boolean raycast (RayCastOutput output, RayCastInput input, Transform transform, int childIndex);
+
+       /** Given a transform, compute the associated axis aligned bounding box for a child shape.
+        * 
+        * @param argAabb returns the axis aligned box.
+        * @param argXf the world transform of the shape. */
+       public abstract void computeAABB (final AABB aabb, final Transform xf, int childIndex);
+
+       /** Compute the mass properties of this shape using its dimensions and density. The inertia tensor is computed about the local
+        * origin.
+        * 
+        * @param massData returns the mass data for this shape.
+        * @param density the density in kilograms per meter squared. */
+       public abstract void computeMass (final MassData massData, final float density);
+
+       /*
+        * Compute the volume and centroid of this shape intersected with a half plane
+        * 
+        * @param normal the surface normal
+        * 
+        * @param offset the surface offset along normal
+        * 
+        * @param xf the shape transform
+        * 
+        * @param c returns the centroid
+        * 
+        * @return the total volume less than offset along normal
+        * 
+        * public abstract float computeSubmergedArea(Vec2 normal, float offset, Transform xf, Vec2 c);
+        */
+
+       public abstract Shape clone ();
 }
index 700ded6..d9f8ac1 100644 (file)
 package org.jbox2d.common;
 
 // updated to rev 100
-/**
- * Similar to javax.vecmath.Color3f holder
- * @author ewjordan
- *
- */
+/** Similar to javax.vecmath.Color3f holder
+ * @author ewjordan */
 public class Color3f {
-       
+
        public static final Color3f WHITE = new Color3f(1, 1, 1);
        public static final Color3f BLACK = new Color3f(0, 0, 0);
        public static final Color3f BLUE = new Color3f(0, 0, 1);
        public static final Color3f GREEN = new Color3f(0, 1, 0);
        public static final Color3f RED = new Color3f(1, 0, 0);
-       
+
        public float x;
        public float y;
        public float z;
 
-       
-       public Color3f(){
+       public Color3f () {
                x = y = z = 0;
        }
-       public Color3f(float r, float g, float b) {
+
+       public Color3f (float r, float g, float b) {
                x = r;
                y = g;
                z = b;
        }
-       
-       public void set(float r, float g, float b){
+
+       public void set (float r, float g, float b) {
                x = r;
                y = g;
                z = b;
        }
-       
-       public void set(Color3f argColor){
+
+       public void set (Color3f argColor) {
                x = argColor.x;
                y = argColor.y;
                z = argColor.z;
index 7b3ff92..ce37403 100644 (file)
  * 
  * 1:13:11 AM, Jul 17, 2009
  */
+
 package org.jbox2d.common;
 
 // updated to rev 100
-/**
- * This is the viewport transform used from drawing.
- * Use yFlip if you are drawing from the top-left corner.
- * @author daniel
- */
+/** This is the viewport transform used from drawing. Use yFlip if you are drawing from the top-left corner.
+ * @author daniel */
 public interface IViewportTransform {
-       
-       /**
-        * @return if the transform flips the y axis
-        */
-       public boolean isYFlip();
 
-       /**
-        * @param yFlip if we flip the y axis when transforming
-        */
-       public void setYFlip(boolean yFlip);
-       
-       /**
-        * This is the half-width and half-height.
-        * This should be the actual half-width and 
-        * half-height, not anything transformed or scaled.
-        * Not a copy.
-        * @return
-        */
-       public Vec2 getExtents();
-       
-       /**
-        * This sets the half-width and half-height.
-        * This should be the actual half-width and 
-        * half-height, not anything transformed or scaled.
-        * @param argExtents
-        */
-       public void setExtents(Vec2 argExtents);
-       
-       /**
-        * This sets the half-width and half-height of the
-        * viewport. This should be the actual half-width and 
-        * half-height, not anything transformed or scaled.
+       /** @return if the transform flips the y axis */
+       public boolean isYFlip ();
+
+       /** @param yFlip if we flip the y axis when transforming */
+       public void setYFlip (boolean yFlip);
+
+       /** This is the half-width and half-height. This should be the actual half-width and half-height, not anything transformed or
+        * scaled. Not a copy.
+        * @return */
+       public Vec2 getExtents ();
+
+       /** This sets the half-width and half-height. This should be the actual half-width and half-height, not anything transformed or
+        * scaled.
+        * @param argExtents */
+       public void setExtents (Vec2 argExtents);
+
+       /** This sets the half-width and half-height of the viewport. This should be the actual half-width and half-height, not anything
+        * transformed or scaled.
         * @param argHalfWidth
-        * @param argHalfHeight
-        */
-       public void setExtents(float argHalfWidth, float argHalfHeight);
-       
-       /**
-        * center of the viewport.  Not a copy.
-        * @return
-        */
-       public Vec2 getCenter();
-       
-       /**
-        * sets the center of the viewport.
-        * @param argPos
-        */
-       public void setCenter(Vec2 argPos);
-       
-       /**
-        * sets the center of the viewport.
+        * @param argHalfHeight */
+       public void setExtents (float argHalfWidth, float argHalfHeight);
+
+       /** center of the viewport. Not a copy.
+        * @return */
+       public Vec2 getCenter ();
+
+       /** sets the center of the viewport.
+        * @param argPos */
+       public void setCenter (Vec2 argPos);
+
+       /** sets the center of the viewport.
         * @param x
-        * @param y
-        */
-       public void setCenter(float x, float y);
-       
-       /**
-        * Sets the transform's center to the given x and y coordinates,
-        * and using the given scale.
+        * @param y */
+       public void setCenter (float x, float y);
+
+       /** Sets the transform's center to the given x and y coordinates, and using the given scale.
         * @param x
         * @param y
-        * @param scale
-        */
-       public void setCamera(float x, float y, float scale);
-       
-       /**
-        * Transforms the given directional vector by the
-        * viewport transform (not positional)
+        * @param scale */
+       public void setCamera (float x, float y, float scale);
+
+       /** Transforms the given directional vector by the viewport transform (not positional)
         * @param argVec
-        * @param argOut
-        */
-       public void getWorldVectorToScreen(Vec2 argWorld, Vec2 argScreen);
-       
-       
-       /**
-        * Transforms the given directional screen vector back to
-        * the world direction.
+        * @param argOut */
+       public void getWorldVectorToScreen (Vec2 argWorld, Vec2 argScreen);
+
+       /** Transforms the given directional screen vector back to the world direction.
         * @param argVec
-        * @param argOut
-        */
-       public void getScreenVectorToWorld(Vec2 argScreen, Vec2 argWorld);
-       
-       
-       /**
-        * takes the world coordinate (argWorld) puts the corresponding
-        * screen coordinate in argScreen.  It should be safe to give the
+        * @param argOut */
+       public void getScreenVectorToWorld (Vec2 argScreen, Vec2 argWorld);
+
+       /** takes the world coordinate (argWorld) puts the corresponding screen coordinate in argScreen. It should be safe to give the
         * same object as both parameters.
         * @param argWorld
+        * @param argScreen */
+       public void getWorldToScreen (Vec2 argWorld, Vec2 argScreen);
+
+       /** takes the screen coordinates (argScreen) and puts the corresponding world coordinates in argWorld. It should be safe to give
+        * the same object as both parameters.
         * @param argScreen
-        */
-       public void getWorldToScreen(Vec2 argWorld, Vec2 argScreen);
-       
-       
-       /**
-        * takes the screen coordinates (argScreen) and puts the
-        * corresponding world coordinates in argWorld. It should be safe
-        * to give the same object as both parameters.
-        * @param argScreen
-        * @param argWorld
-        */
-       public void getScreenToWorld(Vec2 argScreen, Vec2 argWorld);
+        * @param argWorld */
+       public void getScreenToWorld (Vec2 argScreen, Vec2 argWorld);
 }
index 711bccf..997fa33 100644 (file)
@@ -26,557 +26,510 @@ package org.jbox2d.common;
 
 import java.io.Serializable;
 
-/**
- * A 2-by-2 matrix. Stored in column-major order.
- */
+/** A 2-by-2 matrix. Stored in column-major order. */
 public class Mat22 implements Serializable {
-  private static final long serialVersionUID = 2L;
-
-  public final Vec2 ex, ey;
-
-  /** Convert the matrix to printable format. */
-  @Override
-  public String toString() {
-    String s = "";
-    s += "[" + ex.x + "," + ey.x + "]\n";
-    s += "[" + ex.y + "," + ey.y + "]";
-    return s;
-  }
-
-  /**
-   * Construct zero matrix. Note: this is NOT an identity matrix! djm fixed double allocation
-   * problem
-   */
-  public Mat22() {
-    ex = new Vec2();
-    ey = new Vec2();
-  }
-
-  /**
-   * Create a matrix with given vectors as columns.
-   * 
-   * @param c1 Column 1 of matrix
-   * @param c2 Column 2 of matrix
-   */
-  public Mat22(final Vec2 c1, final Vec2 c2) {
-    ex = c1.clone();
-    ey = c2.clone();
-  }
-
-  /**
-   * Create a matrix from four floats.
-   * 
-   * @param exx
-   * @param col2x
-   * @param exy
-   * @param col2y
-   */
-  public Mat22(final float exx, final float col2x, final float exy, final float col2y) {
-    ex = new Vec2(exx, exy);
-    ey = new Vec2(col2x, col2y);
-  }
-
-  /**
-   * Set as a copy of another matrix.
-   * 
-   * @param m Matrix to copy
-   */
-  public final Mat22 set(final Mat22 m) {
-    ex.x = m.ex.x;
-    ex.y = m.ex.y;
-    ey.x = m.ey.x;
-    ey.y = m.ey.y;
-    return this;
-  }
-
-  public final Mat22 set(final float exx, final float col2x, final float exy, final float col2y) {
-    ex.x = exx;
-    ex.y = exy;
-    ey.x = col2x;
-    ey.y = col2y;
-    return this;
-  }
-
-  /**
-   * Return a clone of this matrix. djm fixed double allocation
-   */
-  public final Mat22 clone() {
-    return new Mat22(ex, ey);
-  }
-
-  /**
-   * Set as a matrix representing a rotation.
-   * 
-   * @param angle Rotation (in radians) that matrix represents.
-   */
-  public final void set(final float angle) {
-    final float c = MathUtils.cos(angle), s = MathUtils.sin(angle);
-    ex.x = c;
-    ey.x = -s;
-    ex.y = s;
-    ey.y = c;
-  }
-
-  /**
-   * Set as the identity matrix.
-   */
-  public final void setIdentity() {
-    ex.x = 1.0f;
-    ey.x = 0.0f;
-    ex.y = 0.0f;
-    ey.y = 1.0f;
-  }
-
-  /**
-   * Set as the zero matrix.
-   */
-  public final void setZero() {
-    ex.x = 0.0f;
-    ey.x = 0.0f;
-    ex.y = 0.0f;
-    ey.y = 0.0f;
-  }
-
-  /**
-   * Extract the angle from this matrix (assumed to be a rotation matrix).
-   * 
-   * @return
-   */
-  public final float getAngle() {
-    return MathUtils.atan2(ex.y, ex.x);
-  }
-
-  /**
-   * Set by column vectors.
-   * 
-   * @param c1 Column 1
-   * @param c2 Column 2
-   */
-  public final void set(final Vec2 c1, final Vec2 c2) {
-    ex.x = c1.x;
-    ey.x = c2.x;
-    ex.y = c1.y;
-    ey.y = c2.y;
-  }
-
-  /** Returns the inverted Mat22 - does NOT invert the matrix locally! */
-  public final Mat22 invert() {
-    final float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
-    final Mat22 B = new Mat22();
-    float det = a * d - b * c;
-    if (det != 0) {
-      det = 1.0f / det;
-    }
-    B.ex.x = det * d;
-    B.ey.x = -det * b;
-    B.ex.y = -det * c;
-    B.ey.y = det * a;
-    return B;
-  }
-
-  public final Mat22 invertLocal() {
-    final float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
-    float det = a * d - b * c;
-    if (det != 0) {
-      det = 1.0f / det;
-    }
-    ex.x = det * d;
-    ey.x = -det * b;
-    ex.y = -det * c;
-    ey.y = det * a;
-    return this;
-  }
-
-  public final void invertToOut(final Mat22 out) {
-    final float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
-    float det = a * d - b * c;
-    // b2Assert(det != 0.0f);
-    det = 1.0f / det;
-    out.ex.x = det * d;
-    out.ey.x = -det * b;
-    out.ex.y = -det * c;
-    out.ey.y = det * a;
-  }
-
-
-
-  /**
-   * Return the matrix composed of the absolute values of all elements. djm: fixed double allocation
-   * 
-   * @return Absolute value matrix
-   */
-  public final Mat22 abs() {
-    return new Mat22(MathUtils.abs(ex.x), MathUtils.abs(ey.x), MathUtils.abs(ex.y),
-        MathUtils.abs(ey.y));
-  }
-
-  /* djm: added */
-  public final void absLocal() {
-    ex.absLocal();
-    ey.absLocal();
-  }
-
-  /**
-   * Return the matrix composed of the absolute values of all elements.
-   * 
-   * @return Absolute value matrix
-   */
-  public final static Mat22 abs(final Mat22 R) {
-    return R.abs();
-  }
-
-  /* djm created */
-  public static void absToOut(final Mat22 R, final Mat22 out) {
-    out.ex.x = MathUtils.abs(R.ex.x);
-    out.ex.y = MathUtils.abs(R.ex.y);
-    out.ey.x = MathUtils.abs(R.ey.x);
-    out.ey.y = MathUtils.abs(R.ey.y);
-  }
-
-  /**
-   * Multiply a vector by this matrix.
-   * 
-   * @param v Vector to multiply by matrix.
-   * @return Resulting vector
-   */
-  public final Vec2 mul(final Vec2 v) {
-    return new Vec2(ex.x * v.x + ey.x * v.y, ex.y * v.x + ey.y * v.y);
-  }
-
-  public final void mulToOut(final Vec2 v, final Vec2 out) {
-    final float tempy = ex.y * v.x + ey.y * v.y;
-    out.x = ex.x * v.x + ey.x * v.y;
-    out.y = tempy;
-  }
-
-  public final void mulToOutUnsafe(final Vec2 v, final Vec2 out) {
-    assert (v != out);
-    out.x = ex.x * v.x + ey.x * v.y;
-    out.y = ex.y * v.x + ey.y * v.y;
-  }
-
-
-  /**
-   * Multiply another matrix by this one (this one on left). djm optimized
-   * 
-   * @param R
-   * @return
-   */
-  public final Mat22 mul(final Mat22 R) {
-    /*
-     * Mat22 C = new Mat22();C.set(this.mul(R.ex), this.mul(R.ey));return C;
-     */
-    final Mat22 C = new Mat22();
-    C.ex.x = ex.x * R.ex.x + ey.x * R.ex.y;
-    C.ex.y = ex.y * R.ex.x + ey.y * R.ex.y;
-    C.ey.x = ex.x * R.ey.x + ey.x * R.ey.y;
-    C.ey.y = ex.y * R.ey.x + ey.y * R.ey.y;
-    // C.set(ex,col2);
-    return C;
-  }
-
-  public final Mat22 mulLocal(final Mat22 R) {
-    mulToOut(R, this);
-    return this;
-  }
-
-  public final void mulToOut(final Mat22 R, final Mat22 out) {
-    final float tempy1 = this.ex.y * R.ex.x + this.ey.y * R.ex.y;
-    final float tempx1 = this.ex.x * R.ex.x + this.ey.x * R.ex.y;
-    out.ex.x = tempx1;
-    out.ex.y = tempy1;
-    final float tempy2 = this.ex.y * R.ey.x + this.ey.y * R.ey.y;
-    final float tempx2 = this.ex.x * R.ey.x + this.ey.x * R.ey.y;
-    out.ey.x = tempx2;
-    out.ey.y = tempy2;
-  }
-
-  public final void mulToOutUnsafe(final Mat22 R, final Mat22 out) {
-    assert (out != R);
-    assert (out != this);
-    out.ex.x = this.ex.x * R.ex.x + this.ey.x * R.ex.y;
-    out.ex.y = this.ex.y * R.ex.x + this.ey.y * R.ex.y;
-    out.ey.x = this.ex.x * R.ey.x + this.ey.x * R.ey.y;
-    out.ey.y = this.ex.y * R.ey.x + this.ey.y * R.ey.y;
-  }
-
-  /**
-   * Multiply another matrix by the transpose of this one (transpose of this one on left). djm:
-   * optimized
-   * 
-   * @param B
-   * @return
-   */
-  public final Mat22 mulTrans(final Mat22 B) {
-    /*
-     * Vec2 c1 = new Vec2(Vec2.dot(this.ex, B.ex), Vec2.dot(this.ey, B.ex)); Vec2 c2 = new
-     * Vec2(Vec2.dot(this.ex, B.ey), Vec2.dot(this.ey, B.ey)); Mat22 C = new Mat22(); C.set(c1, c2);
-     * return C;
-     */
-    final Mat22 C = new Mat22();
-
-    C.ex.x = Vec2.dot(this.ex, B.ex);
-    C.ex.y = Vec2.dot(this.ey, B.ex);
-
-    C.ey.x = Vec2.dot(this.ex, B.ey);
-    C.ey.y = Vec2.dot(this.ey, B.ey);
-    return C;
-  }
-
-  public final Mat22 mulTransLocal(final Mat22 B) {
-    mulTransToOut(B, this);
-    return this;
-  }
-
-  public final void mulTransToOut(final Mat22 B, final Mat22 out) {
-    /*
-     * out.ex.x = Vec2.dot(this.ex, B.ex); out.ex.y = Vec2.dot(this.ey, B.ex); out.ey.x =
-     * Vec2.dot(this.ex, B.ey); out.ey.y = Vec2.dot(this.ey, B.ey);
-     */
-    final float x1 = this.ex.x * B.ex.x + this.ex.y * B.ex.y;
-    final float y1 = this.ey.x * B.ex.x + this.ey.y * B.ex.y;
-    final float x2 = this.ex.x * B.ey.x + this.ex.y * B.ey.y;
-    final float y2 = this.ey.x * B.ey.x + this.ey.y * B.ey.y;
-    out.ex.x = x1;
-    out.ey.x = x2;
-    out.ex.y = y1;
-    out.ey.y = y2;
-  }
-
-  public final void mulTransToOutUnsafe(final Mat22 B, final Mat22 out) {
-    assert (B != out);
-    assert (this != out);
-    out.ex.x = this.ex.x * B.ex.x + this.ex.y * B.ex.y;
-    out.ey.x = this.ex.x * B.ey.x + this.ex.y * B.ey.y;
-    out.ex.y = this.ey.x * B.ex.x + this.ey.y * B.ex.y;
-    out.ey.y = this.ey.x * B.ey.x + this.ey.y * B.ey.y;
-  }
-
-  /**
-   * Multiply a vector by the transpose of this matrix.
-   * 
-   * @param v
-   * @return
-   */
-  public final Vec2 mulTrans(final Vec2 v) {
-    // return new Vec2(Vec2.dot(v, ex), Vec2.dot(v, col2));
-    return new Vec2((v.x * ex.x + v.y * ex.y), (v.x * ey.x + v.y * ey.y));
-  }
-
-  /* djm added */
-  public final void mulTransToOut(final Vec2 v, final Vec2 out) {
-    /*
-     * out.x = Vec2.dot(v, ex); out.y = Vec2.dot(v, col2);
-     */
-    final float tempx = v.x * ex.x + v.y * ex.y;
-    out.y = v.x * ey.x + v.y * ey.y;
-    out.x = tempx;
-  }
-
-  /**
-   * Add this matrix to B, return the result.
-   * 
-   * @param B
-   * @return
-   */
-  public final Mat22 add(final Mat22 B) {
-    // return new Mat22(ex.add(B.ex), col2.add(B.ey));
-    Mat22 m = new Mat22();
-    m.ex.x = ex.x + B.ex.x;
-    m.ex.y = ex.y + B.ex.y;
-    m.ey.x = ey.x + B.ey.x;
-    m.ey.y = ey.y + B.ey.y;
-    return m;
-  }
-
-  /**
-   * Add B to this matrix locally.
-   * 
-   * @param B
-   * @return
-   */
-  public final Mat22 addLocal(final Mat22 B) {
-    // ex.addLocal(B.ex);
-    // col2.addLocal(B.ey);
-    ex.x += B.ex.x;
-    ex.y += B.ex.y;
-    ey.x += B.ey.x;
-    ey.y += B.ey.y;
-    return this;
-  }
-
-  /**
-   * Solve A * x = b where A = this matrix.
-   * 
-   * @return The vector x that solves the above equation.
-   */
-  public final Vec2 solve(final Vec2 b) {
-    final float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;
-    float det = a11 * a22 - a12 * a21;
-    if (det != 0.0f) {
-      det = 1.0f / det;
-    }
-    final Vec2 x = new Vec2(det * (a22 * b.x - a12 * b.y), det * (a11 * b.y - a21 * b.x));
-    return x;
-  }
-
-  public final void solveToOut(final Vec2 b, final Vec2 out) {
-    final float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;
-    float det = a11 * a22 - a12 * a21;
-    if (det != 0.0f) {
-      det = 1.0f / det;
-    }
-    final float tempy = det * (a11 * b.y - a21 * b.x);
-    out.x = det * (a22 * b.x - a12 * b.y);
-    out.y = tempy;
-  }
-
-  public final static Vec2 mul(final Mat22 R, final Vec2 v) {
-    // return R.mul(v);
-    return new Vec2(R.ex.x * v.x + R.ey.x * v.y, R.ex.y * v.x + R.ey.y * v.y);
-  }
-
-  public final static void mulToOut(final Mat22 R, final Vec2 v, final Vec2 out) {
-    final float tempy = R.ex.y * v.x + R.ey.y * v.y;
-    out.x = R.ex.x * v.x + R.ey.x * v.y;
-    out.y = tempy;
-  }
-
-  public final static void mulToOutUnsafe(final Mat22 R, final Vec2 v, final Vec2 out) {
-    assert (v != out);
-    out.x = R.ex.x * v.x + R.ey.x * v.y;
-    out.y = R.ex.y * v.x + R.ey.y * v.y;
-  }
-
-  public final static Mat22 mul(final Mat22 A, final Mat22 B) {
-    // return A.mul(B);
-    final Mat22 C = new Mat22();
-    C.ex.x = A.ex.x * B.ex.x + A.ey.x * B.ex.y;
-    C.ex.y = A.ex.y * B.ex.x + A.ey.y * B.ex.y;
-    C.ey.x = A.ex.x * B.ey.x + A.ey.x * B.ey.y;
-    C.ey.y = A.ex.y * B.ey.x + A.ey.y * B.ey.y;
-    return C;
-  }
-
-  public final static void mulToOut(final Mat22 A, final Mat22 B, final Mat22 out) {
-    final float tempy1 = A.ex.y * B.ex.x + A.ey.y * B.ex.y;
-    final float tempx1 = A.ex.x * B.ex.x + A.ey.x * B.ex.y;
-    final float tempy2 = A.ex.y * B.ey.x + A.ey.y * B.ey.y;
-    final float tempx2 = A.ex.x * B.ey.x + A.ey.x * B.ey.y;
-    out.ex.x = tempx1;
-    out.ex.y = tempy1;
-    out.ey.x = tempx2;
-    out.ey.y = tempy2;
-  }
-
-  public final static void mulToOutUnsafe(final Mat22 A, final Mat22 B, final Mat22 out) {
-    assert (out != A);
-    assert (out != B);
-    out.ex.x = A.ex.x * B.ex.x + A.ey.x * B.ex.y;
-    out.ex.y = A.ex.y * B.ex.x + A.ey.y * B.ex.y;
-    out.ey.x = A.ex.x * B.ey.x + A.ey.x * B.ey.y;
-    out.ey.y = A.ex.y * B.ey.x + A.ey.y * B.ey.y;
-  }
-
-  public final static Vec2 mulTrans(final Mat22 R, final Vec2 v) {
-    return new Vec2((v.x * R.ex.x + v.y * R.ex.y), (v.x * R.ey.x + v.y * R.ey.y));
-  }
-
-  public final static void mulTransToOut(final Mat22 R, final Vec2 v, final Vec2 out) {
-    float outx = v.x * R.ex.x + v.y * R.ex.y;
-    out.y = v.x * R.ey.x + v.y * R.ey.y;
-    out.x = outx;
-  }
-
-  public final static void mulTransToOutUnsafe(final Mat22 R, final Vec2 v, final Vec2 out) {
-    assert (out != v);
-    out.y = v.x * R.ey.x + v.y * R.ey.y;
-    out.x = v.x * R.ex.x + v.y * R.ex.y;
-  }
-
-  public final static Mat22 mulTrans(final Mat22 A, final Mat22 B) {
-    final Mat22 C = new Mat22();
-    C.ex.x = A.ex.x * B.ex.x + A.ex.y * B.ex.y;
-    C.ex.y = A.ey.x * B.ex.x + A.ey.y * B.ex.y;
-    C.ey.x = A.ex.x * B.ey.x + A.ex.y * B.ey.y;
-    C.ey.y = A.ey.x * B.ey.x + A.ey.y * B.ey.y;
-    return C;
-  }
-
-  public final static void mulTransToOut(final Mat22 A, final Mat22 B, final Mat22 out) {
-    final float x1 = A.ex.x * B.ex.x + A.ex.y * B.ex.y;
-    final float y1 = A.ey.x * B.ex.x + A.ey.y * B.ex.y;
-    final float x2 = A.ex.x * B.ey.x + A.ex.y * B.ey.y;
-    final float y2 = A.ey.x * B.ey.x + A.ey.y * B.ey.y;
-
-    out.ex.x = x1;
-    out.ex.y = y1;
-    out.ey.x = x2;
-    out.ey.y = y2;
-  }
-
-  public final static void mulTransToOutUnsafe(final Mat22 A, final Mat22 B, final Mat22 out) {
-    assert (A != out);
-    assert (B != out);
-    out.ex.x = A.ex.x * B.ex.x + A.ex.y * B.ex.y;
-    out.ex.y = A.ey.x * B.ex.x + A.ey.y * B.ex.y;
-    out.ey.x = A.ex.x * B.ey.x + A.ex.y * B.ey.y;
-    out.ey.y = A.ey.x * B.ey.x + A.ey.y * B.ey.y;
-  }
-
-  public final static Mat22 createRotationalTransform(float angle) {
-    Mat22 mat = new Mat22();
-    final float c = MathUtils.cos(angle);
-    final float s = MathUtils.sin(angle);
-    mat.ex.x = c;
-    mat.ey.x = -s;
-    mat.ex.y = s;
-    mat.ey.y = c;
-    return mat;
-  }
-
-  public final static void createRotationalTransform(float angle, Mat22 out) {
-    final float c = MathUtils.cos(angle);
-    final float s = MathUtils.sin(angle);
-    out.ex.x = c;
-    out.ey.x = -s;
-    out.ex.y = s;
-    out.ey.y = c;
-  }
-
-  public final static Mat22 createScaleTransform(float scale) {
-    Mat22 mat = new Mat22();
-    mat.ex.x = scale;
-    mat.ey.y = scale;
-    return mat;
-  }
-
-  public final static void createScaleTransform(float scale, Mat22 out) {
-    out.ex.x = scale;
-    out.ey.y = scale;
-  }
-
-  @Override
-  public int hashCode() {
-    final int prime = 31;
-    int result = 1;
-    result = prime * result + ((ex == null) ? 0 : ex.hashCode());
-    result = prime * result + ((ey == null) ? 0 : ey.hashCode());
-    return result;
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj) return true;
-    if (obj == null) return false;
-    if (getClass() != obj.getClass()) return false;
-    Mat22 other = (Mat22) obj;
-    if (ex == null) {
-      if (other.ex != null) return false;
-    } else if (!ex.equals(other.ex)) return false;
-    if (ey == null) {
-      if (other.ey != null) return false;
-    } else if (!ey.equals(other.ey)) return false;
-    return true;
-  }
+       private static final long serialVersionUID = 2L;
+
+       public final Vec2 ex, ey;
+
+       /** Convert the matrix to printable format. */
+       @Override
+       public String toString () {
+               String s = "";
+               s += "[" + ex.x + "," + ey.x + "]\n";
+               s += "[" + ex.y + "," + ey.y + "]";
+               return s;
+       }
+
+       /** Construct zero matrix. Note: this is NOT an identity matrix! djm fixed double allocation problem */
+       public Mat22 () {
+               ex = new Vec2();
+               ey = new Vec2();
+       }
+
+       /** Create a matrix with given vectors as columns.
+        * 
+        * @param c1 Column 1 of matrix
+        * @param c2 Column 2 of matrix */
+       public Mat22 (final Vec2 c1, final Vec2 c2) {
+               ex = c1.clone();
+               ey = c2.clone();
+       }
+
+       /** Create a matrix from four floats.
+        * 
+        * @param exx
+        * @param col2x
+        * @param exy
+        * @param col2y */
+       public Mat22 (final float exx, final float col2x, final float exy, final float col2y) {
+               ex = new Vec2(exx, exy);
+               ey = new Vec2(col2x, col2y);
+       }
+
+       /** Set as a copy of another matrix.
+        * 
+        * @param m Matrix to copy */
+       public final Mat22 set (final Mat22 m) {
+               ex.x = m.ex.x;
+               ex.y = m.ex.y;
+               ey.x = m.ey.x;
+               ey.y = m.ey.y;
+               return this;
+       }
+
+       public final Mat22 set (final float exx, final float col2x, final float exy, final float col2y) {
+               ex.x = exx;
+               ex.y = exy;
+               ey.x = col2x;
+               ey.y = col2y;
+               return this;
+       }
+
+       /** Return a clone of this matrix. djm fixed double allocation */
+       public final Mat22 clone () {
+               return new Mat22(ex, ey);
+       }
+
+       /** Set as a matrix representing a rotation.
+        * 
+        * @param angle Rotation (in radians) that matrix represents. */
+       public final void set (final float angle) {
+               final float c = MathUtils.cos(angle), s = MathUtils.sin(angle);
+               ex.x = c;
+               ey.x = -s;
+               ex.y = s;
+               ey.y = c;
+       }
+
+       /** Set as the identity matrix. */
+       public final void setIdentity () {
+               ex.x = 1.0f;
+               ey.x = 0.0f;
+               ex.y = 0.0f;
+               ey.y = 1.0f;
+       }
+
+       /** Set as the zero matrix. */
+       public final void setZero () {
+               ex.x = 0.0f;
+               ey.x = 0.0f;
+               ex.y = 0.0f;
+               ey.y = 0.0f;
+       }
+
+       /** Extract the angle from this matrix (assumed to be a rotation matrix).
+        * 
+        * @return */
+       public final float getAngle () {
+               return MathUtils.atan2(ex.y, ex.x);
+       }
+
+       /** Set by column vectors.
+        * 
+        * @param c1 Column 1
+        * @param c2 Column 2 */
+       public final void set (final Vec2 c1, final Vec2 c2) {
+               ex.x = c1.x;
+               ey.x = c2.x;
+               ex.y = c1.y;
+               ey.y = c2.y;
+       }
+
+       /** Returns the inverted Mat22 - does NOT invert the matrix locally! */
+       public final Mat22 invert () {
+               final float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
+               final Mat22 B = new Mat22();
+               float det = a * d - b * c;
+               if (det != 0) {
+                       det = 1.0f / det;
+               }
+               B.ex.x = det * d;
+               B.ey.x = -det * b;
+               B.ex.y = -det * c;
+               B.ey.y = det * a;
+               return B;
+       }
+
+       public final Mat22 invertLocal () {
+               final float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
+               float det = a * d - b * c;
+               if (det != 0) {
+                       det = 1.0f / det;
+               }
+               ex.x = det * d;
+               ey.x = -det * b;
+               ex.y = -det * c;
+               ey.y = det * a;
+               return this;
+       }
+
+       public final void invertToOut (final Mat22 out) {
+               final float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
+               float det = a * d - b * c;
+               // b2Assert(det != 0.0f);
+               det = 1.0f / det;
+               out.ex.x = det * d;
+               out.ey.x = -det * b;
+               out.ex.y = -det * c;
+               out.ey.y = det * a;
+       }
+
+       /** Return the matrix composed of the absolute values of all elements. djm: fixed double allocation
+        * 
+        * @return Absolute value matrix */
+       public final Mat22 abs () {
+               return new Mat22(MathUtils.abs(ex.x), MathUtils.abs(ey.x), MathUtils.abs(ex.y), MathUtils.abs(ey.y));
+       }
+
+       /* djm: added */
+       public final void absLocal () {
+               ex.absLocal();
+               ey.absLocal();
+       }
+
+       /** Return the matrix composed of the absolute values of all elements.
+        * 
+        * @return Absolute value matrix */
+       public final static Mat22 abs (final Mat22 R) {
+               return R.abs();
+       }
+
+       /* djm created */
+       public static void absToOut (final Mat22 R, final Mat22 out) {
+               out.ex.x = MathUtils.abs(R.ex.x);
+               out.ex.y = MathUtils.abs(R.ex.y);
+               out.ey.x = MathUtils.abs(R.ey.x);
+               out.ey.y = MathUtils.abs(R.ey.y);
+       }
+
+       /** Multiply a vector by this matrix.
+        * 
+        * @param v Vector to multiply by matrix.
+        * @return Resulting vector */
+       public final Vec2 mul (final Vec2 v) {
+               return new Vec2(ex.x * v.x + ey.x * v.y, ex.y * v.x + ey.y * v.y);
+       }
+
+       public final void mulToOut (final Vec2 v, final Vec2 out) {
+               final float tempy = ex.y * v.x + ey.y * v.y;
+               out.x = ex.x * v.x + ey.x * v.y;
+               out.y = tempy;
+       }
+
+       public final void mulToOutUnsafe (final Vec2 v, final Vec2 out) {
+               assert (v != out);
+               out.x = ex.x * v.x + ey.x * v.y;
+               out.y = ex.y * v.x + ey.y * v.y;
+       }
+
+       /** Multiply another matrix by this one (this one on left). djm optimized
+        * 
+        * @param R
+        * @return */
+       public final Mat22 mul (final Mat22 R) {
+               /*
+                * Mat22 C = new Mat22();C.set(this.mul(R.ex), this.mul(R.ey));return C;
+                */
+               final Mat22 C = new Mat22();
+               C.ex.x = ex.x * R.ex.x + ey.x * R.ex.y;
+               C.ex.y = ex.y * R.ex.x + ey.y * R.ex.y;
+               C.ey.x = ex.x * R.ey.x + ey.x * R.ey.y;
+               C.ey.y = ex.y * R.ey.x + ey.y * R.ey.y;
+               // C.set(ex,col2);
+               return C;
+       }
+
+       public final Mat22 mulLocal (final Mat22 R) {
+               mulToOut(R, this);
+               return this;
+       }
+
+       public final void mulToOut (final Mat22 R, final Mat22 out) {
+               final float tempy1 = this.ex.y * R.ex.x + this.ey.y * R.ex.y;
+               final float tempx1 = this.ex.x * R.ex.x + this.ey.x * R.ex.y;
+               out.ex.x = tempx1;
+               out.ex.y = tempy1;
+               final float tempy2 = this.ex.y * R.ey.x + this.ey.y * R.ey.y;
+               final float tempx2 = this.ex.x * R.ey.x + this.ey.x * R.ey.y;
+               out.ey.x = tempx2;
+               out.ey.y = tempy2;
+       }
+
+       public final void mulToOutUnsafe (final Mat22 R, final Mat22 out) {
+               assert (out != R);
+               assert (out != this);
+               out.ex.x = this.ex.x * R.ex.x + this.ey.x * R.ex.y;
+               out.ex.y = this.ex.y * R.ex.x + this.ey.y * R.ex.y;
+               out.ey.x = this.ex.x * R.ey.x + this.ey.x * R.ey.y;
+               out.ey.y = this.ex.y * R.ey.x + this.ey.y * R.ey.y;
+       }
+
+       /** Multiply another matrix by the transpose of this one (transpose of this one on left). djm: optimized
+        * 
+        * @param B
+        * @return */
+       public final Mat22 mulTrans (final Mat22 B) {
+               /*
+                * Vec2 c1 = new Vec2(Vec2.dot(this.ex, B.ex), Vec2.dot(this.ey, B.ex)); Vec2 c2 = new Vec2(Vec2.dot(this.ex, B.ey),
+                * Vec2.dot(this.ey, B.ey)); Mat22 C = new Mat22(); C.set(c1, c2); return C;
+                */
+               final Mat22 C = new Mat22();
+
+               C.ex.x = Vec2.dot(this.ex, B.ex);
+               C.ex.y = Vec2.dot(this.ey, B.ex);
+
+               C.ey.x = Vec2.dot(this.ex, B.ey);
+               C.ey.y = Vec2.dot(this.ey, B.ey);
+               return C;
+       }
+
+       public final Mat22 mulTransLocal (final Mat22 B) {
+               mulTransToOut(B, this);
+               return this;
+       }
+
+       public final void mulTransToOut (final Mat22 B, final Mat22 out) {
+               /*
+                * out.ex.x = Vec2.dot(this.ex, B.ex); out.ex.y = Vec2.dot(this.ey, B.ex); out.ey.x = Vec2.dot(this.ex, B.ey); out.ey.y =
+                * Vec2.dot(this.ey, B.ey);
+                */
+               final float x1 = this.ex.x * B.ex.x + this.ex.y * B.ex.y;
+               final float y1 = this.ey.x * B.ex.x + this.ey.y * B.ex.y;
+               final float x2 = this.ex.x * B.ey.x + this.ex.y * B.ey.y;
+               final float y2 = this.ey.x * B.ey.x + this.ey.y * B.ey.y;
+               out.ex.x = x1;
+               out.ey.x = x2;
+               out.ex.y = y1;
+               out.ey.y = y2;
+       }
+
+       public final void mulTransToOutUnsafe (final Mat22 B, final Mat22 out) {
+               assert (B != out);
+               assert (this != out);
+               out.ex.x = this.ex.x * B.ex.x + this.ex.y * B.ex.y;
+               out.ey.x = this.ex.x * B.ey.x + this.ex.y * B.ey.y;
+               out.ex.y = this.ey.x * B.ex.x + this.ey.y * B.ex.y;
+               out.ey.y = this.ey.x * B.ey.x + this.ey.y * B.ey.y;
+       }
+
+       /** Multiply a vector by the transpose of this matrix.
+        * 
+        * @param v
+        * @return */
+       public final Vec2 mulTrans (final Vec2 v) {
+               // return new Vec2(Vec2.dot(v, ex), Vec2.dot(v, col2));
+               return new Vec2((v.x * ex.x + v.y * ex.y), (v.x * ey.x + v.y * ey.y));
+       }
+
+       /* djm added */
+       public final void mulTransToOut (final Vec2 v, final Vec2 out) {
+               /*
+                * out.x = Vec2.dot(v, ex); out.y = Vec2.dot(v, col2);
+                */
+               final float tempx = v.x * ex.x + v.y * ex.y;
+               out.y = v.x * ey.x + v.y * ey.y;
+               out.x = tempx;
+       }
+
+       /** Add this matrix to B, return the result.
+        * 
+        * @param B
+        * @return */
+       public final Mat22 add (final Mat22 B) {
+               // return new Mat22(ex.add(B.ex), col2.add(B.ey));
+               Mat22 m = new Mat22();
+               m.ex.x = ex.x + B.ex.x;
+               m.ex.y = ex.y + B.ex.y;
+               m.ey.x = ey.x + B.ey.x;
+               m.ey.y = ey.y + B.ey.y;
+               return m;
+       }
+
+       /** Add B to this matrix locally.
+        * 
+        * @param B
+        * @return */
+       public final Mat22 addLocal (final Mat22 B) {
+               // ex.addLocal(B.ex);
+               // col2.addLocal(B.ey);
+               ex.x += B.ex.x;
+               ex.y += B.ex.y;
+               ey.x += B.ey.x;
+               ey.y += B.ey.y;
+               return this;
+       }
+
+       /** Solve A * x = b where A = this matrix.
+        * 
+        * @return The vector x that solves the above equation. */
+       public final Vec2 solve (final Vec2 b) {
+               final float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;
+               float det = a11 * a22 - a12 * a21;
+               if (det != 0.0f) {
+                       det = 1.0f / det;
+               }
+               final Vec2 x = new Vec2(det * (a22 * b.x - a12 * b.y), det * (a11 * b.y - a21 * b.x));
+               return x;
+       }
+
+       public final void solveToOut (final Vec2 b, final Vec2 out) {
+               final float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;
+               float det = a11 * a22 - a12 * a21;
+               if (det != 0.0f) {
+                       det = 1.0f / det;
+               }
+               final float tempy = det * (a11 * b.y - a21 * b.x);
+               out.x = det * (a22 * b.x - a12 * b.y);
+               out.y = tempy;
+       }
+
+       public final static Vec2 mul (final Mat22 R, final Vec2 v) {
+               // return R.mul(v);
+               return new Vec2(R.ex.x * v.x + R.ey.x * v.y, R.ex.y * v.x + R.ey.y * v.y);
+       }
+
+       public final static void mulToOut (final Mat22 R, final Vec2 v, final Vec2 out) {
+               final float tempy = R.ex.y * v.x + R.ey.y * v.y;
+               out.x = R.ex.x * v.x + R.ey.x * v.y;
+               out.y = tempy;
+       }
+
+       public final static void mulToOutUnsafe (final Mat22 R, final Vec2 v, final Vec2 out) {
+               assert (v != out);
+               out.x = R.ex.x * v.x + R.ey.x * v.y;
+               out.y = R.ex.y * v.x + R.ey.y * v.y;
+       }
+
+       public final static Mat22 mul (final Mat22 A, final Mat22 B) {
+               // return A.mul(B);
+               final Mat22 C = new Mat22();
+               C.ex.x = A.ex.x * B.ex.x + A.ey.x * B.ex.y;
+               C.ex.y = A.ex.y * B.ex.x + A.ey.y * B.ex.y;
+               C.ey.x = A.ex.x * B.ey.x + A.ey.x * B.ey.y;
+               C.ey.y = A.ex.y * B.ey.x + A.ey.y * B.ey.y;
+               return C;
+       }
+
+       public final static void mulToOut (final Mat22 A, final Mat22 B, final Mat22 out) {
+               final float tempy1 = A.ex.y * B.ex.x + A.ey.y * B.ex.y;
+               final float tempx1 = A.ex.x * B.ex.x + A.ey.x * B.ex.y;
+               final float tempy2 = A.ex.y * B.ey.x + A.ey.y * B.ey.y;
+               final float tempx2 = A.ex.x * B.ey.x + A.ey.x * B.ey.y;
+               out.ex.x = tempx1;
+               out.ex.y = tempy1;
+               out.ey.x = tempx2;
+               out.ey.y = tempy2;
+       }
+
+       public final static void mulToOutUnsafe (final Mat22 A, final Mat22 B, final Mat22 out) {
+               assert (out != A);
+               assert (out != B);
+               out.ex.x = A.ex.x * B.ex.x + A.ey.x * B.ex.y;
+               out.ex.y = A.ex.y * B.ex.x + A.ey.y * B.ex.y;
+               out.ey.x = A.ex.x * B.ey.x + A.ey.x * B.ey.y;
+               out.ey.y = A.ex.y * B.ey.x + A.ey.y * B.ey.y;
+       }
+
+       public final static Vec2 mulTrans (final Mat22 R, final Vec2 v) {
+               return new Vec2((v.x * R.ex.x + v.y * R.ex.y), (v.x * R.ey.x + v.y * R.ey.y));
+       }
+
+       public final static void mulTransToOut (final Mat22 R, final Vec2 v, final Vec2 out) {
+               float outx = v.x * R.ex.x + v.y * R.ex.y;
+               out.y = v.x * R.ey.x + v.y * R.ey.y;
+               out.x = outx;
+       }
+
+       public final static void mulTransToOutUnsafe (final Mat22 R, final Vec2 v, final Vec2 out) {
+               assert (out != v);
+               out.y = v.x * R.ey.x + v.y * R.ey.y;
+               out.x = v.x * R.ex.x + v.y * R.ex.y;
+       }
+
+       public final static Mat22 mulTrans (final Mat22 A, final Mat22 B) {
+               final Mat22 C = new Mat22();
+               C.ex.x = A.ex.x * B.ex.x + A.ex.y * B.ex.y;
+               C.ex.y = A.ey.x * B.ex.x + A.ey.y * B.ex.y;
+               C.ey.x = A.ex.x * B.ey.x + A.ex.y * B.ey.y;
+               C.ey.y = A.ey.x * B.ey.x + A.ey.y * B.ey.y;
+               return C;
+       }
+
+       public final static void mulTransToOut (final Mat22 A, final Mat22 B, final Mat22 out) {
+               final float x1 = A.ex.x * B.ex.x + A.ex.y * B.ex.y;
+               final float y1 = A.ey.x * B.ex.x + A.ey.y * B.ex.y;
+               final float x2 = A.ex.x * B.ey.x + A.ex.y * B.ey.y;
+               final float y2 = A.ey.x * B.ey.x + A.ey.y * B.ey.y;
+
+               out.ex.x = x1;
+               out.ex.y = y1;
+               out.ey.x = x2;
+               out.ey.y = y2;
+       }
+
+       public final static void mulTransToOutUnsafe (final Mat22 A, final Mat22 B, final Mat22 out) {
+               assert (A != out);
+               assert (B != out);
+               out.ex.x = A.ex.x * B.ex.x + A.ex.y * B.ex.y;
+               out.ex.y = A.ey.x * B.ex.x + A.ey.y * B.ex.y;
+               out.ey.x = A.ex.x * B.ey.x + A.ex.y * B.ey.y;
+               out.ey.y = A.ey.x * B.ey.x + A.ey.y * B.ey.y;
+       }
+
+       public final static Mat22 createRotationalTransform (float angle) {
+               Mat22 mat = new Mat22();
+               final float c = MathUtils.cos(angle);
+               final float s = MathUtils.sin(angle);
+               mat.ex.x = c;
+               mat.ey.x = -s;
+               mat.ex.y = s;
+               mat.ey.y = c;
+               return mat;
+       }
+
+       public final static void createRotationalTransform (float angle, Mat22 out) {
+               final float c = MathUtils.cos(angle);
+               final float s = MathUtils.sin(angle);
+               out.ex.x = c;
+               out.ey.x = -s;
+               out.ex.y = s;
+               out.ey.y = c;
+       }
+
+       public final static Mat22 createScaleTransform (float scale) {
+               Mat22 mat = new Mat22();
+               mat.ex.x = scale;
+               mat.ey.y = scale;
+               return mat;
+       }
+
+       public final static void createScaleTransform (float scale, Mat22 out) {
+               out.ex.x = scale;
+               out.ey.y = scale;
+       }
+
+       @Override
+       public int hashCode () {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((ex == null) ? 0 : ex.hashCode());
+               result = prime * result + ((ey == null) ? 0 : ey.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals (Object obj) {
+               if (this == obj) return true;
+               if (obj == null) return false;
+               if (getClass() != obj.getClass()) return false;
+               Mat22 other = (Mat22)obj;
+               if (ex == null) {
+                       if (other.ex != null) return false;
+               } else if (!ex.equals(other.ex)) return false;
+               if (ey == null) {
+                       if (other.ey != null) return false;
+               } else if (!ey.equals(other.ey)) return false;
+               return true;
+       }
 }
index 7ea83cf..1ea6dba 100644 (file)
@@ -26,213 +26,198 @@ package org.jbox2d.common;
 
 import java.io.Serializable;
 
-/**
- * A 3-by-3 matrix. Stored in column-major order.
+/** A 3-by-3 matrix. Stored in column-major order.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class Mat33 implements Serializable {
-  private static final long serialVersionUID = 2L;
-
-  public static final Mat33 IDENTITY = new Mat33(new Vec3(1, 0, 0), new Vec3(0, 1, 0), new Vec3(0,
-      0, 1));
-
-  public final Vec3 ex, ey, ez;
-
-  public Mat33() {
-    ex = new Vec3();
-    ey = new Vec3();
-    ez = new Vec3();
-  }
-
-  public Mat33(Vec3 argCol1, Vec3 argCol2, Vec3 argCol3) {
-    ex = argCol1.clone();
-    ey = argCol2.clone();
-    ez = argCol3.clone();
-  }
-
-  public void setZero() {
-    ex.setZero();
-    ey.setZero();
-    ez.setZero();
-  }
-
-  // / Multiply a matrix times a vector.
-  public static final Vec3 mul(Mat33 A, Vec3 v) {
-    return new Vec3(v.x * A.ex.x + v.y * A.ey.x + v.z + A.ez.x, v.x * A.ex.y + v.y * A.ey.y + v.z
-        * A.ez.y, v.x * A.ex.z + v.y * A.ey.z + v.z * A.ez.z);
-  }
-
-  public static final Vec2 mul22(Mat33 A, Vec2 v) {
-    return new Vec2(A.ex.x * v.x + A.ey.x * v.y, A.ex.y * v.x + A.ey.y * v.y);
-  }
-
-  public static final void mul22ToOut(Mat33 A, Vec2 v, Vec2 out) {
-    final float tempx = A.ex.x * v.x + A.ey.x * v.y;
-    out.y = A.ex.y * v.x + A.ey.y * v.y;
-    out.x = tempx;
-  }
-
-  public static final void mul22ToOutUnsafe(Mat33 A, Vec2 v, Vec2 out) {
-    assert (v != out);
-    out.y = A.ex.y * v.x + A.ey.y * v.y;
-    out.x = A.ex.x * v.x + A.ey.x * v.y;
-  }
-
-  public static final void mulToOut(Mat33 A, Vec3 v, Vec3 out) {
-    final float tempy = v.x * A.ex.y + v.y * A.ey.y + v.z * A.ez.y;
-    final float tempz = v.x * A.ex.z + v.y * A.ey.z + v.z * A.ez.z;
-    out.x = v.x * A.ex.x + v.y * A.ey.x + v.z * A.ez.x;
-    out.y = tempy;
-    out.z = tempz;
-  }
-
-  public static final void mulToOutUnsafe(Mat33 A, Vec3 v, Vec3 out) {
-    assert (out != v);
-    out.x = v.x * A.ex.x + v.y * A.ey.x + v.z * A.ez.x;
-    out.y = v.x * A.ex.y + v.y * A.ey.y + v.z * A.ez.y;
-    out.z = v.x * A.ex.z + v.y * A.ey.z + v.z * A.ez.z;
-  }
-
-  /**
-   * Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse
-   * in one-shot cases.
-   * 
-   * @param b
-   * @return
-   */
-  public final Vec2 solve22(Vec2 b) {
-    Vec2 x = new Vec2();
-    solve22ToOut(b, x);
-    return x;
-  }
-
-  /**
-   * Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse
-   * in one-shot cases.
-   * 
-   * @param b
-   * @return
-   */
-  public final void solve22ToOut(Vec2 b, Vec2 out) {
-    final float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;
-    float det = a11 * a22 - a12 * a21;
-    if (det != 0.0f) {
-      det = 1.0f / det;
-    }
-    out.x = det * (a22 * b.x - a12 * b.y);
-    out.y = det * (a11 * b.y - a21 * b.x);
-  }
-
-  // djm pooling from below
-  /**
-   * Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse
-   * in one-shot cases.
-   * 
-   * @param b
-   * @return
-   */
-  public final Vec3 solve33(Vec3 b) {
-    Vec3 x = new Vec3();
-    solve33ToOut(b, x);
-    return x;
-  }
-
-  /**
-   * Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse
-   * in one-shot cases.
-   * 
-   * @param b
-   * @param out the result
-   */
-  public final void solve33ToOut(Vec3 b, Vec3 out) {
-    assert (b != out);
-    Vec3.crossToOutUnsafe(ey, ez, out);
-    float det = Vec3.dot(ex, out);
-    if (det != 0.0f) {
-      det = 1.0f / det;
-    }
-    Vec3.crossToOutUnsafe(ey, ez, out);
-    final float x = det * Vec3.dot(b, out);
-    Vec3.crossToOutUnsafe(b, ez, out);
-    final float y = det * Vec3.dot(ex, out);
-    Vec3.crossToOutUnsafe(ey, b, out);
-    float z = det * Vec3.dot(ex, out);
-    out.x = x;
-    out.y = y;
-    out.z = z;
-  }
-
-  public void getInverse22(Mat33 M) {
-    float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
-    float det = a * d - b * c;
-    if (det != 0.0f) {
-      det = 1.0f / det;
-    }
-
-    M.ex.x = det * d;
-    M.ey.x = -det * b;
-    M.ex.z = 0.0f;
-    M.ex.y = -det * c;
-    M.ey.y = det * a;
-    M.ey.z = 0.0f;
-    M.ez.x = 0.0f;
-    M.ez.y = 0.0f;
-    M.ez.z = 0.0f;
-  }
-
-  // / Returns the zero matrix if singular.
-  public void getSymInverse33(Mat33 M) {
-    float bx = ey.y * ez.z - ey.z * ez.y;
-    float by = ey.z * ez.x - ey.x * ez.z;
-    float bz = ey.x * ez.y - ey.y * ez.x;
-    float det = ex.x * bx + ex.y * by + ex.z * bz;
-    if (det != 0.0f) {
-      det = 1.0f / det;
-    }
-
-    float a11 = ex.x, a12 = ey.x, a13 = ez.x;
-    float a22 = ey.y, a23 = ez.y;
-    float a33 = ez.z;
-
-    M.ex.x = det * (a22 * a33 - a23 * a23);
-    M.ex.y = det * (a13 * a23 - a12 * a33);
-    M.ex.z = det * (a12 * a23 - a13 * a22);
-
-    M.ey.x = M.ex.y;
-    M.ey.y = det * (a11 * a33 - a13 * a13);
-    M.ey.z = det * (a13 * a12 - a11 * a23);
-
-    M.ez.x = M.ex.z;
-    M.ez.y = M.ey.z;
-    M.ez.z = det * (a11 * a22 - a12 * a12);
-  }
-
-  @Override
-  public int hashCode() {
-    final int prime = 31;
-    int result = 1;
-    result = prime * result + ((ex == null) ? 0 : ex.hashCode());
-    result = prime * result + ((ey == null) ? 0 : ey.hashCode());
-    result = prime * result + ((ez == null) ? 0 : ez.hashCode());
-    return result;
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj) return true;
-    if (obj == null) return false;
-    if (getClass() != obj.getClass()) return false;
-    Mat33 other = (Mat33) obj;
-    if (ex == null) {
-      if (other.ex != null) return false;
-    } else if (!ex.equals(other.ex)) return false;
-    if (ey == null) {
-      if (other.ey != null) return false;
-    } else if (!ey.equals(other.ey)) return false;
-    if (ez == null) {
-      if (other.ez != null) return false;
-    } else if (!ez.equals(other.ez)) return false;
-    return true;
-  }
+       private static final long serialVersionUID = 2L;
+
+       public static final Mat33 IDENTITY = new Mat33(new Vec3(1, 0, 0), new Vec3(0, 1, 0), new Vec3(0, 0, 1));
+
+       public final Vec3 ex, ey, ez;
+
+       public Mat33 () {
+               ex = new Vec3();
+               ey = new Vec3();
+               ez = new Vec3();
+       }
+
+       public Mat33 (Vec3 argCol1, Vec3 argCol2, Vec3 argCol3) {
+               ex = argCol1.clone();
+               ey = argCol2.clone();
+               ez = argCol3.clone();
+       }
+
+       public void setZero () {
+               ex.setZero();
+               ey.setZero();
+               ez.setZero();
+       }
+
+       // / Multiply a matrix times a vector.
+       public static final Vec3 mul (Mat33 A, Vec3 v) {
+               return new Vec3(v.x * A.ex.x + v.y * A.ey.x + v.z + A.ez.x, v.x * A.ex.y + v.y * A.ey.y + v.z * A.ez.y, v.x * A.ex.z + v.y
+                       * A.ey.z + v.z * A.ez.z);
+       }
+
+       public static final Vec2 mul22 (Mat33 A, Vec2 v) {
+               return new Vec2(A.ex.x * v.x + A.ey.x * v.y, A.ex.y * v.x + A.ey.y * v.y);
+       }
+
+       public static final void mul22ToOut (Mat33 A, Vec2 v, Vec2 out) {
+               final float tempx = A.ex.x * v.x + A.ey.x * v.y;
+               out.y = A.ex.y * v.x + A.ey.y * v.y;
+               out.x = tempx;
+       }
+
+       public static final void mul22ToOutUnsafe (Mat33 A, Vec2 v, Vec2 out) {
+               assert (v != out);
+               out.y = A.ex.y * v.x + A.ey.y * v.y;
+               out.x = A.ex.x * v.x + A.ey.x * v.y;
+       }
+
+       public static final void mulToOut (Mat33 A, Vec3 v, Vec3 out) {
+               final float tempy = v.x * A.ex.y + v.y * A.ey.y + v.z * A.ez.y;
+               final float tempz = v.x * A.ex.z + v.y * A.ey.z + v.z * A.ez.z;
+               out.x = v.x * A.ex.x + v.y * A.ey.x + v.z * A.ez.x;
+               out.y = tempy;
+               out.z = tempz;
+       }
+
+       public static final void mulToOutUnsafe (Mat33 A, Vec3 v, Vec3 out) {
+               assert (out != v);
+               out.x = v.x * A.ex.x + v.y * A.ey.x + v.z * A.ez.x;
+               out.y = v.x * A.ex.y + v.y * A.ey.y + v.z * A.ez.y;
+               out.z = v.x * A.ex.z + v.y * A.ey.z + v.z * A.ez.z;
+       }
+
+       /** Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.
+        * 
+        * @param b
+        * @return */
+       public final Vec2 solve22 (Vec2 b) {
+               Vec2 x = new Vec2();
+               solve22ToOut(b, x);
+               return x;
+       }
+
+       /** Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.
+        * 
+        * @param b
+        * @return */
+       public final void solve22ToOut (Vec2 b, Vec2 out) {
+               final float a11 = ex.x, a12 = ey.x, a21 = ex.y, a22 = ey.y;
+               float det = a11 * a22 - a12 * a21;
+               if (det != 0.0f) {
+                       det = 1.0f / det;
+               }
+               out.x = det * (a22 * b.x - a12 * b.y);
+               out.y = det * (a11 * b.y - a21 * b.x);
+       }
+
+       // djm pooling from below
+       /** Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.
+        * 
+        * @param b
+        * @return */
+       public final Vec3 solve33 (Vec3 b) {
+               Vec3 x = new Vec3();
+               solve33ToOut(b, x);
+               return x;
+       }
+
+       /** Solve A * x = b, where b is a column vector. This is more efficient than computing the inverse in one-shot cases.
+        * 
+        * @param b
+        * @param out the result */
+       public final void solve33ToOut (Vec3 b, Vec3 out) {
+               assert (b != out);
+               Vec3.crossToOutUnsafe(ey, ez, out);
+               float det = Vec3.dot(ex, out);
+               if (det != 0.0f) {
+                       det = 1.0f / det;
+               }
+               Vec3.crossToOutUnsafe(ey, ez, out);
+               final float x = det * Vec3.dot(b, out);
+               Vec3.crossToOutUnsafe(b, ez, out);
+               final float y = det * Vec3.dot(ex, out);
+               Vec3.crossToOutUnsafe(ey, b, out);
+               float z = det * Vec3.dot(ex, out);
+               out.x = x;
+               out.y = y;
+               out.z = z;
+       }
+
+       public void getInverse22 (Mat33 M) {
+               float a = ex.x, b = ey.x, c = ex.y, d = ey.y;
+               float det = a * d - b * c;
+               if (det != 0.0f) {
+                       det = 1.0f / det;
+               }
+
+               M.ex.x = det * d;
+               M.ey.x = -det * b;
+               M.ex.z = 0.0f;
+               M.ex.y = -det * c;
+               M.ey.y = det * a;
+               M.ey.z = 0.0f;
+               M.ez.x = 0.0f;
+               M.ez.y = 0.0f;
+               M.ez.z = 0.0f;
+       }
+
+       // / Returns the zero matrix if singular.
+       public void getSymInverse33 (Mat33 M) {
+               float bx = ey.y * ez.z - ey.z * ez.y;
+               float by = ey.z * ez.x - ey.x * ez.z;
+               float bz = ey.x * ez.y - ey.y * ez.x;
+               float det = ex.x * bx + ex.y * by + ex.z * bz;
+               if (det != 0.0f) {
+                       det = 1.0f / det;
+               }
+
+               float a11 = ex.x, a12 = ey.x, a13 = ez.x;
+               float a22 = ey.y, a23 = ez.y;
+               float a33 = ez.z;
+
+               M.ex.x = det * (a22 * a33 - a23 * a23);
+               M.ex.y = det * (a13 * a23 - a12 * a33);
+               M.ex.z = det * (a12 * a23 - a13 * a22);
+
+               M.ey.x = M.ex.y;
+               M.ey.y = det * (a11 * a33 - a13 * a13);
+               M.ey.z = det * (a13 * a12 - a11 * a23);
+
+               M.ez.x = M.ex.z;
+               M.ez.y = M.ey.z;
+               M.ez.z = det * (a11 * a22 - a12 * a12);
+       }
+
+       @Override
+       public int hashCode () {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + ((ex == null) ? 0 : ex.hashCode());
+               result = prime * result + ((ey == null) ? 0 : ey.hashCode());
+               result = prime * result + ((ez == null) ? 0 : ez.hashCode());
+               return result;
+       }
+
+       @Override
+       public boolean equals (Object obj) {
+               if (this == obj) return true;
+               if (obj == null) return false;
+               if (getClass() != obj.getClass()) return false;
+               Mat33 other = (Mat33)obj;
+               if (ex == null) {
+                       if (other.ex != null) return false;
+               } else if (!ex.equals(other.ex)) return false;
+               if (ey == null) {
+                       if (other.ey != null) return false;
+               } else if (!ey.equals(other.ey)) return false;
+               if (ez == null) {
+                       if (other.ez != null) return false;
+               } else if (!ez.equals(other.ez)) return false;
+               return true;
+       }
 }
index 6af11ce..0c681ae 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.common;
 
-/**
- * Orientated bounding box viewport transform
+/** Orientated bounding box viewport transform
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class OBBViewportTransform implements IViewportTransform {
 
-  public static class OBB {
-    public final Mat22 R = new Mat22();
-    public final Vec2 center = new Vec2();
-    public final Vec2 extents = new Vec2();
-  }
-
-  protected final OBB box = new OBB();
-  private boolean yFlip = false;
-  private final Mat22 yFlipMat = new Mat22(1, 0, 0, -1);
-  private final Mat22 yFlipMatInv = yFlipMat.invert();
-
-  public OBBViewportTransform() {
-    box.R.setIdentity();
-  }
-
-  public void set(OBBViewportTransform vpt) {
-    box.center.set(vpt.box.center);
-    box.extents.set(vpt.box.extents);
-    box.R.set(vpt.box.R);
-    yFlip = vpt.yFlip;
-  }
-
-  /**
-   * @see IViewportTransform#setCamera(float, float, float)
-   */
-  public void setCamera(float x, float y, float scale) {
-    box.center.set(x, y);
-    Mat22.createScaleTransform(scale, box.R);
-  }
-
-  /**
-   * @see IViewportTransform#getExtents()
-   */
-  public Vec2 getExtents() {
-    return box.extents;
-  }
-
-  /**
-   * @see IViewportTransform#setExtents(Vec2)
-   */
-  public void setExtents(Vec2 argExtents) {
-    box.extents.set(argExtents);
-  }
-
-  /**
-   * @see IViewportTransform#setExtents(float, float)
-   */
-  public void setExtents(float argHalfWidth, float argHalfHeight) {
-    box.extents.set(argHalfWidth, argHalfHeight);
-  }
-
-  /**
-   * @see IViewportTransform#getCenter()
-   */
-  public Vec2 getCenter() {
-    return box.center;
-  }
-
-  /**
-   * @see IViewportTransform#setCenter(Vec2)
-   */
-  public void setCenter(Vec2 argPos) {
-    box.center.set(argPos);
-  }
-
-  /**
-   * @see IViewportTransform#setCenter(float, float)
-   */
-  public void setCenter(float x, float y) {
-    box.center.set(x, y);
-  }
-
-  /**
-   * gets the transform of the viewport, transforms around the center. Not a copy.
-   * 
-   * @return
-   */
-  public Mat22 getTransform() {
-    return box.R;
-  }
-
-  /**
-   * Sets the transform of the viewport. Transforms about the center.
-   * 
-   * @param transform
-   */
-  public void setTransform(Mat22 transform) {
-    box.R.set(transform);
-  }
-
-  /**
-   * Multiplies the obb transform by the given transform
-   * 
-   * @param argTransform
-   */
-  public void mulByTransform(Mat22 argTransform) {
-    box.R.mulLocal(argTransform);
-  }
-
-  /**
-   * @see IViewportTransform#isYFlip()
-   */
-  public boolean isYFlip() {
-    return yFlip;
-  }
-
-  /**
-   * @see IViewportTransform#setYFlip(boolean)
-   */
-  public void setYFlip(boolean yFlip) {
-    this.yFlip = yFlip;
-  }
-
-  // djm pooling
-  private final Mat22 inv = new Mat22();
-
-  /**
-   * @see IViewportTransform#getScreenVectorToWorld(Vec2, Vec2)
-   */
-  public void getScreenVectorToWorld(Vec2 argScreen, Vec2 argWorld) {
-    inv.set(box.R);
-    inv.invertLocal();
-    inv.mulToOut(argScreen, argWorld);
-    if (yFlip) {
-      yFlipMatInv.mulToOut(argWorld, argWorld);
-    }
-  }
-
-  /**
-   * @see IViewportTransform#getWorldVectorToScreen(Vec2, Vec2)
-   */
-  public void getWorldVectorToScreen(Vec2 argWorld, Vec2 argScreen) {
-    box.R.mulToOut(argWorld, argScreen);
-    if (yFlip) {
-      yFlipMatInv.mulToOut(argScreen, argScreen);
-    }
-  }
-
-  /**
-   * @see IViewportTransform#getWorldToScreen(Vec2, Vec2)
-   */
-  public void getWorldToScreen(Vec2 argWorld, Vec2 argScreen) {
-    argScreen.set(argWorld);
-    argScreen.subLocal(box.center);
-    box.R.mulToOut(argScreen, argScreen);
-    if (yFlip) {
-      yFlipMat.mulToOut(argScreen, argScreen);
-    }
-    argScreen.addLocal(box.extents);
-  }
-
-  private final Mat22 inv2 = new Mat22();
-
-  /**
-   * @see IViewportTransform#getScreenToWorld(Vec2, Vec2)
-   */
-  public void getScreenToWorld(Vec2 argScreen, Vec2 argWorld) {
-    argWorld.set(argScreen);
-    argWorld.subLocal(box.extents);
-    box.R.invertToOut(inv2);
-    inv2.mulToOut(argWorld, argWorld);
-    if (yFlip) {
-      yFlipMatInv.mulToOut(argWorld, argWorld);
-    }
-    argWorld.addLocal(box.center);
-  }
+       public static class OBB {
+               public final Mat22 R = new Mat22();
+               public final Vec2 center = new Vec2();
+               public final Vec2 extents = new Vec2();
+       }
+
+       protected final OBB box = new OBB();
+       private boolean yFlip = false;
+       private final Mat22 yFlipMat = new Mat22(1, 0, 0, -1);
+       private final Mat22 yFlipMatInv = yFlipMat.invert();
+
+       public OBBViewportTransform () {
+               box.R.setIdentity();
+       }
+
+       public void set (OBBViewportTransform vpt) {
+               box.center.set(vpt.box.center);
+               box.extents.set(vpt.box.extents);
+               box.R.set(vpt.box.R);
+               yFlip = vpt.yFlip;
+       }
+
+       /** @see IViewportTransform#setCamera(float, float, float) */
+       public void setCamera (float x, float y, float scale) {
+               box.center.set(x, y);
+               Mat22.createScaleTransform(scale, box.R);
+       }
+
+       /** @see IViewportTransform#getExtents() */
+       public Vec2 getExtents () {
+               return box.extents;
+       }
+
+       /** @see IViewportTransform#setExtents(Vec2) */
+       public void setExtents (Vec2 argExtents) {
+               box.extents.set(argExtents);
+       }
+
+       /** @see IViewportTransform#setExtents(float, float) */
+       public void setExtents (float argHalfWidth, float argHalfHeight) {
+               box.extents.set(argHalfWidth, argHalfHeight);
+       }
+
+       /** @see IViewportTransform#getCenter() */
+       public Vec2 getCenter () {
+               return box.center;
+       }
+
+       /** @see IViewportTransform#setCenter(Vec2) */
+       public void setCenter (Vec2 argPos) {
+               box.center.set(argPos);
+       }
+
+       /** @see IViewportTransform#setCenter(float, float) */
+       public void setCenter (float x, float y) {
+               box.center.set(x, y);
+       }
+
+       /** gets the transform of the viewport, transforms around the center. Not a copy.
+        * 
+        * @return */
+       public Mat22 getTransform () {
+               return box.R;
+       }
+
+       /** Sets the transform of the viewport. Transforms about the center.
+        * 
+        * @param transform */
+       public void setTransform (Mat22 transform) {
+               box.R.set(transform);
+       }
+
+       /** Multiplies the obb transform by the given transform
+        * 
+        * @param argTransform */
+       public void mulByTransform (Mat22 argTransform) {
+               box.R.mulLocal(argTransform);
+       }
+
+       /** @see IViewportTransform#isYFlip() */
+       public boolean isYFlip () {
+               return yFlip;
+       }
+
+       /** @see IViewportTransform#setYFlip(boolean) */
+       public void setYFlip (boolean yFlip) {
+               this.yFlip = yFlip;
+       }
+
+       // djm pooling
+       private final Mat22 inv = new Mat22();
+
+       /** @see IViewportTransform#getScreenVectorToWorld(Vec2, Vec2) */
+       public void getScreenVectorToWorld (Vec2 argScreen, Vec2 argWorld) {
+               inv.set(box.R);
+               inv.invertLocal();
+               inv.mulToOut(argScreen, argWorld);
+               if (yFlip) {
+                       yFlipMatInv.mulToOut(argWorld, argWorld);
+               }
+       }
+
+       /** @see IViewportTransform#getWorldVectorToScreen(Vec2, Vec2) */
+       public void getWorldVectorToScreen (Vec2 argWorld, Vec2 argScreen) {
+               box.R.mulToOut(argWorld, argScreen);
+               if (yFlip) {
+                       yFlipMatInv.mulToOut(argScreen, argScreen);
+               }
+       }
+
+       /** @see IViewportTransform#getWorldToScreen(Vec2, Vec2) */
+       public void getWorldToScreen (Vec2 argWorld, Vec2 argScreen) {
+               argScreen.set(argWorld);
+               argScreen.subLocal(box.center);
+               box.R.mulToOut(argScreen, argScreen);
+               if (yFlip) {
+                       yFlipMat.mulToOut(argScreen, argScreen);
+               }
+               argScreen.addLocal(box.extents);
+       }
+
+       private final Mat22 inv2 = new Mat22();
+
+       /** @see IViewportTransform#getScreenToWorld(Vec2, Vec2) */
+       public void getScreenToWorld (Vec2 argScreen, Vec2 argWorld) {
+               argWorld.set(argScreen);
+               argWorld.subLocal(box.extents);
+               box.R.invertToOut(inv2);
+               inv2.mulToOut(argWorld, argWorld);
+               if (yFlip) {
+                       yFlipMatInv.mulToOut(argWorld, argWorld);
+               }
+               argWorld.addLocal(box.center);
+       }
 }
index ad787e8..cb99b97 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.common;
 
 // updated to rev 100
@@ -28,10 +29,10 @@ package org.jbox2d.common;
 public class RaycastResult {
        public float lambda = 0.0f;
        public final Vec2 normal = new Vec2();
-       
-       public RaycastResult set(RaycastResult argOther){
+
+       public RaycastResult set (RaycastResult argOther) {
                lambda = argOther.lambda;
-               normal.set( argOther.normal);
+               normal.set(argOther.normal);
                return this;
        }
 }
index 99ec095..2b9de69 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.common;\r
 \r
 import java.io.Serializable;\r
 \r
-/**\r
- * Represents a rotation\r
+/** Represents a rotation\r
  * \r
- * @author Daniel\r
- */\r
+ * @author Daniel */\r
 public class Rot implements Serializable {\r
-  private static final long serialVersionUID = 1L;\r
-\r
-  public float s, c; // sin and cos\r
-\r
-  public Rot() {\r
-    setIdentity();\r
-  }\r
-\r
-  public Rot(float angle) {\r
-    set(angle);\r
-  }\r
-\r
-  public float getSin() {\r
-    return s;\r
-  }\r
-\r
-  @Override\r
-  public String toString() {\r
-    return "Rot(s:" + s + ", c:" + c + ")";\r
-  }\r
-\r
-  public float getCos() {\r
-    return c;\r
-  }\r
-\r
-  public Rot set(float angle) {\r
-    s = MathUtils.sin(angle);\r
-    c = MathUtils.cos(angle);\r
-    return this;\r
-  }\r
-\r
-  public Rot set(Rot other) {\r
-    s = other.s;\r
-    c = other.c;\r
-    return this;\r
-  }\r
-\r
-  public Rot setIdentity() {\r
-    s = 0;\r
-    c = 1;\r
-    return this;\r
-  }\r
-\r
-  public float getAngle() {\r
-    return MathUtils.atan2(s, c);\r
-  }\r
-\r
-  public void getXAxis(Vec2 xAxis) {\r
-    xAxis.set(c, s);\r
-  }\r
-\r
-  public void getYAxis(Vec2 yAxis) {\r
-    yAxis.set(-s, c);\r
-  }\r
-\r
-  public Rot clone() {\r
-    Rot copy = new Rot();\r
-    copy.s = s;\r
-    copy.c = c;\r
-    return copy;\r
-  }\r
-\r
-  public static final void mul(Rot q, Rot r, Rot out) {\r
-    float tempc = q.c * r.c - q.s * r.s;\r
-    out.s = q.s * r.c + q.c * r.s;\r
-    out.c = tempc;\r
-  }\r
-\r
-  public static final void mulUnsafe(Rot q, Rot r, Rot out) {\r
-    assert (r != out);\r
-    assert (q != out);\r
-    // [qc -qs] * [rc -rs] = [qc*rc-qs*rs -qc*rs-qs*rc]\r
-    // [qs qc] [rs rc] [qs*rc+qc*rs -qs*rs+qc*rc]\r
-    // s = qs * rc + qc * rs\r
-    // c = qc * rc - qs * rs\r
-    out.s = q.s * r.c + q.c * r.s;\r
-    out.c = q.c * r.c - q.s * r.s;\r
-  }\r
-\r
-  public static final void mulTrans(Rot q, Rot r, Rot out) {\r
-    final float tempc = q.c * r.c + q.s * r.s;\r
-    out.s = q.c * r.s - q.s * r.c;\r
-    out.c = tempc;\r
-  }\r
-\r
-  public static final void mulTransUnsafe(Rot q, Rot r, Rot out) {\r
-    // [ qc qs] * [rc -rs] = [qc*rc+qs*rs -qc*rs+qs*rc]\r
-    // [-qs qc] [rs rc] [-qs*rc+qc*rs qs*rs+qc*rc]\r
-    // s = qc * rs - qs * rc\r
-    // c = qc * rc + qs * rs\r
-    out.s = q.c * r.s - q.s * r.c;\r
-    out.c = q.c * r.c + q.s * r.s;\r
-  }\r
-\r
-  public static final void mulToOut(Rot q, Vec2 v, Vec2 out) {\r
-    float tempy = q.s * v.x + q.c * v.y;\r
-    out.x = q.c * v.x - q.s * v.y;\r
-    out.y = tempy;\r
-  }\r
-\r
-  public static final void mulToOutUnsafe(Rot q, Vec2 v, Vec2 out) {\r
-    out.x = q.c * v.x - q.s * v.y;\r
-    out.y = q.s * v.x + q.c * v.y;\r
-  }\r
-\r
-  public static final void mulTrans(Rot q, Vec2 v, Vec2 out) {\r
-    final float tempy = -q.s * v.x + q.c * v.y;\r
-    out.x = q.c * v.x + q.s * v.y;\r
-    out.y = tempy;\r
-  }\r
-\r
-  public static final void mulTransUnsafe(Rot q, Vec2 v, Vec2 out) {\r
-    out.x = q.c * v.x + q.s * v.y;\r
-    out.y = -q.s * v.x + q.c * v.y;\r
-  }\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       public float s, c; // sin and cos\r
+\r
+       public Rot () {\r
+               setIdentity();\r
+       }\r
+\r
+       public Rot (float angle) {\r
+               set(angle);\r
+       }\r
+\r
+       public float getSin () {\r
+               return s;\r
+       }\r
+\r
+       @Override\r
+       public String toString () {\r
+               return "Rot(s:" + s + ", c:" + c + ")";\r
+       }\r
+\r
+       public float getCos () {\r
+               return c;\r
+       }\r
+\r
+       public Rot set (float angle) {\r
+               s = MathUtils.sin(angle);\r
+               c = MathUtils.cos(angle);\r
+               return this;\r
+       }\r
+\r
+       public Rot set (Rot other) {\r
+               s = other.s;\r
+               c = other.c;\r
+               return this;\r
+       }\r
+\r
+       public Rot setIdentity () {\r
+               s = 0;\r
+               c = 1;\r
+               return this;\r
+       }\r
+\r
+       public float getAngle () {\r
+               return MathUtils.atan2(s, c);\r
+       }\r
+\r
+       public void getXAxis (Vec2 xAxis) {\r
+               xAxis.set(c, s);\r
+       }\r
+\r
+       public void getYAxis (Vec2 yAxis) {\r
+               yAxis.set(-s, c);\r
+       }\r
+\r
+       public Rot clone () {\r
+               Rot copy = new Rot();\r
+               copy.s = s;\r
+               copy.c = c;\r
+               return copy;\r
+       }\r
+\r
+       public static final void mul (Rot q, Rot r, Rot out) {\r
+               float tempc = q.c * r.c - q.s * r.s;\r
+               out.s = q.s * r.c + q.c * r.s;\r
+               out.c = tempc;\r
+       }\r
+\r
+       public static final void mulUnsafe (Rot q, Rot r, Rot out) {\r
+               assert (r != out);\r
+               assert (q != out);\r
+               // [qc -qs] * [rc -rs] = [qc*rc-qs*rs -qc*rs-qs*rc]\r
+               // [qs qc] [rs rc] [qs*rc+qc*rs -qs*rs+qc*rc]\r
+               // s = qs * rc + qc * rs\r
+               // c = qc * rc - qs * rs\r
+               out.s = q.s * r.c + q.c * r.s;\r
+               out.c = q.c * r.c - q.s * r.s;\r
+       }\r
+\r
+       public static final void mulTrans (Rot q, Rot r, Rot out) {\r
+               final float tempc = q.c * r.c + q.s * r.s;\r
+               out.s = q.c * r.s - q.s * r.c;\r
+               out.c = tempc;\r
+       }\r
+\r
+       public static final void mulTransUnsafe (Rot q, Rot r, Rot out) {\r
+               // [ qc qs] * [rc -rs] = [qc*rc+qs*rs -qc*rs+qs*rc]\r
+               // [-qs qc] [rs rc] [-qs*rc+qc*rs qs*rs+qc*rc]\r
+               // s = qc * rs - qs * rc\r
+               // c = qc * rc + qs * rs\r
+               out.s = q.c * r.s - q.s * r.c;\r
+               out.c = q.c * r.c + q.s * r.s;\r
+       }\r
+\r
+       public static final void mulToOut (Rot q, Vec2 v, Vec2 out) {\r
+               float tempy = q.s * v.x + q.c * v.y;\r
+               out.x = q.c * v.x - q.s * v.y;\r
+               out.y = tempy;\r
+       }\r
+\r
+       public static final void mulToOutUnsafe (Rot q, Vec2 v, Vec2 out) {\r
+               out.x = q.c * v.x - q.s * v.y;\r
+               out.y = q.s * v.x + q.c * v.y;\r
+       }\r
+\r
+       public static final void mulTrans (Rot q, Vec2 v, Vec2 out) {\r
+               final float tempy = -q.s * v.x + q.c * v.y;\r
+               out.x = q.c * v.x + q.s * v.y;\r
+               out.y = tempy;\r
+       }\r
+\r
+       public static final void mulTransUnsafe (Rot q, Vec2 v, Vec2 out) {\r
+               out.x = q.c * v.x + q.s * v.y;\r
+               out.y = -q.s * v.x + q.c * v.y;\r
+       }\r
 }\r
index ec600e0..831782d 100644 (file)
 
 package org.jbox2d.common;
 
-/**
- * Global tuning constants based on MKS units and various integer maximums (vertices per shape,
- * pairs, etc.).
- */
+/** Global tuning constants based on MKS units and various integer maximums (vertices per shape, pairs, etc.). */
 public class Settings {
 
-  /** A "close to zero" float epsilon value for use */
-  public static final float EPSILON = 1.1920928955078125E-7f;
-
-  /** Pi. */
-  public static final float PI = (float) Math.PI;
-
-  // JBox2D specific settings
-  /**
-   * needs to be final, or will slow down math methods
-   */
-  public static final boolean FAST_MATH = true;
-  public static final int CONTACT_STACK_INIT_SIZE = 10;
-  public static final boolean SINCOS_LUT_ENABLED = true;
-  /**
-   * smaller the precision, the larger the table. If a small table is used (eg, precision is .006 or
-   * greater), make sure you set the table to lerp it's results. Accuracy chart is in the MathUtils
-   * source. Or, run the tests yourself in {@link SinCosTest}.</br> </br> Good lerp precision
-   * values:
-   * <ul>
-   * <li>.0092</li>
-   * <li>.008201</li>
-   * <li>.005904</li>
-   * <li>.005204</li>
-   * <li>.004305</li>
-   * <li>.002807</li>
-   * <li>.001508</li>
-   * <li>9.32500E-4</li>
-   * <li>7.48000E-4</li>
-   * <li>8.47000E-4</li>
-   * <li>.0005095</li>
-   * <li>.0001098</li>
-   * <li>9.50499E-5</li>
-   * <li>6.08500E-5</li>
-   * <li>3.07000E-5</li>
-   * <li>1.53999E-5</li>
-   * </ul>
-   */
-  public static final float SINCOS_LUT_PRECISION = .00011f;
-  public static final int SINCOS_LUT_LENGTH = (int) Math.ceil(Math.PI * 2 / SINCOS_LUT_PRECISION);
-  /**
-   * Use if the table's precision is large (eg .006 or greater). Although it is more expensive, it
-   * greatly increases accuracy. Look in the MathUtils source for some test results on the accuracy
-   * and speed of lerp vs non lerp. Or, run the tests yourself in {@link SinCosTest}.
-   */
-  public static final boolean SINCOS_LUT_LERP = false;
-
-
-  // Collision
-
-  /**
-   * The maximum number of contact points between two convex shapes.
-   */
-  public static final int maxManifoldPoints = 2;
-
-  /**
-   * The maximum number of vertices on a convex polygon.
-   */
-  public static final int maxPolygonVertices = 8;
-
-  /**
-   * This is used to fatten AABBs in the dynamic tree. This allows proxies to move by a small amount
-   * without triggering a tree adjustment. This is in meters.
-   */
-  public static final float aabbExtension = 0.1f;
-
-  /**
-   * This is used to fatten AABBs in the dynamic tree. This is used to predict the future position
-   * based on the current displacement. This is a dimensionless multiplier.
-   */
-  public static final float aabbMultiplier = 2.0f;
-
-  /**
-   * A small length used as a collision and constraint tolerance. Usually it is chosen to be
-   * numerically significant, but visually insignificant.
-   */
-  public static final float linearSlop = 0.005f;
-
-  /**
-   * A small angle used as a collision and constraint tolerance. Usually it is chosen to be
-   * numerically significant, but visually insignificant.
-   */
-  public static final float angularSlop = (2.0f / 180.0f * PI);
-
-  /**
-   * The radius of the polygon/edge shape skin. This should not be modified. Making this smaller
-   * means polygons will have and insufficient for continuous collision. Making it larger may create
-   * artifacts for vertex collision.
-   */
-  public static final float polygonRadius = (2.0f * linearSlop);
-
-  /** Maximum number of sub-steps per contact in continuous physics simulation. */
-  public static final int maxSubSteps = 8;
-
-  // Dynamics
-
-  /**
-   * Maximum number of contacts to be handled to solve a TOI island.
-   */
-  public static final int maxTOIContacts = 32;
-
-  /**
-   * A velocity threshold for elastic collisions. Any collision with a relative linear velocity
-   * below this threshold will be treated as inelastic.
-   */
-  public static float velocityThreshold = 1.0f;
-
-  /**
-   * The maximum linear position correction used when solving constraints. This helps to prevent
-   * overshoot.
-   */
-  public static final float maxLinearCorrection = 0.2f;
-
-  /**
-   * The maximum angular position correction used when solving constraints. This helps to prevent
-   * overshoot.
-   */
-  public static final float maxAngularCorrection = (8.0f / 180.0f * PI);
-
-  /**
-   * The maximum linear velocity of a body. This limit is very large and is used to prevent
-   * numerical problems. You shouldn't need to adjust this.
-   */
-  public static final float maxTranslation = 2.0f;
-  public static final float maxTranslationSquared = (maxTranslation * maxTranslation);
-
-  /**
-   * The maximum angular velocity of a body. This limit is very large and is used to prevent
-   * numerical problems. You shouldn't need to adjust this.
-   */
-  public static final float maxRotation = (0.5f * PI);
-  public static float maxRotationSquared = (maxRotation * maxRotation);
-
-  /**
-   * This scale factor controls how fast overlap is resolved. Ideally this would be 1 so that
-   * overlap is removed in one time step. However using values close to 1 often lead to overshoot.
-   */
-  public static final float baumgarte = 0.2f;
-  public static final float toiBaugarte = 0.75f;
-
-
-  // Sleep
-
-  /**
-   * The time that a body must be still before it will go to sleep.
-   */
-  public static final float timeToSleep = 0.5f;
-
-  /**
-   * A body cannot sleep if its linear velocity is above this tolerance.
-   */
-  public static final float linearSleepTolerance = 0.01f;
-
-  /**
-   * A body cannot sleep if its angular velocity is above this tolerance.
-   */
-  public static final float angularSleepTolerance = (2.0f / 180.0f * PI);
-
-  /**
-   * Friction mixing law. Feel free to customize this. TODO djm: add customization
-   * 
-   * @param friction1
-   * @param friction2
-   * @return
-   */
-  public static final float mixFriction(float friction1, float friction2) {
-    return MathUtils.sqrt(friction1 * friction2);
-  }
-
-  /**
-   * Restitution mixing law. Feel free to customize this. TODO djm: add customization
-   * 
-   * @param restitution1
-   * @param restitution2
-   * @return
-   */
-  public static final float mixRestitution(float restitution1, float restitution2) {
-    return restitution1 > restitution2 ? restitution1 : restitution2;
-  }
+       /** A "close to zero" float epsilon value for use */
+       public static final float EPSILON = 1.1920928955078125E-7f;
+
+       /** Pi. */
+       public static final float PI = (float)Math.PI;
+
+       // JBox2D specific settings
+       /** needs to be final, or will slow down math methods */
+       public static final boolean FAST_MATH = true;
+       public static final int CONTACT_STACK_INIT_SIZE = 10;
+       public static final boolean SINCOS_LUT_ENABLED = true;
+       /** smaller the precision, the larger the table. If a small table is used (eg, precision is .006 or greater), make sure you set
+        * the table to lerp it's results. Accuracy chart is in the MathUtils source. Or, run the tests yourself in {@link SinCosTest}
+        * .</br> </br> Good lerp precision values:
+        * <ul>
+        * <li>.0092</li>
+        * <li>.008201</li>
+        * <li>.005904</li>
+        * <li>.005204</li>
+        * <li>.004305</li>
+        * <li>.002807</li>
+        * <li>.001508</li>
+        * <li>9.32500E-4</li>
+        * <li>7.48000E-4</li>
+        * <li>8.47000E-4</li>
+        * <li>.0005095</li>
+        * <li>.0001098</li>
+        * <li>9.50499E-5</li>
+        * <li>6.08500E-5</li>
+        * <li>3.07000E-5</li>
+        * <li>1.53999E-5</li>
+        * </ul> */
+       public static final float SINCOS_LUT_PRECISION = .00011f;
+       public static final int SINCOS_LUT_LENGTH = (int)Math.ceil(Math.PI * 2 / SINCOS_LUT_PRECISION);
+       /** Use if the table's precision is large (eg .006 or greater). Although it is more expensive, it greatly increases accuracy.
+        * Look in the MathUtils source for some test results on the accuracy and speed of lerp vs non lerp. Or, run the tests yourself
+        * in {@link SinCosTest}. */
+       public static final boolean SINCOS_LUT_LERP = false;
+
+       // Collision
+
+       /** The maximum number of contact points between two convex shapes. */
+       public static final int maxManifoldPoints = 2;
+
+       /** The maximum number of vertices on a convex polygon. */
+       public static final int maxPolygonVertices = 8;
+
+       /** This is used to fatten AABBs in the dynamic tree. This allows proxies to move by a small amount without triggering a tree
+        * adjustment. This is in meters. */
+       public static final float aabbExtension = 0.1f;
+
+       /** This is used to fatten AABBs in the dynamic tree. This is used to predict the future position based on the current
+        * displacement. This is a dimensionless multiplier. */
+       public static final float aabbMultiplier = 2.0f;
+
+       /** A small length used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but
+        * visually insignificant. */
+       public static final float linearSlop = 0.005f;
+
+       /** A small angle used as a collision and constraint tolerance. Usually it is chosen to be numerically significant, but visually
+        * insignificant. */
+       public static final float angularSlop = (2.0f / 180.0f * PI);
+
+       /** The radius of the polygon/edge shape skin. This should not be modified. Making this smaller means polygons will have and
+        * insufficient for continuous collision. Making it larger may create artifacts for vertex collision. */
+       public static final float polygonRadius = (2.0f * linearSlop);
+
+       /** Maximum number of sub-steps per contact in continuous physics simulation. */
+       public static final int maxSubSteps = 8;
+
+       // Dynamics
+
+       /** Maximum number of contacts to be handled to solve a TOI island. */
+       public static final int maxTOIContacts = 32;
+
+       /** A velocity threshold for elastic collisions. Any collision with a relative linear velocity below this threshold will be
+        * treated as inelastic. */
+       public static float velocityThreshold = 1.0f;
+
+       /** The maximum linear position correction used when solving constraints. This helps to prevent overshoot. */
+       public static final float maxLinearCorrection = 0.2f;
+
+       /** The maximum angular position correction used when solving constraints. This helps to prevent overshoot. */
+       public static final float maxAngularCorrection = (8.0f / 180.0f * PI);
+
+       /** The maximum linear velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't
+        * need to adjust this. */
+       public static final float maxTranslation = 2.0f;
+       public static final float maxTranslationSquared = (maxTranslation * maxTranslation);
+
+       /** The maximum angular velocity of a body. This limit is very large and is used to prevent numerical problems. You shouldn't
+        * need to adjust this. */
+       public static final float maxRotation = (0.5f * PI);
+       public static float maxRotationSquared = (maxRotation * maxRotation);
+
+       /** This scale factor controls how fast overlap is resolved. Ideally this would be 1 so that overlap is removed in one time
+        * step. However using values close to 1 often lead to overshoot. */
+       public static final float baumgarte = 0.2f;
+       public static final float toiBaugarte = 0.75f;
+
+       // Sleep
+
+       /** The time that a body must be still before it will go to sleep. */
+       public static final float timeToSleep = 0.5f;
+
+       /** A body cannot sleep if its linear velocity is above this tolerance. */
+       public static final float linearSleepTolerance = 0.01f;
+
+       /** A body cannot sleep if its angular velocity is above this tolerance. */
+       public static final float angularSleepTolerance = (2.0f / 180.0f * PI);
+
+       /** Friction mixing law. Feel free to customize this. TODO djm: add customization
+        * 
+        * @param friction1
+        * @param friction2
+        * @return */
+       public static final float mixFriction (float friction1, float friction2) {
+               return MathUtils.sqrt(friction1 * friction2);
+       }
+
+       /** Restitution mixing law. Feel free to customize this. TODO djm: add customization
+        * 
+        * @param restitution1
+        * @param restitution2
+        * @return */
+       public static final float mixRestitution (float restitution1, float restitution2) {
+               return restitution1 > restitution2 ? restitution1 : restitution2;
+       }
 }
index 8a776b4..7f592f5 100644 (file)
@@ -26,98 +26,90 @@ package org.jbox2d.common;
 
 import java.io.Serializable;
 
-/**
- * This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to
- * the body origin, which may no coincide with the center of mass. However, to support dynamics we
- * must interpolate the center of mass position.
- */
+/** This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may no
+ * coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position. */
 public class Sweep implements Serializable {
-  private static final long serialVersionUID = 1L;
+       private static final long serialVersionUID = 1L;
 
-  /** Local center of mass position */
-  public final Vec2 localCenter;
-  /** Center world positions */
-  public final Vec2 c0, c;
-  /** World angles */
-  public float a0, a;
+       /** Local center of mass position */
+       public final Vec2 localCenter;
+       /** Center world positions */
+       public final Vec2 c0, c;
+       /** World angles */
+       public float a0, a;
 
-  /** Fraction of the current time step in the range [0,1] c0 and a0 are the positions at alpha0. */
-  public float alpha0;
+       /** Fraction of the current time step in the range [0,1] c0 and a0 are the positions at alpha0. */
+       public float alpha0;
 
-  public String toString() {
-    String s = "Sweep:\nlocalCenter: " + localCenter + "\n";
-    s += "c0: " + c0 + ", c: " + c + "\n";
-    s += "a0: " + a0 + ", a: " + a + "\n";
-    return s;
-  }
+       public String toString () {
+               String s = "Sweep:\nlocalCenter: " + localCenter + "\n";
+               s += "c0: " + c0 + ", c: " + c + "\n";
+               s += "a0: " + a0 + ", a: " + a + "\n";
+               return s;
+       }
 
-  public Sweep() {
-    localCenter = new Vec2();
-    c0 = new Vec2();
-    c = new Vec2();
-  }
+       public Sweep () {
+               localCenter = new Vec2();
+               c0 = new Vec2();
+               c = new Vec2();
+       }
 
-  public final void normalize() {
-    float d = MathUtils.TWOPI * MathUtils.floor(a0 / MathUtils.TWOPI);
-    a0 -= d;
-    a -= d;
-  }
+       public final void normalize () {
+               float d = MathUtils.TWOPI * MathUtils.floor(a0 / MathUtils.TWOPI);
+               a0 -= d;
+               a -= d;
+       }
 
-  public final Sweep set(Sweep argCloneFrom) {
-    localCenter.set(argCloneFrom.localCenter);
-    c0.set(argCloneFrom.c0);
-    c.set(argCloneFrom.c);
-    a0 = argCloneFrom.a0;
-    a = argCloneFrom.a;
-    return this;
-  }
+       public final Sweep set (Sweep argCloneFrom) {
+               localCenter.set(argCloneFrom.localCenter);
+               c0.set(argCloneFrom.c0);
+               c.set(argCloneFrom.c);
+               a0 = argCloneFrom.a0;
+               a = argCloneFrom.a;
+               return this;
+       }
 
-  /**
-   * Get the interpolated transform at a specific time.
-   * 
-   * @param xf the result is placed here - must not be null
-   * @param t the normalized time in [0,1].
-   */
-  public final void getTransform(final Transform xf, final float beta) {
-    assert (xf != null);
-    // if (xf == null)
-    // xf = new XForm();
-    // center = p + R * localCenter
-    /*
-     * if (1.0f - t0 > Settings.EPSILON) { float alpha = (t - t0) / (1.0f - t0); xf.position.x =
-     * (1.0f - alpha) * c0.x + alpha * c.x; xf.position.y = (1.0f - alpha) * c0.y + alpha * c.y;
-     * float angle = (1.0f - alpha) * a0 + alpha * a; xf.R.set(angle); } else { xf.position.set(c);
-     * xf.R.set(a); }
-     */
+       /** Get the interpolated transform at a specific time.
+        * 
+        * @param xf the result is placed here - must not be null
+        * @param t the normalized time in [0,1]. */
+       public final void getTransform (final Transform xf, final float beta) {
+               assert (xf != null);
+               // if (xf == null)
+               // xf = new XForm();
+               // center = p + R * localCenter
+               /*
+                * if (1.0f - t0 > Settings.EPSILON) { float alpha = (t - t0) / (1.0f - t0); xf.position.x = (1.0f - alpha) * c0.x + alpha *
+                * c.x; xf.position.y = (1.0f - alpha) * c0.y + alpha * c.y; float angle = (1.0f - alpha) * a0 + alpha * a; xf.R.set(angle);
+                * } else { xf.position.set(c); xf.R.set(a); }
+                */
 
-    xf.p.x = (1.0f - beta) * c0.x + beta * c.x;
-    xf.p.y = (1.0f - beta) * c0.y + beta * c.y;
-    // float angle = (1.0f - alpha) * a0 + alpha * a;
-    // xf.R.set(angle);
-    xf.q.set((1.0f - beta) * a0 + beta * a);
+               xf.p.x = (1.0f - beta) * c0.x + beta * c.x;
+               xf.p.y = (1.0f - beta) * c0.y + beta * c.y;
+               // float angle = (1.0f - alpha) * a0 + alpha * a;
+               // xf.R.set(angle);
+               xf.q.set((1.0f - beta) * a0 + beta * a);
 
-    // Shift to origin
-    //xf->p -= b2Mul(xf->q, localCenter);
-    final Rot q = xf.q;
-    xf.p.x -= q.c * localCenter.x - q.s * localCenter.y;
-    xf.p.y -= q.s * localCenter.x + q.c * localCenter.y;
-  }
+               // Shift to origin
+               // xf->p -= b2Mul(xf->q, localCenter);
+               final Rot q = xf.q;
+               xf.p.x -= q.c * localCenter.x - q.s * localCenter.y;
+               xf.p.y -= q.s * localCenter.x + q.c * localCenter.y;
+       }
 
-  /**
-   * Advance the sweep forward, yielding a new initial state.
-   * 
-   * @param alpha the new initial time.
-   */
-  public final void advance(final float alpha) {
-//    assert (alpha0 < 1f);
-//    // c0 = (1.0f - t) * c0 + t*c;
-//    float beta = (alpha - alpha0) / (1.0f - alpha0);
-//    c0.x = (1.0f - beta) * c0.x + beta * c.x;
-//    c0.y = (1.0f - beta) * c0.y + beta * c.y;
-//    a0 = (1.0f - beta) * a0 + beta * a;
-//    alpha0 = alpha;
-    c0.x = (1.0f - alpha) * c0.x + alpha * c.x;
-    c0.y = (1.0f - alpha) * c0.y + alpha * c.y;
-    a0 = (1.0f - alpha) * a0 + alpha * a;
-  }
+       /** Advance the sweep forward, yielding a new initial state.
+        * 
+        * @param alpha the new initial time. */
+       public final void advance (final float alpha) {
+// assert (alpha0 < 1f);
+// // c0 = (1.0f - t) * c0 + t*c;
+// float beta = (alpha - alpha0) / (1.0f - alpha0);
+// c0.x = (1.0f - beta) * c0.x + beta * c.x;
+// c0.y = (1.0f - beta) * c0.y + beta * c.y;
+// a0 = (1.0f - beta) * a0 + beta * a;
+// alpha0 = alpha;
+               c0.x = (1.0f - alpha) * c0.x + alpha * c.x;
+               c0.y = (1.0f - alpha) * c0.y + alpha * c.y;
+               a0 = (1.0f - alpha) * a0 + alpha * a;
+       }
 }
index a209014..f8e87ed 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.common;\r
 \r
 import com.badlogic.gdx.utils.TimeUtils;\r
 \r
-/**\r
- * Timer for profiling\r
+/** Timer for profiling\r
  * \r
- * @author Daniel\r
- */\r
+ * @author Daniel */\r
 public class Timer {\r
 \r
-  private long resetNanos;\r
+       private long resetNanos;\r
 \r
-  public Timer() {\r
-    reset();\r
-  }\r
+       public Timer () {\r
+               reset();\r
+       }\r
 \r
-  public void reset() {\r
-    resetNanos = TimeUtils.nanoTime();\r
-  }\r
+       public void reset () {\r
+               resetNanos = TimeUtils.nanoTime();\r
+       }\r
 \r
-  public float getMilliseconds() {\r
-    return (TimeUtils.nanoTime() - resetNanos) / 1000 * 1f / 1000;\r
-  }\r
+       public float getMilliseconds () {\r
+               return (TimeUtils.nanoTime() - resetNanos) / 1000 * 1f / 1000;\r
+       }\r
 }\r
index cb2e4fe..1912ec9 100644 (file)
@@ -28,153 +28,147 @@ import java.io.Serializable;
 
 // updated to rev 100
 
-/**
- * A transform contains translation and rotation. It is used to represent the position and
- * orientation of rigid frames.
- */
+/** A transform contains translation and rotation. It is used to represent the position and orientation of rigid frames. */
 public class Transform implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  /** The translation caused by the transform */
-  public final Vec2 p;
-
-  /** A matrix representing a rotation */
-  public final Rot q;
-
-  /** The default constructor. */
-  public Transform() {
-    p = new Vec2();
-    q = new Rot();
-  }
-
-  /** Initialize as a copy of another transform. */
-  public Transform(final Transform xf) {
-    p = xf.p.clone();
-    q = xf.q.clone();
-  }
-
-  /** Initialize using a position vector and a rotation matrix. */
-  public Transform(final Vec2 _position, final Rot _R) {
-    p = _position.clone();
-    q = _R.clone();
-  }
-
-  /** Set this to equal another transform. */
-  public final Transform set(final Transform xf) {
-    p.set(xf.p);
-    q.set(xf.q);
-    return this;
-  }
-
-  /**
-   * Set this based on the position and angle.
-   * 
-   * @param p
-   * @param angle
-   */
-  public final void set(Vec2 p, float angle) {
-    this.p.set(p);
-    q.set(angle);
-  }
-
-  /** Set this to the identity transform. */
-  public final void setIdentity() {
-    p.setZero();
-    q.setIdentity();
-  }
-
-  public final static Vec2 mul(final Transform T, final Vec2 v) {
-    return new Vec2((T.q.c * v.x - T.q.s * v.y) + T.p.x, (T.q.s * v.x + T.q.c * v.y) + T.p.y);
-  }
-
-  public final static void mulToOut(final Transform T, final Vec2 v, final Vec2 out) {
-    final float tempy = (T.q.s * v.x + T.q.c * v.y) + T.p.y;
-    out.x = (T.q.c * v.x - T.q.s * v.y) + T.p.x;
-    out.y = tempy;
-  }
-
-  public final static void mulToOutUnsafe(final Transform T, final Vec2 v, final Vec2 out) {
-    assert (v != out);
-    out.x = (T.q.c * v.x - T.q.s * v.y) + T.p.x;
-    out.y = (T.q.s * v.x + T.q.c * v.y) + T.p.y;
-  }
-
-  public final static Vec2 mulTrans(final Transform T, final Vec2 v) {
-    final float px = v.x - T.p.x;
-    final float py = v.y - T.p.y;
-    return new Vec2((T.q.c * px + T.q.s * py), (-T.q.s * px + T.q.c * py));
-  }
-
-  public final static void mulTransToOut(final Transform T, final Vec2 v, final Vec2 out) {
-    final float px = v.x - T.p.x;
-    final float py = v.y - T.p.y;
-    final float tempy = (-T.q.s * px + T.q.c * py);
-    out.x = (T.q.c * px + T.q.s * py);
-    out.y = tempy;
-  }
-  
-  public final static void mulTransToOutUnsafe(final Transform T, final Vec2 v, final Vec2 out) {
-    assert(v != out);
-    final float px = v.x - T.p.x;
-    final float py = v.y - T.p.y;
-    out.x = (T.q.c * px + T.q.s * py);
-    out.y = (-T.q.s * px + T.q.c * py);
-  }
-
-  public final static Transform mul(final Transform A, final Transform B) {
-    Transform C = new Transform();
-    Rot.mulUnsafe(A.q, B.q, C.q);
-    Rot.mulToOutUnsafe(A.q, B.p, C.p);
-    C.p.addLocal(A.p);
-    return C;
-  }
-
-  public final static void mulToOut(final Transform A, final Transform B, final Transform out) {
-    assert (out != A);
-    Rot.mul(A.q, B.q, out.q);
-    Rot.mulToOut(A.q, B.p, out.p);
-    out.p.addLocal(A.p);
-  }
-
-  public final static void mulToOutUnsafe(final Transform A, final Transform B, final Transform out) {
-    assert (out != B);
-    assert (out != A);
-    Rot.mulUnsafe(A.q, B.q, out.q);
-    Rot.mulToOutUnsafe(A.q, B.p, out.p);
-    out.p.addLocal(A.p);
-  }
-
-  private static Vec2 pool = new Vec2();
-
-  public final static Transform mulTrans(final Transform A, final Transform B) {
-    Transform C = new Transform();
-    Rot.mulTransUnsafe(A.q, B.q, C.q);
-    pool.set(B.p).subLocal(A.p);
-    Rot.mulTransUnsafe(A.q, pool, C.p);
-    return C;
-  }
-
-  public final static void mulTransToOut(final Transform A, final Transform B, final Transform out) {
-    assert (out != A);
-    Rot.mulTrans(A.q, B.q, out.q);
-    pool.set(B.p).subLocal(A.p);
-    Rot.mulTrans(A.q, pool, out.p);
-  }
-
-  public final static void mulTransToOutUnsafe(final Transform A, final Transform B,
-      final Transform out) {
-    assert (out != A);
-    assert (out != B);
-    Rot.mulTransUnsafe(A.q, B.q, out.q);
-    pool.set(B.p).subLocal(A.p);
-    Rot.mulTransUnsafe(A.q, pool, out.p);
-  }
-
-  @Override
-  public final String toString() {
-    String s = "XForm:\n";
-    s += "Position: " + p + "\n";
-    s += "R: \n" + q + "\n";
-    return s;
-  }
+       private static final long serialVersionUID = 1L;
+
+       /** The translation caused by the transform */
+       public final Vec2 p;
+
+       /** A matrix representing a rotation */
+       public final Rot q;
+
+       /** The default constructor. */
+       public Transform () {
+               p = new Vec2();
+               q = new Rot();
+       }
+
+       /** Initialize as a copy of another transform. */
+       public Transform (final Transform xf) {
+               p = xf.p.clone();
+               q = xf.q.clone();
+       }
+
+       /** Initialize using a position vector and a rotation matrix. */
+       public Transform (final Vec2 _position, final Rot _R) {
+               p = _position.clone();
+               q = _R.clone();
+       }
+
+       /** Set this to equal another transform. */
+       public final Transform set (final Transform xf) {
+               p.set(xf.p);
+               q.set(xf.q);
+               return this;
+       }
+
+       /** Set this based on the position and angle.
+        * 
+        * @param p
+        * @param angle */
+       public final void set (Vec2 p, float angle) {
+               this.p.set(p);
+               q.set(angle);
+       }
+
+       /** Set this to the identity transform. */
+       public final void setIdentity () {
+               p.setZero();
+               q.setIdentity();
+       }
+
+       public final static Vec2 mul (final Transform T, final Vec2 v) {
+               return new Vec2((T.q.c * v.x - T.q.s * v.y) + T.p.x, (T.q.s * v.x + T.q.c * v.y) + T.p.y);
+       }
+
+       public final static void mulToOut (final Transform T, final Vec2 v, final Vec2 out) {
+               final float tempy = (T.q.s * v.x + T.q.c * v.y) + T.p.y;
+               out.x = (T.q.c * v.x - T.q.s * v.y) + T.p.x;
+               out.y = tempy;
+       }
+
+       public final static void mulToOutUnsafe (final Transform T, final Vec2 v, final Vec2 out) {
+               assert (v != out);
+               out.x = (T.q.c * v.x - T.q.s * v.y) + T.p.x;
+               out.y = (T.q.s * v.x + T.q.c * v.y) + T.p.y;
+       }
+
+       public final static Vec2 mulTrans (final Transform T, final Vec2 v) {
+               final float px = v.x - T.p.x;
+               final float py = v.y - T.p.y;
+               return new Vec2((T.q.c * px + T.q.s * py), (-T.q.s * px + T.q.c * py));
+       }
+
+       public final static void mulTransToOut (final Transform T, final Vec2 v, final Vec2 out) {
+               final float px = v.x - T.p.x;
+               final float py = v.y - T.p.y;
+               final float tempy = (-T.q.s * px + T.q.c * py);
+               out.x = (T.q.c * px + T.q.s * py);
+               out.y = tempy;
+       }
+
+       public final static void mulTransToOutUnsafe (final Transform T, final Vec2 v, final Vec2 out) {
+               assert (v != out);
+               final float px = v.x - T.p.x;
+               final float py = v.y - T.p.y;
+               out.x = (T.q.c * px + T.q.s * py);
+               out.y = (-T.q.s * px + T.q.c * py);
+       }
+
+       public final static Transform mul (final Transform A, final Transform B) {
+               Transform C = new Transform();
+               Rot.mulUnsafe(A.q, B.q, C.q);
+               Rot.mulToOutUnsafe(A.q, B.p, C.p);
+               C.p.addLocal(A.p);
+               return C;
+       }
+
+       public final static void mulToOut (final Transform A, final Transform B, final Transform out) {
+               assert (out != A);
+               Rot.mul(A.q, B.q, out.q);
+               Rot.mulToOut(A.q, B.p, out.p);
+               out.p.addLocal(A.p);
+       }
+
+       public final static void mulToOutUnsafe (final Transform A, final Transform B, final Transform out) {
+               assert (out != B);
+               assert (out != A);
+               Rot.mulUnsafe(A.q, B.q, out.q);
+               Rot.mulToOutUnsafe(A.q, B.p, out.p);
+               out.p.addLocal(A.p);
+       }
+
+       private static Vec2 pool = new Vec2();
+
+       public final static Transform mulTrans (final Transform A, final Transform B) {
+               Transform C = new Transform();
+               Rot.mulTransUnsafe(A.q, B.q, C.q);
+               pool.set(B.p).subLocal(A.p);
+               Rot.mulTransUnsafe(A.q, pool, C.p);
+               return C;
+       }
+
+       public final static void mulTransToOut (final Transform A, final Transform B, final Transform out) {
+               assert (out != A);
+               Rot.mulTrans(A.q, B.q, out.q);
+               pool.set(B.p).subLocal(A.p);
+               Rot.mulTrans(A.q, pool, out.p);
+       }
+
+       public final static void mulTransToOutUnsafe (final Transform A, final Transform B, final Transform out) {
+               assert (out != A);
+               assert (out != B);
+               Rot.mulTransUnsafe(A.q, B.q, out.q);
+               pool.set(B.p).subLocal(A.p);
+               Rot.mulTransUnsafe(A.q, pool, out.p);
+       }
+
+       @Override
+       public final String toString () {
+               String s = "XForm:\n";
+               s += "Position: " + p + "\n";
+               s += "R: \n" + q + "\n";
+               return s;
+       }
 }
index 4d0effc..2af1160 100644 (file)
@@ -28,262 +28,254 @@ import java.io.Serializable;
 
 import com.badlogic.gdx.utils.NumberUtils;
 
-/**
- * A 2D column vector
- */
+/** A 2D column vector */
 public class Vec2 implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  public float x, y;
-
-  public Vec2() {
-    this(0, 0);
-  }
-
-  public Vec2(float x, float y) {
-    this.x = x;
-    this.y = y;
-  }
-
-  public Vec2(Vec2 toCopy) {
-    this(toCopy.x, toCopy.y);
-  }
-
-  /** Zero out this vector. */
-  public final void setZero() {
-    x = 0.0f;
-    y = 0.0f;
-  }
-
-  /** Set the vector component-wise. */
-  public final Vec2 set(float x, float y) {
-    this.x = x;
-    this.y = y;
-    return this;
-  }
-
-  /** Set this vector to another vector. */
-  public final Vec2 set(Vec2 v) {
-    this.x = v.x;
-    this.y = v.y;
-    return this;
-  }
-
-  /** Return the sum of this vector and another; does not alter either one. */
-  public final Vec2 add(Vec2 v) {
-    return new Vec2(x + v.x, y + v.y);
-  }
-
-
-
-  /** Return the difference of this vector and another; does not alter either one. */
-  public final Vec2 sub(Vec2 v) {
-    return new Vec2(x - v.x, y - v.y);
-  }
-
-  /** Return this vector multiplied by a scalar; does not alter this vector. */
-  public final Vec2 mul(float a) {
-    return new Vec2(x * a, y * a);
-  }
-
-  /** Return the negation of this vector; does not alter this vector. */
-  public final Vec2 negate() {
-    return new Vec2(-x, -y);
-  }
-
-  /** Flip the vector and return it - alters this vector. */
-  public final Vec2 negateLocal() {
-    x = -x;
-    y = -y;
-    return this;
-  }
-
-  /** Add another vector to this one and returns result - alters this vector. */
-  public final Vec2 addLocal(Vec2 v) {
-    x += v.x;
-    y += v.y;
-    return this;
-  }
-
-  /** Adds values to this vector and returns result - alters this vector. */
-  public final Vec2 addLocal(float x, float y) {
-    this.x += x;
-    this.y += y;
-    return this;
-  }
-
-  /** Subtract another vector from this one and return result - alters this vector. */
-  public final Vec2 subLocal(Vec2 v) {
-    x -= v.x;
-    y -= v.y;
-    return this;
-  }
-
-  /** Multiply this vector by a number and return result - alters this vector. */
-  public final Vec2 mulLocal(float a) {
-    x *= a;
-    y *= a;
-    return this;
-  }
-
-  /** Get the skew vector such that dot(skew_vec, other) == cross(vec, other) */
-  public final Vec2 skew() {
-    return new Vec2(-y, x);
-  }
-
-  /** Get the skew vector such that dot(skew_vec, other) == cross(vec, other) */
-  public final void skew(Vec2 out) {
-    out.x = -y;
-    out.y = x;
-  }
-
-  /** Return the length of this vector. */
-  public final float length() {
-    return MathUtils.sqrt(x * x + y * y);
-  }
-
-  /** Return the squared length of this vector. */
-  public final float lengthSquared() {
-    return (x * x + y * y);
-  }
-
-  /** Normalize this vector and return the length before normalization. Alters this vector. */
-  public final float normalize() {
-    float length = length();
-    if (length < Settings.EPSILON) {
-      return 0f;
-    }
-
-    float invLength = 1.0f / length;
-    x *= invLength;
-    y *= invLength;
-    return length;
-  }
-
-  /** True if the vector represents a pair of valid, non-infinite floating point numbers. */
-  public final boolean isValid() {
-    return !Float.isNaN(x) && !Float.isInfinite(x) && !Float.isNaN(y) && !Float.isInfinite(y);
-  }
-
-  /** Return a new vector that has positive components. */
-  public final Vec2 abs() {
-    return new Vec2(MathUtils.abs(x), MathUtils.abs(y));
-  }
-
-  public final void absLocal() {
-    x = MathUtils.abs(x);
-    y = MathUtils.abs(y);
-  }
-
-  /** Return a copy of this vector. */
-  public final Vec2 clone() {
-    return new Vec2(x, y);
-  }
-
-  @Override
-  public final String toString() {
-    return "(" + x + "," + y + ")";
-  }
-
-  /*
-   * Static
-   */
-
-  public final static Vec2 abs(Vec2 a) {
-    return new Vec2(MathUtils.abs(a.x), MathUtils.abs(a.y));
-  }
-
-  public final static void absToOut(Vec2 a, Vec2 out) {
-    out.x = MathUtils.abs(a.x);
-    out.y = MathUtils.abs(a.y);
-  }
-
-  public final static float dot(Vec2 a, Vec2 b) {
-    return a.x * b.x + a.y * b.y;
-  }
-
-  public final static float cross(Vec2 a, Vec2 b) {
-    return a.x * b.y - a.y * b.x;
-  }
-
-  public final static Vec2 cross(Vec2 a, float s) {
-    return new Vec2(s * a.y, -s * a.x);
-  }
-
-  public final static void crossToOut(Vec2 a, float s, Vec2 out) {
-    final float tempy = -s * a.x;
-    out.x = s * a.y;
-    out.y = tempy;
-  }
-
-  public final static void crossToOutUnsafe(Vec2 a, float s, Vec2 out) {
-    assert (out != a);
-    out.x = s * a.y;
-    out.y = -s * a.x;
-  }
-
-  public final static Vec2 cross(float s, Vec2 a) {
-    return new Vec2(-s * a.y, s * a.x);
-  }
-
-  public final static void crossToOut(float s, Vec2 a, Vec2 out) {
-    final float tempY = s * a.x;
-    out.x = -s * a.y;
-    out.y = tempY;
-  }
-
-  public final static void crossToOutUnsafe(float s, Vec2 a, Vec2 out) {
-    assert (out != a);
-    out.x = -s * a.y;
-    out.y = s * a.x;
-  }
-
-  public final static void negateToOut(Vec2 a, Vec2 out) {
-    out.x = -a.x;
-    out.y = -a.y;
-  }
-
-  public final static Vec2 min(Vec2 a, Vec2 b) {
-    return new Vec2(a.x < b.x ? a.x : b.x, a.y < b.y ? a.y : b.y);
-  }
-
-  public final static Vec2 max(Vec2 a, Vec2 b) {
-    return new Vec2(a.x > b.x ? a.x : b.x, a.y > b.y ? a.y : b.y);
-  }
-
-  public final static void minToOut(Vec2 a, Vec2 b, Vec2 out) {
-    out.x = a.x < b.x ? a.x : b.x;
-    out.y = a.y < b.y ? a.y : b.y;
-  }
-
-  public final static void maxToOut(Vec2 a, Vec2 b, Vec2 out) {
-    out.x = a.x > b.x ? a.x : b.x;
-    out.y = a.y > b.y ? a.y : b.y;
-  }
-
-  /**
-   * @see java.lang.Object#hashCode()
-   */
-  @Override
-  public int hashCode() { // automatically generated by Eclipse
-    final int prime = 31;
-    int result = 1;
-    result = prime * result + NumberUtils.floatToIntBits(x);
-    result = prime * result + NumberUtils.floatToIntBits(y);
-    return result;
-  }
-
-  /**
-   * @see java.lang.Object#equals(java.lang.Object)
-   */
-  @Override
-  public boolean equals(Object obj) { // automatically generated by Eclipse
-    if (this == obj) return true;
-    if (obj == null) return false;
-    if (getClass() != obj.getClass()) return false;
-    Vec2 other = (Vec2) obj;
-    if (NumberUtils.floatToIntBits(x) != NumberUtils.floatToIntBits(other.x)) return false;
-    if (NumberUtils.floatToIntBits(y) != NumberUtils.floatToIntBits(other.y)) return false;
-    return true;
-  }
+       private static final long serialVersionUID = 1L;
+
+       public float x, y;
+
+       public Vec2 () {
+               this(0, 0);
+       }
+
+       public Vec2 (float x, float y) {
+               this.x = x;
+               this.y = y;
+       }
+
+       public Vec2 (Vec2 toCopy) {
+               this(toCopy.x, toCopy.y);
+       }
+
+       /** Zero out this vector. */
+       public final void setZero () {
+               x = 0.0f;
+               y = 0.0f;
+       }
+
+       /** Set the vector component-wise. */
+       public final Vec2 set (float x, float y) {
+               this.x = x;
+               this.y = y;
+               return this;
+       }
+
+       /** Set this vector to another vector. */
+       public final Vec2 set (Vec2 v) {
+               this.x = v.x;
+               this.y = v.y;
+               return this;
+       }
+
+       /** Return the sum of this vector and another; does not alter either one. */
+       public final Vec2 add (Vec2 v) {
+               return new Vec2(x + v.x, y + v.y);
+       }
+
+       /** Return the difference of this vector and another; does not alter either one. */
+       public final Vec2 sub (Vec2 v) {
+               return new Vec2(x - v.x, y - v.y);
+       }
+
+       /** Return this vector multiplied by a scalar; does not alter this vector. */
+       public final Vec2 mul (float a) {
+               return new Vec2(x * a, y * a);
+       }
+
+       /** Return the negation of this vector; does not alter this vector. */
+       public final Vec2 negate () {
+               return new Vec2(-x, -y);
+       }
+
+       /** Flip the vector and return it - alters this vector. */
+       public final Vec2 negateLocal () {
+               x = -x;
+               y = -y;
+               return this;
+       }
+
+       /** Add another vector to this one and returns result - alters this vector. */
+       public final Vec2 addLocal (Vec2 v) {
+               x += v.x;
+               y += v.y;
+               return this;
+       }
+
+       /** Adds values to this vector and returns result - alters this vector. */
+       public final Vec2 addLocal (float x, float y) {
+               this.x += x;
+               this.y += y;
+               return this;
+       }
+
+       /** Subtract another vector from this one and return result - alters this vector. */
+       public final Vec2 subLocal (Vec2 v) {
+               x -= v.x;
+               y -= v.y;
+               return this;
+       }
+
+       /** Multiply this vector by a number and return result - alters this vector. */
+       public final Vec2 mulLocal (float a) {
+               x *= a;
+               y *= a;
+               return this;
+       }
+
+       /** Get the skew vector such that dot(skew_vec, other) == cross(vec, other) */
+       public final Vec2 skew () {
+               return new Vec2(-y, x);
+       }
+
+       /** Get the skew vector such that dot(skew_vec, other) == cross(vec, other) */
+       public final void skew (Vec2 out) {
+               out.x = -y;
+               out.y = x;
+       }
+
+       /** Return the length of this vector. */
+       public final float length () {
+               return MathUtils.sqrt(x * x + y * y);
+       }
+
+       /** Return the squared length of this vector. */
+       public final float lengthSquared () {
+               return (x * x + y * y);
+       }
+
+       /** Normalize this vector and return the length before normalization. Alters this vector. */
+       public final float normalize () {
+               float length = length();
+               if (length < Settings.EPSILON) {
+                       return 0f;
+               }
+
+               float invLength = 1.0f / length;
+               x *= invLength;
+               y *= invLength;
+               return length;
+       }
+
+       /** True if the vector represents a pair of valid, non-infinite floating point numbers. */
+       public final boolean isValid () {
+               return !Float.isNaN(x) && !Float.isInfinite(x) && !Float.isNaN(y) && !Float.isInfinite(y);
+       }
+
+       /** Return a new vector that has positive components. */
+       public final Vec2 abs () {
+               return new Vec2(MathUtils.abs(x), MathUtils.abs(y));
+       }
+
+       public final void absLocal () {
+               x = MathUtils.abs(x);
+               y = MathUtils.abs(y);
+       }
+
+       /** Return a copy of this vector. */
+       public final Vec2 clone () {
+               return new Vec2(x, y);
+       }
+
+       @Override
+       public final String toString () {
+               return "(" + x + "," + y + ")";
+       }
+
+       /*
+        * Static
+        */
+
+       public final static Vec2 abs (Vec2 a) {
+               return new Vec2(MathUtils.abs(a.x), MathUtils.abs(a.y));
+       }
+
+       public final static void absToOut (Vec2 a, Vec2 out) {
+               out.x = MathUtils.abs(a.x);
+               out.y = MathUtils.abs(a.y);
+       }
+
+       public final static float dot (Vec2 a, Vec2 b) {
+               return a.x * b.x + a.y * b.y;
+       }
+
+       public final static float cross (Vec2 a, Vec2 b) {
+               return a.x * b.y - a.y * b.x;
+       }
+
+       public final static Vec2 cross (Vec2 a, float s) {
+               return new Vec2(s * a.y, -s * a.x);
+       }
+
+       public final static void crossToOut (Vec2 a, float s, Vec2 out) {
+               final float tempy = -s * a.x;
+               out.x = s * a.y;
+               out.y = tempy;
+       }
+
+       public final static void crossToOutUnsafe (Vec2 a, float s, Vec2 out) {
+               assert (out != a);
+               out.x = s * a.y;
+               out.y = -s * a.x;
+       }
+
+       public final static Vec2 cross (float s, Vec2 a) {
+               return new Vec2(-s * a.y, s * a.x);
+       }
+
+       public final static void crossToOut (float s, Vec2 a, Vec2 out) {
+               final float tempY = s * a.x;
+               out.x = -s * a.y;
+               out.y = tempY;
+       }
+
+       public final static void crossToOutUnsafe (float s, Vec2 a, Vec2 out) {
+               assert (out != a);
+               out.x = -s * a.y;
+               out.y = s * a.x;
+       }
+
+       public final static void negateToOut (Vec2 a, Vec2 out) {
+               out.x = -a.x;
+               out.y = -a.y;
+       }
+
+       public final static Vec2 min (Vec2 a, Vec2 b) {
+               return new Vec2(a.x < b.x ? a.x : b.x, a.y < b.y ? a.y : b.y);
+       }
+
+       public final static Vec2 max (Vec2 a, Vec2 b) {
+               return new Vec2(a.x > b.x ? a.x : b.x, a.y > b.y ? a.y : b.y);
+       }
+
+       public final static void minToOut (Vec2 a, Vec2 b, Vec2 out) {
+               out.x = a.x < b.x ? a.x : b.x;
+               out.y = a.y < b.y ? a.y : b.y;
+       }
+
+       public final static void maxToOut (Vec2 a, Vec2 b, Vec2 out) {
+               out.x = a.x > b.x ? a.x : b.x;
+               out.y = a.y > b.y ? a.y : b.y;
+       }
+
+       /** @see java.lang.Object#hashCode() */
+       @Override
+       public int hashCode () { // automatically generated by Eclipse
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + NumberUtils.floatToIntBits(x);
+               result = prime * result + NumberUtils.floatToIntBits(y);
+               return result;
+       }
+
+       /** @see java.lang.Object#equals(java.lang.Object) */
+       @Override
+       public boolean equals (Object obj) { // automatically generated by Eclipse
+               if (this == obj) return true;
+               if (obj == null) return false;
+               if (getClass() != obj.getClass()) return false;
+               Vec2 other = (Vec2)obj;
+               if (NumberUtils.floatToIntBits(x) != NumberUtils.floatToIntBits(other.x)) return false;
+               if (NumberUtils.floatToIntBits(y) != NumberUtils.floatToIntBits(other.y)) return false;
+               return true;
+       }
 }
index dd71915..5b98615 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.common;
 
 import java.io.Serializable;
 
 import com.badlogic.gdx.utils.NumberUtils;
 
-/**
- * @author Daniel Murphy
- */
+/** @author Daniel Murphy */
 public class Vec3 implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  public float x, y, z;
-
-  public Vec3() {
-    x = y = z = 0f;
-  }
-
-  public Vec3(float argX, float argY, float argZ) {
-    x = argX;
-    y = argY;
-    z = argZ;
-  }
-
-  public Vec3(Vec3 argCopy) {
-    x = argCopy.x;
-    y = argCopy.y;
-    z = argCopy.z;
-  }
-
-  public Vec3 set(Vec3 argVec) {
-    x = argVec.x;
-    y = argVec.y;
-    z = argVec.z;
-    return this;
-  }
-
-  public Vec3 set(float argX, float argY, float argZ) {
-    x = argX;
-    y = argY;
-    z = argZ;
-    return this;
-  }
-
-  public Vec3 addLocal(Vec3 argVec) {
-    x += argVec.x;
-    y += argVec.y;
-    z += argVec.z;
-    return this;
-  }
-
-  public Vec3 add(Vec3 argVec) {
-    return new Vec3(x + argVec.x, y + argVec.y, z + argVec.z);
-  }
-
-  public Vec3 subLocal(Vec3 argVec) {
-    x -= argVec.x;
-    y -= argVec.y;
-    z -= argVec.z;
-    return this;
-  }
-
-  public Vec3 sub(Vec3 argVec) {
-    return new Vec3(x - argVec.x, y - argVec.y, z - argVec.z);
-  }
-
-  public Vec3 mulLocal(float argScalar) {
-    x *= argScalar;
-    y *= argScalar;
-    z *= argScalar;
-    return this;
-  }
-
-  public Vec3 mul(float argScalar) {
-    return new Vec3(x * argScalar, y * argScalar, z * argScalar);
-  }
-
-  public Vec3 negate() {
-    return new Vec3(-x, -y, -z);
-  }
-
-  public Vec3 negateLocal() {
-    x = -x;
-    y = -y;
-    z = -z;
-    return this;
-  }
-
-  public void setZero() {
-    x = 0;
-    y = 0;
-    z = 0;
-  }
-
-  public Vec3 clone() {
-    return new Vec3(this);
-  }
-
-  public String toString() {
-    return "(" + x + "," + y + "," + z + ")";
-  }
-
-  @Override
-  public int hashCode() {
-    final int prime = 31;
-    int result = 1;
-    result = prime * result + NumberUtils.floatToIntBits(x);
-    result = prime * result + NumberUtils.floatToIntBits(y);
-    result = prime * result + NumberUtils.floatToIntBits(z);
-    return result;
-  }
-
-  @Override
-  public boolean equals(Object obj) {
-    if (this == obj) return true;
-    if (obj == null) return false;
-    if (getClass() != obj.getClass()) return false;
-    Vec3 other = (Vec3) obj;
-    if (NumberUtils.floatToIntBits(x) != NumberUtils.floatToIntBits(other.x)) return false;
-    if (NumberUtils.floatToIntBits(y) != NumberUtils.floatToIntBits(other.y)) return false;
-    if (NumberUtils.floatToIntBits(z) != NumberUtils.floatToIntBits(other.z)) return false;
-    return true;
-  }
-
-  public final static float dot(Vec3 a, Vec3 b) {
-    return a.x * b.x + a.y * b.y + a.z * b.z;
-  }
-
-  public final static Vec3 cross(Vec3 a, Vec3 b) {
-    return new Vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);
-  }
-
-  public final static void crossToOut(Vec3 a, Vec3 b, Vec3 out) {
-    final float tempy = a.z * b.x - a.x * b.z;
-    final float tempz = a.x * b.y - a.y * b.x;
-    out.x = a.y * b.z - a.z * b.y;
-    out.y = tempy;
-    out.z = tempz;
-  }
-  
-  public final static void crossToOutUnsafe(Vec3 a, Vec3 b, Vec3 out) {
-    assert(out != b);
-    assert(out != a);
-    out.x = a.y * b.z - a.z * b.y;
-    out.y = a.z * b.x - a.x * b.z;
-    out.z = a.x * b.y - a.y * b.x;
-  }
+       private static final long serialVersionUID = 1L;
+
+       public float x, y, z;
+
+       public Vec3 () {
+               x = y = z = 0f;
+       }
+
+       public Vec3 (float argX, float argY, float argZ) {
+               x = argX;
+               y = argY;
+               z = argZ;
+       }
+
+       public Vec3 (Vec3 argCopy) {
+               x = argCopy.x;
+               y = argCopy.y;
+               z = argCopy.z;
+       }
+
+       public Vec3 set (Vec3 argVec) {
+               x = argVec.x;
+               y = argVec.y;
+               z = argVec.z;
+               return this;
+       }
+
+       public Vec3 set (float argX, float argY, float argZ) {
+               x = argX;
+               y = argY;
+               z = argZ;
+               return this;
+       }
+
+       public Vec3 addLocal (Vec3 argVec) {
+               x += argVec.x;
+               y += argVec.y;
+               z += argVec.z;
+               return this;
+       }
+
+       public Vec3 add (Vec3 argVec) {
+               return new Vec3(x + argVec.x, y + argVec.y, z + argVec.z);
+       }
+
+       public Vec3 subLocal (Vec3 argVec) {
+               x -= argVec.x;
+               y -= argVec.y;
+               z -= argVec.z;
+               return this;
+       }
+
+       public Vec3 sub (Vec3 argVec) {
+               return new Vec3(x - argVec.x, y - argVec.y, z - argVec.z);
+       }
+
+       public Vec3 mulLocal (float argScalar) {
+               x *= argScalar;
+               y *= argScalar;
+               z *= argScalar;
+               return this;
+       }
+
+       public Vec3 mul (float argScalar) {
+               return new Vec3(x * argScalar, y * argScalar, z * argScalar);
+       }
+
+       public Vec3 negate () {
+               return new Vec3(-x, -y, -z);
+       }
+
+       public Vec3 negateLocal () {
+               x = -x;
+               y = -y;
+               z = -z;
+               return this;
+       }
+
+       public void setZero () {
+               x = 0;
+               y = 0;
+               z = 0;
+       }
+
+       public Vec3 clone () {
+               return new Vec3(this);
+       }
+
+       public String toString () {
+               return "(" + x + "," + y + "," + z + ")";
+       }
+
+       @Override
+       public int hashCode () {
+               final int prime = 31;
+               int result = 1;
+               result = prime * result + NumberUtils.floatToIntBits(x);
+               result = prime * result + NumberUtils.floatToIntBits(y);
+               result = prime * result + NumberUtils.floatToIntBits(z);
+               return result;
+       }
+
+       @Override
+       public boolean equals (Object obj) {
+               if (this == obj) return true;
+               if (obj == null) return false;
+               if (getClass() != obj.getClass()) return false;
+               Vec3 other = (Vec3)obj;
+               if (NumberUtils.floatToIntBits(x) != NumberUtils.floatToIntBits(other.x)) return false;
+               if (NumberUtils.floatToIntBits(y) != NumberUtils.floatToIntBits(other.y)) return false;
+               if (NumberUtils.floatToIntBits(z) != NumberUtils.floatToIntBits(other.z)) return false;
+               return true;
+       }
+
+       public final static float dot (Vec3 a, Vec3 b) {
+               return a.x * b.x + a.y * b.y + a.z * b.z;
+       }
+
+       public final static Vec3 cross (Vec3 a, Vec3 b) {
+               return new Vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x);
+       }
+
+       public final static void crossToOut (Vec3 a, Vec3 b, Vec3 out) {
+               final float tempy = a.z * b.x - a.x * b.z;
+               final float tempz = a.x * b.y - a.y * b.x;
+               out.x = a.y * b.z - a.z * b.y;
+               out.y = tempy;
+               out.z = tempz;
+       }
+
+       public final static void crossToOutUnsafe (Vec3 a, Vec3 b, Vec3 out) {
+               assert (out != b);
+               assert (out != a);
+               out.x = a.y * b.z - a.z * b.y;
+               out.y = a.z * b.x - a.x * b.z;
+               out.z = a.x * b.y - a.y * b.x;
+       }
 }
index 7574ce1..c4ff080 100644 (file)
@@ -16,6 +16,7 @@
  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
  * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 import org.jbox2d.collision.broadphase.BroadPhase;
@@ -30,1149 +31,1037 @@ import org.jbox2d.dynamics.contacts.Contact;
 import org.jbox2d.dynamics.contacts.ContactEdge;
 import org.jbox2d.dynamics.joints.JointEdge;
 
-/**
- * A rigid body. These are created via World.createBody.
+/** A rigid body. These are created via World.createBody.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class Body {
-  public static final int e_islandFlag = 0x0001;
-  public static final int e_awakeFlag = 0x0002;
-  public static final int e_autoSleepFlag = 0x0004;
-  public static final int e_bulletFlag = 0x0008;
-  public static final int e_fixedRotationFlag = 0x0010;
-  public static final int e_activeFlag = 0x0020;
-  public static final int e_toiFlag = 0x0040;
+       public static final int e_islandFlag = 0x0001;
+       public static final int e_awakeFlag = 0x0002;
+       public static final int e_autoSleepFlag = 0x0004;
+       public static final int e_bulletFlag = 0x0008;
+       public static final int e_fixedRotationFlag = 0x0010;
+       public static final int e_activeFlag = 0x0020;
+       public static final int e_toiFlag = 0x0040;
+
+       public BodyType m_type;
+
+       public int m_flags;
+
+       public int m_islandIndex;
+
+       /** The body origin transform. */
+       public final Transform m_xf = new Transform();
+
+       /** The swept motion for CCD */
+       public final Sweep m_sweep = new Sweep();
+
+       public final Vec2 m_linearVelocity = new Vec2();
+       public float m_angularVelocity = 0;
+
+       public final Vec2 m_force = new Vec2();
+       public float m_torque = 0;
+
+       public World m_world;
+       public Body m_prev;
+       public Body m_next;
+
+       public Fixture m_fixtureList;
+       public int m_fixtureCount;
+
+       public JointEdge m_jointList;
+       public ContactEdge m_contactList;
+
+       public float m_mass, m_invMass;
 
-  public BodyType m_type;
+       // Rotational inertia about the center of mass.
+       public float m_I, m_invI;
 
-  public int m_flags;
+       public float m_linearDamping;
+       public float m_angularDamping;
+       public float m_gravityScale;
 
-  public int m_islandIndex;
+       public float m_sleepTime;
 
-  /**
-   * The body origin transform.
-   */
-  public final Transform m_xf = new Transform();
+       public Object m_userData;
 
-  /**
-   * The swept motion for CCD
-   */
-  public final Sweep m_sweep = new Sweep();
+       public Body (final BodyDef bd, World world) {
+               assert (bd.position.isValid());
+               assert (bd.linearVelocity.isValid());
+               assert (bd.gravityScale >= 0.0f);
+               assert (bd.angularDamping >= 0.0f);
+               assert (bd.linearDamping >= 0.0f);
 
-  public final Vec2 m_linearVelocity = new Vec2();
-  public float m_angularVelocity = 0;
+               m_flags = 0;
 
-  public final Vec2 m_force = new Vec2();
-  public float m_torque = 0;
+               if (bd.bullet) {
+                       m_flags |= e_bulletFlag;
+               }
+               if (bd.fixedRotation) {
+                       m_flags |= e_fixedRotationFlag;
+               }
+               if (bd.allowSleep) {
+                       m_flags |= e_autoSleepFlag;
+               }
+               if (bd.awake) {
+                       m_flags |= e_awakeFlag;
+               }
+               if (bd.active) {
+                       m_flags |= e_activeFlag;
+               }
+
+               m_world = world;
+
+               m_xf.p.set(bd.position);
+               m_xf.q.set(bd.angle);
 
-  public World m_world;
-  public Body m_prev;
-  public Body m_next;
-
-  public Fixture m_fixtureList;
-  public int m_fixtureCount;
-
-  public JointEdge m_jointList;
-  public ContactEdge m_contactList;
-
-  public float m_mass, m_invMass;
-
-  // Rotational inertia about the center of mass.
-  public float m_I, m_invI;
-
-  public float m_linearDamping;
-  public float m_angularDamping;
-  public float m_gravityScale;
-
-  public float m_sleepTime;
-
-  public Object m_userData;
-
-  public Body(final BodyDef bd, World world) {
-    assert (bd.position.isValid());
-    assert (bd.linearVelocity.isValid());
-    assert (bd.gravityScale >= 0.0f);
-    assert (bd.angularDamping >= 0.0f);
-    assert (bd.linearDamping >= 0.0f);
-
-    m_flags = 0;
-
-    if (bd.bullet) {
-      m_flags |= e_bulletFlag;
-    }
-    if (bd.fixedRotation) {
-      m_flags |= e_fixedRotationFlag;
-    }
-    if (bd.allowSleep) {
-      m_flags |= e_autoSleepFlag;
-    }
-    if (bd.awake) {
-      m_flags |= e_awakeFlag;
-    }
-    if (bd.active) {
-      m_flags |= e_activeFlag;
-    }
-
-    m_world = world;
-
-    m_xf.p.set(bd.position);
-    m_xf.q.set(bd.angle);
-
-    m_sweep.localCenter.setZero();
-    m_sweep.c0.set(m_xf.p);
-    m_sweep.c.set(m_xf.p);
-    m_sweep.a0 = bd.angle;
-    m_sweep.a = bd.angle;
-    m_sweep.alpha0 = 0.0f;
-
-    m_jointList = null;
-    m_contactList = null;
-    m_prev = null;
-    m_next = null;
-
-    m_linearVelocity.set(bd.linearVelocity);
-    m_angularVelocity = bd.angularVelocity;
-
-    m_linearDamping = bd.linearDamping;
-    m_angularDamping = bd.angularDamping;
-    m_gravityScale = bd.gravityScale;
-
-    m_force.setZero();
-    m_torque = 0.0f;
-
-    m_sleepTime = 0.0f;
-
-    m_type = bd.type;
-
-    if (m_type == BodyType.DYNAMIC) {
-      m_mass = 1f;
-      m_invMass = 1f;
-    } else {
-      m_mass = 0f;
-      m_invMass = 0f;
-    }
-
-    m_I = 0.0f;
-    m_invI = 0.0f;
-
-    m_userData = bd.userData;
-
-    m_fixtureList = null;
-    m_fixtureCount = 0;
-  }
-
-  // TODO djm: check out about this new fixture here
-  /**
-   * Creates a fixture and attach it to this body. Use this function if you need to set some fixture
-   * parameters, like friction. Otherwise you can create the fixture directly from a shape. If the
-   * density is non-zero, this function automatically updates the mass of the body. Contacts are not
-   * created until the next time step.
-   * 
-   * @param def the fixture definition.
-   * @warning This function is locked during callbacks.
-   */
-  public final Fixture createFixture(FixtureDef def) {
-    assert (m_world.isLocked() == false);
-
-    if (m_world.isLocked() == true) {
-      return null;
-    }
-
-    // djm TODO from pool?
-    Fixture fixture = new Fixture();
-    fixture.create(this, def);
-
-    if ((m_flags & e_activeFlag) == e_activeFlag) {
-      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
-      fixture.createProxies(broadPhase, m_xf);
-    }
-
-    fixture.m_next = m_fixtureList;
-    m_fixtureList = fixture;
-    ++m_fixtureCount;
-
-    fixture.m_body = this;
-
-    // Adjust mass properties if needed.
-    if (fixture.m_density > 0.0f) {
-      resetMassData();
-    }
-
-    // Let the world know we have a new fixture. This will cause new contacts
-    // to be created at the beginning of the next time step.
-    m_world.m_flags |= World.NEW_FIXTURE;
-
-    return fixture;
-  }
-
-  private final FixtureDef fixDef = new FixtureDef();
-
-  /**
-   * Creates a fixture from a shape and attach it to this body. This is a convenience function. Use
-   * FixtureDef if you need to set parameters like friction, restitution, user data, or filtering.
-   * If the density is non-zero, this function automatically updates the mass of the body.
-   * 
-   * @param shape the shape to be cloned.
-   * @param density the shape density (set to zero for static bodies).
-   * @warning This function is locked during callbacks.
-   */
-  public final Fixture createFixture(Shape shape, float density) {
-    fixDef.shape = shape;
-    fixDef.density = density;
-
-    return createFixture(fixDef);
-  }
-
-  /**
-   * Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts
-   * associated with this fixture. This will automatically adjust the mass of the body if the body
-   * is dynamic and the fixture has positive density. All fixtures attached to a body are implicitly
-   * destroyed when the body is destroyed.
-   * 
-   * @param fixture the fixture to be removed.
-   * @warning This function is locked during callbacks.
-   */
-  public final void destroyFixture(Fixture fixture) {
-    assert (m_world.isLocked() == false);
-    if (m_world.isLocked() == true) {
-      return;
-    }
-
-    assert (fixture.m_body == this);
-
-    // Remove the fixture from this body's singly linked list.
-    assert (m_fixtureCount > 0);
-    Fixture node = m_fixtureList;
-    Fixture last = null; // java change
-    boolean found = false;
-    while (node != null) {
-      if (node == fixture) {
-        node = fixture.m_next;
-        found = true;
-        break;
-      }
-      last = node;
-      node = node.m_next;
-    }
-
-    // You tried to remove a shape that is not attached to this body.
-    assert (found);
-
-    // java change, remove it from the list
-    if (last == null) {
-      m_fixtureList = fixture.m_next;
-    } else {
-      last.m_next = fixture.m_next;
-    }
-
-    // Destroy any contacts associated with the fixture.
-    ContactEdge edge = m_contactList;
-    while (edge != null) {
-      Contact c = edge.contact;
-      edge = edge.next;
-
-      Fixture fixtureA = c.getFixtureA();
-      Fixture fixtureB = c.getFixtureB();
-
-      if (fixture == fixtureA || fixture == fixtureB) {
-        // This destroys the contact and removes it from
-        // this body's contact list.
-        m_world.m_contactManager.destroy(c);
-      }
-    }
-
-    if ((m_flags & e_activeFlag) == e_activeFlag) {
-      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
-      fixture.destroyProxies(broadPhase);
-    }
-
-    fixture.destroy();
-    fixture.m_body = null;
-    fixture.m_next = null;
-    fixture = null;
-
-    --m_fixtureCount;
-
-    // Reset the mass data.
-    resetMassData();
-  }
-
-  /**
-   * Set the position of the body's origin and rotation. This breaks any contacts and wakes the
-   * other bodies. Manipulating a body's transform may cause non-physical behavior.
-   * 
-   * @param position the world position of the body's local origin.
-   * @param angle the world rotation in radians.
-   */
-  public final void setTransform(Vec2 position, float angle) {
-    assert (m_world.isLocked() == false);
-    if (m_world.isLocked() == true) {
-      return;
-    }
-
-    m_xf.q.set(angle);
-    m_xf.p.set(position);
-
-    // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter);
-    Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c);
-    m_sweep.a = angle;
-
-    m_sweep.c0.set(m_sweep.c);
-    m_sweep.a0 = m_sweep.a;
-
-    BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
-    for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
-      f.synchronize(broadPhase, m_xf, m_xf);
-    }
-
-    m_world.m_contactManager.findNewContacts();
-  }
-
-  /**
-   * Get the body transform for the body's origin.
-   * 
-   * @return the world transform of the body's origin.
-   */
-  public final Transform getTransform() {
-    return m_xf;
-  }
-
-  /**
-   * Get the world body origin position. Do not modify.
-   * 
-   * @return the world position of the body's origin.
-   */
-  public final Vec2 getPosition() {
-    return m_xf.p;
-  }
-
-  /**
-   * Get the angle in radians.
-   * 
-   * @return the current world rotation angle in radians.
-   */
-  public final float getAngle() {
-    return m_sweep.a;
-  }
-
-  /**
-   * Get the world position of the center of mass. Do not modify.
-   */
-  public final Vec2 getWorldCenter() {
-    return m_sweep.c;
-  }
-
-  /**
-   * Get the local position of the center of mass. Do not modify.
-   */
-  public final Vec2 getLocalCenter() {
-    return m_sweep.localCenter;
-  }
-
-  /**
-   * Set the linear velocity of the center of mass.
-   * 
-   * @param v the new linear velocity of the center of mass.
-   */
-  public final void setLinearVelocity(Vec2 v) {
-    if (m_type == BodyType.STATIC) {
-      return;
-    }
-
-    if (Vec2.dot(v, v) > 0.0f) {
-      setAwake(true);
-    }
-
-    m_linearVelocity.set(v);
-  }
-
-  /**
-   * Get the linear velocity of the center of mass. Do not modify, instead use
-   * {@link #setLinearVelocity(Vec2)}.
-   * 
-   * @return the linear velocity of the center of mass.
-   */
-  public final Vec2 getLinearVelocity() {
-    return m_linearVelocity;
-  }
-
-  /**
-   * Set the angular velocity.
-   * 
-   * @param omega the new angular velocity in radians/second.
-   */
-  public final void setAngularVelocity(float w) {
-    if (m_type == BodyType.STATIC) {
-      return;
-    }
-
-    if (w * w > 0f) {
-      setAwake(true);
-    }
-
-    m_angularVelocity = w;
-  }
-
-  /**
-   * Get the angular velocity.
-   * 
-   * @return the angular velocity in radians/second.
-   */
-  public final float getAngularVelocity() {
-    return m_angularVelocity;
-  }
-
-  /**
-   * Get the gravity scale of the body.
-   * 
-   * @return
-   */
-  public float getGravityScale() {
-    return m_gravityScale;
-  }
-
-  /**
-   * Set the gravity scale of the body.
-   * 
-   * @param gravityScale
-   */
-  public void setGravityScale(float gravityScale) {
-    this.m_gravityScale = gravityScale;
-  }
-
-  /**
-   * Apply a force at a world point. If the force is not applied at the center of mass, it will
-   * generate a torque and affect the angular velocity. This wakes up the body.
-   * 
-   * @param force the world force vector, usually in Newtons (N).
-   * @param point the world position of the point of application.
-   */
-  public final void applyForce(Vec2 force, Vec2 point) {
-    if (m_type != BodyType.DYNAMIC) {
-      return;
-    }
-
-    if (isAwake() == false) {
-      setAwake(true);
-    }
-
-    // m_force.addLocal(force);
-    // Vec2 temp = tltemp.get();
-    // temp.set(point).subLocal(m_sweep.c);
-    // m_torque += Vec2.cross(temp, force);
-
-    m_force.x += force.x;
-    m_force.y += force.y;
-
-    m_torque += (point.x - m_sweep.c.x) * force.y - (point.y - m_sweep.c.y) * force.x;
-  }
-
-  /**
-   * Apply a force to the center of mass. This wakes up the body.
-   * 
-   * @param force the world force vector, usually in Newtons (N).
-   */
-  public final void applyForceToCenter(Vec2 force) {
-    if (m_type != BodyType.DYNAMIC) {
-      return;
-    }
-
-    if (isAwake() == false) {
-      setAwake(true);
-    }
-
-    m_force.x += force.x;
-    m_force.y += force.y;
-  }
-
-  /**
-   * Apply a torque. This affects the angular velocity without affecting the linear velocity of the
-   * center of mass. This wakes up the body.
-   * 
-   * @param torque about the z-axis (out of the screen), usually in N-m.
-   */
-  public final void applyTorque(float torque) {
-    if (m_type != BodyType.DYNAMIC) {
-      return;
-    }
-
-    if (isAwake() == false) {
-      setAwake(true);
-    }
-
-    m_torque += torque;
-  }
-
-  /**
-   * Apply an impulse at a point. This immediately modifies the velocity. It also modifies the
-   * angular velocity if the point of application is not at the center of mass. This wakes up the
-   * body.
-   * 
-   * @param impulse the world impulse vector, usually in N-seconds or kg-m/s.
-   * @param point the world position of the point of application.
-   */
-  public final void applyLinearImpulse(Vec2 impulse, Vec2 point) {
-    if (m_type != BodyType.DYNAMIC) {
-      return;
-    }
-
-    if (isAwake() == false) {
-      setAwake(true);
-    }
-
-    // Vec2 temp = tltemp.get();
-    // temp.set(impulse).mulLocal(m_invMass);
-    // m_linearVelocity.addLocal(temp);
-    //
-    // temp.set(point).subLocal(m_sweep.c);
-    // m_angularVelocity += m_invI * Vec2.cross(temp, impulse);
-
-    m_linearVelocity.x += impulse.x * m_invMass;
-    m_linearVelocity.y += impulse.y * m_invMass;
-
-    m_angularVelocity +=
-        m_invI * ((point.x - m_sweep.c.x) * impulse.y - (point.y - m_sweep.c.y) * impulse.x);
-  }
-
-  /**
-   * Apply an angular impulse.
-   * 
-   * @param impulse the angular impulse in units of kg*m*m/s
-   */
-  public void applyAngularImpulse(float impulse) {
-    if (m_type != BodyType.DYNAMIC) {
-      return;
-    }
-
-    if (isAwake() == false) {
-      setAwake(true);
-    }
-    m_angularVelocity += m_invI * impulse;
-  }
-
-  /**
-   * Get the total mass of the body.
-   * 
-   * @return the mass, usually in kilograms (kg).
-   */
-  public final float getMass() {
-    return m_mass;
-  }
-
-  /**
-   * Get the central rotational inertia of the body.
-   * 
-   * @return the rotational inertia, usually in kg-m^2.
-   */
-  public final float getInertia() {
-    return m_I
-        + m_mass
-        * (m_sweep.localCenter.x * m_sweep.localCenter.x + m_sweep.localCenter.y
-            * m_sweep.localCenter.y);
-  }
-
-  /**
-   * Get the mass data of the body. The rotational inertia is relative to the center of mass.
-   * 
-   * @return a struct containing the mass, inertia and center of the body.
-   */
-  public final void getMassData(MassData data) {
-    // data.mass = m_mass;
-    // data.I = m_I + m_mass * Vec2.dot(m_sweep.localCenter, m_sweep.localCenter);
-    // data.center.set(m_sweep.localCenter);
-
-    data.mass = m_mass;
-    data.I =
-        m_I
-            + m_mass
-            * (m_sweep.localCenter.x * m_sweep.localCenter.x + m_sweep.localCenter.y
-                * m_sweep.localCenter.y);
-    data.center.x = m_sweep.localCenter.x;
-    data.center.y = m_sweep.localCenter.y;
-  }
-
-  /**
-   * Set the mass properties to override the mass properties of the fixtures. Note that this changes
-   * the center of mass position. Note that creating or destroying fixtures can also alter the mass.
-   * This function has no effect if the body isn't dynamic.
-   * 
-   * @param massData the mass properties.
-   */
-  public final void setMassData(MassData massData) {
-    // TODO_ERIN adjust linear velocity and torque to account for movement of center.
-    assert (m_world.isLocked() == false);
-    if (m_world.isLocked() == true) {
-      return;
-    }
-
-    if (m_type != BodyType.DYNAMIC) {
-      return;
-    }
-
-    m_invMass = 0.0f;
-    m_I = 0.0f;
-    m_invI = 0.0f;
-
-    m_mass = massData.mass;
-    if (m_mass <= 0.0f) {
-      m_mass = 1f;
-    }
-
-    m_invMass = 1.0f / m_mass;
-
-    if (massData.I > 0.0f && (m_flags & e_fixedRotationFlag) == 0) {
-      m_I = massData.I - m_mass * Vec2.dot(massData.center, massData.center);
-      assert (m_I > 0.0f);
-      m_invI = 1.0f / m_I;
-    }
-
-    final Vec2 oldCenter = m_world.getPool().popVec2();
-    // Move center of mass.
-    oldCenter.set(m_sweep.c);
-    m_sweep.localCenter.set(massData.center);
-    // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter);
-    Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c0);
-    m_sweep.c.set(m_sweep.c0);
-
-    // Update center of mass velocity.
-    // m_linearVelocity += Cross(m_angularVelocity, m_sweep.c - oldCenter);
-    final Vec2 temp = m_world.getPool().popVec2();
-    temp.set(m_sweep.c).subLocal(oldCenter);
-    Vec2.crossToOut(m_angularVelocity, temp, temp);
-    m_linearVelocity.addLocal(temp);
-
-    m_world.getPool().pushVec2(2);
-  }
-
-  private final MassData pmd = new MassData();
-
-  /**
-   * This resets the mass properties to the sum of the mass properties of the fixtures. This
-   * normally does not need to be called unless you called setMassData to override the mass and you
-   * later want to reset the mass.
-   */
-  public final void resetMassData() {
-    // Compute mass data from shapes. Each shape has its own density.
-    m_mass = 0.0f;
-    m_invMass = 0.0f;
-    m_I = 0.0f;
-    m_invI = 0.0f;
-    m_sweep.localCenter.setZero();
-
-    // Static and kinematic bodies have zero mass.
-    if (m_type == BodyType.STATIC || m_type == BodyType.KINEMATIC) {
-      // m_sweep.c0 = m_sweep.c = m_xf.position;
-      m_sweep.c0.set(m_xf.p);
-      m_sweep.c.set(m_xf.p);
-      m_sweep.a0 = m_sweep.a;
-      return;
-    }
-
-    assert (m_type == BodyType.DYNAMIC);
-
-    // Accumulate mass over all fixtures.
-    final Vec2 localCenter = m_world.getPool().popVec2();
-    localCenter.setZero();
-    final Vec2 temp = m_world.getPool().popVec2();
-    final MassData massData = pmd;
-    for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
-      if (f.m_density == 0.0f) {
-        continue;
-      }
-      f.getMassData(massData);
-      m_mass += massData.mass;
-      // center += massData.mass * massData.center;
-      temp.set(massData.center).mulLocal(massData.mass);
-      localCenter.addLocal(temp);
-      m_I += massData.I;
-    }
-
-    // Compute center of mass.
-    if (m_mass > 0.0f) {
-      m_invMass = 1.0f / m_mass;
-      localCenter.mulLocal(m_invMass);
-    } else {
-      // Force all dynamic bodies to have a positive mass.
-      m_mass = 1.0f;
-      m_invMass = 1.0f;
-    }
-
-    if (m_I > 0.0f && (m_flags & e_fixedRotationFlag) == 0) {
-      // Center the inertia about the center of mass.
-      m_I -= m_mass * Vec2.dot(localCenter, localCenter);
-      assert (m_I > 0.0f);
-      m_invI = 1.0f / m_I;
-    } else {
-      m_I = 0.0f;
-      m_invI = 0.0f;
-    }
-
-    Vec2 oldCenter = m_world.getPool().popVec2();
-    // Move center of mass.
-    oldCenter.set(m_sweep.c);
-    m_sweep.localCenter.set(localCenter);
-    // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter);
-    Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c0);
-    m_sweep.c.set(m_sweep.c0);
-
-    // Update center of mass velocity.
-    // m_linearVelocity += Cross(m_angularVelocity, m_sweep.c - oldCenter);
-    temp.set(m_sweep.c).subLocal(oldCenter);
-
-    final Vec2 temp2 = oldCenter;
-    Vec2.crossToOutUnsafe(m_angularVelocity, temp, temp2);
-    m_linearVelocity.addLocal(temp2);
-
-    m_world.getPool().pushVec2(3);
-  }
-
-  /**
-   * Get the world coordinates of a point given the local coordinates.
-   * 
-   * @param localPoint a point on the body measured relative the the body's origin.
-   * @return the same point expressed in world coordinates.
-   */
-  public final Vec2 getWorldPoint(Vec2 localPoint) {
-    Vec2 v = new Vec2();
-    getWorldPointToOut(localPoint, v);
-    return v;
-  }
-
-  public final void getWorldPointToOut(Vec2 localPoint, Vec2 out) {
-    Transform.mulToOut(m_xf, localPoint, out);
-  }
-
-  /**
-   * Get the world coordinates of a vector given the local coordinates.
-   * 
-   * @param localVector a vector fixed in the body.
-   * @return the same vector expressed in world coordinates.
-   */
-  public final Vec2 getWorldVector(Vec2 localVector) {
-    Vec2 out = new Vec2();
-    getWorldVectorToOut(localVector, out);
-    return out;
-  }
-
-  public final void getWorldVectorToOut(Vec2 localVector, Vec2 out) {
-    Rot.mulToOut(m_xf.q, localVector, out);
-  }
-
-  public final void getWorldVectorToOutUnsafe(Vec2 localVector, Vec2 out) {
-    Rot.mulToOutUnsafe(m_xf.q, localVector, out);
-  }
-
-  /**
-   * Gets a local point relative to the body's origin given a world point.
-   * 
-   * @param a point in world coordinates.
-   * @return the corresponding local point relative to the body's origin.
-   */
-  public final Vec2 getLocalPoint(Vec2 worldPoint) {
-    Vec2 out = new Vec2();
-    getLocalPointToOut(worldPoint, out);
-    return out;
-  }
-
-  public final void getLocalPointToOut(Vec2 worldPoint, Vec2 out) {
-    Transform.mulTransToOut(m_xf, worldPoint, out);
-  }
-
-  /**
-   * Gets a local vector given a world vector.
-   * 
-   * @param a vector in world coordinates.
-   * @return the corresponding local vector.
-   */
-  public final Vec2 getLocalVector(Vec2 worldVector) {
-    Vec2 out = new Vec2();
-    getLocalVectorToOut(worldVector, out);
-    return out;
-  }
-
-  public final void getLocalVectorToOut(Vec2 worldVector, Vec2 out) {
-    Rot.mulTrans(m_xf.q, worldVector, out);
-  }
-
-  public final void getLocalVectorToOutUnsafe(Vec2 worldVector, Vec2 out) {
-    Rot.mulTransUnsafe(m_xf.q, worldVector, out);
-  }
-
-  /**
-   * Get the world linear velocity of a world point attached to this body.
-   * 
-   * @param a point in world coordinates.
-   * @return the world velocity of a point.
-   */
-  public final Vec2 getLinearVelocityFromWorldPoint(Vec2 worldPoint) {
-    Vec2 out = new Vec2();
-    getLinearVelocityFromWorldPointToOut(worldPoint, out);
-    return out;
-  }
-
-  public final void getLinearVelocityFromWorldPointToOut(Vec2 worldPoint, Vec2 out) {
-    out.set(worldPoint).subLocal(m_sweep.c);
-    Vec2.crossToOut(m_angularVelocity, out, out);
-    out.addLocal(m_linearVelocity);
-  }
-
-  /**
-   * Get the world velocity of a local point.
-   * 
-   * @param a point in local coordinates.
-   * @return the world velocity of a point.
-   */
-  public final Vec2 getLinearVelocityFromLocalPoint(Vec2 localPoint) {
-    Vec2 out = new Vec2();
-    getLinearVelocityFromLocalPointToOut(localPoint, out);
-    return out;
-  }
-
-  public final void getLinearVelocityFromLocalPointToOut(Vec2 localPoint, Vec2 out) {
-    getWorldPointToOut(localPoint, out);
-    getLinearVelocityFromWorldPointToOut(out, out);
-  }
-
-  /** Get the linear damping of the body. */
-  public final float getLinearDamping() {
-    return m_linearDamping;
-  }
-
-  /** Set the linear damping of the body. */
-  public final void setLinearDamping(float linearDamping) {
-    m_linearDamping = linearDamping;
-  }
-
-  /** Get the angular damping of the body. */
-  public final float getAngularDamping() {
-    return m_angularDamping;
-  }
-
-  /** Set the angular damping of the body. */
-  public final void setAngularDamping(float angularDamping) {
-    m_angularDamping = angularDamping;
-  }
-
-  public BodyType getType() {
-    return m_type;
-  }
-
-  /**
-   * Set the type of this body. This may alter the mass and velocity.
-   * 
-   * @param type
-   */
-  public void setType(BodyType type) {
-    assert (m_world.isLocked() == false);
-    if (m_world.isLocked() == true) {
-      return;
-    }
-
-    if (m_type == type) {
-      return;
-    }
-
-    m_type = type;
-
-    resetMassData();
-
-    if (m_type == BodyType.STATIC) {
-      m_linearVelocity.setZero();
-      m_angularVelocity = 0.0f;
-      m_sweep.a0 = m_sweep.a;
-      m_sweep.c0.set(m_sweep.c);
-      synchronizeFixtures();
-    }
-
-    setAwake(true);
-
-    m_force.setZero();
-    m_torque = 0.0f;
-
-    // Delete the attached contacts.
-    ContactEdge ce = m_contactList;
-    while (ce != null) {
-      ContactEdge ce0 = ce;
-      ce = ce.next;
-      m_world.m_contactManager.destroy(ce0.contact);
-    }
-    m_contactList = null;
-
-    // Touch the proxies so that new contacts will be created (when appropriate)
-    BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
-    for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
-      int proxyCount = f.m_proxyCount;
-      for (int i = 0; i < proxyCount; ++i) {
-        broadPhase.touchProxy(f.m_proxies[i].proxyId);
-      }
-    }
-  }
-
-  /** Is this body treated like a bullet for continuous collision detection? */
-  public final boolean isBullet() {
-    return (m_flags & e_bulletFlag) == e_bulletFlag;
-  }
-
-  /** Should this body be treated like a bullet for continuous collision detection? */
-  public final void setBullet(boolean flag) {
-    if (flag) {
-      m_flags |= e_bulletFlag;
-    } else {
-      m_flags &= ~e_bulletFlag;
-    }
-  }
-
-  /**
-   * You can disable sleeping on this body. If you disable sleeping, the body will be woken.
-   * 
-   * @param flag
-   */
-  public void setSleepingAllowed(boolean flag) {
-    if (flag) {
-      m_flags |= e_autoSleepFlag;
-    } else {
-      m_flags &= ~e_autoSleepFlag;
-      setAwake(true);
-    }
-  }
-
-  /**
-   * Is this body allowed to sleep
-   * 
-   * @return
-   */
-  public boolean isSleepingAllowed() {
-    return (m_flags & e_autoSleepFlag) == e_autoSleepFlag;
-  }
-
-  /**
-   * Set the sleep state of the body. A sleeping body has very low CPU cost.
-   * 
-   * @param flag set to true to put body to sleep, false to wake it.
-   * @param flag
-   */
-  public void setAwake(boolean flag) {
-    if (flag) {
-      if ((m_flags & e_awakeFlag) == 0) {
-        m_flags |= e_awakeFlag;
-        m_sleepTime = 0.0f;
-      }
-    } else {
-      m_flags &= ~e_awakeFlag;
-      m_sleepTime = 0.0f;
-      m_linearVelocity.setZero();
-      m_angularVelocity = 0.0f;
-      m_force.setZero();
-      m_torque = 0.0f;
-    }
-  }
-
-  /**
-   * Get the sleeping state of this body.
-   * 
-   * @return true if the body is sleeping.
-   */
-  public boolean isAwake() {
-    return (m_flags & e_awakeFlag) == e_awakeFlag;
-  }
-
-  /**
-   * Set the active state of the body. An inactive body is not simulated and cannot be collided with
-   * or woken up. If you pass a flag of true, all fixtures will be added to the broad-phase. If you
-   * pass a flag of false, all fixtures will be removed from the broad-phase and all contacts will
-   * be destroyed. Fixtures and joints are otherwise unaffected. You may continue to create/destroy
-   * fixtures and joints on inactive bodies. Fixtures on an inactive body are implicitly inactive
-   * and will not participate in collisions, ray-casts, or queries. Joints connected to an inactive
-   * body are implicitly inactive. An inactive body is still owned by a World object and remains in
-   * the body list.
-   * 
-   * @param flag
-   */
-  public void setActive(boolean flag) {
-    assert (m_world.isLocked() == false);
-
-    if (flag == isActive()) {
-      return;
-    }
-
-    if (flag) {
-      m_flags |= e_activeFlag;
-
-      // Create all proxies.
-      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
-      for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
-        f.createProxies(broadPhase, m_xf);
-      }
-
-      // Contacts are created the next time step.
-    } else {
-      m_flags &= ~e_activeFlag;
-
-      // Destroy all proxies.
-      BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
-      for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
-        f.destroyProxies(broadPhase);
-      }
-
-      // Destroy the attached contacts.
-      ContactEdge ce = m_contactList;
-      while (ce != null) {
-        ContactEdge ce0 = ce;
-        ce = ce.next;
-        m_world.m_contactManager.destroy(ce0.contact);
-      }
-      m_contactList = null;
-    }
-  }
-
-  /**
-   * Get the active state of the body.
-   * 
-   * @return
-   */
-  public boolean isActive() {
-    return (m_flags & e_activeFlag) == e_activeFlag;
-  }
-
-  /**
-   * Set this body to have fixed rotation. This causes the mass to be reset.
-   * 
-   * @param flag
-   */
-  public void setFixedRotation(boolean flag) {
-    if (flag) {
-      m_flags |= e_fixedRotationFlag;
-    } else {
-      m_flags &= ~e_fixedRotationFlag;
-    }
-
-    resetMassData();
-  }
-
-  /**
-   * Does this body have fixed rotation?
-   * 
-   * @return
-   */
-  public boolean isFixedRotation() {
-    return (m_flags & e_fixedRotationFlag) == e_fixedRotationFlag;
-  }
-
-  /** Get the list of all fixtures attached to this body. */
-  public final Fixture getFixtureList() {
-    return m_fixtureList;
-  }
-
-  /** Get the list of all joints attached to this body. */
-  public final JointEdge getJointList() {
-    return m_jointList;
-  }
-
-  /**
-   * Get the list of all contacts attached to this body.
-   * 
-   * @warning this list changes during the time step and you may miss some collisions if you don't
-   *          use ContactListener.
-   */
-  public final ContactEdge getContactList() {
-    return m_contactList;
-  }
-
-  /** Get the next body in the world's body list. */
-  public final Body getNext() {
-    return m_next;
-  }
-
-  /** Get the user data pointer that was provided in the body definition. */
-  public final Object getUserData() {
-    return m_userData;
-  }
-
-  /**
-   * Set the user data. Use this to store your application specific data.
-   */
-  public final void setUserData(Object data) {
-    m_userData = data;
-  }
-
-  /**
-   * Get the parent world of this body.
-   */
-  public final World getWorld() {
-    return m_world;
-  }
-
-  // djm pooling
-  private final Transform pxf = new Transform();
-
-  protected final void synchronizeFixtures() {
-    final Transform xf1 = pxf;
-    // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter);
-
-    // xf1.q.set(m_sweep.a0);
-    // Rot.mulToOutUnsafe(xf1.q, m_sweep.localCenter, xf1.p);
-    // xf1.p.mulLocal(-1).addLocal(m_sweep.c0);
-    // inlined:
-    xf1.q.s = MathUtils.sin(m_sweep.a0);
-    xf1.q.c = MathUtils.cos(m_sweep.a0);
-    xf1.p.x = m_sweep.c0.x - xf1.q.c * m_sweep.localCenter.x + xf1.q.s * m_sweep.localCenter.y;
-    xf1.p.y = m_sweep.c0.y - xf1.q.s * m_sweep.localCenter.x - xf1.q.c * m_sweep.localCenter.y;
-    // end inline
-
-    for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
-      f.synchronize(m_world.m_contactManager.m_broadPhase, xf1, m_xf);
-    }
-  }
-
-  public final void synchronizeTransform() {
-    // m_xf.q.set(m_sweep.a);
-    //
-    // // m_xf.position = m_sweep.c - Mul(m_xf.R, m_sweep.localCenter);
-    // Rot.mulToOutUnsafe(m_xf.q, m_sweep.localCenter, m_xf.p);
-    // m_xf.p.mulLocal(-1).addLocal(m_sweep.c);
-    //
-    m_xf.q.s = MathUtils.sin(m_sweep.a);
-    m_xf.q.c = MathUtils.cos(m_sweep.a);
-    Rot q = m_xf.q;
-    Vec2 v = m_sweep.localCenter;
-    m_xf.p.x = m_sweep.c.x - q.c * v.x + q.s * v.y;
-    m_xf.p.y = m_sweep.c.y - q.s * v.x - q.c * v.y;
-  }
-
-  /**
-   * This is used to prevent connected bodies from colliding. It may lie, depending on the
-   * collideConnected flag.
-   * 
-   * @param other
-   * @return
-   */
-  public boolean shouldCollide(Body other) {
-    // At least one body should be dynamic.
-    if (m_type != BodyType.DYNAMIC && other.m_type != BodyType.DYNAMIC) {
-      return false;
-    }
-
-    // Does a joint prevent collision?
-    for (JointEdge jn = m_jointList; jn != null; jn = jn.next) {
-      if (jn.other == other) {
-        if (jn.joint.m_collideConnected == false) {
-          return false;
-        }
-      }
-    }
-
-    return true;
-  }
-
-  protected final void advance(float t) {
-    // Advance to the new safe time. This doesn't sync the broad-phase.
-    m_sweep.advance(t);
-    m_sweep.c.set(m_sweep.c0);
-    m_sweep.a = m_sweep.a0;
-    m_xf.q.set(m_sweep.a);
-    // m_xf.position = m_sweep.c - Mul(m_xf.R, m_sweep.localCenter);
-    Rot.mulToOutUnsafe(m_xf.q, m_sweep.localCenter, m_xf.p);
-    m_xf.p.mulLocal(-1).addLocal(m_sweep.c);
-  }
+               m_sweep.localCenter.setZero();
+               m_sweep.c0.set(m_xf.p);
+               m_sweep.c.set(m_xf.p);
+               m_sweep.a0 = bd.angle;
+               m_sweep.a = bd.angle;
+               m_sweep.alpha0 = 0.0f;
+
+               m_jointList = null;
+               m_contactList = null;
+               m_prev = null;
+               m_next = null;
+
+               m_linearVelocity.set(bd.linearVelocity);
+               m_angularVelocity = bd.angularVelocity;
+
+               m_linearDamping = bd.linearDamping;
+               m_angularDamping = bd.angularDamping;
+               m_gravityScale = bd.gravityScale;
+
+               m_force.setZero();
+               m_torque = 0.0f;
+
+               m_sleepTime = 0.0f;
+
+               m_type = bd.type;
+
+               if (m_type == BodyType.DYNAMIC) {
+                       m_mass = 1f;
+                       m_invMass = 1f;
+               } else {
+                       m_mass = 0f;
+                       m_invMass = 0f;
+               }
+
+               m_I = 0.0f;
+               m_invI = 0.0f;
+
+               m_userData = bd.userData;
+
+               m_fixtureList = null;
+               m_fixtureCount = 0;
+       }
+
+       // TODO djm: check out about this new fixture here
+       /** Creates a fixture and attach it to this body. Use this function if you need to set some fixture parameters, like friction.
+        * Otherwise you can create the fixture directly from a shape. If the density is non-zero, this function automatically updates
+        * the mass of the body. Contacts are not created until the next time step.
+        * 
+        * @param def the fixture definition.
+        * @warning This function is locked during callbacks. */
+       public final Fixture createFixture (FixtureDef def) {
+               assert (m_world.isLocked() == false);
+
+               if (m_world.isLocked() == true) {
+                       return null;
+               }
+
+               // djm TODO from pool?
+               Fixture fixture = new Fixture();
+               fixture.create(this, def);
+
+               if ((m_flags & e_activeFlag) == e_activeFlag) {
+                       BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
+                       fixture.createProxies(broadPhase, m_xf);
+               }
+
+               fixture.m_next = m_fixtureList;
+               m_fixtureList = fixture;
+               ++m_fixtureCount;
+
+               fixture.m_body = this;
+
+               // Adjust mass properties if needed.
+               if (fixture.m_density > 0.0f) {
+                       resetMassData();
+               }
+
+               // Let the world know we have a new fixture. This will cause new contacts
+               // to be created at the beginning of the next time step.
+               m_world.m_flags |= World.NEW_FIXTURE;
+
+               return fixture;
+       }
+
+       private final FixtureDef fixDef = new FixtureDef();
+
+       /** Creates a fixture from a shape and attach it to this body. This is a convenience function. Use FixtureDef if you need to set
+        * parameters like friction, restitution, user data, or filtering. If the density is non-zero, this function automatically
+        * updates the mass of the body.
+        * 
+        * @param shape the shape to be cloned.
+        * @param density the shape density (set to zero for static bodies).
+        * @warning This function is locked during callbacks. */
+       public final Fixture createFixture (Shape shape, float density) {
+               fixDef.shape = shape;
+               fixDef.density = density;
+
+               return createFixture(fixDef);
+       }
+
+       /** Destroy a fixture. This removes the fixture from the broad-phase and destroys all contacts associated with this fixture.
+        * This will automatically adjust the mass of the body if the body is dynamic and the fixture has positive density. All
+        * fixtures attached to a body are implicitly destroyed when the body is destroyed.
+        * 
+        * @param fixture the fixture to be removed.
+        * @warning This function is locked during callbacks. */
+       public final void destroyFixture (Fixture fixture) {
+               assert (m_world.isLocked() == false);
+               if (m_world.isLocked() == true) {
+                       return;
+               }
+
+               assert (fixture.m_body == this);
+
+               // Remove the fixture from this body's singly linked list.
+               assert (m_fixtureCount > 0);
+               Fixture node = m_fixtureList;
+               Fixture last = null; // java change
+               boolean found = false;
+               while (node != null) {
+                       if (node == fixture) {
+                               node = fixture.m_next;
+                               found = true;
+                               break;
+                       }
+                       last = node;
+                       node = node.m_next;
+               }
+
+               // You tried to remove a shape that is not attached to this body.
+               assert (found);
+
+               // java change, remove it from the list
+               if (last == null) {
+                       m_fixtureList = fixture.m_next;
+               } else {
+                       last.m_next = fixture.m_next;
+               }
+
+               // Destroy any contacts associated with the fixture.
+               ContactEdge edge = m_contactList;
+               while (edge != null) {
+                       Contact c = edge.contact;
+                       edge = edge.next;
+
+                       Fixture fixtureA = c.getFixtureA();
+                       Fixture fixtureB = c.getFixtureB();
+
+                       if (fixture == fixtureA || fixture == fixtureB) {
+                               // This destroys the contact and removes it from
+                               // this body's contact list.
+                               m_world.m_contactManager.destroy(c);
+                       }
+               }
+
+               if ((m_flags & e_activeFlag) == e_activeFlag) {
+                       BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
+                       fixture.destroyProxies(broadPhase);
+               }
+
+               fixture.destroy();
+               fixture.m_body = null;
+               fixture.m_next = null;
+               fixture = null;
+
+               --m_fixtureCount;
+
+               // Reset the mass data.
+               resetMassData();
+       }
+
+       /** Set the position of the body's origin and rotation. This breaks any contacts and wakes the other bodies. Manipulating a
+        * body's transform may cause non-physical behavior.
+        * 
+        * @param position the world position of the body's local origin.
+        * @param angle the world rotation in radians. */
+       public final void setTransform (Vec2 position, float angle) {
+               assert (m_world.isLocked() == false);
+               if (m_world.isLocked() == true) {
+                       return;
+               }
+
+               m_xf.q.set(angle);
+               m_xf.p.set(position);
+
+               // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter);
+               Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c);
+               m_sweep.a = angle;
+
+               m_sweep.c0.set(m_sweep.c);
+               m_sweep.a0 = m_sweep.a;
+
+               BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
+               for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
+                       f.synchronize(broadPhase, m_xf, m_xf);
+               }
+
+               m_world.m_contactManager.findNewContacts();
+       }
+
+       /** Get the body transform for the body's origin.
+        * 
+        * @return the world transform of the body's origin. */
+       public final Transform getTransform () {
+               return m_xf;
+       }
+
+       /** Get the world body origin position. Do not modify.
+        * 
+        * @return the world position of the body's origin. */
+       public final Vec2 getPosition () {
+               return m_xf.p;
+       }
+
+       /** Get the angle in radians.
+        * 
+        * @return the current world rotation angle in radians. */
+       public final float getAngle () {
+               return m_sweep.a;
+       }
+
+       /** Get the world position of the center of mass. Do not modify. */
+       public final Vec2 getWorldCenter () {
+               return m_sweep.c;
+       }
+
+       /** Get the local position of the center of mass. Do not modify. */
+       public final Vec2 getLocalCenter () {
+               return m_sweep.localCenter;
+       }
+
+       /** Set the linear velocity of the center of mass.
+        * 
+        * @param v the new linear velocity of the center of mass. */
+       public final void setLinearVelocity (Vec2 v) {
+               if (m_type == BodyType.STATIC) {
+                       return;
+               }
+
+               if (Vec2.dot(v, v) > 0.0f) {
+                       setAwake(true);
+               }
+
+               m_linearVelocity.set(v);
+       }
+
+       /** Get the linear velocity of the center of mass. Do not modify, instead use {@link #setLinearVelocity(Vec2)}.
+        * 
+        * @return the linear velocity of the center of mass. */
+       public final Vec2 getLinearVelocity () {
+               return m_linearVelocity;
+       }
+
+       /** Set the angular velocity.
+        * 
+        * @param omega the new angular velocity in radians/second. */
+       public final void setAngularVelocity (float w) {
+               if (m_type == BodyType.STATIC) {
+                       return;
+               }
+
+               if (w * w > 0f) {
+                       setAwake(true);
+               }
+
+               m_angularVelocity = w;
+       }
+
+       /** Get the angular velocity.
+        * 
+        * @return the angular velocity in radians/second. */
+       public final float getAngularVelocity () {
+               return m_angularVelocity;
+       }
+
+       /** Get the gravity scale of the body.
+        * 
+        * @return */
+       public float getGravityScale () {
+               return m_gravityScale;
+       }
+
+       /** Set the gravity scale of the body.
+        * 
+        * @param gravityScale */
+       public void setGravityScale (float gravityScale) {
+               this.m_gravityScale = gravityScale;
+       }
+
+       /** Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the
+        * angular velocity. This wakes up the body.
+        * 
+        * @param force the world force vector, usually in Newtons (N).
+        * @param point the world position of the point of application. */
+       public final void applyForce (Vec2 force, Vec2 point) {
+               if (m_type != BodyType.DYNAMIC) {
+                       return;
+               }
+
+               if (isAwake() == false) {
+                       setAwake(true);
+               }
+
+               // m_force.addLocal(force);
+               // Vec2 temp = tltemp.get();
+               // temp.set(point).subLocal(m_sweep.c);
+               // m_torque += Vec2.cross(temp, force);
+
+               m_force.x += force.x;
+               m_force.y += force.y;
+
+               m_torque += (point.x - m_sweep.c.x) * force.y - (point.y - m_sweep.c.y) * force.x;
+       }
+
+       /** Apply a force to the center of mass. This wakes up the body.
+        * 
+        * @param force the world force vector, usually in Newtons (N). */
+       public final void applyForceToCenter (Vec2 force) {
+               if (m_type != BodyType.DYNAMIC) {
+                       return;
+               }
+
+               if (isAwake() == false) {
+                       setAwake(true);
+               }
+
+               m_force.x += force.x;
+               m_force.y += force.y;
+       }
+
+       /** Apply a torque. This affects the angular velocity without affecting the linear velocity of the center of mass. This wakes up
+        * the body.
+        * 
+        * @param torque about the z-axis (out of the screen), usually in N-m. */
+       public final void applyTorque (float torque) {
+               if (m_type != BodyType.DYNAMIC) {
+                       return;
+               }
+
+               if (isAwake() == false) {
+                       setAwake(true);
+               }
+
+               m_torque += torque;
+       }
+
+       /** Apply an impulse at a point. This immediately modifies the velocity. It also modifies the angular velocity if the point of
+        * application is not at the center of mass. This wakes up the body.
+        * 
+        * @param impulse the world impulse vector, usually in N-seconds or kg-m/s.
+        * @param point the world position of the point of application. */
+       public final void applyLinearImpulse (Vec2 impulse, Vec2 point) {
+               if (m_type != BodyType.DYNAMIC) {
+                       return;
+               }
+
+               if (isAwake() == false) {
+                       setAwake(true);
+               }
+
+               // Vec2 temp = tltemp.get();
+               // temp.set(impulse).mulLocal(m_invMass);
+               // m_linearVelocity.addLocal(temp);
+               //
+               // temp.set(point).subLocal(m_sweep.c);
+               // m_angularVelocity += m_invI * Vec2.cross(temp, impulse);
+
+               m_linearVelocity.x += impulse.x * m_invMass;
+               m_linearVelocity.y += impulse.y * m_invMass;
+
+               m_angularVelocity += m_invI * ((point.x - m_sweep.c.x) * impulse.y - (point.y - m_sweep.c.y) * impulse.x);
+       }
+
+       /** Apply an angular impulse.
+        * 
+        * @param impulse the angular impulse in units of kg*m*m/s */
+       public void applyAngularImpulse (float impulse) {
+               if (m_type != BodyType.DYNAMIC) {
+                       return;
+               }
+
+               if (isAwake() == false) {
+                       setAwake(true);
+               }
+               m_angularVelocity += m_invI * impulse;
+       }
+
+       /** Get the total mass of the body.
+        * 
+        * @return the mass, usually in kilograms (kg). */
+       public final float getMass () {
+               return m_mass;
+       }
+
+       /** Get the central rotational inertia of the body.
+        * 
+        * @return the rotational inertia, usually in kg-m^2. */
+       public final float getInertia () {
+               return m_I + m_mass * (m_sweep.localCenter.x * m_sweep.localCenter.x + m_sweep.localCenter.y * m_sweep.localCenter.y);
+       }
+
+       /** Get the mass data of the body. The rotational inertia is relative to the center of mass.
+        * 
+        * @return a struct containing the mass, inertia and center of the body. */
+       public final void getMassData (MassData data) {
+               // data.mass = m_mass;
+               // data.I = m_I + m_mass * Vec2.dot(m_sweep.localCenter, m_sweep.localCenter);
+               // data.center.set(m_sweep.localCenter);
+
+               data.mass = m_mass;
+               data.I = m_I + m_mass * (m_sweep.localCenter.x * m_sweep.localCenter.x + m_sweep.localCenter.y * m_sweep.localCenter.y);
+               data.center.x = m_sweep.localCenter.x;
+               data.center.y = m_sweep.localCenter.y;
+       }
+
+       /** Set the mass properties to override the mass properties of the fixtures. Note that this changes the center of mass position.
+        * Note that creating or destroying fixtures can also alter the mass. This function has no effect if the body isn't dynamic.
+        * 
+        * @param massData the mass properties. */
+       public final void setMassData (MassData massData) {
+               // TODO_ERIN adjust linear velocity and torque to account for movement of center.
+               assert (m_world.isLocked() == false);
+               if (m_world.isLocked() == true) {
+                       return;
+               }
+
+               if (m_type != BodyType.DYNAMIC) {
+                       return;
+               }
+
+               m_invMass = 0.0f;
+               m_I = 0.0f;
+               m_invI = 0.0f;
+
+               m_mass = massData.mass;
+               if (m_mass <= 0.0f) {
+                       m_mass = 1f;
+               }
+
+               m_invMass = 1.0f / m_mass;
+
+               if (massData.I > 0.0f && (m_flags & e_fixedRotationFlag) == 0) {
+                       m_I = massData.I - m_mass * Vec2.dot(massData.center, massData.center);
+                       assert (m_I > 0.0f);
+                       m_invI = 1.0f / m_I;
+               }
+
+               final Vec2 oldCenter = m_world.getPool().popVec2();
+               // Move center of mass.
+               oldCenter.set(m_sweep.c);
+               m_sweep.localCenter.set(massData.center);
+               // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter);
+               Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c0);
+               m_sweep.c.set(m_sweep.c0);
+
+               // Update center of mass velocity.
+               // m_linearVelocity += Cross(m_angularVelocity, m_sweep.c - oldCenter);
+               final Vec2 temp = m_world.getPool().popVec2();
+               temp.set(m_sweep.c).subLocal(oldCenter);
+               Vec2.crossToOut(m_angularVelocity, temp, temp);
+               m_linearVelocity.addLocal(temp);
+
+               m_world.getPool().pushVec2(2);
+       }
+
+       private final MassData pmd = new MassData();
+
+       /** This resets the mass properties to the sum of the mass properties of the fixtures. This normally does not need to be called
+        * unless you called setMassData to override the mass and you later want to reset the mass. */
+       public final void resetMassData () {
+               // Compute mass data from shapes. Each shape has its own density.
+               m_mass = 0.0f;
+               m_invMass = 0.0f;
+               m_I = 0.0f;
+               m_invI = 0.0f;
+               m_sweep.localCenter.setZero();
+
+               // Static and kinematic bodies have zero mass.
+               if (m_type == BodyType.STATIC || m_type == BodyType.KINEMATIC) {
+                       // m_sweep.c0 = m_sweep.c = m_xf.position;
+                       m_sweep.c0.set(m_xf.p);
+                       m_sweep.c.set(m_xf.p);
+                       m_sweep.a0 = m_sweep.a;
+                       return;
+               }
+
+               assert (m_type == BodyType.DYNAMIC);
+
+               // Accumulate mass over all fixtures.
+               final Vec2 localCenter = m_world.getPool().popVec2();
+               localCenter.setZero();
+               final Vec2 temp = m_world.getPool().popVec2();
+               final MassData massData = pmd;
+               for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
+                       if (f.m_density == 0.0f) {
+                               continue;
+                       }
+                       f.getMassData(massData);
+                       m_mass += massData.mass;
+                       // center += massData.mass * massData.center;
+                       temp.set(massData.center).mulLocal(massData.mass);
+                       localCenter.addLocal(temp);
+                       m_I += massData.I;
+               }
+
+               // Compute center of mass.
+               if (m_mass > 0.0f) {
+                       m_invMass = 1.0f / m_mass;
+                       localCenter.mulLocal(m_invMass);
+               } else {
+                       // Force all dynamic bodies to have a positive mass.
+                       m_mass = 1.0f;
+                       m_invMass = 1.0f;
+               }
+
+               if (m_I > 0.0f && (m_flags & e_fixedRotationFlag) == 0) {
+                       // Center the inertia about the center of mass.
+                       m_I -= m_mass * Vec2.dot(localCenter, localCenter);
+                       assert (m_I > 0.0f);
+                       m_invI = 1.0f / m_I;
+               } else {
+                       m_I = 0.0f;
+                       m_invI = 0.0f;
+               }
+
+               Vec2 oldCenter = m_world.getPool().popVec2();
+               // Move center of mass.
+               oldCenter.set(m_sweep.c);
+               m_sweep.localCenter.set(localCenter);
+               // m_sweep.c0 = m_sweep.c = Mul(m_xf, m_sweep.localCenter);
+               Transform.mulToOutUnsafe(m_xf, m_sweep.localCenter, m_sweep.c0);
+               m_sweep.c.set(m_sweep.c0);
+
+               // Update center of mass velocity.
+               // m_linearVelocity += Cross(m_angularVelocity, m_sweep.c - oldCenter);
+               temp.set(m_sweep.c).subLocal(oldCenter);
+
+               final Vec2 temp2 = oldCenter;
+               Vec2.crossToOutUnsafe(m_angularVelocity, temp, temp2);
+               m_linearVelocity.addLocal(temp2);
+
+               m_world.getPool().pushVec2(3);
+       }
+
+       /** Get the world coordinates of a point given the local coordinates.
+        * 
+        * @param localPoint a point on the body measured relative the the body's origin.
+        * @return the same point expressed in world coordinates. */
+       public final Vec2 getWorldPoint (Vec2 localPoint) {
+               Vec2 v = new Vec2();
+               getWorldPointToOut(localPoint, v);
+               return v;
+       }
+
+       public final void getWorldPointToOut (Vec2 localPoint, Vec2 out) {
+               Transform.mulToOut(m_xf, localPoint, out);
+       }
+
+       /** Get the world coordinates of a vector given the local coordinates.
+        * 
+        * @param localVector a vector fixed in the body.
+        * @return the same vector expressed in world coordinates. */
+       public final Vec2 getWorldVector (Vec2 localVector) {
+               Vec2 out = new Vec2();
+               getWorldVectorToOut(localVector, out);
+               return out;
+       }
+
+       public final void getWorldVectorToOut (Vec2 localVector, Vec2 out) {
+               Rot.mulToOut(m_xf.q, localVector, out);
+       }
+
+       public final void getWorldVectorToOutUnsafe (Vec2 localVector, Vec2 out) {
+               Rot.mulToOutUnsafe(m_xf.q, localVector, out);
+       }
+
+       /** Gets a local point relative to the body's origin given a world point.
+        * 
+        * @param a point in world coordinates.
+        * @return the corresponding local point relative to the body's origin. */
+       public final Vec2 getLocalPoint (Vec2 worldPoint) {
+               Vec2 out = new Vec2();
+               getLocalPointToOut(worldPoint, out);
+               return out;
+       }
+
+       public final void getLocalPointToOut (Vec2 worldPoint, Vec2 out) {
+               Transform.mulTransToOut(m_xf, worldPoint, out);
+       }
+
+       /** Gets a local vector given a world vector.
+        * 
+        * @param a vector in world coordinates.
+        * @return the corresponding local vector. */
+       public final Vec2 getLocalVector (Vec2 worldVector) {
+               Vec2 out = new Vec2();
+               getLocalVectorToOut(worldVector, out);
+               return out;
+       }
+
+       public final void getLocalVectorToOut (Vec2 worldVector, Vec2 out) {
+               Rot.mulTrans(m_xf.q, worldVector, out);
+       }
+
+       public final void getLocalVectorToOutUnsafe (Vec2 worldVector, Vec2 out) {
+               Rot.mulTransUnsafe(m_xf.q, worldVector, out);
+       }
+
+       /** Get the world linear velocity of a world point attached to this body.
+        * 
+        * @param a point in world coordinates.
+        * @return the world velocity of a point. */
+       public final Vec2 getLinearVelocityFromWorldPoint (Vec2 worldPoint) {
+               Vec2 out = new Vec2();
+               getLinearVelocityFromWorldPointToOut(worldPoint, out);
+               return out;
+       }
+
+       public final void getLinearVelocityFromWorldPointToOut (Vec2 worldPoint, Vec2 out) {
+               out.set(worldPoint).subLocal(m_sweep.c);
+               Vec2.crossToOut(m_angularVelocity, out, out);
+               out.addLocal(m_linearVelocity);
+       }
+
+       /** Get the world velocity of a local point.
+        * 
+        * @param a point in local coordinates.
+        * @return the world velocity of a point. */
+       public final Vec2 getLinearVelocityFromLocalPoint (Vec2 localPoint) {
+               Vec2 out = new Vec2();
+               getLinearVelocityFromLocalPointToOut(localPoint, out);
+               return out;
+       }
+
+       public final void getLinearVelocityFromLocalPointToOut (Vec2 localPoint, Vec2 out) {
+               getWorldPointToOut(localPoint, out);
+               getLinearVelocityFromWorldPointToOut(out, out);
+       }
+
+       /** Get the linear damping of the body. */
+       public final float getLinearDamping () {
+               return m_linearDamping;
+       }
+
+       /** Set the linear damping of the body. */
+       public final void setLinearDamping (float linearDamping) {
+               m_linearDamping = linearDamping;
+       }
+
+       /** Get the angular damping of the body. */
+       public final float getAngularDamping () {
+               return m_angularDamping;
+       }
+
+       /** Set the angular damping of the body. */
+       public final void setAngularDamping (float angularDamping) {
+               m_angularDamping = angularDamping;
+       }
+
+       public BodyType getType () {
+               return m_type;
+       }
+
+       /** Set the type of this body. This may alter the mass and velocity.
+        * 
+        * @param type */
+       public void setType (BodyType type) {
+               assert (m_world.isLocked() == false);
+               if (m_world.isLocked() == true) {
+                       return;
+               }
+
+               if (m_type == type) {
+                       return;
+               }
+
+               m_type = type;
+
+               resetMassData();
+
+               if (m_type == BodyType.STATIC) {
+                       m_linearVelocity.setZero();
+                       m_angularVelocity = 0.0f;
+                       m_sweep.a0 = m_sweep.a;
+                       m_sweep.c0.set(m_sweep.c);
+                       synchronizeFixtures();
+               }
+
+               setAwake(true);
+
+               m_force.setZero();
+               m_torque = 0.0f;
+
+               // Delete the attached contacts.
+               ContactEdge ce = m_contactList;
+               while (ce != null) {
+                       ContactEdge ce0 = ce;
+                       ce = ce.next;
+                       m_world.m_contactManager.destroy(ce0.contact);
+               }
+               m_contactList = null;
+
+               // Touch the proxies so that new contacts will be created (when appropriate)
+               BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
+               for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
+                       int proxyCount = f.m_proxyCount;
+                       for (int i = 0; i < proxyCount; ++i) {
+                               broadPhase.touchProxy(f.m_proxies[i].proxyId);
+                       }
+               }
+       }
+
+       /** Is this body treated like a bullet for continuous collision detection? */
+       public final boolean isBullet () {
+               return (m_flags & e_bulletFlag) == e_bulletFlag;
+       }
+
+       /** Should this body be treated like a bullet for continuous collision detection? */
+       public final void setBullet (boolean flag) {
+               if (flag) {
+                       m_flags |= e_bulletFlag;
+               } else {
+                       m_flags &= ~e_bulletFlag;
+               }
+       }
+
+       /** You can disable sleeping on this body. If you disable sleeping, the body will be woken.
+        * 
+        * @param flag */
+       public void setSleepingAllowed (boolean flag) {
+               if (flag) {
+                       m_flags |= e_autoSleepFlag;
+               } else {
+                       m_flags &= ~e_autoSleepFlag;
+                       setAwake(true);
+               }
+       }
+
+       /** Is this body allowed to sleep
+        * 
+        * @return */
+       public boolean isSleepingAllowed () {
+               return (m_flags & e_autoSleepFlag) == e_autoSleepFlag;
+       }
+
+       /** Set the sleep state of the body. A sleeping body has very low CPU cost.
+        * 
+        * @param flag set to true to put body to sleep, false to wake it.
+        * @param flag */
+       public void setAwake (boolean flag) {
+               if (flag) {
+                       if ((m_flags & e_awakeFlag) == 0) {
+                               m_flags |= e_awakeFlag;
+                               m_sleepTime = 0.0f;
+                       }
+               } else {
+                       m_flags &= ~e_awakeFlag;
+                       m_sleepTime = 0.0f;
+                       m_linearVelocity.setZero();
+                       m_angularVelocity = 0.0f;
+                       m_force.setZero();
+                       m_torque = 0.0f;
+               }
+       }
+
+       /** Get the sleeping state of this body.
+        * 
+        * @return true if the body is sleeping. */
+       public boolean isAwake () {
+               return (m_flags & e_awakeFlag) == e_awakeFlag;
+       }
+
+       /** Set the active state of the body. An inactive body is not simulated and cannot be collided with or woken up. If you pass a
+        * flag of true, all fixtures will be added to the broad-phase. If you pass a flag of false, all fixtures will be removed from
+        * the broad-phase and all contacts will be destroyed. Fixtures and joints are otherwise unaffected. You may continue to
+        * create/destroy fixtures and joints on inactive bodies. Fixtures on an inactive body are implicitly inactive and will not
+        * participate in collisions, ray-casts, or queries. Joints connected to an inactive body are implicitly inactive. An inactive
+        * body is still owned by a World object and remains in the body list.
+        * 
+        * @param flag */
+       public void setActive (boolean flag) {
+               assert (m_world.isLocked() == false);
+
+               if (flag == isActive()) {
+                       return;
+               }
+
+               if (flag) {
+                       m_flags |= e_activeFlag;
+
+                       // Create all proxies.
+                       BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
+                       for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
+                               f.createProxies(broadPhase, m_xf);
+                       }
+
+                       // Contacts are created the next time step.
+               } else {
+                       m_flags &= ~e_activeFlag;
+
+                       // Destroy all proxies.
+                       BroadPhase broadPhase = m_world.m_contactManager.m_broadPhase;
+                       for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
+                               f.destroyProxies(broadPhase);
+                       }
+
+                       // Destroy the attached contacts.
+                       ContactEdge ce = m_contactList;
+                       while (ce != null) {
+                               ContactEdge ce0 = ce;
+                               ce = ce.next;
+                               m_world.m_contactManager.destroy(ce0.contact);
+                       }
+                       m_contactList = null;
+               }
+       }
+
+       /** Get the active state of the body.
+        * 
+        * @return */
+       public boolean isActive () {
+               return (m_flags & e_activeFlag) == e_activeFlag;
+       }
+
+       /** Set this body to have fixed rotation. This causes the mass to be reset.
+        * 
+        * @param flag */
+       public void setFixedRotation (boolean flag) {
+               if (flag) {
+                       m_flags |= e_fixedRotationFlag;
+               } else {
+                       m_flags &= ~e_fixedRotationFlag;
+               }
+
+               resetMassData();
+       }
+
+       /** Does this body have fixed rotation?
+        * 
+        * @return */
+       public boolean isFixedRotation () {
+               return (m_flags & e_fixedRotationFlag) == e_fixedRotationFlag;
+       }
+
+       /** Get the list of all fixtures attached to this body. */
+       public final Fixture getFixtureList () {
+               return m_fixtureList;
+       }
+
+       /** Get the list of all joints attached to this body. */
+       public final JointEdge getJointList () {
+               return m_jointList;
+       }
+
+       /** Get the list of all contacts attached to this body.
+        * 
+        * @warning this list changes during the time step and you may miss some collisions if you don't use ContactListener. */
+       public final ContactEdge getContactList () {
+               return m_contactList;
+       }
+
+       /** Get the next body in the world's body list. */
+       public final Body getNext () {
+               return m_next;
+       }
+
+       /** Get the user data pointer that was provided in the body definition. */
+       public final Object getUserData () {
+               return m_userData;
+       }
+
+       /** Set the user data. Use this to store your application specific data. */
+       public final void setUserData (Object data) {
+               m_userData = data;
+       }
+
+       /** Get the parent world of this body. */
+       public final World getWorld () {
+               return m_world;
+       }
+
+       // djm pooling
+       private final Transform pxf = new Transform();
+
+       protected final void synchronizeFixtures () {
+               final Transform xf1 = pxf;
+               // xf1.position = m_sweep.c0 - Mul(xf1.R, m_sweep.localCenter);
+
+               // xf1.q.set(m_sweep.a0);
+               // Rot.mulToOutUnsafe(xf1.q, m_sweep.localCenter, xf1.p);
+               // xf1.p.mulLocal(-1).addLocal(m_sweep.c0);
+               // inlined:
+               xf1.q.s = MathUtils.sin(m_sweep.a0);
+               xf1.q.c = MathUtils.cos(m_sweep.a0);
+               xf1.p.x = m_sweep.c0.x - xf1.q.c * m_sweep.localCenter.x + xf1.q.s * m_sweep.localCenter.y;
+               xf1.p.y = m_sweep.c0.y - xf1.q.s * m_sweep.localCenter.x - xf1.q.c * m_sweep.localCenter.y;
+               // end inline
+
+               for (Fixture f = m_fixtureList; f != null; f = f.m_next) {
+                       f.synchronize(m_world.m_contactManager.m_broadPhase, xf1, m_xf);
+               }
+       }
+
+       public final void synchronizeTransform () {
+               // m_xf.q.set(m_sweep.a);
+               //
+               // // m_xf.position = m_sweep.c - Mul(m_xf.R, m_sweep.localCenter);
+               // Rot.mulToOutUnsafe(m_xf.q, m_sweep.localCenter, m_xf.p);
+               // m_xf.p.mulLocal(-1).addLocal(m_sweep.c);
+               //
+               m_xf.q.s = MathUtils.sin(m_sweep.a);
+               m_xf.q.c = MathUtils.cos(m_sweep.a);
+               Rot q = m_xf.q;
+               Vec2 v = m_sweep.localCenter;
+               m_xf.p.x = m_sweep.c.x - q.c * v.x + q.s * v.y;
+               m_xf.p.y = m_sweep.c.y - q.s * v.x - q.c * v.y;
+       }
+
+       /** This is used to prevent connected bodies from colliding. It may lie, depending on the collideConnected flag.
+        * 
+        * @param other
+        * @return */
+       public boolean shouldCollide (Body other) {
+               // At least one body should be dynamic.
+               if (m_type != BodyType.DYNAMIC && other.m_type != BodyType.DYNAMIC) {
+                       return false;
+               }
+
+               // Does a joint prevent collision?
+               for (JointEdge jn = m_jointList; jn != null; jn = jn.next) {
+                       if (jn.other == other) {
+                               if (jn.joint.m_collideConnected == false) {
+                                       return false;
+                               }
+                       }
+               }
+
+               return true;
+       }
+
+       protected final void advance (float t) {
+               // Advance to the new safe time. This doesn't sync the broad-phase.
+               m_sweep.advance(t);
+               m_sweep.c.set(m_sweep.c0);
+               m_sweep.a = m_sweep.a0;
+               m_xf.q.set(m_sweep.a);
+               // m_xf.position = m_sweep.c - Mul(m_xf.R, m_sweep.localCenter);
+               Rot.mulToOutUnsafe(m_xf.q, m_sweep.localCenter, m_xf.p);
+               m_xf.p.mulLocal(-1).addLocal(m_sweep.c);
+       }
 }
index b323fcc..fc1f309 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 import org.jbox2d.common.Vec2;
 
 // updated to rev 100
-/**
- * A body definition holds all the data needed to construct a rigid body.
- * You can safely re-use body definitions. Shapes are added to a body
- * after construction.
+/** A body definition holds all the data needed to construct a rigid body. You can safely re-use body definitions. Shapes are added
+ * to a body after construction.
  * 
- * @author daniel
- */
+ * @author daniel */
 public class BodyDef {
-       
-       /**
-        * The body type: static, kinematic, or dynamic.
-        * Note: if a dynamic body would have zero mass, the mass is set to one.
-        */
+
+       /** The body type: static, kinematic, or dynamic. Note: if a dynamic body would have zero mass, the mass is set to one. */
        public BodyType type;
-       
-       /**
-        * Use this to store application specific body data.
-        */
+
+       /** Use this to store application specific body data. */
        public Object userData;
-       
-       /**
-        * The world position of the body. Avoid creating bodies at the origin
-        * since this can lead to many overlapping shapes.
-        */
+
+       /** The world position of the body. Avoid creating bodies at the origin since this can lead to many overlapping shapes. */
        public Vec2 position;
-       
-       /**
-        * The world angle of the body in radians.
-        */
+
+       /** The world angle of the body in radians. */
        public float angle;
-       
-       /**
-        * The linear velocity of the body in world co-ordinates.
-        */
+
+       /** The linear velocity of the body in world co-ordinates. */
        public Vec2 linearVelocity;
-       
-       /**
-        * The angular velocity of the body.
-        */
+
+       /** The angular velocity of the body. */
        public float angularVelocity;
-       
-       /**
-        * Linear damping is use to reduce the linear velocity. The damping parameter
-        * can be larger than 1.0f but the damping effect becomes sensitive to the
-        * time step when the damping parameter is large.
-        */
+
+       /** Linear damping is use to reduce the linear velocity. The damping parameter can be larger than 1.0f but the damping effect
+        * becomes sensitive to the time step when the damping parameter is large. */
        public float linearDamping;
-       
-       /**
-        * Angular damping is use to reduce the angular velocity. The damping parameter
-        * can be larger than 1.0f but the damping effect becomes sensitive to the
-        * time step when the damping parameter is large.
-        */
+
+       /** Angular damping is use to reduce the angular velocity. The damping parameter can be larger than 1.0f but the damping effect
+        * becomes sensitive to the time step when the damping parameter is large. */
        public float angularDamping;
-       
-       /**
-        * Set this flag to false if this body should never fall asleep. Note that
-        * this increases CPU usage.
-        */
+
+       /** Set this flag to false if this body should never fall asleep. Note that this increases CPU usage. */
        public boolean allowSleep;
-       
-       /**
-        * Is this body initially sleeping?
-        */
+
+       /** Is this body initially sleeping? */
        public boolean awake;
-       
-       /**
-        * Should this body be prevented from rotating? Useful for characters.
-        */
+
+       /** Should this body be prevented from rotating? Useful for characters. */
        public boolean fixedRotation;
-       
-       /**
-        * Is this a fast moving body that should be prevented from tunneling through
-        * other moving bodies? Note that all bodies are prevented from tunneling through
-        * kinematic and static bodies. This setting is only considered on dynamic bodies.
+
+       /** Is this a fast moving body that should be prevented from tunneling through other moving bodies? Note that all bodies are
+        * prevented from tunneling through kinematic and static bodies. This setting is only considered on dynamic bodies.
         * 
-        * @warning You should use this flag sparingly since it increases processing time.
-        */
+        * @warning You should use this flag sparingly since it increases processing time. */
        public boolean bullet;
-       
-       /**
-        * Does this body start out active?
-        */
+
+       /** Does this body start out active? */
        public boolean active;
-       
-       /**
-        * Experimental: scales the inertia tensor.
-        */
+
+       /** Experimental: scales the inertia tensor. */
        public float gravityScale;
-       
-       public BodyDef() {
+
+       public BodyDef () {
                userData = null;
                position = new Vec2();
                angle = 0f;
index 3102715..b9492ed 100644 (file)
 /**
  * Created at 3:59:59 AM Jul 7, 2010
  */
+
 package org.jbox2d.dynamics;
 
 // updated to rev 100
 
-/**
- * The body type.
- * static: zero mass, zero velocity, may be manually moved
- * kinematic: zero mass, non-zero velocity set by user, moved by solver
- * dynamic: positive mass, non-zero velocity determined by forces, moved by solver
+/** The body type. static: zero mass, zero velocity, may be manually moved kinematic: zero mass, non-zero velocity set by user,
+ * moved by solver dynamic: positive mass, non-zero velocity determined by forces, moved by solver
  * 
- * @author daniel
- */
+ * @author daniel */
 public enum BodyType {
        STATIC, KINEMATIC, DYNAMIC
 }
index 00d8445..8e39230 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 import org.jbox2d.callbacks.ContactFilter;
@@ -30,261 +31,255 @@ import org.jbox2d.collision.broadphase.BroadPhase;
 import org.jbox2d.dynamics.contacts.Contact;
 import org.jbox2d.dynamics.contacts.ContactEdge;
 
-/**
- * Delegate of World.
+/** Delegate of World.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class ContactManager implements PairCallback {
 
-  public BroadPhase m_broadPhase;
-  public Contact m_contactList;
-  public int m_contactCount;
-  public ContactFilter m_contactFilter;
-  public ContactListener m_contactListener;
-
-  private final World pool;
-
-  public ContactManager(World argPool) {
-    m_contactList = null;
-    m_contactCount = 0;
-    m_contactFilter = new ContactFilter();
-    m_contactListener = null;
-    m_broadPhase = new BroadPhase();
-    pool = argPool;
-  }
-
-  /**
-   * Broad-phase callback.
-   * 
-   * @param proxyUserDataA
-   * @param proxyUserDataB
-   */
-  public void addPair(Object proxyUserDataA, Object proxyUserDataB) {
-    FixtureProxy proxyA = (FixtureProxy) proxyUserDataA;
-    FixtureProxy proxyB = (FixtureProxy) proxyUserDataB;
-
-    Fixture fixtureA = proxyA.fixture;
-    Fixture fixtureB = proxyB.fixture;
-
-    int indexA = proxyA.childIndex;
-    int indexB = proxyB.childIndex;
-
-    Body bodyA = fixtureA.getBody();
-    Body bodyB = fixtureB.getBody();
-
-    // Are the fixtures on the same body?
-    if (bodyA == bodyB) {
-      return;
-    }
-
-    // TODO_ERIN use a hash table to remove a potential bottleneck when both
-    // bodies have a lot of contacts.
-    // Does a contact already exist?
-    ContactEdge edge = bodyB.getContactList();
-    while (edge != null) {
-      if (edge.other == bodyA) {
-        Fixture fA = edge.contact.getFixtureA();
-        Fixture fB = edge.contact.getFixtureB();
-        int iA = edge.contact.getChildIndexA();
-        int iB = edge.contact.getChildIndexB();
-
-        if (fA == fixtureA && iA == indexA && fB == fixtureB && iB == indexB) {
-          // A contact already exists.
-          return;
-        }
-
-        if (fA == fixtureB && iA == indexB && fB == fixtureA && iB == indexA) {
-          // A contact already exists.
-          return;
-        }
-      }
-
-      edge = edge.next;
-    }
-
-    // Does a joint override collision? is at least one body dynamic?
-    if (bodyB.shouldCollide(bodyA) == false) {
-      return;
-    }
-
-    // Check user filtering.
-    if (m_contactFilter != null && m_contactFilter.shouldCollide(fixtureA, fixtureB) == false) {
-      return;
-    }
-
-    // Call the factory.
-    Contact c = pool.popContact(fixtureA, indexA, fixtureB, indexB);
-    if (c == null) {
-      return;
-    }
-
-    // Contact creation may swap fixtures.
-    fixtureA = c.getFixtureA();
-    fixtureB = c.getFixtureB();
-    indexA = c.getChildIndexA();
-    indexB = c.getChildIndexB();
-    bodyA = fixtureA.getBody();
-    bodyB = fixtureB.getBody();
-
-    // Insert into the world.
-    c.m_prev = null;
-    c.m_next = m_contactList;
-    if (m_contactList != null) {
-      m_contactList.m_prev = c;
-    }
-    m_contactList = c;
-
-    // Connect to island graph.
-
-    // Connect to body A
-    c.m_nodeA.contact = c;
-    c.m_nodeA.other = bodyB;
-
-    c.m_nodeA.prev = null;
-    c.m_nodeA.next = bodyA.m_contactList;
-    if (bodyA.m_contactList != null) {
-      bodyA.m_contactList.prev = c.m_nodeA;
-    }
-    bodyA.m_contactList = c.m_nodeA;
-
-    // Connect to body B
-    c.m_nodeB.contact = c;
-    c.m_nodeB.other = bodyA;
-
-    c.m_nodeB.prev = null;
-    c.m_nodeB.next = bodyB.m_contactList;
-    if (bodyB.m_contactList != null) {
-      bodyB.m_contactList.prev = c.m_nodeB;
-    }
-    bodyB.m_contactList = c.m_nodeB;
-
-    // wake up the bodies
-    bodyA.setAwake(true);
-    bodyB.setAwake(true);
-
-    ++m_contactCount;
-  }
-
-  public void findNewContacts() {
-    m_broadPhase.updatePairs(this);
-  }
-
-  public void destroy(Contact c) {
-    Fixture fixtureA = c.getFixtureA();
-    Fixture fixtureB = c.getFixtureB();
-    Body bodyA = fixtureA.getBody();
-    Body bodyB = fixtureB.getBody();
-
-    if (m_contactListener != null && c.isTouching()) {
-      m_contactListener.endContact(c);
-    }
-
-    // Remove from the world.
-    if (c.m_prev != null) {
-      c.m_prev.m_next = c.m_next;
-    }
-
-    if (c.m_next != null) {
-      c.m_next.m_prev = c.m_prev;
-    }
-
-    if (c == m_contactList) {
-      m_contactList = c.m_next;
-    }
-
-    // Remove from body 1
-    if (c.m_nodeA.prev != null) {
-      c.m_nodeA.prev.next = c.m_nodeA.next;
-    }
-
-    if (c.m_nodeA.next != null) {
-      c.m_nodeA.next.prev = c.m_nodeA.prev;
-    }
-
-    if (c.m_nodeA == bodyA.m_contactList) {
-      bodyA.m_contactList = c.m_nodeA.next;
-    }
-
-    // Remove from body 2
-    if (c.m_nodeB.prev != null) {
-      c.m_nodeB.prev.next = c.m_nodeB.next;
-    }
-
-    if (c.m_nodeB.next != null) {
-      c.m_nodeB.next.prev = c.m_nodeB.prev;
-    }
-
-    if (c.m_nodeB == bodyB.m_contactList) {
-      bodyB.m_contactList = c.m_nodeB.next;
-    }
-
-    // Call the factory.
-    pool.pushContact(c);
-    --m_contactCount;
-  }
-
-  /**
-   * This is the top level collision call for the time step. Here all the narrow phase collision is
-   * processed for the world contact list.
-   */
-  public void collide() {
-    // Update awake contacts.
-    Contact c = m_contactList;
-    while (c != null) {
-      Fixture fixtureA = c.getFixtureA();
-      Fixture fixtureB = c.getFixtureB();
-      int indexA = c.getChildIndexA();
-      int indexB = c.getChildIndexB();
-      Body bodyA = fixtureA.getBody();
-      Body bodyB = fixtureB.getBody();
-
-      // is this contact flagged for filtering?
-      if ((c.m_flags & Contact.FILTER_FLAG) == Contact.FILTER_FLAG) {
-        // Should these bodies collide?
-        if (bodyB.shouldCollide(bodyA) == false) {
-          Contact cNuke = c;
-          c = cNuke.getNext();
-          destroy(cNuke);
-          continue;
-        }
-
-        // Check user filtering.
-        if (m_contactFilter != null && m_contactFilter.shouldCollide(fixtureA, fixtureB) == false) {
-          Contact cNuke = c;
-          c = cNuke.getNext();
-          destroy(cNuke);
-          continue;
-        }
-
-        // Clear the filtering flag.
-        c.m_flags &= ~Contact.FILTER_FLAG;
-      }
-
-      boolean activeA = bodyA.isAwake() && bodyA.m_type != BodyType.STATIC;
-      boolean activeB = bodyB.isAwake() && bodyB.m_type != BodyType.STATIC;
-
-      // At least one body must be awake and it must be dynamic or kinematic.
-      if (activeA == false && activeB == false) {
-        c = c.getNext();
-        continue;
-      }
-
-      int proxyIdA = fixtureA.m_proxies[indexA].proxyId;
-      int proxyIdB = fixtureB.m_proxies[indexB].proxyId;
-      boolean overlap = m_broadPhase.testOverlap(proxyIdA, proxyIdB);
-
-      // Here we destroy contacts that cease to overlap in the broad-phase.
-      if (overlap == false) {
-        Contact cNuke = c;
-        c = cNuke.getNext();
-        destroy(cNuke);
-        continue;
-      }
-
-      // The contact persists.
-      c.update(m_contactListener);
-      c = c.getNext();
-    }
-  }
+       public BroadPhase m_broadPhase;
+       public Contact m_contactList;
+       public int m_contactCount;
+       public ContactFilter m_contactFilter;
+       public ContactListener m_contactListener;
+
+       private final World pool;
+
+       public ContactManager (World argPool) {
+               m_contactList = null;
+               m_contactCount = 0;
+               m_contactFilter = new ContactFilter();
+               m_contactListener = null;
+               m_broadPhase = new BroadPhase();
+               pool = argPool;
+       }
+
+       /** Broad-phase callback.
+        * 
+        * @param proxyUserDataA
+        * @param proxyUserDataB */
+       public void addPair (Object proxyUserDataA, Object proxyUserDataB) {
+               FixtureProxy proxyA = (FixtureProxy)proxyUserDataA;
+               FixtureProxy proxyB = (FixtureProxy)proxyUserDataB;
+
+               Fixture fixtureA = proxyA.fixture;
+               Fixture fixtureB = proxyB.fixture;
+
+               int indexA = proxyA.childIndex;
+               int indexB = proxyB.childIndex;
+
+               Body bodyA = fixtureA.getBody();
+               Body bodyB = fixtureB.getBody();
+
+               // Are the fixtures on the same body?
+               if (bodyA == bodyB) {
+                       return;
+               }
+
+               // TODO_ERIN use a hash table to remove a potential bottleneck when both
+               // bodies have a lot of contacts.
+               // Does a contact already exist?
+               ContactEdge edge = bodyB.getContactList();
+               while (edge != null) {
+                       if (edge.other == bodyA) {
+                               Fixture fA = edge.contact.getFixtureA();
+                               Fixture fB = edge.contact.getFixtureB();
+                               int iA = edge.contact.getChildIndexA();
+                               int iB = edge.contact.getChildIndexB();
+
+                               if (fA == fixtureA && iA == indexA && fB == fixtureB && iB == indexB) {
+                                       // A contact already exists.
+                                       return;
+                               }
+
+                               if (fA == fixtureB && iA == indexB && fB == fixtureA && iB == indexA) {
+                                       // A contact already exists.
+                                       return;
+                               }
+                       }
+
+                       edge = edge.next;
+               }
+
+               // Does a joint override collision? is at least one body dynamic?
+               if (bodyB.shouldCollide(bodyA) == false) {
+                       return;
+               }
+
+               // Check user filtering.
+               if (m_contactFilter != null && m_contactFilter.shouldCollide(fixtureA, fixtureB) == false) {
+                       return;
+               }
+
+               // Call the factory.
+               Contact c = pool.popContact(fixtureA, indexA, fixtureB, indexB);
+               if (c == null) {
+                       return;
+               }
+
+               // Contact creation may swap fixtures.
+               fixtureA = c.getFixtureA();
+               fixtureB = c.getFixtureB();
+               indexA = c.getChildIndexA();
+               indexB = c.getChildIndexB();
+               bodyA = fixtureA.getBody();
+               bodyB = fixtureB.getBody();
+
+               // Insert into the world.
+               c.m_prev = null;
+               c.m_next = m_contactList;
+               if (m_contactList != null) {
+                       m_contactList.m_prev = c;
+               }
+               m_contactList = c;
+
+               // Connect to island graph.
+
+               // Connect to body A
+               c.m_nodeA.contact = c;
+               c.m_nodeA.other = bodyB;
+
+               c.m_nodeA.prev = null;
+               c.m_nodeA.next = bodyA.m_contactList;
+               if (bodyA.m_contactList != null) {
+                       bodyA.m_contactList.prev = c.m_nodeA;
+               }
+               bodyA.m_contactList = c.m_nodeA;
+
+               // Connect to body B
+               c.m_nodeB.contact = c;
+               c.m_nodeB.other = bodyA;
+
+               c.m_nodeB.prev = null;
+               c.m_nodeB.next = bodyB.m_contactList;
+               if (bodyB.m_contactList != null) {
+                       bodyB.m_contactList.prev = c.m_nodeB;
+               }
+               bodyB.m_contactList = c.m_nodeB;
+
+               // wake up the bodies
+               bodyA.setAwake(true);
+               bodyB.setAwake(true);
+
+               ++m_contactCount;
+       }
+
+       public void findNewContacts () {
+               m_broadPhase.updatePairs(this);
+       }
+
+       public void destroy (Contact c) {
+               Fixture fixtureA = c.getFixtureA();
+               Fixture fixtureB = c.getFixtureB();
+               Body bodyA = fixtureA.getBody();
+               Body bodyB = fixtureB.getBody();
+
+               if (m_contactListener != null && c.isTouching()) {
+                       m_contactListener.endContact(c);
+               }
+
+               // Remove from the world.
+               if (c.m_prev != null) {
+                       c.m_prev.m_next = c.m_next;
+               }
+
+               if (c.m_next != null) {
+                       c.m_next.m_prev = c.m_prev;
+               }
+
+               if (c == m_contactList) {
+                       m_contactList = c.m_next;
+               }
+
+               // Remove from body 1
+               if (c.m_nodeA.prev != null) {
+                       c.m_nodeA.prev.next = c.m_nodeA.next;
+               }
+
+               if (c.m_nodeA.next != null) {
+                       c.m_nodeA.next.prev = c.m_nodeA.prev;
+               }
+
+               if (c.m_nodeA == bodyA.m_contactList) {
+                       bodyA.m_contactList = c.m_nodeA.next;
+               }
+
+               // Remove from body 2
+               if (c.m_nodeB.prev != null) {
+                       c.m_nodeB.prev.next = c.m_nodeB.next;
+               }
+
+               if (c.m_nodeB.next != null) {
+                       c.m_nodeB.next.prev = c.m_nodeB.prev;
+               }
+
+               if (c.m_nodeB == bodyB.m_contactList) {
+                       bodyB.m_contactList = c.m_nodeB.next;
+               }
+
+               // Call the factory.
+               pool.pushContact(c);
+               --m_contactCount;
+       }
+
+       /** This is the top level collision call for the time step. Here all the narrow phase collision is processed for the world
+        * contact list. */
+       public void collide () {
+               // Update awake contacts.
+               Contact c = m_contactList;
+               while (c != null) {
+                       Fixture fixtureA = c.getFixtureA();
+                       Fixture fixtureB = c.getFixtureB();
+                       int indexA = c.getChildIndexA();
+                       int indexB = c.getChildIndexB();
+                       Body bodyA = fixtureA.getBody();
+                       Body bodyB = fixtureB.getBody();
+
+                       // is this contact flagged for filtering?
+                       if ((c.m_flags & Contact.FILTER_FLAG) == Contact.FILTER_FLAG) {
+                               // Should these bodies collide?
+                               if (bodyB.shouldCollide(bodyA) == false) {
+                                       Contact cNuke = c;
+                                       c = cNuke.getNext();
+                                       destroy(cNuke);
+                                       continue;
+                               }
+
+                               // Check user filtering.
+                               if (m_contactFilter != null && m_contactFilter.shouldCollide(fixtureA, fixtureB) == false) {
+                                       Contact cNuke = c;
+                                       c = cNuke.getNext();
+                                       destroy(cNuke);
+                                       continue;
+                               }
+
+                               // Clear the filtering flag.
+                               c.m_flags &= ~Contact.FILTER_FLAG;
+                       }
+
+                       boolean activeA = bodyA.isAwake() && bodyA.m_type != BodyType.STATIC;
+                       boolean activeB = bodyB.isAwake() && bodyB.m_type != BodyType.STATIC;
+
+                       // At least one body must be awake and it must be dynamic or kinematic.
+                       if (activeA == false && activeB == false) {
+                               c = c.getNext();
+                               continue;
+                       }
+
+                       int proxyIdA = fixtureA.m_proxies[indexA].proxyId;
+                       int proxyIdB = fixtureB.m_proxies[indexB].proxyId;
+                       boolean overlap = m_broadPhase.testOverlap(proxyIdA, proxyIdB);
+
+                       // Here we destroy contacts that cease to overlap in the broad-phase.
+                       if (overlap == false) {
+                               Contact cNuke = c;
+                               c = cNuke.getNext();
+                               destroy(cNuke);
+                               continue;
+                       }
+
+                       // The contact persists.
+                       c.update(m_contactListener);
+                       c = c.getNext();
+               }
+       }
 }
index 4e56cf1..54ec186 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 // updated to rev 100
-/**
- * This holds contact filtering data.
+/** This holds contact filtering data.
  * 
- * @author daniel
- */
+ * @author daniel */
 public class Filter {
-       /**
-        * The collision category bits. Normally you would just set one bit.
-        */
+       /** The collision category bits. Normally you would just set one bit. */
        public int categoryBits;
-       
-       /**
-        * The collision mask bits. This states the categories that this
-        * shape would accept for collision.
-        */
+
+       /** The collision mask bits. This states the categories that this shape would accept for collision. */
        public int maskBits;
-       
-       /**
-        * Collision groups allow a certain group of objects to never collide (negative)
-        * or always collide (positive). Zero means no collision group. Non-zero group
-        * filtering always wins against the mask bits.
-        */
+
+       /** Collision groups allow a certain group of objects to never collide (negative) or always collide (positive). Zero means no
+        * collision group. Non-zero group filtering always wins against the mask bits. */
        public int groupIndex;
-       
-       public Filter() {
-         categoryBits = 0x0001;
-      maskBits = 0xFFFF;
-      groupIndex = 0;
-    }
-       
-       public void set(Filter argOther) {
+
+       public Filter () {
+               categoryBits = 0x0001;
+               maskBits = 0xFFFF;
+               groupIndex = 0;
+       }
+
+       public void set (Filter argOther) {
                categoryBits = argOther.categoryBits;
                maskBits = argOther.maskBits;
                groupIndex = argOther.groupIndex;
index 251b005..af0ad72 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 import org.jbox2d.collision.AABB;
@@ -36,407 +37,354 @@ import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.contacts.Contact;
 import org.jbox2d.dynamics.contacts.ContactEdge;
 
-/**
- * A fixture is used to attach a shape to a body for collision detection. A fixture inherits its
- * transform from its parent. Fixtures hold additional non-geometric data such as friction,
- * collision filters, etc. Fixtures are created via Body::CreateFixture.
+/** A fixture is used to attach a shape to a body for collision detection. A fixture inherits its transform from its parent.
+ * Fixtures hold additional non-geometric data such as friction, collision filters, etc. Fixtures are created via
+ * Body::CreateFixture.
  * 
  * @warning you cannot reuse fixtures.
  * 
- * @author daniel
- */
+ * @author daniel */
 public class Fixture {
 
-  public float m_density;
-
-  public Fixture m_next;
-  public Body m_body;
-
-  public Shape m_shape;
-
-  public float m_friction;
-  public float m_restitution;
-
-  public FixtureProxy[] m_proxies;
-  public int m_proxyCount;
-
-  public final Filter m_filter;
-
-  public boolean m_isSensor;
-
-  public Object m_userData;
-
-  public Fixture() {
-    m_userData = null;
-    m_body = null;
-    m_next = null;
-    m_proxies = null;
-    m_proxyCount = 0;
-    m_shape = null;
-    m_filter = new Filter();
-  }
-
-  /**
-   * Get the type of the child shape. You can use this to down cast to the concrete shape.
-   * 
-   * @return the shape type.
-   */
-  public ShapeType getType() {
-    return m_shape.getType();
-  }
-
-  /**
-   * Get the child shape. You can modify the child shape, however you should not change the number
-   * of vertices because this will crash some collision caching mechanisms.
-   * 
-   * @return
-   */
-  public Shape getShape() {
-    return m_shape;
-  }
-
-  /**
-   * Is this fixture a sensor (non-solid)?
-   * 
-   * @return the true if the shape is a sensor.
-   * @return
-   */
-  public boolean isSensor() {
-    return m_isSensor;
-  }
-
-  /**
-   * Set if this fixture is a sensor.
-   * 
-   * @param sensor
-   */
-  public void setSensor(boolean sensor) {
-    if (sensor != m_isSensor) {
-      m_body.setAwake(true);
-      m_isSensor = sensor;
-    }
-  }
-
-  /**
-   * Set the contact filtering data. This is an expensive operation and should not be called
-   * frequently. This will not update contacts until the next time step when either parent body is
-   * awake. This automatically calls refilter.
-   * 
-   * @param filter
-   */
-  public void setFilterData(final Filter filter) {
-    m_filter.set(filter);
-
-    refilter();
-  }
-
-  /**
-   * Get the contact filtering data.
-   * 
-   * @return
-   */
-  public Filter getFilterData() {
-    return m_filter;
-  }
-
-  /**
-   * Call this if you want to establish collision that was previously disabled by
-   * ContactFilter::ShouldCollide.
-   */
-  public void refilter() {
-    if (m_body == null) {
-      return;
-    }
-
-    // Flag associated contacts for filtering.
-    ContactEdge edge = m_body.getContactList();
-    while (edge != null) {
-      Contact contact = edge.contact;
-      Fixture fixtureA = contact.getFixtureA();
-      Fixture fixtureB = contact.getFixtureB();
-      if (fixtureA == this || fixtureB == this) {
-        contact.flagForFiltering();
-      }
-      edge = edge.next;
-    }
-
-    World world = m_body.getWorld();
-
-    if (world == null) {
-      return;
-    }
-
-    // Touch each proxy so that new pairs may be created
-    BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
-    for (int i = 0; i < m_proxyCount; ++i) {
-      broadPhase.touchProxy(m_proxies[i].proxyId);
-    }
-  }
-
-  /**
-   * Get the parent body of this fixture. This is NULL if the fixture is not attached.
-   * 
-   * @return the parent body.
-   * @return
-   */
-  public Body getBody() {
-    return m_body;
-  }
-
-  /**
-   * Get the next fixture in the parent body's fixture list.
-   * 
-   * @return the next shape.
-   * @return
-   */
-  public Fixture getNext() {
-    return m_next;
-  }
-
-  public void setDensity(float density) {
-    assert (density >= 0f);
-    m_density = density;
-  }
-
-  public float getDensity() {
-    return m_density;
-  }
-
-  /**
-   * Get the user data that was assigned in the fixture definition. Use this to store your
-   * application specific data.
-   * 
-   * @return
-   */
-  public Object getUserData() {
-    return m_userData;
-  }
-
-  /**
-   * Set the user data. Use this to store your application specific data.
-   * 
-   * @param data
-   */
-  public void setUserData(Object data) {
-    m_userData = data;
-  }
-
-  /**
-   * Test a point for containment in this fixture. This only works for convex shapes.
-   * 
-   * @param p a point in world coordinates.
-   * @return
-   */
-  public boolean testPoint(final Vec2 p) {
-    return m_shape.testPoint(m_body.m_xf, p);
-  }
-
-  /**
-   * Cast a ray against this shape.
-   * 
-   * @param output the ray-cast results.
-   * @param input the ray-cast input parameters.
-   * @param output
-   * @param input
-   */
-  public boolean raycast(RayCastOutput output, RayCastInput input, int childIndex) {
-    return m_shape.raycast(output, input, m_body.m_xf, childIndex);
-  }
-
-  /**
-   * Get the mass data for this fixture. The mass data is based on the density and the shape. The
-   * rotational inertia is about the shape's origin.
-   * 
-   * @return
-   */
-  public void getMassData(MassData massData) {
-    m_shape.computeMass(massData, m_density);
-  }
-
-  /**
-   * Get the coefficient of friction.
-   * 
-   * @return
-   */
-  public float getFriction() {
-    return m_friction;
-  }
-
-  /**
-   * Set the coefficient of friction. This will _not_ change the friction of existing contacts.
-   * 
-   * @param friction
-   */
-  public void setFriction(float friction) {
-    m_friction = friction;
-  }
-
-  /**
-   * Get the coefficient of restitution.
-   * 
-   * @return
-   */
-  public float getRestitution() {
-    return m_restitution;
-  }
-
-  /**
-   * Set the coefficient of restitution. This will _not_ change the restitution of existing
-   * contacts.
-   * 
-   * @param restitution
-   */
-  public void setRestitution(float restitution) {
-    m_restitution = restitution;
-  }
-
-  /**
-   * Get the fixture's AABB. This AABB may be enlarge and/or stale. If you need a more accurate
-   * AABB, compute it using the shape and the body transform.
-   * 
-   * @return
-   */
-  public AABB getAABB(int childIndex) {
-    assert (childIndex >= 0 && childIndex < m_proxyCount);
-    return m_proxies[childIndex].aabb;
-  }
-
-  /**
-   * Dump this fixture to the log file.
-   * 
-   * @param bodyIndex
-   */
-  public void dump(int bodyIndex) {
-
-  }
-
-
-  // We need separation create/destroy functions from the constructor/destructor because
-  // the destructor cannot access the allocator (no destructor arguments allowed by C++).
-
-  public void create(Body body, FixtureDef def) {
-    m_userData = def.userData;
-    m_friction = def.friction;
-    m_restitution = def.restitution;
-
-    m_body = body;
-    m_next = null;
-
-
-    m_filter.set(def.filter);
-
-    m_isSensor = def.isSensor;
-
-    m_shape = def.shape.clone();
-
-    // Reserve proxy space
-    int childCount = m_shape.getChildCount();
-    if (m_proxies == null) {
-      m_proxies = new FixtureProxy[childCount];
-      for (int i = 0; i < childCount; i++) {
-        m_proxies[i] = new FixtureProxy();
-        m_proxies[i].fixture = null;
-        m_proxies[i].proxyId = BroadPhase.NULL_PROXY;
-      }
-    }
-
-    if (m_proxies.length < childCount) {
-      FixtureProxy[] old = m_proxies;
-      int newLen = MathUtils.max(old.length * 2, childCount);
-      m_proxies = new FixtureProxy[newLen];
-      System.arraycopy(old, 0, m_proxies, 0, old.length);
-      for (int i = 0; i < newLen; i++) {
-        if (i >= old.length) {
-          m_proxies[i] = new FixtureProxy();
-        }
-        m_proxies[i].fixture = null;
-        m_proxies[i].proxyId = BroadPhase.NULL_PROXY;
-      }
-    }
-    m_proxyCount = 0;
-
-    m_density = def.density;
-  }
-
-  public void destroy() {
-    // The proxies must be destroyed before calling this.
-    assert (m_proxyCount == 0);
-
-    // Free the child shape.
-    m_shape = null;
-    m_proxies = null;
-    m_next = null;
-
-    // TODO pool shapes
-    // TODO pool fixtures
-  }
-
-  // These support body activation/deactivation.
-  public void createProxies(BroadPhase broadPhase, final Transform xf) {
-    assert (m_proxyCount == 0);
-
-    // Create proxies in the broad-phase.
-    m_proxyCount = m_shape.getChildCount();
-
-    for (int i = 0; i < m_proxyCount; ++i) {
-      FixtureProxy proxy = m_proxies[i];
-      m_shape.computeAABB(proxy.aabb, xf, i);
-      proxy.proxyId = broadPhase.createProxy(proxy.aabb, proxy);
-      proxy.fixture = this;
-      proxy.childIndex = i;
-    }
-  }
-
-  /**
-   * Internal method
-   * 
-   * @param broadPhase
-   */
-  public void destroyProxies(BroadPhase broadPhase) {
-    // Destroy proxies in the broad-phase.
-    for (int i = 0; i < m_proxyCount; ++i) {
-      FixtureProxy proxy = m_proxies[i];
-      broadPhase.destroyProxy(proxy.proxyId);
-      proxy.proxyId = BroadPhase.NULL_PROXY;
-    }
-
-    m_proxyCount = 0;
-  }
-
-  private final AABB pool1 = new AABB();
-  private final AABB pool2 = new AABB();
-  private final Vec2 displacement = new Vec2();
-
-  /**
-   * Internal method
-   * 
-   * @param broadPhase
-   * @param xf1
-   * @param xf2
-   */
-  protected void synchronize(BroadPhase broadPhase, final Transform transform1,
-      final Transform transform2) {
-    if (m_proxyCount == 0) {
-      return;
-    }
-
-    for (int i = 0; i < m_proxyCount; ++i) {
-      FixtureProxy proxy = m_proxies[i];
-
-      // Compute an AABB that covers the swept shape (may miss some rotation effect).
-      final AABB aabb1 = pool1;
-      final AABB aab = pool2;
-      m_shape.computeAABB(aabb1, transform1, proxy.childIndex);
-      m_shape.computeAABB(aab, transform2, proxy.childIndex);
-
-      proxy.aabb.lowerBound.x = aabb1.lowerBound.x < aab.lowerBound.x ? aabb1.lowerBound.x : aab.lowerBound.x;
-      proxy.aabb.lowerBound.y = aabb1.lowerBound.y < aab.lowerBound.y ? aabb1.lowerBound.y : aab.lowerBound.y;
-      proxy.aabb.upperBound.x = aabb1.upperBound.x > aab.upperBound.x ? aabb1.upperBound.x : aab.upperBound.x;
-      proxy.aabb.upperBound.y = aabb1.upperBound.y > aab.upperBound.y ? aabb1.upperBound.y : aab.upperBound.y;
-      displacement.x = transform2.p.x - transform1.p.x;
-      displacement.y = transform2.p.y - transform1.p.y;
-
-      broadPhase.moveProxy(proxy.proxyId, proxy.aabb, displacement);
-    }
-  }
+       public float m_density;
+
+       public Fixture m_next;
+       public Body m_body;
+
+       public Shape m_shape;
+
+       public float m_friction;
+       public float m_restitution;
+
+       public FixtureProxy[] m_proxies;
+       public int m_proxyCount;
+
+       public final Filter m_filter;
+
+       public boolean m_isSensor;
+
+       public Object m_userData;
+
+       public Fixture () {
+               m_userData = null;
+               m_body = null;
+               m_next = null;
+               m_proxies = null;
+               m_proxyCount = 0;
+               m_shape = null;
+               m_filter = new Filter();
+       }
+
+       /** Get the type of the child shape. You can use this to down cast to the concrete shape.
+        * 
+        * @return the shape type. */
+       public ShapeType getType () {
+               return m_shape.getType();
+       }
+
+       /** Get the child shape. You can modify the child shape, however you should not change the number of vertices because this will
+        * crash some collision caching mechanisms.
+        * 
+        * @return */
+       public Shape getShape () {
+               return m_shape;
+       }
+
+       /** Is this fixture a sensor (non-solid)?
+        * 
+        * @return the true if the shape is a sensor.
+        * @return */
+       public boolean isSensor () {
+               return m_isSensor;
+       }
+
+       /** Set if this fixture is a sensor.
+        * 
+        * @param sensor */
+       public void setSensor (boolean sensor) {
+               if (sensor != m_isSensor) {
+                       m_body.setAwake(true);
+                       m_isSensor = sensor;
+               }
+       }
+
+       /** Set the contact filtering data. This is an expensive operation and should not be called frequently. This will not update
+        * contacts until the next time step when either parent body is awake. This automatically calls refilter.
+        * 
+        * @param filter */
+       public void setFilterData (final Filter filter) {
+               m_filter.set(filter);
+
+               refilter();
+       }
+
+       /** Get the contact filtering data.
+        * 
+        * @return */
+       public Filter getFilterData () {
+               return m_filter;
+       }
+
+       /** Call this if you want to establish collision that was previously disabled by ContactFilter::ShouldCollide. */
+       public void refilter () {
+               if (m_body == null) {
+                       return;
+               }
+
+               // Flag associated contacts for filtering.
+               ContactEdge edge = m_body.getContactList();
+               while (edge != null) {
+                       Contact contact = edge.contact;
+                       Fixture fixtureA = contact.getFixtureA();
+                       Fixture fixtureB = contact.getFixtureB();
+                       if (fixtureA == this || fixtureB == this) {
+                               contact.flagForFiltering();
+                       }
+                       edge = edge.next;
+               }
+
+               World world = m_body.getWorld();
+
+               if (world == null) {
+                       return;
+               }
+
+               // Touch each proxy so that new pairs may be created
+               BroadPhase broadPhase = world.m_contactManager.m_broadPhase;
+               for (int i = 0; i < m_proxyCount; ++i) {
+                       broadPhase.touchProxy(m_proxies[i].proxyId);
+               }
+       }
+
+       /** Get the parent body of this fixture. This is NULL if the fixture is not attached.
+        * 
+        * @return the parent body.
+        * @return */
+       public Body getBody () {
+               return m_body;
+       }
+
+       /** Get the next fixture in the parent body's fixture list.
+        * 
+        * @return the next shape.
+        * @return */
+       public Fixture getNext () {
+               return m_next;
+       }
+
+       public void setDensity (float density) {
+               assert (density >= 0f);
+               m_density = density;
+       }
+
+       public float getDensity () {
+               return m_density;
+       }
+
+       /** Get the user data that was assigned in the fixture definition. Use this to store your application specific data.
+        * 
+        * @return */
+       public Object getUserData () {
+               return m_userData;
+       }
+
+       /** Set the user data. Use this to store your application specific data.
+        * 
+        * @param data */
+       public void setUserData (Object data) {
+               m_userData = data;
+       }
+
+       /** Test a point for containment in this fixture. This only works for convex shapes.
+        * 
+        * @param p a point in world coordinates.
+        * @return */
+       public boolean testPoint (final Vec2 p) {
+               return m_shape.testPoint(m_body.m_xf, p);
+       }
+
+       /** Cast a ray against this shape.
+        * 
+        * @param output the ray-cast results.
+        * @param input the ray-cast input parameters.
+        * @param output
+        * @param input */
+       public boolean raycast (RayCastOutput output, RayCastInput input, int childIndex) {
+               return m_shape.raycast(output, input, m_body.m_xf, childIndex);
+       }
+
+       /** Get the mass data for this fixture. The mass data is based on the density and the shape. The rotational inertia is about the
+        * shape's origin.
+        * 
+        * @return */
+       public void getMassData (MassData massData) {
+               m_shape.computeMass(massData, m_density);
+       }
+
+       /** Get the coefficient of friction.
+        * 
+        * @return */
+       public float getFriction () {
+               return m_friction;
+       }
+
+       /** Set the coefficient of friction. This will _not_ change the friction of existing contacts.
+        * 
+        * @param friction */
+       public void setFriction (float friction) {
+               m_friction = friction;
+       }
+
+       /** Get the coefficient of restitution.
+        * 
+        * @return */
+       public float getRestitution () {
+               return m_restitution;
+       }
+
+       /** Set the coefficient of restitution. This will _not_ change the restitution of existing contacts.
+        * 
+        * @param restitution */
+       public void setRestitution (float restitution) {
+               m_restitution = restitution;
+       }
+
+       /** Get the fixture's AABB. This AABB may be enlarge and/or stale. If you need a more accurate AABB, compute it using the shape
+        * and the body transform.
+        * 
+        * @return */
+       public AABB getAABB (int childIndex) {
+               assert (childIndex >= 0 && childIndex < m_proxyCount);
+               return m_proxies[childIndex].aabb;
+       }
+
+       /** Dump this fixture to the log file.
+        * 
+        * @param bodyIndex */
+       public void dump (int bodyIndex) {
+
+       }
+
+       // We need separation create/destroy functions from the constructor/destructor because
+       // the destructor cannot access the allocator (no destructor arguments allowed by C++).
+
+       public void create (Body body, FixtureDef def) {
+               m_userData = def.userData;
+               m_friction = def.friction;
+               m_restitution = def.restitution;
+
+               m_body = body;
+               m_next = null;
+
+               m_filter.set(def.filter);
+
+               m_isSensor = def.isSensor;
+
+               m_shape = def.shape.clone();
+
+               // Reserve proxy space
+               int childCount = m_shape.getChildCount();
+               if (m_proxies == null) {
+                       m_proxies = new FixtureProxy[childCount];
+                       for (int i = 0; i < childCount; i++) {
+                               m_proxies[i] = new FixtureProxy();
+                               m_proxies[i].fixture = null;
+                               m_proxies[i].proxyId = BroadPhase.NULL_PROXY;
+                       }
+               }
+
+               if (m_proxies.length < childCount) {
+                       FixtureProxy[] old = m_proxies;
+                       int newLen = MathUtils.max(old.length * 2, childCount);
+                       m_proxies = new FixtureProxy[newLen];
+                       System.arraycopy(old, 0, m_proxies, 0, old.length);
+                       for (int i = 0; i < newLen; i++) {
+                               if (i >= old.length) {
+                                       m_proxies[i] = new FixtureProxy();
+                               }
+                               m_proxies[i].fixture = null;
+                               m_proxies[i].proxyId = BroadPhase.NULL_PROXY;
+                       }
+               }
+               m_proxyCount = 0;
+
+               m_density = def.density;
+       }
+
+       public void destroy () {
+               // The proxies must be destroyed before calling this.
+               assert (m_proxyCount == 0);
+
+               // Free the child shape.
+               m_shape = null;
+               m_proxies = null;
+               m_next = null;
+
+               // TODO pool shapes
+               // TODO pool fixtures
+       }
+
+       // These support body activation/deactivation.
+       public void createProxies (BroadPhase broadPhase, final Transform xf) {
+               assert (m_proxyCount == 0);
+
+               // Create proxies in the broad-phase.
+               m_proxyCount = m_shape.getChildCount();
+
+               for (int i = 0; i < m_proxyCount; ++i) {
+                       FixtureProxy proxy = m_proxies[i];
+                       m_shape.computeAABB(proxy.aabb, xf, i);
+                       proxy.proxyId = broadPhase.createProxy(proxy.aabb, proxy);
+                       proxy.fixture = this;
+                       proxy.childIndex = i;
+               }
+       }
+
+       /** Internal method
+        * 
+        * @param broadPhase */
+       public void destroyProxies (BroadPhase broadPhase) {
+               // Destroy proxies in the broad-phase.
+               for (int i = 0; i < m_proxyCount; ++i) {
+                       FixtureProxy proxy = m_proxies[i];
+                       broadPhase.destroyProxy(proxy.proxyId);
+                       proxy.proxyId = BroadPhase.NULL_PROXY;
+               }
+
+               m_proxyCount = 0;
+       }
+
+       private final AABB pool1 = new AABB();
+       private final AABB pool2 = new AABB();
+       private final Vec2 displacement = new Vec2();
+
+       /** Internal method
+        * 
+        * @param broadPhase
+        * @param xf1
+        * @param xf2 */
+       protected void synchronize (BroadPhase broadPhase, final Transform transform1, final Transform transform2) {
+               if (m_proxyCount == 0) {
+                       return;
+               }
+
+               for (int i = 0; i < m_proxyCount; ++i) {
+                       FixtureProxy proxy = m_proxies[i];
+
+                       // Compute an AABB that covers the swept shape (may miss some rotation effect).
+                       final AABB aabb1 = pool1;
+                       final AABB aab = pool2;
+                       m_shape.computeAABB(aabb1, transform1, proxy.childIndex);
+                       m_shape.computeAABB(aab, transform2, proxy.childIndex);
+
+                       proxy.aabb.lowerBound.x = aabb1.lowerBound.x < aab.lowerBound.x ? aabb1.lowerBound.x : aab.lowerBound.x;
+                       proxy.aabb.lowerBound.y = aabb1.lowerBound.y < aab.lowerBound.y ? aabb1.lowerBound.y : aab.lowerBound.y;
+                       proxy.aabb.upperBound.x = aabb1.upperBound.x > aab.upperBound.x ? aabb1.upperBound.x : aab.upperBound.x;
+                       proxy.aabb.upperBound.y = aabb1.upperBound.y > aab.upperBound.y ? aabb1.upperBound.y : aab.upperBound.y;
+                       displacement.x = transform2.p.x - transform1.p.x;
+                       displacement.y = transform2.p.y - transform1.p.y;
+
+                       broadPhase.moveProxy(proxy.proxyId, proxy.aabb, displacement);
+               }
+       }
 }
index 1d174f2..0b50ad9 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 import org.jbox2d.collision.shapes.Shape;
 
 // updated to rev 100
-/**
- * A fixture definition is used to create a fixture. This class defines an
- * abstract fixture definition. You can reuse fixture definitions safely.
- *
- * @author daniel
- */
+/** A fixture definition is used to create a fixture. This class defines an abstract fixture definition. You can reuse fixture
+ * definitions safely.
+ * 
+ * @author daniel */
 public class FixtureDef {
-       /**
-        * The shape, this must be set. The shape will be cloned, so you
-        * can create the shape on the stack.
-        */
+       /** The shape, this must be set. The shape will be cloned, so you can create the shape on the stack. */
        public Shape shape = null;
-       
-       /**
-        * Use this to store application specific fixture data.
-        */
+
+       /** Use this to store application specific fixture data. */
        public Object userData;
-       
-       /**
-        * The friction coefficient, usually in the range [0,1].
-        */
+
+       /** The friction coefficient, usually in the range [0,1]. */
        public float friction;
-       
-       /**
-        * The restitution (elasticity) usually in the range [0,1].
-        */
+
+       /** The restitution (elasticity) usually in the range [0,1]. */
        public float restitution;
-       
-       /**
-        * The density, usually in kg/m^2
-        */
+
+       /** The density, usually in kg/m^2 */
        public float density;
-       
-       /**
-        * A sensor shape collects contact information but never generates a collision
-        * response.
-        */
+
+       /** A sensor shape collects contact information but never generates a collision response. */
        public boolean isSensor;
-       
-       /**
-        * Contact filtering data;
-        */
+
+       /** Contact filtering data; */
        public Filter filter;
-       
-       public FixtureDef(){
+
+       public FixtureDef () {
                shape = null;
                userData = null;
                friction = 0.2f;
index 85d4717..b4fb036 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics;\r
 \r
 import org.jbox2d.collision.AABB;\r
 \r
-/**\r
- * This proxy is used internally to connect fixtures to the broad-phase.\r
+/** This proxy is used internally to connect fixtures to the broad-phase.\r
  * \r
- * @author Daniel\r
- */\r
+ * @author Daniel */\r
 public class FixtureProxy {\r
-  final AABB aabb = new AABB();\r
-  Fixture fixture;\r
-  int childIndex;\r
-  int proxyId;\r
+       final AABB aabb = new AABB();\r
+       Fixture fixture;\r
+       int childIndex;\r
+       int proxyId;\r
 }\r
index f0cc5b1..f46bd7f 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 import org.jbox2d.callbacks.ContactImpulse;
@@ -155,435 +156,430 @@ import org.jbox2d.dynamics.joints.Joint;
  However, we can compute sin+cos of the same angle fast.
  */
 
-/**
- * This is an internal class.
+/** This is an internal class.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class Island {
 
-  public ContactListener m_listener;
-
-  public Body[] m_bodies;
-  public Contact[] m_contacts;
-  public Joint[] m_joints;
-
-  public Position[] m_positions;
-  public Velocity[] m_velocities;
-
-  public int m_bodyCount;
-  public int m_jointCount;
-  public int m_contactCount;
-
-  public int m_bodyCapacity;
-  public int m_contactCapacity;
-  public int m_jointCapacity;
-
-  public Island() {
-
-  }
-
-  public void init(int bodyCapacity, int contactCapacity, int jointCapacity,
-      ContactListener listener) {
-    // System.out.println("Initializing Island");
-    m_bodyCapacity = bodyCapacity;
-    m_contactCapacity = contactCapacity;
-    m_jointCapacity = jointCapacity;
-    m_bodyCount = 0;
-    m_contactCount = 0;
-    m_jointCount = 0;
-
-    m_listener = listener;
-
-    if (m_bodies == null || m_bodyCapacity > m_bodies.length) {
-      m_bodies = new Body[m_bodyCapacity];
-    }
-    if (m_joints == null || m_jointCapacity > m_joints.length) {
-      m_joints = new Joint[m_jointCapacity];
-    }
-    if (m_contacts == null || m_contactCapacity > m_contacts.length) {
-      m_contacts = new Contact[m_contactCapacity];
-    }
-
-    // dynamic array
-    if (m_velocities == null || m_bodyCapacity > m_velocities.length) {
-      final Velocity[] old = m_velocities == null ? new Velocity[0] : m_velocities;
-      m_velocities = new Velocity[m_bodyCapacity];
-      System.arraycopy(old, 0, m_velocities, 0, old.length);
-      for (int i = old.length; i < m_velocities.length; i++) {
-        m_velocities[i] = new Velocity();
-      }
-    }
-
-
-    // dynamic array
-    if (m_positions == null || m_bodyCapacity > m_positions.length) {
-      final Position[] old = m_positions == null ? new Position[0] : m_positions;
-      m_positions = new Position[m_bodyCapacity];
-      System.arraycopy(old, 0, m_positions, 0, old.length);
-      for (int i = old.length; i < m_positions.length; i++) {
-        m_positions[i] = new Position();
-      }
-    }
-  }
-
-  public void clear() {
-    m_bodyCount = 0;
-    m_contactCount = 0;
-    m_jointCount = 0;
-  }
-
-  private final ContactSolver contactSolver = new ContactSolver();
-  private final Vec2 translation = new Vec2();
-  private final Timer timer = new Timer();
-  private final SolverData solverData = new SolverData();
-  private final ContactSolverDef solverDef = new ContactSolverDef();
-
-  public void solve(Profile profile, TimeStep step, Vec2 gravity, boolean allowSleep) {
-
-    // System.out.println("Solving Island");
-    float h = step.dt;
-
-    // Integrate velocities and apply damping. Initialize the body state.
-    for (int i = 0; i < m_bodyCount; ++i) {
-      final Body b = m_bodies[i];
-      final Vec2 c = b.m_sweep.c;
-      float a = b.m_sweep.a;
-      final Vec2 v = b.m_linearVelocity;
-      float w = b.m_angularVelocity;
-
-      // Store positions for continuous collision.
-      b.m_sweep.c0.set(b.m_sweep.c);
-      b.m_sweep.a0 = b.m_sweep.a;
-
-      if (b.m_type == BodyType.DYNAMIC) {
-        // Integrate velocities.
-        // v += h * (b.m_gravityScale * gravity + b.m_invMass * b.m_force);
-        v.x += h * (b.m_gravityScale * gravity.x + b.m_invMass * b.m_force.x);
-        v.y += h * (b.m_gravityScale * gravity.y + b.m_invMass * b.m_force.y);
-        w += h * b.m_invI * b.m_torque;
-
-        // Apply damping.
-        // ODE: dv/dt + c * v = 0
-        // Solution: v(t) = v0 * exp(-c * t)
-        // Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v *
-        // exp(-c * dt)
-        // v2 = exp(-c * dt) * v1
-        // Taylor expansion:
-        // v2 = (1.0f - c * dt) * v1
-        v.mulLocal(MathUtils.clamp(1.0f - h * b.m_linearDamping, 0.0f, 1.0f));
-        w *= MathUtils.clamp(1.0f - h * b.m_angularDamping, 0.0f, 1.0f);
-      }
-//      assert (v.x == 0);
-
-      m_positions[i].c.set(c);
-      m_positions[i].a = a;
-      m_velocities[i].v.set(v);
-      m_velocities[i].w = w;
-    }
-
-    timer.reset();
-
-    // Solver data
-    solverData.step = step;
-    solverData.positions = m_positions;
-    solverData.velocities = m_velocities;
-
-    // Initialize velocity constraints.
-    solverDef.step = step;
-    solverDef.contacts = m_contacts;
-    solverDef.count = m_contactCount;
-    solverDef.positions = m_positions;
-    solverDef.velocities = m_velocities;
-
-    contactSolver.init(solverDef);
-    // System.out.println("island init vel");
-    contactSolver.initializeVelocityConstraints();
-
-    if (step.warmStarting) {
-      // System.out.println("island warm start");
-      contactSolver.warmStart();
-    }
-
-    for (int i = 0; i < m_jointCount; ++i) {
-      m_joints[i].initVelocityConstraints(solverData);
-    }
-
-    profile.solveInit = timer.getMilliseconds();
-
-    // Solve velocity constraints
-    timer.reset();
-    // System.out.println("island solving velocities");
-    for (int i = 0; i < step.velocityIterations; ++i) {
-      for (int j = 0; j < m_jointCount; ++j) {
-        m_joints[j].solveVelocityConstraints(solverData);
-      }
-
-      contactSolver.solveVelocityConstraints();
-    }
-
-    // Store impulses for warm starting
-    contactSolver.storeImpulses();
-    profile.solveVelocity = timer.getMilliseconds();
-
-    // Integrate positions
-    for (int i = 0; i < m_bodyCount; ++i) {
-      final Vec2 c = m_positions[i].c;
-      float a = m_positions[i].a;
-      final Vec2 v = m_velocities[i].v;
-      float w = m_velocities[i].w;
-
-      // Check for large velocities
-      translation.x = v.x * h;
-      translation.y = v.y * h;
-
-      if (Vec2.dot(translation, translation) > Settings.maxTranslationSquared) {
-        float ratio = Settings.maxTranslation / translation.length();
-        v.x *= ratio;
-        v.y *= ratio;
-      }
-
-      float rotation = h * w;
-      if (rotation * rotation > Settings.maxRotationSquared) {
-        float ratio = Settings.maxRotation / MathUtils.abs(rotation);
-        w *= ratio;
-      }
-
-      // Integrate
-      c.x += h * v.x;
-      c.y += h * v.y;
-      a += h * w;
-
-      m_positions[i].a = a;
-      m_velocities[i].w = w;
-    }
-
-    // Solve position constraints
-    timer.reset();
-    boolean positionSolved = false;
-    for (int i = 0; i < step.positionIterations; ++i) {
-      boolean contactsOkay = contactSolver.solvePositionConstraints();
-
-      boolean jointsOkay = true;
-      for (int j = 0; j < m_jointCount; ++j) {
-        boolean jointOkay = m_joints[j].solvePositionConstraints(solverData);
-        jointsOkay = jointsOkay && jointOkay;
-      }
-
-      if (contactsOkay && jointsOkay) {
-        // Exit early if the position errors are small.
-        positionSolved = true;
-        break;
-      }
-    }
-
-    // Copy state buffers back to the bodies
-    for (int i = 0; i < m_bodyCount; ++i) {
-      Body body = m_bodies[i];
-      body.m_sweep.c.set(m_positions[i].c);
-      body.m_sweep.a = m_positions[i].a;
-      body.m_linearVelocity.set(m_velocities[i].v);
-      body.m_angularVelocity = m_velocities[i].w;
-      body.synchronizeTransform();
-    }
-
-    profile.solvePosition = timer.getMilliseconds();
-
-    report(contactSolver.m_velocityConstraints);
-
-    if (allowSleep) {
-      float minSleepTime = Float.MAX_VALUE;
-
-      final float linTolSqr = Settings.linearSleepTolerance * Settings.linearSleepTolerance;
-      final float angTolSqr = Settings.angularSleepTolerance * Settings.angularSleepTolerance;
-
-      for (int i = 0; i < m_bodyCount; ++i) {
-        Body b = m_bodies[i];
-        if (b.getType() == BodyType.STATIC) {
-          continue;
-        }
-
-        if ((b.m_flags & Body.e_autoSleepFlag) == 0
-            || b.m_angularVelocity * b.m_angularVelocity > angTolSqr
-            || Vec2.dot(b.m_linearVelocity, b.m_linearVelocity) > linTolSqr) {
-          b.m_sleepTime = 0.0f;
-          minSleepTime = 0.0f;
-        } else {
-          b.m_sleepTime += h;
-          minSleepTime = MathUtils.min(minSleepTime, b.m_sleepTime);
-        }
-      }
-
-      if (minSleepTime >= Settings.timeToSleep && positionSolved) {
-        for (int i = 0; i < m_bodyCount; ++i) {
-          Body b = m_bodies[i];
-          b.setAwake(false);
-        }
-      }
-    }
-  }
-
-  private final ContactSolver toiContactSolver = new ContactSolver();
-  private final ContactSolverDef toiSolverDef = new ContactSolverDef();
-
-  public void solveTOI(TimeStep subStep, int toiIndexA, int toiIndexB) {
-    assert (toiIndexA < m_bodyCount);
-    assert (toiIndexB < m_bodyCount);
-
-    // Initialize the body state.
-    for (int i = 0; i < m_bodyCount; ++i) {
-      Body b = m_bodies[i];
-      m_positions[i].c.set(b.m_sweep.c);
-      m_positions[i].a = b.m_sweep.a;
-      m_velocities[i].v.set(b.m_linearVelocity);
-      m_velocities[i].w = b.m_angularVelocity;
-    }
-
-    toiSolverDef.contacts = m_contacts;
-    toiSolverDef.count = m_contactCount;
-    toiSolverDef.step = subStep;
-    toiSolverDef.positions = m_positions;
-    toiSolverDef.velocities = m_velocities;
-    toiContactSolver.init(toiSolverDef);
-
-    // Solve position constraints.
-    for (int i = 0; i < subStep.positionIterations; ++i) {
-      boolean contactsOkay = toiContactSolver.solveTOIPositionConstraints(toiIndexA, toiIndexB);
-      if (contactsOkay) {
-        break;
-      }
-    }
-
-    // #if 0
-    // // Is the new position really safe?
-    // for (int i = 0; i < m_contactCount; ++i)
-    // {
-    // Contact* c = m_contacts[i];
-    // Fixture* fA = c.GetFixtureA();
-    // Fixture* fB = c.GetFixtureB();
-    //
-    // Body bA = fA.GetBody();
-    // Body bB = fB.GetBody();
-    //
-    // int indexA = c.GetChildIndexA();
-    // int indexB = c.GetChildIndexB();
-    //
-    // DistanceInput input;
-    // input.proxyA.Set(fA.GetShape(), indexA);
-    // input.proxyB.Set(fB.GetShape(), indexB);
-    // input.transformA = bA.GetTransform();
-    // input.transformB = bB.GetTransform();
-    // input.useRadii = false;
-    //
-    // DistanceOutput output;
-    // SimplexCache cache;
-    // cache.count = 0;
-    // Distance(&output, &cache, &input);
-    //
-    // if (output.distance == 0 || cache.count == 3)
-    // {
-    // cache.count += 0;
-    // }
-    // }
-    // #endif
-
-    // Leap of faith to new safe state.
-    m_bodies[toiIndexA].m_sweep.c0.set(m_positions[toiIndexA].c);
-    m_bodies[toiIndexA].m_sweep.a0 = m_positions[toiIndexA].a;
-    m_bodies[toiIndexB].m_sweep.c0.set(m_positions[toiIndexB].c);
-    m_bodies[toiIndexB].m_sweep.a0 = m_positions[toiIndexB].a;
-
-    // No warm starting is needed for TOI events because warm
-    // starting impulses were applied in the discrete solver.
-    toiContactSolver.initializeVelocityConstraints();
-
-    // Solve velocity constraints.
-    for (int i = 0; i < subStep.velocityIterations; ++i) {
-      toiContactSolver.solveVelocityConstraints();
-    }
-
-    // Don't store the TOI contact forces for warm starting
-    // because they can be quite large.
-
-    float h = subStep.dt;
-
-    // Integrate positions
-    for (int i = 0; i < m_bodyCount; ++i) {
-      Vec2 c = m_positions[i].c;
-      float a = m_positions[i].a;
-      Vec2 v = m_velocities[i].v;
-      float w = m_velocities[i].w;
-
-      // Check for large velocities
-      translation.set(v).mulLocal(h);
-      if (Vec2.dot(translation, translation) > Settings.maxTranslationSquared) {
-        float ratio = Settings.maxTranslation / translation.length();
-        v.mulLocal(ratio);
-      }
-
-      float rotation = h * w;
-      if (rotation * rotation > Settings.maxRotationSquared) {
-        float ratio = Settings.maxRotation / MathUtils.abs(rotation);
-        w *= ratio;
-      }
-
-      // Integrate
-      c.x += v.x * h;
-      c.y += v.y * h;
-      a += h * w;
-
-      m_positions[i].c.set(c);
-      m_positions[i].a = a;
-      m_velocities[i].v.set(v);
-      m_velocities[i].w = w;
-
-      // Sync bodies
-      Body body = m_bodies[i];
-      body.m_sweep.c.set(c);
-      body.m_sweep.a = a;
-      body.m_linearVelocity.set(v);
-      body.m_angularVelocity = w;
-      body.synchronizeTransform();
-    }
-
-    report(toiContactSolver.m_velocityConstraints);
-  }
-
-  public void add(Body body) {
-    assert (m_bodyCount < m_bodyCapacity);
-    body.m_islandIndex = m_bodyCount;
-    m_bodies[m_bodyCount] = body;
-    ++m_bodyCount;
-  }
-
-  public void add(Contact contact) {
-    assert (m_contactCount < m_contactCapacity);
-    m_contacts[m_contactCount++] = contact;
-  }
-
-  public void add(Joint joint) {
-    assert (m_jointCount < m_jointCapacity);
-    m_joints[m_jointCount++] = joint;
-  }
-
-  private final ContactImpulse impulse = new ContactImpulse();
-
-  public void report(ContactVelocityConstraint[] constraints) {
-    if (m_listener == null) {
-      return;
-    }
-
-    for (int i = 0; i < m_contactCount; ++i) {
-      Contact c = m_contacts[i];
-
-      ContactVelocityConstraint vc = constraints[i];
-      impulse.count = vc.pointCount;
-      for (int j = 0; j < vc.pointCount; ++j) {
-        impulse.normalImpulses[j] = vc.points[j].normalImpulse;
-        impulse.tangentImpulses[j] = vc.points[j].tangentImpulse;
-      }
-
-      m_listener.postSolve(c, impulse);
-    }
-  }
+       public ContactListener m_listener;
+
+       public Body[] m_bodies;
+       public Contact[] m_contacts;
+       public Joint[] m_joints;
+
+       public Position[] m_positions;
+       public Velocity[] m_velocities;
+
+       public int m_bodyCount;
+       public int m_jointCount;
+       public int m_contactCount;
+
+       public int m_bodyCapacity;
+       public int m_contactCapacity;
+       public int m_jointCapacity;
+
+       public Island () {
+
+       }
+
+       public void init (int bodyCapacity, int contactCapacity, int jointCapacity, ContactListener listener) {
+               // System.out.println("Initializing Island");
+               m_bodyCapacity = bodyCapacity;
+               m_contactCapacity = contactCapacity;
+               m_jointCapacity = jointCapacity;
+               m_bodyCount = 0;
+               m_contactCount = 0;
+               m_jointCount = 0;
+
+               m_listener = listener;
+
+               if (m_bodies == null || m_bodyCapacity > m_bodies.length) {
+                       m_bodies = new Body[m_bodyCapacity];
+               }
+               if (m_joints == null || m_jointCapacity > m_joints.length) {
+                       m_joints = new Joint[m_jointCapacity];
+               }
+               if (m_contacts == null || m_contactCapacity > m_contacts.length) {
+                       m_contacts = new Contact[m_contactCapacity];
+               }
+
+               // dynamic array
+               if (m_velocities == null || m_bodyCapacity > m_velocities.length) {
+                       final Velocity[] old = m_velocities == null ? new Velocity[0] : m_velocities;
+                       m_velocities = new Velocity[m_bodyCapacity];
+                       System.arraycopy(old, 0, m_velocities, 0, old.length);
+                       for (int i = old.length; i < m_velocities.length; i++) {
+                               m_velocities[i] = new Velocity();
+                       }
+               }
+
+               // dynamic array
+               if (m_positions == null || m_bodyCapacity > m_positions.length) {
+                       final Position[] old = m_positions == null ? new Position[0] : m_positions;
+                       m_positions = new Position[m_bodyCapacity];
+                       System.arraycopy(old, 0, m_positions, 0, old.length);
+                       for (int i = old.length; i < m_positions.length; i++) {
+                               m_positions[i] = new Position();
+                       }
+               }
+       }
+
+       public void clear () {
+               m_bodyCount = 0;
+               m_contactCount = 0;
+               m_jointCount = 0;
+       }
+
+       private final ContactSolver contactSolver = new ContactSolver();
+       private final Vec2 translation = new Vec2();
+       private final Timer timer = new Timer();
+       private final SolverData solverData = new SolverData();
+       private final ContactSolverDef solverDef = new ContactSolverDef();
+
+       public void solve (Profile profile, TimeStep step, Vec2 gravity, boolean allowSleep) {
+
+               // System.out.println("Solving Island");
+               float h = step.dt;
+
+               // Integrate velocities and apply damping. Initialize the body state.
+               for (int i = 0; i < m_bodyCount; ++i) {
+                       final Body b = m_bodies[i];
+                       final Vec2 c = b.m_sweep.c;
+                       float a = b.m_sweep.a;
+                       final Vec2 v = b.m_linearVelocity;
+                       float w = b.m_angularVelocity;
+
+                       // Store positions for continuous collision.
+                       b.m_sweep.c0.set(b.m_sweep.c);
+                       b.m_sweep.a0 = b.m_sweep.a;
+
+                       if (b.m_type == BodyType.DYNAMIC) {
+                               // Integrate velocities.
+                               // v += h * (b.m_gravityScale * gravity + b.m_invMass * b.m_force);
+                               v.x += h * (b.m_gravityScale * gravity.x + b.m_invMass * b.m_force.x);
+                               v.y += h * (b.m_gravityScale * gravity.y + b.m_invMass * b.m_force.y);
+                               w += h * b.m_invI * b.m_torque;
+
+                               // Apply damping.
+                               // ODE: dv/dt + c * v = 0
+                               // Solution: v(t) = v0 * exp(-c * t)
+                               // Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v *
+                               // exp(-c * dt)
+                               // v2 = exp(-c * dt) * v1
+                               // Taylor expansion:
+                               // v2 = (1.0f - c * dt) * v1
+                               v.mulLocal(MathUtils.clamp(1.0f - h * b.m_linearDamping, 0.0f, 1.0f));
+                               w *= MathUtils.clamp(1.0f - h * b.m_angularDamping, 0.0f, 1.0f);
+                       }
+// assert (v.x == 0);
+
+                       m_positions[i].c.set(c);
+                       m_positions[i].a = a;
+                       m_velocities[i].v.set(v);
+                       m_velocities[i].w = w;
+               }
+
+               timer.reset();
+
+               // Solver data
+               solverData.step = step;
+               solverData.positions = m_positions;
+               solverData.velocities = m_velocities;
+
+               // Initialize velocity constraints.
+               solverDef.step = step;
+               solverDef.contacts = m_contacts;
+               solverDef.count = m_contactCount;
+               solverDef.positions = m_positions;
+               solverDef.velocities = m_velocities;
+
+               contactSolver.init(solverDef);
+               // System.out.println("island init vel");
+               contactSolver.initializeVelocityConstraints();
+
+               if (step.warmStarting) {
+                       // System.out.println("island warm start");
+                       contactSolver.warmStart();
+               }
+
+               for (int i = 0; i < m_jointCount; ++i) {
+                       m_joints[i].initVelocityConstraints(solverData);
+               }
+
+               profile.solveInit = timer.getMilliseconds();
+
+               // Solve velocity constraints
+               timer.reset();
+               // System.out.println("island solving velocities");
+               for (int i = 0; i < step.velocityIterations; ++i) {
+                       for (int j = 0; j < m_jointCount; ++j) {
+                               m_joints[j].solveVelocityConstraints(solverData);
+                       }
+
+                       contactSolver.solveVelocityConstraints();
+               }
+
+               // Store impulses for warm starting
+               contactSolver.storeImpulses();
+               profile.solveVelocity = timer.getMilliseconds();
+
+               // Integrate positions
+               for (int i = 0; i < m_bodyCount; ++i) {
+                       final Vec2 c = m_positions[i].c;
+                       float a = m_positions[i].a;
+                       final Vec2 v = m_velocities[i].v;
+                       float w = m_velocities[i].w;
+
+                       // Check for large velocities
+                       translation.x = v.x * h;
+                       translation.y = v.y * h;
+
+                       if (Vec2.dot(translation, translation) > Settings.maxTranslationSquared) {
+                               float ratio = Settings.maxTranslation / translation.length();
+                               v.x *= ratio;
+                               v.y *= ratio;
+                       }
+
+                       float rotation = h * w;
+                       if (rotation * rotation > Settings.maxRotationSquared) {
+                               float ratio = Settings.maxRotation / MathUtils.abs(rotation);
+                               w *= ratio;
+                       }
+
+                       // Integrate
+                       c.x += h * v.x;
+                       c.y += h * v.y;
+                       a += h * w;
+
+                       m_positions[i].a = a;
+                       m_velocities[i].w = w;
+               }
+
+               // Solve position constraints
+               timer.reset();
+               boolean positionSolved = false;
+               for (int i = 0; i < step.positionIterations; ++i) {
+                       boolean contactsOkay = contactSolver.solvePositionConstraints();
+
+                       boolean jointsOkay = true;
+                       for (int j = 0; j < m_jointCount; ++j) {
+                               boolean jointOkay = m_joints[j].solvePositionConstraints(solverData);
+                               jointsOkay = jointsOkay && jointOkay;
+                       }
+
+                       if (contactsOkay && jointsOkay) {
+                               // Exit early if the position errors are small.
+                               positionSolved = true;
+                               break;
+                       }
+               }
+
+               // Copy state buffers back to the bodies
+               for (int i = 0; i < m_bodyCount; ++i) {
+                       Body body = m_bodies[i];
+                       body.m_sweep.c.set(m_positions[i].c);
+                       body.m_sweep.a = m_positions[i].a;
+                       body.m_linearVelocity.set(m_velocities[i].v);
+                       body.m_angularVelocity = m_velocities[i].w;
+                       body.synchronizeTransform();
+               }
+
+               profile.solvePosition = timer.getMilliseconds();
+
+               report(contactSolver.m_velocityConstraints);
+
+               if (allowSleep) {
+                       float minSleepTime = Float.MAX_VALUE;
+
+                       final float linTolSqr = Settings.linearSleepTolerance * Settings.linearSleepTolerance;
+                       final float angTolSqr = Settings.angularSleepTolerance * Settings.angularSleepTolerance;
+
+                       for (int i = 0; i < m_bodyCount; ++i) {
+                               Body b = m_bodies[i];
+                               if (b.getType() == BodyType.STATIC) {
+                                       continue;
+                               }
+
+                               if ((b.m_flags & Body.e_autoSleepFlag) == 0 || b.m_angularVelocity * b.m_angularVelocity > angTolSqr
+                                       || Vec2.dot(b.m_linearVelocity, b.m_linearVelocity) > linTolSqr) {
+                                       b.m_sleepTime = 0.0f;
+                                       minSleepTime = 0.0f;
+                               } else {
+                                       b.m_sleepTime += h;
+                                       minSleepTime = MathUtils.min(minSleepTime, b.m_sleepTime);
+                               }
+                       }
+
+                       if (minSleepTime >= Settings.timeToSleep && positionSolved) {
+                               for (int i = 0; i < m_bodyCount; ++i) {
+                                       Body b = m_bodies[i];
+                                       b.setAwake(false);
+                               }
+                       }
+               }
+       }
+
+       private final ContactSolver toiContactSolver = new ContactSolver();
+       private final ContactSolverDef toiSolverDef = new ContactSolverDef();
+
+       public void solveTOI (TimeStep subStep, int toiIndexA, int toiIndexB) {
+               assert (toiIndexA < m_bodyCount);
+               assert (toiIndexB < m_bodyCount);
+
+               // Initialize the body state.
+               for (int i = 0; i < m_bodyCount; ++i) {
+                       Body b = m_bodies[i];
+                       m_positions[i].c.set(b.m_sweep.c);
+                       m_positions[i].a = b.m_sweep.a;
+                       m_velocities[i].v.set(b.m_linearVelocity);
+                       m_velocities[i].w = b.m_angularVelocity;
+               }
+
+               toiSolverDef.contacts = m_contacts;
+               toiSolverDef.count = m_contactCount;
+               toiSolverDef.step = subStep;
+               toiSolverDef.positions = m_positions;
+               toiSolverDef.velocities = m_velocities;
+               toiContactSolver.init(toiSolverDef);
+
+               // Solve position constraints.
+               for (int i = 0; i < subStep.positionIterations; ++i) {
+                       boolean contactsOkay = toiContactSolver.solveTOIPositionConstraints(toiIndexA, toiIndexB);
+                       if (contactsOkay) {
+                               break;
+                       }
+               }
+
+               // #if 0
+               // // Is the new position really safe?
+               // for (int i = 0; i < m_contactCount; ++i)
+               // {
+               // Contact* c = m_contacts[i];
+               // Fixture* fA = c.GetFixtureA();
+               // Fixture* fB = c.GetFixtureB();
+               //
+               // Body bA = fA.GetBody();
+               // Body bB = fB.GetBody();
+               //
+               // int indexA = c.GetChildIndexA();
+               // int indexB = c.GetChildIndexB();
+               //
+               // DistanceInput input;
+               // input.proxyA.Set(fA.GetShape(), indexA);
+               // input.proxyB.Set(fB.GetShape(), indexB);
+               // input.transformA = bA.GetTransform();
+               // input.transformB = bB.GetTransform();
+               // input.useRadii = false;
+               //
+               // DistanceOutput output;
+               // SimplexCache cache;
+               // cache.count = 0;
+               // Distance(&output, &cache, &input);
+               //
+               // if (output.distance == 0 || cache.count == 3)
+               // {
+               // cache.count += 0;
+               // }
+               // }
+               // #endif
+
+               // Leap of faith to new safe state.
+               m_bodies[toiIndexA].m_sweep.c0.set(m_positions[toiIndexA].c);
+               m_bodies[toiIndexA].m_sweep.a0 = m_positions[toiIndexA].a;
+               m_bodies[toiIndexB].m_sweep.c0.set(m_positions[toiIndexB].c);
+               m_bodies[toiIndexB].m_sweep.a0 = m_positions[toiIndexB].a;
+
+               // No warm starting is needed for TOI events because warm
+               // starting impulses were applied in the discrete solver.
+               toiContactSolver.initializeVelocityConstraints();
+
+               // Solve velocity constraints.
+               for (int i = 0; i < subStep.velocityIterations; ++i) {
+                       toiContactSolver.solveVelocityConstraints();
+               }
+
+               // Don't store the TOI contact forces for warm starting
+               // because they can be quite large.
+
+               float h = subStep.dt;
+
+               // Integrate positions
+               for (int i = 0; i < m_bodyCount; ++i) {
+                       Vec2 c = m_positions[i].c;
+                       float a = m_positions[i].a;
+                       Vec2 v = m_velocities[i].v;
+                       float w = m_velocities[i].w;
+
+                       // Check for large velocities
+                       translation.set(v).mulLocal(h);
+                       if (Vec2.dot(translation, translation) > Settings.maxTranslationSquared) {
+                               float ratio = Settings.maxTranslation / translation.length();
+                               v.mulLocal(ratio);
+                       }
+
+                       float rotation = h * w;
+                       if (rotation * rotation > Settings.maxRotationSquared) {
+                               float ratio = Settings.maxRotation / MathUtils.abs(rotation);
+                               w *= ratio;
+                       }
+
+                       // Integrate
+                       c.x += v.x * h;
+                       c.y += v.y * h;
+                       a += h * w;
+
+                       m_positions[i].c.set(c);
+                       m_positions[i].a = a;
+                       m_velocities[i].v.set(v);
+                       m_velocities[i].w = w;
+
+                       // Sync bodies
+                       Body body = m_bodies[i];
+                       body.m_sweep.c.set(c);
+                       body.m_sweep.a = a;
+                       body.m_linearVelocity.set(v);
+                       body.m_angularVelocity = w;
+                       body.synchronizeTransform();
+               }
+
+               report(toiContactSolver.m_velocityConstraints);
+       }
+
+       public void add (Body body) {
+               assert (m_bodyCount < m_bodyCapacity);
+               body.m_islandIndex = m_bodyCount;
+               m_bodies[m_bodyCount] = body;
+               ++m_bodyCount;
+       }
+
+       public void add (Contact contact) {
+               assert (m_contactCount < m_contactCapacity);
+               m_contacts[m_contactCount++] = contact;
+       }
+
+       public void add (Joint joint) {
+               assert (m_jointCount < m_jointCapacity);
+               m_joints[m_jointCount++] = joint;
+       }
+
+       private final ContactImpulse impulse = new ContactImpulse();
+
+       public void report (ContactVelocityConstraint[] constraints) {
+               if (m_listener == null) {
+                       return;
+               }
+
+               for (int i = 0; i < m_contactCount; ++i) {
+                       Contact c = m_contacts[i];
+
+                       ContactVelocityConstraint vc = constraints[i];
+                       impulse.count = vc.pointCount;
+                       for (int j = 0; j < vc.pointCount; ++j) {
+                               impulse.normalImpulses[j] = vc.points[j].normalImpulse;
+                               impulse.tangentImpulses[j] = vc.points[j].tangentImpulse;
+                       }
+
+                       m_listener.postSolve(c, impulse);
+               }
+       }
 }
index 6f2bbab..28bfd0e 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics;\r
 \r
 import java.util.List;\r
 \r
 public class Profile {\r
-  public float step;\r
-  public float collide;\r
-  public float solve;\r
-  public float solveInit;\r
-  public float solveVelocity;\r
-  public float solvePosition;\r
-  public float broadphase;\r
-  public float solveTOI;\r
-  \r
-  public void toDebugStrings(List<String> strings) {\r
-    strings.add("Profile:");\r
-    strings.add(" step: " + step);\r
-    strings.add("  collide: " + collide);\r
-    strings.add("  solve: " + solve);\r
-    strings.add("   solveInit: " + solveInit);\r
-    strings.add("   solveVelocity: " + solveVelocity);\r
-    strings.add("   solvePosition: " + solvePosition);\r
-    strings.add("   broadphase: " + broadphase);\r
-    strings.add("  solveTOI: " + solveTOI);\r
-  }\r
+       public float step;\r
+       public float collide;\r
+       public float solve;\r
+       public float solveInit;\r
+       public float solveVelocity;\r
+       public float solvePosition;\r
+       public float broadphase;\r
+       public float solveTOI;\r
+\r
+       public void toDebugStrings (List<String> strings) {\r
+               strings.add("Profile:");\r
+               strings.add(" step: " + step);\r
+               strings.add("  collide: " + collide);\r
+               strings.add("  solve: " + solve);\r
+               strings.add("   solveInit: " + solveInit);\r
+               strings.add("   solveVelocity: " + solveVelocity);\r
+               strings.add("   solvePosition: " + solvePosition);\r
+               strings.add("   broadphase: " + broadphase);\r
+               strings.add("  solveTOI: " + solveTOI);\r
+       }\r
 }\r
index 107247b..e21e220 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics;\r
 \r
 import org.jbox2d.dynamics.contacts.Position;\r
 import org.jbox2d.dynamics.contacts.Velocity;\r
 \r
 public class SolverData {\r
-  public TimeStep step;\r
-  public Position[] positions;\r
-  public Velocity[] velocities;\r
+       public TimeStep step;\r
+       public Position[] positions;\r
+       public Velocity[] velocities;\r
 }\r
index a101174..1ece980 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 //updated to rev 100
-/**
- * This is an internal structure.
- */
+/** This is an internal structure. */
 public class TimeStep {
-       
+
        /** time step */
        public float dt;
-       
+
        /** inverse time step (0 if dt == 0). */
        public float inv_dt;
-       
+
        /** dt * inv_dt0 */
        public float dtRatio;
-       
+
        public int velocityIterations;
-       
+
        public int positionIterations;
-       
+
        public boolean warmStarting;
 }
index a14855a..aaa177e 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics;
 
 import org.jbox2d.callbacks.ContactFilter;
@@ -62,1500 +63,1420 @@ import org.jbox2d.pooling.IWorldPool;
 import org.jbox2d.pooling.arrays.Vec2Array;
 import org.jbox2d.pooling.normal.DefaultWorldPool;
 
-/**
- * The world class manages all physics entities, dynamic simulation, and asynchronous queries. The
- * world also contains efficient memory management facilities.
+/** The world class manages all physics entities, dynamic simulation, and asynchronous queries. The world also contains efficient
+ * memory management facilities.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class World {
-  public static final int WORLD_POOL_SIZE = 100;
-  public static final int WORLD_POOL_CONTAINER_SIZE = 10;
-
-  public static final int NEW_FIXTURE = 0x0001;
-  public static final int LOCKED = 0x0002;
-  public static final int CLEAR_FORCES = 0x0004;
-
+       public static final int WORLD_POOL_SIZE = 100;
+       public static final int WORLD_POOL_CONTAINER_SIZE = 10;
 
-  // statistics gathering
-  public int activeContacts = 0;
-  public int contactPoolCount = 0;
+       public static final int NEW_FIXTURE = 0x0001;
+       public static final int LOCKED = 0x0002;
+       public static final int CLEAR_FORCES = 0x0004;
 
-  protected int m_flags;
+       // statistics gathering
+       public int activeContacts = 0;
+       public int contactPoolCount = 0;
 
-  protected ContactManager m_contactManager;
+       protected int m_flags;
 
-  private Body m_bodyList;
-  private Joint m_jointList;
+       protected ContactManager m_contactManager;
 
-  private int m_bodyCount;
-  private int m_jointCount;
+       private Body m_bodyList;
+       private Joint m_jointList;
 
-  private final Vec2 m_gravity = new Vec2();
-  private boolean m_allowSleep;
+       private int m_bodyCount;
+       private int m_jointCount;
 
-  // private Body m_groundBody;
+       private final Vec2 m_gravity = new Vec2();
+       private boolean m_allowSleep;
 
-  private DestructionListener m_destructionListener;
-  private DebugDraw m_debugDraw;
+       // private Body m_groundBody;
 
-  private final IWorldPool pool;
+       private DestructionListener m_destructionListener;
+       private DebugDraw m_debugDraw;
 
-  /**
-   * This is used to compute the time step ratio to support a variable time step.
-   */
-  private float m_inv_dt0;
+       private final IWorldPool pool;
 
-  // these are for debugging the solver
-  private boolean m_warmStarting;
-  private boolean m_continuousPhysics;
-  private boolean m_subStepping;
+       /** This is used to compute the time step ratio to support a variable time step. */
+       private float m_inv_dt0;
 
-  private boolean m_stepComplete;
-
-  private Profile m_profile;
-
-
-  private ContactRegister[][] contactStacks =
-      new ContactRegister[ShapeType.values().length][ShapeType.values().length];
-
-  public World(Vec2 gravity) {
-    this(gravity, new DefaultWorldPool(WORLD_POOL_SIZE, WORLD_POOL_CONTAINER_SIZE));
-  }
-
-  /**
-   * Construct a world object.
-   * 
-   * @param gravity the world gravity vector.
-   * @param doSleep improve performance by not simulating inactive bodies.
-   */
-  public World(Vec2 gravity, IWorldPool argPool) {
-    pool = argPool;
-    m_destructionListener = null;
-    m_debugDraw = null;
-
-    m_bodyList = null;
-    m_jointList = null;
-
-    m_bodyCount = 0;
-    m_jointCount = 0;
-
-    m_warmStarting = true;
-    m_continuousPhysics = true;
-    m_subStepping = false;
-    m_stepComplete = true;
-
-    m_allowSleep = true;
-    m_gravity.set(gravity);
-
-    m_flags = CLEAR_FORCES;
-
-    m_inv_dt0 = 0f;
-
-    m_contactManager = new ContactManager(this);
-    m_profile = new Profile();
-
-    initializeRegisters();
-  }
-
-  public void setAllowSleep(boolean flag) {
-    if (flag == m_allowSleep) {
-      return;
-    }
-
-    m_allowSleep = flag;
-    if (m_allowSleep == false) {
-      for (Body b = m_bodyList; b != null; b = b.m_next) {
-        b.setAwake(true);
-      }
-    }
-  }
-
-  public boolean isAllowSleep() {
-    return m_allowSleep;
-  }
-
-  private void addType(IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) {
-    ContactRegister register = new ContactRegister();
-    register.creator = creator;
-    register.primary = true;
-    contactStacks[type1.ordinal()][type2.ordinal()] = register;
-
-    if (type1 != type2) {
-      ContactRegister register2 = new ContactRegister();
-      register2.creator = creator;
-      register2.primary = false;
-      contactStacks[type2.ordinal()][type1.ordinal()] = register2;
-    }
-  }
-
-  private void initializeRegisters() {
-    addType(pool.getCircleContactStack(), ShapeType.CIRCLE, ShapeType.CIRCLE);
-    addType(pool.getPolyCircleContactStack(), ShapeType.POLYGON, ShapeType.CIRCLE);
-    addType(pool.getPolyContactStack(), ShapeType.POLYGON, ShapeType.POLYGON);
-    addType(pool.getEdgeCircleContactStack(), ShapeType.EDGE, ShapeType.CIRCLE);
-    addType(pool.getEdgePolyContactStack(), ShapeType.EDGE, ShapeType.POLYGON);
-    addType(pool.getChainCircleContactStack(), ShapeType.CHAIN, ShapeType.CIRCLE);
-    addType(pool.getChainPolyContactStack(), ShapeType.CHAIN, ShapeType.POLYGON);
-  }
-
-  public Contact popContact(Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) {
-    final ShapeType type1 = fixtureA.getType();
-    final ShapeType type2 = fixtureB.getType();
-
-    final ContactRegister reg = contactStacks[type1.ordinal()][type2.ordinal()];
-    final IDynamicStack<Contact> creator = reg.creator;
-    if (creator != null) {
-      if (reg.primary) {
-        Contact c = creator.pop();
-        c.init(fixtureA, indexA, fixtureB, indexB);
-        return c;
-      } else {
-        Contact c = creator.pop();
-        c.init(fixtureB, indexB, fixtureA, indexA);
-        return c;
-      }
-    } else {
-      return null;
-    }
-  }
-
-  public void pushContact(Contact contact) {
-
-    if (contact.m_manifold.pointCount > 0) {
-      contact.getFixtureA().getBody().setAwake(true);
-      contact.getFixtureB().getBody().setAwake(true);
-    }
-
-    ShapeType type1 = contact.getFixtureA().getType();
-    ShapeType type2 = contact.getFixtureB().getType();
-
-    IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator;
-    creator.push(contact);
-  }
-
-  public IWorldPool getPool() {
-    return pool;
-  }
-
-  /**
-   * Register a destruction listener. The listener is owned by you and must remain in scope.
-   * 
-   * @param listener
-   */
-  public void setDestructionListener(DestructionListener listener) {
-    m_destructionListener = listener;
-  }
-
-  /**
-   * Register a contact filter to provide specific control over collision. Otherwise the default
-   * filter is used (_defaultFilter). The listener is owned by you and must remain in scope.
-   * 
-   * @param filter
-   */
-  public void setContactFilter(ContactFilter filter) {
-    m_contactManager.m_contactFilter = filter;
-  }
-
-  /**
-   * Register a contact event listener. The listener is owned by you and must remain in scope.
-   * 
-   * @param listener
-   */
-  public void setContactListener(ContactListener listener) {
-    m_contactManager.m_contactListener = listener;
-  }
-
-  /**
-   * Register a routine for debug drawing. The debug draw functions are called inside with
-   * World.DrawDebugData method. The debug draw object is owned by you and must remain in scope.
-   * 
-   * @param debugDraw
-   */
-  public void setDebugDraw(DebugDraw debugDraw) {
-    m_debugDraw = debugDraw;
-  }
-
-  /**
-   * create a rigid body given a definition. No reference to the definition is retained.
-   * 
-   * @warning This function is locked during callbacks.
-   * @param def
-   * @return
-   */
-  public Body createBody(BodyDef def) {
-    assert (isLocked() == false);
-    if (isLocked()) {
-      return null;
-    }
-    // TODO djm pooling
-    Body b = new Body(def, this);
-
-    // add to world doubly linked list
-    b.m_prev = null;
-    b.m_next = m_bodyList;
-    if (m_bodyList != null) {
-      m_bodyList.m_prev = b;
-    }
-    m_bodyList = b;
-    ++m_bodyCount;
-
-    return b;
-  }
-
-  /**
-   * destroy a rigid body given a definition. No reference to the definition is retained. This
-   * function is locked during callbacks.
-   * 
-   * @warning This automatically deletes all associated shapes and joints.
-   * @warning This function is locked during callbacks.
-   * @param body
-   */
-  public void destroyBody(Body body) {
-    assert (m_bodyCount > 0);
-    assert (isLocked() == false);
-    if (isLocked()) {
-      return;
-    }
-
-    // Delete the attached joints.
-    JointEdge je = body.m_jointList;
-    while (je != null) {
-      JointEdge je0 = je;
-      je = je.next;
-      if (m_destructionListener != null) {
-        m_destructionListener.sayGoodbye(je0.joint);
-      }
-
-      destroyJoint(je0.joint);
-
-      body.m_jointList = je;
-    }
-    body.m_jointList = null;
-
-    // Delete the attached contacts.
-    ContactEdge ce = body.m_contactList;
-    while (ce != null) {
-      ContactEdge ce0 = ce;
-      ce = ce.next;
-      m_contactManager.destroy(ce0.contact);
-    }
-    body.m_contactList = null;
-
-    Fixture f = body.m_fixtureList;
-    while (f != null) {
-      Fixture f0 = f;
-      f = f.m_next;
-
-      if (m_destructionListener != null) {
-        m_destructionListener.sayGoodbye(f0);
-      }
-
-      f0.destroyProxies(m_contactManager.m_broadPhase);
-      f0.destroy();
-      // TODO djm recycle fixtures (here or in that destroy method)
-      body.m_fixtureList = f;
-      body.m_fixtureCount -= 1;
-    }
-    body.m_fixtureList = null;
-    body.m_fixtureCount = 0;
-
-    // Remove world body list.
-    if (body.m_prev != null) {
-      body.m_prev.m_next = body.m_next;
-    }
-
-    if (body.m_next != null) {
-      body.m_next.m_prev = body.m_prev;
-    }
-
-    if (body == m_bodyList) {
-      m_bodyList = body.m_next;
-    }
-
-    --m_bodyCount;
-    // TODO djm recycle body
-  }
-
-  /**
-   * create a joint to constrain bodies together. No reference to the definition is retained. This
-   * may cause the connected bodies to cease colliding.
-   * 
-   * @warning This function is locked during callbacks.
-   * @param def
-   * @return
-   */
-  public Joint createJoint(JointDef def) {
-    assert (isLocked() == false);
-    if (isLocked()) {
-      return null;
-    }
-
-    Joint j = Joint.create(this, def);
-
-    // Connect to the world list.
-    j.m_prev = null;
-    j.m_next = m_jointList;
-    if (m_jointList != null) {
-      m_jointList.m_prev = j;
-    }
-    m_jointList = j;
-    ++m_jointCount;
-
-    // Connect to the bodies' doubly linked lists.
-    j.m_edgeA.joint = j;
-    j.m_edgeA.other = j.m_bodyB;
-    j.m_edgeA.prev = null;
-    j.m_edgeA.next = j.m_bodyA.m_jointList;
-    if (j.m_bodyA.m_jointList != null) {
-      j.m_bodyA.m_jointList.prev = j.m_edgeA;
-    }
-    j.m_bodyA.m_jointList = j.m_edgeA;
-
-    j.m_edgeB.joint = j;
-    j.m_edgeB.other = j.m_bodyA;
-    j.m_edgeB.prev = null;
-    j.m_edgeB.next = j.m_bodyB.m_jointList;
-    if (j.m_bodyB.m_jointList != null) {
-      j.m_bodyB.m_jointList.prev = j.m_edgeB;
-    }
-    j.m_bodyB.m_jointList = j.m_edgeB;
-
-    Body bodyA = def.bodyA;
-    Body bodyB = def.bodyB;
-
-    // If the joint prevents collisions, then flag any contacts for filtering.
-    if (def.collideConnected == false) {
-      ContactEdge edge = bodyB.getContactList();
-      while (edge != null) {
-        if (edge.other == bodyA) {
-          // Flag the contact for filtering at the next time step (where either
-          // body is awake).
-          edge.contact.flagForFiltering();
-        }
-
-        edge = edge.next;
-      }
-    }
-
-    // Note: creating a joint doesn't wake the bodies.
-
-    return j;
-  }
-
-  /**
-   * destroy a joint. This may cause the connected bodies to begin colliding.
-   * 
-   * @warning This function is locked during callbacks.
-   * @param joint
-   */
-  public void destroyJoint(Joint j) {
-    assert (isLocked() == false);
-    if (isLocked()) {
-      return;
-    }
-
-    boolean collideConnected = j.m_collideConnected;
-
-    // Remove from the doubly linked list.
-    if (j.m_prev != null) {
-      j.m_prev.m_next = j.m_next;
-    }
-
-    if (j.m_next != null) {
-      j.m_next.m_prev = j.m_prev;
-    }
-
-    if (j == m_jointList) {
-      m_jointList = j.m_next;
-    }
-
-    // Disconnect from island graph.
-    Body bodyA = j.m_bodyA;
-    Body bodyB = j.m_bodyB;
-
-    // Wake up connected bodies.
-    bodyA.setAwake(true);
-    bodyB.setAwake(true);
-
-    // Remove from body 1.
-    if (j.m_edgeA.prev != null) {
-      j.m_edgeA.prev.next = j.m_edgeA.next;
-    }
-
-    if (j.m_edgeA.next != null) {
-      j.m_edgeA.next.prev = j.m_edgeA.prev;
-    }
-
-    if (j.m_edgeA == bodyA.m_jointList) {
-      bodyA.m_jointList = j.m_edgeA.next;
-    }
-
-    j.m_edgeA.prev = null;
-    j.m_edgeA.next = null;
-
-    // Remove from body 2
-    if (j.m_edgeB.prev != null) {
-      j.m_edgeB.prev.next = j.m_edgeB.next;
-    }
-
-    if (j.m_edgeB.next != null) {
-      j.m_edgeB.next.prev = j.m_edgeB.prev;
-    }
-
-    if (j.m_edgeB == bodyB.m_jointList) {
-      bodyB.m_jointList = j.m_edgeB.next;
-    }
-
-    j.m_edgeB.prev = null;
-    j.m_edgeB.next = null;
-
-    Joint.destroy(j);
-
-    assert (m_jointCount > 0);
-    --m_jointCount;
-
-    // If the joint prevents collisions, then flag any contacts for filtering.
-    if (collideConnected == false) {
-      ContactEdge edge = bodyB.getContactList();
-      while (edge != null) {
-        if (edge.other == bodyA) {
-          // Flag the contact for filtering at the next time step (where either
-          // body is awake).
-          edge.contact.flagForFiltering();
-        }
-
-        edge = edge.next;
-      }
-    }
-  }
-
-  // djm pooling
-  private final TimeStep step = new TimeStep();
-  private final Timer stepTimer = new Timer();
-  private final Timer tempTimer = new Timer();
-
-  /**
-   * Take a time step. This performs collision detection, integration, and constraint solution.
-   * 
-   * @param timeStep the amount of time to simulate, this should not vary.
-   * @param velocityIterations for the velocity constraint solver.
-   * @param positionIterations for the position constraint solver.
-   */
-  public void step(float dt, int velocityIterations, int positionIterations) {
-    stepTimer.reset();
-    // log.debug("Starting step");
-    // If new fixtures were added, we need to find the new contacts.
-    if ((m_flags & NEW_FIXTURE) == NEW_FIXTURE) {
-      // log.debug("There's a new fixture, lets look for new contacts");
-      m_contactManager.findNewContacts();
-      m_flags &= ~NEW_FIXTURE;
-    }
-
-    m_flags |= LOCKED;
-
-    step.dt = dt;
-    step.velocityIterations = velocityIterations;
-    step.positionIterations = positionIterations;
-    if (dt > 0.0f) {
-      step.inv_dt = 1.0f / dt;
-    } else {
-      step.inv_dt = 0.0f;
-    }
-
-    step.dtRatio = m_inv_dt0 * dt;
-
-    step.warmStarting = m_warmStarting;
-
-    // Update contacts. This is where some contacts are destroyed.
-    tempTimer.reset();
-    m_contactManager.collide();
-    m_profile.collide = tempTimer.getMilliseconds();
-
-    // Integrate velocities, solve velocity constraints, and integrate positions.
-    if (m_stepComplete && step.dt > 0.0f) {
-      tempTimer.reset();
-      solve(step);
-      m_profile.solve = tempTimer.getMilliseconds();
-    }
-
-    // Handle TOI events.
-    if (m_continuousPhysics && step.dt > 0.0f) {
-      tempTimer.reset();
-      solveTOI(step);
-      m_profile.solveTOI = tempTimer.getMilliseconds();
-    }
-
-    if (step.dt > 0.0f) {
-      m_inv_dt0 = step.inv_dt;
-    }
-
-    if ((m_flags & CLEAR_FORCES) == CLEAR_FORCES) {
-      clearForces();
-    }
-
-    m_flags &= ~LOCKED;
-    // log.debug("ending step");
-
-    m_profile.step = stepTimer.getMilliseconds();
-  }
-
-  /**
-   * Call this after you are done with time steps to clear the forces. You normally call this after
-   * each call to Step, unless you are performing sub-steps. By default, forces will be
-   * automatically cleared, so you don't need to call this function.
-   * 
-   * @see setAutoClearForces
-   */
-  public void clearForces() {
-    for (Body body = m_bodyList; body != null; body = body.getNext()) {
-      body.m_force.setZero();
-      body.m_torque = 0.0f;
-    }
-  }
-
-  private final Color3f color = new Color3f();
-  private final Transform xf = new Transform();
-  private final Vec2 cA = new Vec2();
-  private final Vec2 cB = new Vec2();
-  private final Vec2Array avs = new Vec2Array();
-
-  /**
-   * Call this to draw shapes and other debug draw data.
-   */
-  public void drawDebugData() {
-    if (m_debugDraw == null) {
-      return;
-    }
-
-    int flags = m_debugDraw.getFlags();
-
-    if ((flags & DebugDraw.e_shapeBit) == DebugDraw.e_shapeBit) {
-      for (Body b = m_bodyList; b != null; b = b.getNext()) {
-        xf.set(b.getTransform());
-        for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
-          if (b.isActive() == false) {
-            color.set(0.5f, 0.5f, 0.3f);
-            drawShape(f, xf, color);
-          } else if (b.getType() == BodyType.STATIC) {
-            color.set(0.5f, 0.9f, 0.3f);
-            drawShape(f, xf, color);
-          } else if (b.getType() == BodyType.KINEMATIC) {
-            color.set(0.5f, 0.5f, 0.9f);
-            drawShape(f, xf, color);
-          } else if (b.isAwake() == false) {
-            color.set(0.5f, 0.5f, 0.5f);
-            drawShape(f, xf, color);
-          } else {
-            color.set(0.9f, 0.7f, 0.7f);
-            drawShape(f, xf, color);
-          }
-        }
-      }
-    }
-
-    if ((flags & DebugDraw.e_jointBit) == DebugDraw.e_jointBit) {
-      for (Joint j = m_jointList; j != null; j = j.getNext()) {
-        drawJoint(j);
-      }
-    }
-
-    if ((flags & DebugDraw.e_pairBit) == DebugDraw.e_pairBit) {
-      color.set(0.3f, 0.9f, 0.9f);
-      for (Contact c = m_contactManager.m_contactList; c != null; c = c.getNext()) {
-        // Fixture fixtureA = c.getFixtureA();
-        // Fixture fixtureB = c.getFixtureB();
-        //
-        // fixtureA.getAABB(childIndex).getCenterToOut(cA);
-        // fixtureB.getAABB().getCenterToOut(cB);
-        //
-        // m_debugDraw.drawSegment(cA, cB, color);
-      }
-    }
-
-    if ((flags & DebugDraw.e_aabbBit) == DebugDraw.e_aabbBit) {
-      color.set(0.9f, 0.3f, 0.9f);
-
-      for (Body b = m_bodyList; b != null; b = b.getNext()) {
-        if (b.isActive() == false) {
-          continue;
-        }
-
-        for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
-
-          for (int i = 0; i < f.m_proxyCount; ++i) {
-            FixtureProxy proxy = f.m_proxies[i];
-            AABB aabb = m_contactManager.m_broadPhase.getFatAABB(proxy.proxyId);
-            Vec2[] vs = avs.get(4);
-            vs[0].set(aabb.lowerBound.x, aabb.lowerBound.y);
-            vs[1].set(aabb.upperBound.x, aabb.lowerBound.y);
-            vs[2].set(aabb.upperBound.x, aabb.upperBound.y);
-            vs[3].set(aabb.lowerBound.x, aabb.upperBound.y);
-
-            m_debugDraw.drawPolygon(vs, 4, color);
-          }
-
-        }
-      }
-    }
-
-    if ((flags & DebugDraw.e_centerOfMassBit) == DebugDraw.e_centerOfMassBit) {
-      for (Body b = m_bodyList; b != null; b = b.getNext()) {
-        xf.set(b.getTransform());
-        xf.p.set(b.getWorldCenter());
-        m_debugDraw.drawTransform(xf);
-      }
-    }
-
-    if ((flags & DebugDraw.e_dynamicTreeBit) == DebugDraw.e_dynamicTreeBit) {
-      m_contactManager.m_broadPhase.drawTree(m_debugDraw);
-    }
-  }
-
-  private final WorldQueryWrapper wqwrapper = new WorldQueryWrapper();
-
-  /**
-   * Query the world for all fixtures that potentially overlap the provided AABB.
-   * 
-   * @param callback a user implemented callback class.
-   * @param aabb the query box.
-   */
-  public void queryAABB(QueryCallback callback, AABB aabb) {
-    wqwrapper.broadPhase = m_contactManager.m_broadPhase;
-    wqwrapper.callback = callback;
-    m_contactManager.m_broadPhase.query(wqwrapper, aabb);
-  }
-
-  private final WorldRayCastWrapper wrcwrapper = new WorldRayCastWrapper();
-  private final RayCastInput input = new RayCastInput();
-
-  /**
-   * Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you
-   * get the closest point, any point, or n-points. The ray-cast ignores shapes that contain the
-   * starting point.
-   * 
-   * @param callback a user implemented callback class.
-   * @param point1 the ray starting point
-   * @param point2 the ray ending point
-   */
-  public void raycast(RayCastCallback callback, Vec2 point1, Vec2 point2) {
-    wrcwrapper.broadPhase = m_contactManager.m_broadPhase;
-    wrcwrapper.callback = callback;
-    input.maxFraction = 1.0f;
-    input.p1.set(point1);
-    input.p2.set(point2);
-    m_contactManager.m_broadPhase.raycast(wrcwrapper, input);
-  }
-
-  /**
-   * Get the world body list. With the returned body, use Body.getNext to get the next body in the
-   * world list. A null body indicates the end of the list.
-   * 
-   * @return the head of the world body list.
-   */
-  public Body getBodyList() {
-    return m_bodyList;
-  }
-
-  /**
-   * Get the world joint list. With the returned joint, use Joint.getNext to get the next joint in
-   * the world list. A null joint indicates the end of the list.
-   * 
-   * @return the head of the world joint list.
-   */
-  public Joint getJointList() {
-    return m_jointList;
-  }
-
-  /**
-   * Get the world contact list. With the returned contact, use Contact.getNext to get the next
-   * contact in the world list. A null contact indicates the end of the list.
-   * 
-   * @return the head of the world contact list.
-   * @warning contacts are created and destroyed in the middle of a time step. Use ContactListener
-   *          to avoid missing contacts.
-   */
-  public Contact getContactList() {
-    return m_contactManager.m_contactList;
-  }
-
-  public boolean isSleepingAllowed() {
-    return m_allowSleep;
-  }
-
-  public void setSleepingAllowed(boolean sleepingAllowed) {
-    m_allowSleep = sleepingAllowed;
-  }
-
-  /**
-   * Enable/disable warm starting. For testing.
-   * 
-   * @param flag
-   */
-  public void setWarmStarting(boolean flag) {
-    m_warmStarting = flag;
-  }
-
-  public boolean isWarmStarting() {
-    return m_warmStarting;
-  }
-
-  /**
-   * Enable/disable continuous physics. For testing.
-   * 
-   * @param flag
-   */
-  public void setContinuousPhysics(boolean flag) {
-    m_continuousPhysics = flag;
-  }
-
-  public boolean isContinuousPhysics() {
-    return m_continuousPhysics;
-  }
-
-
-
-  /**
-   * Get the number of broad-phase proxies.
-   * 
-   * @return
-   */
-  public int getProxyCount() {
-    return m_contactManager.m_broadPhase.getProxyCount();
-  }
-
-  /**
-   * Get the number of bodies.
-   * 
-   * @return
-   */
-  public int getBodyCount() {
-    return m_bodyCount;
-  }
-
-  /**
-   * Get the number of joints.
-   * 
-   * @return
-   */
-  public int getJointCount() {
-    return m_jointCount;
-  }
-
-  /**
-   * Get the number of contacts (each may have 0 or more contact points).
-   * 
-   * @return
-   */
-  public int getContactCount() {
-    return m_contactManager.m_contactCount;
-  }
-
-  /**
-   * Gets the height of the dynamic tree
-   * 
-   * @return
-   */
-  public int getTreeHeight() {
-    return m_contactManager.m_broadPhase.getTreeHeight();
-  }
-
-  /**
-   * Gets the balance of the dynamic tree
-   * 
-   * @return
-   */
-  public int getTreeBalance() {
-    return m_contactManager.m_broadPhase.getTreeBalance();
-  }
-
-  /**
-   * Gets the quality of the dynamic tree
-   * 
-   * @return
-   */
-  public float getTreeQuality() {
-    return m_contactManager.m_broadPhase.getTreeQuality();
-  }
-
-  /**
-   * Change the global gravity vector.
-   * 
-   * @param gravity
-   */
-  public void setGravity(Vec2 gravity) {
-    m_gravity.set(gravity);
-  }
-
-  /**
-   * Get the global gravity vector.
-   * 
-   * @return
-   */
-  public Vec2 getGravity() {
-    return m_gravity;
-  }
-
-  /**
-   * Is the world locked (in the middle of a time step).
-   * 
-   * @return
-   */
-  public boolean isLocked() {
-    return (m_flags & LOCKED) == LOCKED;
-  }
-
-  /**
-   * Set flag to control automatic clearing of forces after each time step.
-   * 
-   * @param flag
-   */
-  public void setAutoClearForces(boolean flag) {
-    if (flag) {
-      m_flags |= CLEAR_FORCES;
-    } else {
-      m_flags &= ~CLEAR_FORCES;
-    }
-  }
-
-  /**
-   * Get the flag that controls automatic clearing of forces after each time step.
-   * 
-   * @return
-   */
-  public boolean getAutoClearForces() {
-    return (m_flags & CLEAR_FORCES) == CLEAR_FORCES;
-  }
-
-  /**
-   * Get the contact manager for testing purposes
-   * 
-   * @return
-   */
-  public ContactManager getContactManager() {
-    return m_contactManager;
-  }
-
-  public Profile getProfile() {
-    return m_profile;
-  }
-
-  private final Island island = new Island();
-  private Body[] stack = new Body[10]; // TODO djm find a good initial stack number;
-  private final Profile islandProfile = new Profile();
-  private final Timer broadphaseTimer = new Timer();
-
-  private void solve(TimeStep step) {
-    m_profile.solveInit = 0;
-    m_profile.solveVelocity = 0;
-    m_profile.solvePosition = 0;
-
-    // Size the island for the worst case.
-    island.init(m_bodyCount, m_contactManager.m_contactCount, m_jointCount,
-        m_contactManager.m_contactListener);
-
-    // Clear all the island flags.
-    for (Body b = m_bodyList; b != null; b = b.m_next) {
-      b.m_flags &= ~Body.e_islandFlag;
-    }
-    for (Contact c = m_contactManager.m_contactList; c != null; c = c.m_next) {
-      c.m_flags &= ~Contact.ISLAND_FLAG;
-    }
-    for (Joint j = m_jointList; j != null; j = j.m_next) {
-      j.m_islandFlag = false;
-    }
-
-    // Build and simulate all awake islands.
-    int stackSize = m_bodyCount;
-    if (stack.length < stackSize) {
-      stack = new Body[stackSize];
-    }
-    for (Body seed = m_bodyList; seed != null; seed = seed.m_next) {
-      if ((seed.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {
-        continue;
-      }
-
-      if (seed.isAwake() == false || seed.isActive() == false) {
-        continue;
-      }
-
-      // The seed can be dynamic or kinematic.
-      if (seed.getType() == BodyType.STATIC) {
-        continue;
-      }
-
-      // Reset island and stack.
-      island.clear();
-      int stackCount = 0;
-      stack[stackCount++] = seed;
-      seed.m_flags |= Body.e_islandFlag;
-
-      // Perform a depth first search (DFS) on the constraint graph.
-      while (stackCount > 0) {
-        // Grab the next body off the stack and add it to the island.
-        Body b = stack[--stackCount];
-        assert (b.isActive() == true);
-        island.add(b);
-
-        // Make sure the body is awake.
-        b.setAwake(true);
-
-        // To keep islands as small as possible, we don't
-        // propagate islands across static bodies.
-        if (b.getType() == BodyType.STATIC) {
-          continue;
-        }
-
-        // Search all contacts connected to this body.
-        for (ContactEdge ce = b.m_contactList; ce != null; ce = ce.next) {
-          Contact contact = ce.contact;
-
-          // Has this contact already been added to an island?
-          if ((contact.m_flags & Contact.ISLAND_FLAG) == Contact.ISLAND_FLAG) {
-            continue;
-          }
-
-          // Is this contact solid and touching?
-          if (contact.isEnabled() == false || contact.isTouching() == false) {
-            continue;
-          }
-
-          // Skip sensors.
-          boolean sensorA = contact.m_fixtureA.m_isSensor;
-          boolean sensorB = contact.m_fixtureB.m_isSensor;
-          if (sensorA || sensorB) {
-            continue;
-          }
-
-          island.add(contact);
-          contact.m_flags |= Contact.ISLAND_FLAG;
-
-          Body other = ce.other;
-
-          // Was the other body already added to this island?
-          if ((other.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {
-            continue;
-          }
-
-          assert (stackCount < stackSize);
-          stack[stackCount++] = other;
-          other.m_flags |= Body.e_islandFlag;
-        }
-
-        // Search all joints connect to this body.
-        for (JointEdge je = b.m_jointList; je != null; je = je.next) {
-          if (je.joint.m_islandFlag == true) {
-            continue;
-          }
-
-          Body other = je.other;
-
-          // Don't simulate joints connected to inactive bodies.
-          if (other.isActive() == false) {
-            continue;
-          }
-
-          island.add(je.joint);
-          je.joint.m_islandFlag = true;
-
-          if ((other.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {
-            continue;
-          }
-
-          assert (stackCount < stackSize);
-          stack[stackCount++] = other;
-          other.m_flags |= Body.e_islandFlag;
-        }
-      }
-      island.solve(islandProfile, step, m_gravity, m_allowSleep);
-      m_profile.solveInit += islandProfile.solveInit;
-      m_profile.solveVelocity += islandProfile.solveVelocity;
-      m_profile.solvePosition += islandProfile.solvePosition;
-
-      // Post solve cleanup.
-      for (int i = 0; i < island.m_bodyCount; ++i) {
-        // Allow static bodies to participate in other islands.
-        Body b = island.m_bodies[i];
-        if (b.getType() == BodyType.STATIC) {
-          b.m_flags &= ~Body.e_islandFlag;
-        }
-      }
-    }
-
-    broadphaseTimer.reset();
-    // Synchronize fixtures, check for out of range bodies.
-    for (Body b = m_bodyList; b != null; b = b.getNext()) {
-      // If a body was not in an island then it did not move.
-      if ((b.m_flags & Body.e_islandFlag) == 0) {
-        continue;
-      }
-
-      if (b.getType() == BodyType.STATIC) {
-        continue;
-      }
-
-      // Update fixtures (for broad-phase).
-      b.synchronizeFixtures();
-    }
-
-    // Look for new contacts.
-    m_contactManager.findNewContacts();
-    m_profile.broadphase = broadphaseTimer.getMilliseconds();
-  }
-
-  private final Island toiIsland = new Island();
-  private final TOIInput toiInput = new TOIInput();
-  private final TOIOutput toiOutput = new TOIOutput();
-  private final TimeStep subStep = new TimeStep();
-  private final Body[] tempBodies = new Body[2];
-  private final Sweep backup1 = new Sweep();
-  private final Sweep backup2 = new Sweep();
-
-  private void solveTOI(final TimeStep step) {
-
-    final Island island = toiIsland;
-    island.init(2 * Settings.maxTOIContacts, Settings.maxTOIContacts, 0, m_contactManager.m_contactListener);
-    if (m_stepComplete) {
-      for (Body b = m_bodyList; b != null; b = b.m_next) {
-        b.m_flags &= ~Body.e_islandFlag;
-        b.m_sweep.alpha0 = 0.0f;
-      }
-
-      for (Contact c = m_contactManager.m_contactList; c != null; c = c.m_next) {
-        // Invalidate TOI
-        c.m_flags &= ~(Contact.TOI_FLAG | Contact.ISLAND_FLAG);
-        c.m_toiCount = 0;
-        c.m_toi = 1.0f;
-      }
-    }
-
-    // Find TOI events and solve them.
-    for (;;) {
-      // Find the first TOI.
-      Contact minContact = null;
-      float minAlpha = 1.0f;
-
-      for (Contact c = m_contactManager.m_contactList; c != null; c = c.m_next) {
-        // Is this contact disabled?
-        if (c.isEnabled() == false) {
-          continue;
-        }
-
-        // Prevent excessive sub-stepping.
-        if (c.m_toiCount > Settings.maxSubSteps) {
-          continue;
-        }
-
-        float alpha = 1.0f;
-        if ((c.m_flags & Contact.TOI_FLAG) != 0) {
-          // This contact has a valid cached TOI.
-          alpha = c.m_toi;
-        } else {
-          Fixture fA = c.getFixtureA();
-          Fixture fB = c.getFixtureB();
-
-          // Is there a sensor?
-          if (fA.isSensor() || fB.isSensor()) {
-            continue;
-          }
-
-          Body bA = fA.getBody();
-          Body bB = fB.getBody();
-
-          BodyType typeA = bA.m_type;
-          BodyType typeB = bB.m_type;
-          assert (typeA == BodyType.DYNAMIC || typeB == BodyType.DYNAMIC);
-
-          boolean activeA = bA.isAwake() && typeA != BodyType.STATIC;
-          boolean activeB = bB.isAwake() && typeB != BodyType.STATIC;
-
-          // Is at least one body active (awake and dynamic or kinematic)?
-          if (activeA == false && activeB == false) {
-            continue;
-          }
-
-          boolean collideA = bA.isBullet() || typeA != BodyType.DYNAMIC;
-          boolean collideB = bB.isBullet() || typeB != BodyType.DYNAMIC;
-
-          // Are these two non-bullet dynamic bodies?
-          if (collideA == false && collideB == false) {
-            continue;
-          }
-
-          // Compute the TOI for this contact.
-          // Put the sweeps onto the same time interval.
-          float alpha0 = bA.m_sweep.alpha0;
-
-          if (bA.m_sweep.alpha0 < bB.m_sweep.alpha0) {
-            alpha0 = bB.m_sweep.alpha0;
-            bA.m_sweep.advance(alpha0);
-          } else if (bB.m_sweep.alpha0 < bA.m_sweep.alpha0) {
-            alpha0 = bA.m_sweep.alpha0;
-            bB.m_sweep.advance(alpha0);
-          }
-
-          assert (alpha0 < 1.0f);
-
-          int indexA = c.getChildIndexA();
-          int indexB = c.getChildIndexB();
-
-          // Compute the time of impact in interval [0, minTOI]
-          final TOIInput input = toiInput;
-          input.proxyA.set(fA.getShape(), indexA);
-          input.proxyB.set(fB.getShape(), indexB);
-          input.sweepA.set(bA.m_sweep);
-          input.sweepB.set(bB.m_sweep);
-          input.tMax = 1.0f;
-
-          pool.getTimeOfImpact().timeOfImpact(toiOutput, input);
-
-          // Beta is the fraction of the remaining portion of the .
-          float beta = toiOutput.t;
-          if (toiOutput.state == TOIOutputState.TOUCHING) {
-            alpha = MathUtils.min(alpha0 + (1.0f - alpha0) * beta, 1.0f);
-          } else {
-            alpha = 1.0f;
-          }
-
-          c.m_toi = alpha;
-          c.m_flags |= Contact.TOI_FLAG;
-        }
-
-        if (alpha < minAlpha) {
-          // This is the minimum TOI found so far.
-          minContact = c;
-          minAlpha = alpha;
-        }
-      }
-
-      if (minContact == null || 1.0f - 10.0f * Settings.EPSILON < minAlpha) {
-        // No more TOI events. Done!
-        m_stepComplete = true;
-        break;
-      }
-
-      // Advance the bodies to the TOI.
-      Fixture fA = minContact.getFixtureA();
-      Fixture fB = minContact.getFixtureB();
-      Body bA = fA.getBody();
-      Body bB = fB.getBody();
-
-      backup1.set(bA.m_sweep);
-      backup2.set(bB.m_sweep);
-
-      bA.advance(minAlpha);
-      bB.advance(minAlpha);
-
-      // The TOI contact likely has some new contact points.
-      minContact.update(m_contactManager.m_contactListener);
-      minContact.m_flags &= ~Contact.TOI_FLAG;
-      ++minContact.m_toiCount;
-
-      // Is the contact solid?
-      if (minContact.isEnabled() == false || minContact.isTouching() == false) {
-        // Restore the sweeps.
-        minContact.setEnabled(false);
-        bA.m_sweep.set(backup1);
-        bB.m_sweep.set(backup2);
-        bA.synchronizeTransform();
-        bB.synchronizeTransform();
-        continue;
-      }
-
-      bA.setAwake(true);
-      bB.setAwake(true);
-
-      // Build the island
-      island.clear();
-      island.add(bA);
-      island.add(bB);
-      island.add(minContact);
-
-      bA.m_flags |= Body.e_islandFlag;
-      bB.m_flags |= Body.e_islandFlag;
-      minContact.m_flags |= Contact.ISLAND_FLAG;
-
-      // Get contacts on bodyA and bodyB.
-      tempBodies[0] = bA;
-      tempBodies[1] = bB;
-      for (int i = 0; i < 2; ++i) {
-        Body body = tempBodies[i];
-        if (body.m_type == BodyType.DYNAMIC) {
-          for (ContactEdge ce = body.m_contactList; ce != null; ce = ce.next) {
-            if (island.m_bodyCount == island.m_bodyCapacity) {
-              break;
-            }
-
-            if (island.m_contactCount == island.m_contactCapacity) {
-              break;
-            }
-
-            Contact contact = ce.contact;
-
-            // Has this contact already been added to the island?
-            if ((contact.m_flags & Contact.ISLAND_FLAG) != 0) {
-              continue;
-            }
-
-            // Only add static, kinematic, or bullet bodies.
-            Body other = ce.other;
-            if (other.m_type == BodyType.DYNAMIC && body.isBullet() == false
-                && other.isBullet() == false) {
-              continue;
-            }
-
-            // Skip sensors.
-            boolean sensorA = contact.m_fixtureA.m_isSensor;
-            boolean sensorB = contact.m_fixtureB.m_isSensor;
-            if (sensorA || sensorB) {
-              continue;
-            }
-
-            // Tentatively advance the body to the TOI.
-            backup1.set(other.m_sweep);
-            if ((other.m_flags & Body.e_islandFlag) == 0) {
-              other.advance(minAlpha);
-            }
-
-            // Update the contact points
-            contact.update(m_contactManager.m_contactListener);
-
-            // Was the contact disabled by the user?
-            if (contact.isEnabled() == false) {
-              other.m_sweep.set(backup1);
-              other.synchronizeTransform();
-              continue;
-            }
-
-            // Are there contact points?
-            if (contact.isTouching() == false) {
-              other.m_sweep.set(backup1);
-              other.synchronizeTransform();
-              continue;
-            }
-
-            // Add the contact to the island
-            contact.m_flags |= Contact.ISLAND_FLAG;
-            island.add(contact);
-
-            // Has the other body already been added to the island?
-            if ((other.m_flags & Body.e_islandFlag) != 0) {
-              continue;
-            }
-
-            // Add the other body to the island.
-            other.m_flags |= Body.e_islandFlag;
-
-            if (other.m_type != BodyType.STATIC) {
-              other.setAwake(true);
-            }
-
-            island.add(other);
-          }
-        }
-      }
-
-      subStep.dt = (1.0f - minAlpha) * step.dt;
-      subStep.inv_dt = 1.0f / subStep.dt;
-      subStep.dtRatio = 1.0f;
-      subStep.positionIterations = 20;
-      subStep.velocityIterations = step.velocityIterations;
-      subStep.warmStarting = false;
-      island.solveTOI(subStep, bA.m_islandIndex, bB.m_islandIndex);
-
-      // Reset island flags and synchronize broad-phase proxies.
-      for (int i = 0; i < island.m_bodyCount; ++i) {
-        Body body = island.m_bodies[i];
-        body.m_flags &= ~Body.e_islandFlag;
-
-        if (body.m_type != BodyType.DYNAMIC) {
-          continue;
-        }
-
-        body.synchronizeFixtures();
-
-        // Invalidate all contact TOIs on this displaced body.
-        for (ContactEdge ce = body.m_contactList; ce != null; ce = ce.next) {
-          ce.contact.m_flags &= ~(Contact.TOI_FLAG | Contact.ISLAND_FLAG);
-        }
-      }
-
-      // Commit fixture proxy movements to the broad-phase so that new contacts are created.
-      // Also, some contacts can be destroyed.
-      m_contactManager.findNewContacts();
-
-      if (m_subStepping) {
-        m_stepComplete = false;
-        break;
-      }
-    }
-  }
-
-  private void drawJoint(Joint joint) {
-    Body bodyA = joint.getBodyA();
-    Body bodyB = joint.getBodyB();
-    Transform xf1 = bodyA.getTransform();
-    Transform xf2 = bodyB.getTransform();
-    Vec2 x1 = xf1.p;
-    Vec2 x2 = xf2.p;
-    Vec2 p1 = pool.popVec2();
-    Vec2 p2 = pool.popVec2();
-    joint.getAnchorA(p1);
-    joint.getAnchorB(p2);
-
-    color.set(0.5f, 0.8f, 0.8f);
-
-    switch (joint.getType()) {
-    // TODO djm write after writing joints
-      case DISTANCE:
-        m_debugDraw.drawSegment(p1, p2, color);
-        break;
-
-      case PULLEY: {
-        PulleyJoint pulley = (PulleyJoint) joint;
-        Vec2 s1 = pulley.getGroundAnchorA();
-        Vec2 s2 = pulley.getGroundAnchorB();
-        m_debugDraw.drawSegment(s1, p1, color);
-        m_debugDraw.drawSegment(s2, p2, color);
-        m_debugDraw.drawSegment(s1, s2, color);
-      }
-        break;
-      case CONSTANT_VOLUME:
-      case MOUSE:
-        // don't draw this
-        break;
-      default:
-        m_debugDraw.drawSegment(x1, p1, color);
-        m_debugDraw.drawSegment(p1, p2, color);
-        m_debugDraw.drawSegment(x2, p2, color);
-    }
-    pool.pushVec2(2);
-  }
-
-  // NOTE this corresponds to the liquid test, so the debugdraw can draw
-  // the liquid particles correctly. They should be the same.
-  private static Integer LIQUID_INT = new Integer(1234598372);
-  private float liquidLength = .12f;
-  private float averageLinearVel = -1;
-  private final Vec2 liquidOffset = new Vec2();
-  private final Vec2 circCenterMoved = new Vec2();
-  private final Color3f liquidColor = new Color3f(.4f, .4f, 1f);
-
-  private final Vec2 center = new Vec2();
-  private final Vec2 axis = new Vec2();
-  private final Vec2 v1 = new Vec2();
-  private final Vec2 v2 = new Vec2();
-  private final Vec2Array tlvertices = new Vec2Array();
-
-  private void drawShape(Fixture fixture, Transform xf, Color3f color) {
-    switch (fixture.getType()) {
-      case CIRCLE: {
-        CircleShape circle = (CircleShape) fixture.getShape();
-
-        // Vec2 center = Mul(xf, circle.m_p);
-        Transform.mulToOutUnsafe(xf, circle.m_p, center);
-        float radius = circle.m_radius;
-        xf.q.getXAxis(axis);
-
-        if (fixture.getUserData() != null && fixture.getUserData().equals(LIQUID_INT)) {
-          Body b = fixture.getBody();
-          liquidOffset.set(b.m_linearVelocity);
-          float linVelLength = b.m_linearVelocity.length();
-          if (averageLinearVel == -1) {
-            averageLinearVel = linVelLength;
-          } else {
-            averageLinearVel = .98f * averageLinearVel + .02f * linVelLength;
-          }
-          liquidOffset.mulLocal(liquidLength / averageLinearVel / 2);
-          circCenterMoved.set(center).addLocal(liquidOffset);
-          center.subLocal(liquidOffset);
-          m_debugDraw.drawSegment(center, circCenterMoved, liquidColor);
-          return;
-        }
-
-        m_debugDraw.drawSolidCircle(center, radius, axis, color);
-      }
-        break;
-
-      case POLYGON: {
-        PolygonShape poly = (PolygonShape) fixture.getShape();
-        int vertexCount = poly.m_count;
-        assert (vertexCount <= Settings.maxPolygonVertices);
-        Vec2[] vertices = tlvertices.get(Settings.maxPolygonVertices);
-
-        for (int i = 0; i < vertexCount; ++i) {
-          // vertices[i] = Mul(xf, poly.m_vertices[i]);
-          Transform.mulToOutUnsafe(xf, poly.m_vertices[i], vertices[i]);
-        }
-
-        m_debugDraw.drawSolidPolygon(vertices, vertexCount, color);
-      }
-        break;
-      case EDGE: {
-        EdgeShape edge = (EdgeShape) fixture.getShape();
-        Transform.mulToOutUnsafe(xf, edge.m_vertex1, v1);
-        Transform.mulToOutUnsafe(xf, edge.m_vertex2, v2);
-        m_debugDraw.drawSegment(v1, v2, color);
-      }
-        break;
-
-      case CHAIN: {
-        ChainShape chain = (ChainShape) fixture.getShape();
-        int count = chain.m_count;
-        Vec2[] vertices = chain.m_vertices;
-
-        Transform.mulToOutUnsafe(xf, vertices[0], v1);
-        for (int i = 1; i < count; ++i) {
-          Transform.mulToOutUnsafe(xf, vertices[i], v2);
-          m_debugDraw.drawSegment(v1, v2, color);
-          m_debugDraw.drawCircle(v1, 0.05f, color);
-          v1.set(v2);
-        }
-      }
-        break;
-      default:
-        break;
-    }
-  }
+       // these are for debugging the solver
+       private boolean m_warmStarting;
+       private boolean m_continuousPhysics;
+       private boolean m_subStepping;
+
+       private boolean m_stepComplete;
+
+       private Profile m_profile;
+
+       private ContactRegister[][] contactStacks = new ContactRegister[ShapeType.values().length][ShapeType.values().length];
+
+       public World (Vec2 gravity) {
+               this(gravity, new DefaultWorldPool(WORLD_POOL_SIZE, WORLD_POOL_CONTAINER_SIZE));
+       }
+
+       /** Construct a world object.
+        * 
+        * @param gravity the world gravity vector.
+        * @param doSleep improve performance by not simulating inactive bodies. */
+       public World (Vec2 gravity, IWorldPool argPool) {
+               pool = argPool;
+               m_destructionListener = null;
+               m_debugDraw = null;
+
+               m_bodyList = null;
+               m_jointList = null;
+
+               m_bodyCount = 0;
+               m_jointCount = 0;
+
+               m_warmStarting = true;
+               m_continuousPhysics = true;
+               m_subStepping = false;
+               m_stepComplete = true;
+
+               m_allowSleep = true;
+               m_gravity.set(gravity);
+
+               m_flags = CLEAR_FORCES;
+
+               m_inv_dt0 = 0f;
+
+               m_contactManager = new ContactManager(this);
+               m_profile = new Profile();
+
+               initializeRegisters();
+       }
+
+       public void setAllowSleep (boolean flag) {
+               if (flag == m_allowSleep) {
+                       return;
+               }
+
+               m_allowSleep = flag;
+               if (m_allowSleep == false) {
+                       for (Body b = m_bodyList; b != null; b = b.m_next) {
+                               b.setAwake(true);
+                       }
+               }
+       }
+
+       public boolean isAllowSleep () {
+               return m_allowSleep;
+       }
+
+       private void addType (IDynamicStack<Contact> creator, ShapeType type1, ShapeType type2) {
+               ContactRegister register = new ContactRegister();
+               register.creator = creator;
+               register.primary = true;
+               contactStacks[type1.ordinal()][type2.ordinal()] = register;
+
+               if (type1 != type2) {
+                       ContactRegister register2 = new ContactRegister();
+                       register2.creator = creator;
+                       register2.primary = false;
+                       contactStacks[type2.ordinal()][type1.ordinal()] = register2;
+               }
+       }
+
+       private void initializeRegisters () {
+               addType(pool.getCircleContactStack(), ShapeType.CIRCLE, ShapeType.CIRCLE);
+               addType(pool.getPolyCircleContactStack(), ShapeType.POLYGON, ShapeType.CIRCLE);
+               addType(pool.getPolyContactStack(), ShapeType.POLYGON, ShapeType.POLYGON);
+               addType(pool.getEdgeCircleContactStack(), ShapeType.EDGE, ShapeType.CIRCLE);
+               addType(pool.getEdgePolyContactStack(), ShapeType.EDGE, ShapeType.POLYGON);
+               addType(pool.getChainCircleContactStack(), ShapeType.CHAIN, ShapeType.CIRCLE);
+               addType(pool.getChainPolyContactStack(), ShapeType.CHAIN, ShapeType.POLYGON);
+       }
+
+       public Contact popContact (Fixture fixtureA, int indexA, Fixture fixtureB, int indexB) {
+               final ShapeType type1 = fixtureA.getType();
+               final ShapeType type2 = fixtureB.getType();
+
+               final ContactRegister reg = contactStacks[type1.ordinal()][type2.ordinal()];
+               final IDynamicStack<Contact> creator = reg.creator;
+               if (creator != null) {
+                       if (reg.primary) {
+                               Contact c = creator.pop();
+                               c.init(fixtureA, indexA, fixtureB, indexB);
+                               return c;
+                       } else {
+                               Contact c = creator.pop();
+                               c.init(fixtureB, indexB, fixtureA, indexA);
+                               return c;
+                       }
+               } else {
+                       return null;
+               }
+       }
+
+       public void pushContact (Contact contact) {
+
+               if (contact.m_manifold.pointCount > 0) {
+                       contact.getFixtureA().getBody().setAwake(true);
+                       contact.getFixtureB().getBody().setAwake(true);
+               }
+
+               ShapeType type1 = contact.getFixtureA().getType();
+               ShapeType type2 = contact.getFixtureB().getType();
+
+               IDynamicStack<Contact> creator = contactStacks[type1.ordinal()][type2.ordinal()].creator;
+               creator.push(contact);
+       }
+
+       public IWorldPool getPool () {
+               return pool;
+       }
+
+       /** Register a destruction listener. The listener is owned by you and must remain in scope.
+        * 
+        * @param listener */
+       public void setDestructionListener (DestructionListener listener) {
+               m_destructionListener = listener;
+       }
+
+       /** Register a contact filter to provide specific control over collision. Otherwise the default filter is used (_defaultFilter).
+        * The listener is owned by you and must remain in scope.
+        * 
+        * @param filter */
+       public void setContactFilter (ContactFilter filter) {
+               m_contactManager.m_contactFilter = filter;
+       }
+
+       /** Register a contact event listener. The listener is owned by you and must remain in scope.
+        * 
+        * @param listener */
+       public void setContactListener (ContactListener listener) {
+               m_contactManager.m_contactListener = listener;
+       }
+
+       /** Register a routine for debug drawing. The debug draw functions are called inside with World.DrawDebugData method. The debug
+        * draw object is owned by you and must remain in scope.
+        * 
+        * @param debugDraw */
+       public void setDebugDraw (DebugDraw debugDraw) {
+               m_debugDraw = debugDraw;
+       }
+
+       /** create a rigid body given a definition. No reference to the definition is retained.
+        * 
+        * @warning This function is locked during callbacks.
+        * @param def
+        * @return */
+       public Body createBody (BodyDef def) {
+               assert (isLocked() == false);
+               if (isLocked()) {
+                       return null;
+               }
+               // TODO djm pooling
+               Body b = new Body(def, this);
+
+               // add to world doubly linked list
+               b.m_prev = null;
+               b.m_next = m_bodyList;
+               if (m_bodyList != null) {
+                       m_bodyList.m_prev = b;
+               }
+               m_bodyList = b;
+               ++m_bodyCount;
+
+               return b;
+       }
+
+       /** destroy a rigid body given a definition. No reference to the definition is retained. This function is locked during
+        * callbacks.
+        * 
+        * @warning This automatically deletes all associated shapes and joints.
+        * @warning This function is locked during callbacks.
+        * @param body */
+       public void destroyBody (Body body) {
+               assert (m_bodyCount > 0);
+               assert (isLocked() == false);
+               if (isLocked()) {
+                       return;
+               }
+
+               // Delete the attached joints.
+               JointEdge je = body.m_jointList;
+               while (je != null) {
+                       JointEdge je0 = je;
+                       je = je.next;
+                       if (m_destructionListener != null) {
+                               m_destructionListener.sayGoodbye(je0.joint);
+                       }
+
+                       destroyJoint(je0.joint);
+
+                       body.m_jointList = je;
+               }
+               body.m_jointList = null;
+
+               // Delete the attached contacts.
+               ContactEdge ce = body.m_contactList;
+               while (ce != null) {
+                       ContactEdge ce0 = ce;
+                       ce = ce.next;
+                       m_contactManager.destroy(ce0.contact);
+               }
+               body.m_contactList = null;
+
+               Fixture f = body.m_fixtureList;
+               while (f != null) {
+                       Fixture f0 = f;
+                       f = f.m_next;
+
+                       if (m_destructionListener != null) {
+                               m_destructionListener.sayGoodbye(f0);
+                       }
+
+                       f0.destroyProxies(m_contactManager.m_broadPhase);
+                       f0.destroy();
+                       // TODO djm recycle fixtures (here or in that destroy method)
+                       body.m_fixtureList = f;
+                       body.m_fixtureCount -= 1;
+               }
+               body.m_fixtureList = null;
+               body.m_fixtureCount = 0;
+
+               // Remove world body list.
+               if (body.m_prev != null) {
+                       body.m_prev.m_next = body.m_next;
+               }
+
+               if (body.m_next != null) {
+                       body.m_next.m_prev = body.m_prev;
+               }
+
+               if (body == m_bodyList) {
+                       m_bodyList = body.m_next;
+               }
+
+               --m_bodyCount;
+               // TODO djm recycle body
+       }
+
+       /** create a joint to constrain bodies together. No reference to the definition is retained. This may cause the connected bodies
+        * to cease colliding.
+        * 
+        * @warning This function is locked during callbacks.
+        * @param def
+        * @return */
+       public Joint createJoint (JointDef def) {
+               assert (isLocked() == false);
+               if (isLocked()) {
+                       return null;
+               }
+
+               Joint j = Joint.create(this, def);
+
+               // Connect to the world list.
+               j.m_prev = null;
+               j.m_next = m_jointList;
+               if (m_jointList != null) {
+                       m_jointList.m_prev = j;
+               }
+               m_jointList = j;
+               ++m_jointCount;
+
+               // Connect to the bodies' doubly linked lists.
+               j.m_edgeA.joint = j;
+               j.m_edgeA.other = j.m_bodyB;
+               j.m_edgeA.prev = null;
+               j.m_edgeA.next = j.m_bodyA.m_jointList;
+               if (j.m_bodyA.m_jointList != null) {
+                       j.m_bodyA.m_jointList.prev = j.m_edgeA;
+               }
+               j.m_bodyA.m_jointList = j.m_edgeA;
+
+               j.m_edgeB.joint = j;
+               j.m_edgeB.other = j.m_bodyA;
+               j.m_edgeB.prev = null;
+               j.m_edgeB.next = j.m_bodyB.m_jointList;
+               if (j.m_bodyB.m_jointList != null) {
+                       j.m_bodyB.m_jointList.prev = j.m_edgeB;
+               }
+               j.m_bodyB.m_jointList = j.m_edgeB;
+
+               Body bodyA = def.bodyA;
+               Body bodyB = def.bodyB;
+
+               // If the joint prevents collisions, then flag any contacts for filtering.
+               if (def.collideConnected == false) {
+                       ContactEdge edge = bodyB.getContactList();
+                       while (edge != null) {
+                               if (edge.other == bodyA) {
+                                       // Flag the contact for filtering at the next time step (where either
+                                       // body is awake).
+                                       edge.contact.flagForFiltering();
+                               }
+
+                               edge = edge.next;
+                       }
+               }
+
+               // Note: creating a joint doesn't wake the bodies.
+
+               return j;
+       }
+
+       /** destroy a joint. This may cause the connected bodies to begin colliding.
+        * 
+        * @warning This function is locked during callbacks.
+        * @param joint */
+       public void destroyJoint (Joint j) {
+               assert (isLocked() == false);
+               if (isLocked()) {
+                       return;
+               }
+
+               boolean collideConnected = j.m_collideConnected;
+
+               // Remove from the doubly linked list.
+               if (j.m_prev != null) {
+                       j.m_prev.m_next = j.m_next;
+               }
+
+               if (j.m_next != null) {
+                       j.m_next.m_prev = j.m_prev;
+               }
+
+               if (j == m_jointList) {
+                       m_jointList = j.m_next;
+               }
+
+               // Disconnect from island graph.
+               Body bodyA = j.m_bodyA;
+               Body bodyB = j.m_bodyB;
+
+               // Wake up connected bodies.
+               bodyA.setAwake(true);
+               bodyB.setAwake(true);
+
+               // Remove from body 1.
+               if (j.m_edgeA.prev != null) {
+                       j.m_edgeA.prev.next = j.m_edgeA.next;
+               }
+
+               if (j.m_edgeA.next != null) {
+                       j.m_edgeA.next.prev = j.m_edgeA.prev;
+               }
+
+               if (j.m_edgeA == bodyA.m_jointList) {
+                       bodyA.m_jointList = j.m_edgeA.next;
+               }
+
+               j.m_edgeA.prev = null;
+               j.m_edgeA.next = null;
+
+               // Remove from body 2
+               if (j.m_edgeB.prev != null) {
+                       j.m_edgeB.prev.next = j.m_edgeB.next;
+               }
+
+               if (j.m_edgeB.next != null) {
+                       j.m_edgeB.next.prev = j.m_edgeB.prev;
+               }
+
+               if (j.m_edgeB == bodyB.m_jointList) {
+                       bodyB.m_jointList = j.m_edgeB.next;
+               }
+
+               j.m_edgeB.prev = null;
+               j.m_edgeB.next = null;
+
+               Joint.destroy(j);
+
+               assert (m_jointCount > 0);
+               --m_jointCount;
+
+               // If the joint prevents collisions, then flag any contacts for filtering.
+               if (collideConnected == false) {
+                       ContactEdge edge = bodyB.getContactList();
+                       while (edge != null) {
+                               if (edge.other == bodyA) {
+                                       // Flag the contact for filtering at the next time step (where either
+                                       // body is awake).
+                                       edge.contact.flagForFiltering();
+                               }
+
+                               edge = edge.next;
+                       }
+               }
+       }
+
+       // djm pooling
+       private final TimeStep step = new TimeStep();
+       private final Timer stepTimer = new Timer();
+       private final Timer tempTimer = new Timer();
+
+       /** Take a time step. This performs collision detection, integration, and constraint solution.
+        * 
+        * @param timeStep the amount of time to simulate, this should not vary.
+        * @param velocityIterations for the velocity constraint solver.
+        * @param positionIterations for the position constraint solver. */
+       public void step (float dt, int velocityIterations, int positionIterations) {
+               stepTimer.reset();
+               // log.debug("Starting step");
+               // If new fixtures were added, we need to find the new contacts.
+               if ((m_flags & NEW_FIXTURE) == NEW_FIXTURE) {
+                       // log.debug("There's a new fixture, lets look for new contacts");
+                       m_contactManager.findNewContacts();
+                       m_flags &= ~NEW_FIXTURE;
+               }
+
+               m_flags |= LOCKED;
+
+               step.dt = dt;
+               step.velocityIterations = velocityIterations;
+               step.positionIterations = positionIterations;
+               if (dt > 0.0f) {
+                       step.inv_dt = 1.0f / dt;
+               } else {
+                       step.inv_dt = 0.0f;
+               }
+
+               step.dtRatio = m_inv_dt0 * dt;
+
+               step.warmStarting = m_warmStarting;
+
+               // Update contacts. This is where some contacts are destroyed.
+               tempTimer.reset();
+               m_contactManager.collide();
+               m_profile.collide = tempTimer.getMilliseconds();
+
+               // Integrate velocities, solve velocity constraints, and integrate positions.
+               if (m_stepComplete && step.dt > 0.0f) {
+                       tempTimer.reset();
+                       solve(step);
+                       m_profile.solve = tempTimer.getMilliseconds();
+               }
+
+               // Handle TOI events.
+               if (m_continuousPhysics && step.dt > 0.0f) {
+                       tempTimer.reset();
+                       solveTOI(step);
+                       m_profile.solveTOI = tempTimer.getMilliseconds();
+               }
+
+               if (step.dt > 0.0f) {
+                       m_inv_dt0 = step.inv_dt;
+               }
+
+               if ((m_flags & CLEAR_FORCES) == CLEAR_FORCES) {
+                       clearForces();
+               }
+
+               m_flags &= ~LOCKED;
+               // log.debug("ending step");
+
+               m_profile.step = stepTimer.getMilliseconds();
+       }
+
+       /** Call this after you are done with time steps to clear the forces. You normally call this after each call to Step, unless you
+        * are performing sub-steps. By default, forces will be automatically cleared, so you don't need to call this function.
+        * 
+        * @see setAutoClearForces */
+       public void clearForces () {
+               for (Body body = m_bodyList; body != null; body = body.getNext()) {
+                       body.m_force.setZero();
+                       body.m_torque = 0.0f;
+               }
+       }
+
+       private final Color3f color = new Color3f();
+       private final Transform xf = new Transform();
+       private final Vec2 cA = new Vec2();
+       private final Vec2 cB = new Vec2();
+       private final Vec2Array avs = new Vec2Array();
+
+       /** Call this to draw shapes and other debug draw data. */
+       public void drawDebugData () {
+               if (m_debugDraw == null) {
+                       return;
+               }
+
+               int flags = m_debugDraw.getFlags();
+
+               if ((flags & DebugDraw.e_shapeBit) == DebugDraw.e_shapeBit) {
+                       for (Body b = m_bodyList; b != null; b = b.getNext()) {
+                               xf.set(b.getTransform());
+                               for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
+                                       if (b.isActive() == false) {
+                                               color.set(0.5f, 0.5f, 0.3f);
+                                               drawShape(f, xf, color);
+                                       } else if (b.getType() == BodyType.STATIC) {
+                                               color.set(0.5f, 0.9f, 0.3f);
+                                               drawShape(f, xf, color);
+                                       } else if (b.getType() == BodyType.KINEMATIC) {
+                                               color.set(0.5f, 0.5f, 0.9f);
+                                               drawShape(f, xf, color);
+                                       } else if (b.isAwake() == false) {
+                                               color.set(0.5f, 0.5f, 0.5f);
+                                               drawShape(f, xf, color);
+                                       } else {
+                                               color.set(0.9f, 0.7f, 0.7f);
+                                               drawShape(f, xf, color);
+                                       }
+                               }
+                       }
+               }
+
+               if ((flags & DebugDraw.e_jointBit) == DebugDraw.e_jointBit) {
+                       for (Joint j = m_jointList; j != null; j = j.getNext()) {
+                               drawJoint(j);
+                       }
+               }
+
+               if ((flags & DebugDraw.e_pairBit) == DebugDraw.e_pairBit) {
+                       color.set(0.3f, 0.9f, 0.9f);
+                       for (Contact c = m_contactManager.m_contactList; c != null; c = c.getNext()) {
+                               // Fixture fixtureA = c.getFixtureA();
+                               // Fixture fixtureB = c.getFixtureB();
+                               //
+                               // fixtureA.getAABB(childIndex).getCenterToOut(cA);
+                               // fixtureB.getAABB().getCenterToOut(cB);
+                               //
+                               // m_debugDraw.drawSegment(cA, cB, color);
+                       }
+               }
+
+               if ((flags & DebugDraw.e_aabbBit) == DebugDraw.e_aabbBit) {
+                       color.set(0.9f, 0.3f, 0.9f);
+
+                       for (Body b = m_bodyList; b != null; b = b.getNext()) {
+                               if (b.isActive() == false) {
+                                       continue;
+                               }
+
+                               for (Fixture f = b.getFixtureList(); f != null; f = f.getNext()) {
+
+                                       for (int i = 0; i < f.m_proxyCount; ++i) {
+                                               FixtureProxy proxy = f.m_proxies[i];
+                                               AABB aabb = m_contactManager.m_broadPhase.getFatAABB(proxy.proxyId);
+                                               Vec2[] vs = avs.get(4);
+                                               vs[0].set(aabb.lowerBound.x, aabb.lowerBound.y);
+                                               vs[1].set(aabb.upperBound.x, aabb.lowerBound.y);
+                                               vs[2].set(aabb.upperBound.x, aabb.upperBound.y);
+                                               vs[3].set(aabb.lowerBound.x, aabb.upperBound.y);
+
+                                               m_debugDraw.drawPolygon(vs, 4, color);
+                                       }
+
+                               }
+                       }
+               }
+
+               if ((flags & DebugDraw.e_centerOfMassBit) == DebugDraw.e_centerOfMassBit) {
+                       for (Body b = m_bodyList; b != null; b = b.getNext()) {
+                               xf.set(b.getTransform());
+                               xf.p.set(b.getWorldCenter());
+                               m_debugDraw.drawTransform(xf);
+                       }
+               }
+
+               if ((flags & DebugDraw.e_dynamicTreeBit) == DebugDraw.e_dynamicTreeBit) {
+                       m_contactManager.m_broadPhase.drawTree(m_debugDraw);
+               }
+       }
+
+       private final WorldQueryWrapper wqwrapper = new WorldQueryWrapper();
+
+       /** Query the world for all fixtures that potentially overlap the provided AABB.
+        * 
+        * @param callback a user implemented callback class.
+        * @param aabb the query box. */
+       public void queryAABB (QueryCallback callback, AABB aabb) {
+               wqwrapper.broadPhase = m_contactManager.m_broadPhase;
+               wqwrapper.callback = callback;
+               m_contactManager.m_broadPhase.query(wqwrapper, aabb);
+       }
+
+       private final WorldRayCastWrapper wrcwrapper = new WorldRayCastWrapper();
+       private final RayCastInput input = new RayCastInput();
+
+       /** Ray-cast the world for all fixtures in the path of the ray. Your callback controls whether you get the closest point, any
+        * point, or n-points. The ray-cast ignores shapes that contain the starting point.
+        * 
+        * @param callback a user implemented callback class.
+        * @param point1 the ray starting point
+        * @param point2 the ray ending point */
+       public void raycast (RayCastCallback callback, Vec2 point1, Vec2 point2) {
+               wrcwrapper.broadPhase = m_contactManager.m_broadPhase;
+               wrcwrapper.callback = callback;
+               input.maxFraction = 1.0f;
+               input.p1.set(point1);
+               input.p2.set(point2);
+               m_contactManager.m_broadPhase.raycast(wrcwrapper, input);
+       }
+
+       /** Get the world body list. With the returned body, use Body.getNext to get the next body in the world list. A null body
+        * indicates the end of the list.
+        * 
+        * @return the head of the world body list. */
+       public Body getBodyList () {
+               return m_bodyList;
+       }
+
+       /** Get the world joint list. With the returned joint, use Joint.getNext to get the next joint in the world list. A null joint
+        * indicates the end of the list.
+        * 
+        * @return the head of the world joint list. */
+       public Joint getJointList () {
+               return m_jointList;
+       }
+
+       /** Get the world contact list. With the returned contact, use Contact.getNext to get the next contact in the world list. A null
+        * contact indicates the end of the list.
+        * 
+        * @return the head of the world contact list.
+        * @warning contacts are created and destroyed in the middle of a time step. Use ContactListener to avoid missing contacts. */
+       public Contact getContactList () {
+               return m_contactManager.m_contactList;
+       }
+
+       public boolean isSleepingAllowed () {
+               return m_allowSleep;
+       }
+
+       public void setSleepingAllowed (boolean sleepingAllowed) {
+               m_allowSleep = sleepingAllowed;
+       }
+
+       /** Enable/disable warm starting. For testing.
+        * 
+        * @param flag */
+       public void setWarmStarting (boolean flag) {
+               m_warmStarting = flag;
+       }
+
+       public boolean isWarmStarting () {
+               return m_warmStarting;
+       }
+
+       /** Enable/disable continuous physics. For testing.
+        * 
+        * @param flag */
+       public void setContinuousPhysics (boolean flag) {
+               m_continuousPhysics = flag;
+       }
+
+       public boolean isContinuousPhysics () {
+               return m_continuousPhysics;
+       }
+
+       /** Get the number of broad-phase proxies.
+        * 
+        * @return */
+       public int getProxyCount () {
+               return m_contactManager.m_broadPhase.getProxyCount();
+       }
+
+       /** Get the number of bodies.
+        * 
+        * @return */
+       public int getBodyCount () {
+               return m_bodyCount;
+       }
+
+       /** Get the number of joints.
+        * 
+        * @return */
+       public int getJointCount () {
+               return m_jointCount;
+       }
+
+       /** Get the number of contacts (each may have 0 or more contact points).
+        * 
+        * @return */
+       public int getContactCount () {
+               return m_contactManager.m_contactCount;
+       }
+
+       /** Gets the height of the dynamic tree
+        * 
+        * @return */
+       public int getTreeHeight () {
+               return m_contactManager.m_broadPhase.getTreeHeight();
+       }
+
+       /** Gets the balance of the dynamic tree
+        * 
+        * @return */
+       public int getTreeBalance () {
+               return m_contactManager.m_broadPhase.getTreeBalance();
+       }
+
+       /** Gets the quality of the dynamic tree
+        * 
+        * @return */
+       public float getTreeQuality () {
+               return m_contactManager.m_broadPhase.getTreeQuality();
+       }
+
+       /** Change the global gravity vector.
+        * 
+        * @param gravity */
+       public void setGravity (Vec2 gravity) {
+               m_gravity.set(gravity);
+       }
+
+       /** Get the global gravity vector.
+        * 
+        * @return */
+       public Vec2 getGravity () {
+               return m_gravity;
+       }
+
+       /** Is the world locked (in the middle of a time step).
+        * 
+        * @return */
+       public boolean isLocked () {
+               return (m_flags & LOCKED) == LOCKED;
+       }
+
+       /** Set flag to control automatic clearing of forces after each time step.
+        * 
+        * @param flag */
+       public void setAutoClearForces (boolean flag) {
+               if (flag) {
+                       m_flags |= CLEAR_FORCES;
+               } else {
+                       m_flags &= ~CLEAR_FORCES;
+               }
+       }
+
+       /** Get the flag that controls automatic clearing of forces after each time step.
+        * 
+        * @return */
+       public boolean getAutoClearForces () {
+               return (m_flags & CLEAR_FORCES) == CLEAR_FORCES;
+       }
+
+       /** Get the contact manager for testing purposes
+        * 
+        * @return */
+       public ContactManager getContactManager () {
+               return m_contactManager;
+       }
+
+       public Profile getProfile () {
+               return m_profile;
+       }
+
+       private final Island island = new Island();
+       private Body[] stack = new Body[10]; // TODO djm find a good initial stack number;
+       private final Profile islandProfile = new Profile();
+       private final Timer broadphaseTimer = new Timer();
+
+       private void solve (TimeStep step) {
+               m_profile.solveInit = 0;
+               m_profile.solveVelocity = 0;
+               m_profile.solvePosition = 0;
+
+               // Size the island for the worst case.
+               island.init(m_bodyCount, m_contactManager.m_contactCount, m_jointCount, m_contactManager.m_contactListener);
+
+               // Clear all the island flags.
+               for (Body b = m_bodyList; b != null; b = b.m_next) {
+                       b.m_flags &= ~Body.e_islandFlag;
+               }
+               for (Contact c = m_contactManager.m_contactList; c != null; c = c.m_next) {
+                       c.m_flags &= ~Contact.ISLAND_FLAG;
+               }
+               for (Joint j = m_jointList; j != null; j = j.m_next) {
+                       j.m_islandFlag = false;
+               }
+
+               // Build and simulate all awake islands.
+               int stackSize = m_bodyCount;
+               if (stack.length < stackSize) {
+                       stack = new Body[stackSize];
+               }
+               for (Body seed = m_bodyList; seed != null; seed = seed.m_next) {
+                       if ((seed.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {
+                               continue;
+                       }
+
+                       if (seed.isAwake() == false || seed.isActive() == false) {
+                               continue;
+                       }
+
+                       // The seed can be dynamic or kinematic.
+                       if (seed.getType() == BodyType.STATIC) {
+                               continue;
+                       }
+
+                       // Reset island and stack.
+                       island.clear();
+                       int stackCount = 0;
+                       stack[stackCount++] = seed;
+                       seed.m_flags |= Body.e_islandFlag;
+
+                       // Perform a depth first search (DFS) on the constraint graph.
+                       while (stackCount > 0) {
+                               // Grab the next body off the stack and add it to the island.
+                               Body b = stack[--stackCount];
+                               assert (b.isActive() == true);
+                               island.add(b);
+
+                               // Make sure the body is awake.
+                               b.setAwake(true);
+
+                               // To keep islands as small as possible, we don't
+                               // propagate islands across static bodies.
+                               if (b.getType() == BodyType.STATIC) {
+                                       continue;
+                               }
+
+                               // Search all contacts connected to this body.
+                               for (ContactEdge ce = b.m_contactList; ce != null; ce = ce.next) {
+                                       Contact contact = ce.contact;
+
+                                       // Has this contact already been added to an island?
+                                       if ((contact.m_flags & Contact.ISLAND_FLAG) == Contact.ISLAND_FLAG) {
+                                               continue;
+                                       }
+
+                                       // Is this contact solid and touching?
+                                       if (contact.isEnabled() == false || contact.isTouching() == false) {
+                                               continue;
+                                       }
+
+                                       // Skip sensors.
+                                       boolean sensorA = contact.m_fixtureA.m_isSensor;
+                                       boolean sensorB = contact.m_fixtureB.m_isSensor;
+                                       if (sensorA || sensorB) {
+                                               continue;
+                                       }
+
+                                       island.add(contact);
+                                       contact.m_flags |= Contact.ISLAND_FLAG;
+
+                                       Body other = ce.other;
+
+                                       // Was the other body already added to this island?
+                                       if ((other.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {
+                                               continue;
+                                       }
+
+                                       assert (stackCount < stackSize);
+                                       stack[stackCount++] = other;
+                                       other.m_flags |= Body.e_islandFlag;
+                               }
+
+                               // Search all joints connect to this body.
+                               for (JointEdge je = b.m_jointList; je != null; je = je.next) {
+                                       if (je.joint.m_islandFlag == true) {
+                                               continue;
+                                       }
+
+                                       Body other = je.other;
+
+                                       // Don't simulate joints connected to inactive bodies.
+                                       if (other.isActive() == false) {
+                                               continue;
+                                       }
+
+                                       island.add(je.joint);
+                                       je.joint.m_islandFlag = true;
+
+                                       if ((other.m_flags & Body.e_islandFlag) == Body.e_islandFlag) {
+                                               continue;
+                                       }
+
+                                       assert (stackCount < stackSize);
+                                       stack[stackCount++] = other;
+                                       other.m_flags |= Body.e_islandFlag;
+                               }
+                       }
+                       island.solve(islandProfile, step, m_gravity, m_allowSleep);
+                       m_profile.solveInit += islandProfile.solveInit;
+                       m_profile.solveVelocity += islandProfile.solveVelocity;
+                       m_profile.solvePosition += islandProfile.solvePosition;
+
+                       // Post solve cleanup.
+                       for (int i = 0; i < island.m_bodyCount; ++i) {
+                               // Allow static bodies to participate in other islands.
+                               Body b = island.m_bodies[i];
+                               if (b.getType() == BodyType.STATIC) {
+                                       b.m_flags &= ~Body.e_islandFlag;
+                               }
+                       }
+               }
+
+               broadphaseTimer.reset();
+               // Synchronize fixtures, check for out of range bodies.
+               for (Body b = m_bodyList; b != null; b = b.getNext()) {
+                       // If a body was not in an island then it did not move.
+                       if ((b.m_flags & Body.e_islandFlag) == 0) {
+                               continue;
+                       }
+
+                       if (b.getType() == BodyType.STATIC) {
+                               continue;
+                       }
+
+                       // Update fixtures (for broad-phase).
+                       b.synchronizeFixtures();
+               }
+
+               // Look for new contacts.
+               m_contactManager.findNewContacts();
+               m_profile.broadphase = broadphaseTimer.getMilliseconds();
+       }
+
+       private final Island toiIsland = new Island();
+       private final TOIInput toiInput = new TOIInput();
+       private final TOIOutput toiOutput = new TOIOutput();
+       private final TimeStep subStep = new TimeStep();
+       private final Body[] tempBodies = new Body[2];
+       private final Sweep backup1 = new Sweep();
+       private final Sweep backup2 = new Sweep();
+
+       private void solveTOI (final TimeStep step) {
+
+               final Island island = toiIsland;
+               island.init(2 * Settings.maxTOIContacts, Settings.maxTOIContacts, 0, m_contactManager.m_contactListener);
+               if (m_stepComplete) {
+                       for (Body b = m_bodyList; b != null; b = b.m_next) {
+                               b.m_flags &= ~Body.e_islandFlag;
+                               b.m_sweep.alpha0 = 0.0f;
+                       }
+
+                       for (Contact c = m_contactManager.m_contactList; c != null; c = c.m_next) {
+                               // Invalidate TOI
+                               c.m_flags &= ~(Contact.TOI_FLAG | Contact.ISLAND_FLAG);
+                               c.m_toiCount = 0;
+                               c.m_toi = 1.0f;
+                       }
+               }
+
+               // Find TOI events and solve them.
+               for (;;) {
+                       // Find the first TOI.
+                       Contact minContact = null;
+                       float minAlpha = 1.0f;
+
+                       for (Contact c = m_contactManager.m_contactList; c != null; c = c.m_next) {
+                               // Is this contact disabled?
+                               if (c.isEnabled() == false) {
+                                       continue;
+                               }
+
+                               // Prevent excessive sub-stepping.
+                               if (c.m_toiCount > Settings.maxSubSteps) {
+                                       continue;
+                               }
+
+                               float alpha = 1.0f;
+                               if ((c.m_flags & Contact.TOI_FLAG) != 0) {
+                                       // This contact has a valid cached TOI.
+                                       alpha = c.m_toi;
+                               } else {
+                                       Fixture fA = c.getFixtureA();
+                                       Fixture fB = c.getFixtureB();
+
+                                       // Is there a sensor?
+                                       if (fA.isSensor() || fB.isSensor()) {
+                                               continue;
+                                       }
+
+                                       Body bA = fA.getBody();
+                                       Body bB = fB.getBody();
+
+                                       BodyType typeA = bA.m_type;
+                                       BodyType typeB = bB.m_type;
+                                       assert (typeA == BodyType.DYNAMIC || typeB == BodyType.DYNAMIC);
+
+                                       boolean activeA = bA.isAwake() && typeA != BodyType.STATIC;
+                                       boolean activeB = bB.isAwake() && typeB != BodyType.STATIC;
+
+                                       // Is at least one body active (awake and dynamic or kinematic)?
+                                       if (activeA == false && activeB == false) {
+                                               continue;
+                                       }
+
+                                       boolean collideA = bA.isBullet() || typeA != BodyType.DYNAMIC;
+                                       boolean collideB = bB.isBullet() || typeB != BodyType.DYNAMIC;
+
+                                       // Are these two non-bullet dynamic bodies?
+                                       if (collideA == false && collideB == false) {
+                                               continue;
+                                       }
+
+                                       // Compute the TOI for this contact.
+                                       // Put the sweeps onto the same time interval.
+                                       float alpha0 = bA.m_sweep.alpha0;
+
+                                       if (bA.m_sweep.alpha0 < bB.m_sweep.alpha0) {
+                                               alpha0 = bB.m_sweep.alpha0;
+                                               bA.m_sweep.advance(alpha0);
+                                       } else if (bB.m_sweep.alpha0 < bA.m_sweep.alpha0) {
+                                               alpha0 = bA.m_sweep.alpha0;
+                                               bB.m_sweep.advance(alpha0);
+                                       }
+
+                                       assert (alpha0 < 1.0f);
+
+                                       int indexA = c.getChildIndexA();
+                                       int indexB = c.getChildIndexB();
+
+                                       // Compute the time of impact in interval [0, minTOI]
+                                       final TOIInput input = toiInput;
+                                       input.proxyA.set(fA.getShape(), indexA);
+                                       input.proxyB.set(fB.getShape(), indexB);
+                                       input.sweepA.set(bA.m_sweep);
+                                       input.sweepB.set(bB.m_sweep);
+                                       input.tMax = 1.0f;
+
+                                       pool.getTimeOfImpact().timeOfImpact(toiOutput, input);
+
+                                       // Beta is the fraction of the remaining portion of the .
+                                       float beta = toiOutput.t;
+                                       if (toiOutput.state == TOIOutputState.TOUCHING) {
+                                               alpha = MathUtils.min(alpha0 + (1.0f - alpha0) * beta, 1.0f);
+                                       } else {
+                                               alpha = 1.0f;
+                                       }
+
+                                       c.m_toi = alpha;
+                                       c.m_flags |= Contact.TOI_FLAG;
+                               }
+
+                               if (alpha < minAlpha) {
+                                       // This is the minimum TOI found so far.
+                                       minContact = c;
+                                       minAlpha = alpha;
+                               }
+                       }
+
+                       if (minContact == null || 1.0f - 10.0f * Settings.EPSILON < minAlpha) {
+                               // No more TOI events. Done!
+                               m_stepComplete = true;
+                               break;
+                       }
+
+                       // Advance the bodies to the TOI.
+                       Fixture fA = minContact.getFixtureA();
+                       Fixture fB = minContact.getFixtureB();
+                       Body bA = fA.getBody();
+                       Body bB = fB.getBody();
+
+                       backup1.set(bA.m_sweep);
+                       backup2.set(bB.m_sweep);
+
+                       bA.advance(minAlpha);
+                       bB.advance(minAlpha);
+
+                       // The TOI contact likely has some new contact points.
+                       minContact.update(m_contactManager.m_contactListener);
+                       minContact.m_flags &= ~Contact.TOI_FLAG;
+                       ++minContact.m_toiCount;
+
+                       // Is the contact solid?
+                       if (minContact.isEnabled() == false || minContact.isTouching() == false) {
+                               // Restore the sweeps.
+                               minContact.setEnabled(false);
+                               bA.m_sweep.set(backup1);
+                               bB.m_sweep.set(backup2);
+                               bA.synchronizeTransform();
+                               bB.synchronizeTransform();
+                               continue;
+                       }
+
+                       bA.setAwake(true);
+                       bB.setAwake(true);
+
+                       // Build the island
+                       island.clear();
+                       island.add(bA);
+                       island.add(bB);
+                       island.add(minContact);
+
+                       bA.m_flags |= Body.e_islandFlag;
+                       bB.m_flags |= Body.e_islandFlag;
+                       minContact.m_flags |= Contact.ISLAND_FLAG;
+
+                       // Get contacts on bodyA and bodyB.
+                       tempBodies[0] = bA;
+                       tempBodies[1] = bB;
+                       for (int i = 0; i < 2; ++i) {
+                               Body body = tempBodies[i];
+                               if (body.m_type == BodyType.DYNAMIC) {
+                                       for (ContactEdge ce = body.m_contactList; ce != null; ce = ce.next) {
+                                               if (island.m_bodyCount == island.m_bodyCapacity) {
+                                                       break;
+                                               }
+
+                                               if (island.m_contactCount == island.m_contactCapacity) {
+                                                       break;
+                                               }
+
+                                               Contact contact = ce.contact;
+
+                                               // Has this contact already been added to the island?
+                                               if ((contact.m_flags & Contact.ISLAND_FLAG) != 0) {
+                                                       continue;
+                                               }
+
+                                               // Only add static, kinematic, or bullet bodies.
+                                               Body other = ce.other;
+                                               if (other.m_type == BodyType.DYNAMIC && body.isBullet() == false && other.isBullet() == false) {
+                                                       continue;
+                                               }
+
+                                               // Skip sensors.
+                                               boolean sensorA = contact.m_fixtureA.m_isSensor;
+                                               boolean sensorB = contact.m_fixtureB.m_isSensor;
+                                               if (sensorA || sensorB) {
+                                                       continue;
+                                               }
+
+                                               // Tentatively advance the body to the TOI.
+                                               backup1.set(other.m_sweep);
+                                               if ((other.m_flags & Body.e_islandFlag) == 0) {
+                                                       other.advance(minAlpha);
+                                               }
+
+                                               // Update the contact points
+                                               contact.update(m_contactManager.m_contactListener);
+
+                                               // Was the contact disabled by the user?
+                                               if (contact.isEnabled() == false) {
+                                                       other.m_sweep.set(backup1);
+                                                       other.synchronizeTransform();
+                                                       continue;
+                                               }
+
+                                               // Are there contact points?
+                                               if (contact.isTouching() == false) {
+                                                       other.m_sweep.set(backup1);
+                                                       other.synchronizeTransform();
+                                                       continue;
+                                               }
+
+                                               // Add the contact to the island
+                                               contact.m_flags |= Contact.ISLAND_FLAG;
+                                               island.add(contact);
+
+                                               // Has the other body already been added to the island?
+                                               if ((other.m_flags & Body.e_islandFlag) != 0) {
+                                                       continue;
+                                               }
+
+                                               // Add the other body to the island.
+                                               other.m_flags |= Body.e_islandFlag;
+
+                                               if (other.m_type != BodyType.STATIC) {
+                                                       other.setAwake(true);
+                                               }
+
+                                               island.add(other);
+                                       }
+                               }
+                       }
+
+                       subStep.dt = (1.0f - minAlpha) * step.dt;
+                       subStep.inv_dt = 1.0f / subStep.dt;
+                       subStep.dtRatio = 1.0f;
+                       subStep.positionIterations = 20;
+                       subStep.velocityIterations = step.velocityIterations;
+                       subStep.warmStarting = false;
+                       island.solveTOI(subStep, bA.m_islandIndex, bB.m_islandIndex);
+
+                       // Reset island flags and synchronize broad-phase proxies.
+                       for (int i = 0; i < island.m_bodyCount; ++i) {
+                               Body body = island.m_bodies[i];
+                               body.m_flags &= ~Body.e_islandFlag;
+
+                               if (body.m_type != BodyType.DYNAMIC) {
+                                       continue;
+                               }
+
+                               body.synchronizeFixtures();
+
+                               // Invalidate all contact TOIs on this displaced body.
+                               for (ContactEdge ce = body.m_contactList; ce != null; ce = ce.next) {
+                                       ce.contact.m_flags &= ~(Contact.TOI_FLAG | Contact.ISLAND_FLAG);
+                               }
+                       }
+
+                       // Commit fixture proxy movements to the broad-phase so that new contacts are created.
+                       // Also, some contacts can be destroyed.
+                       m_contactManager.findNewContacts();
+
+                       if (m_subStepping) {
+                               m_stepComplete = false;
+                               break;
+                       }
+               }
+       }
+
+       private void drawJoint (Joint joint) {
+               Body bodyA = joint.getBodyA();
+               Body bodyB = joint.getBodyB();
+               Transform xf1 = bodyA.getTransform();
+               Transform xf2 = bodyB.getTransform();
+               Vec2 x1 = xf1.p;
+               Vec2 x2 = xf2.p;
+               Vec2 p1 = pool.popVec2();
+               Vec2 p2 = pool.popVec2();
+               joint.getAnchorA(p1);
+               joint.getAnchorB(p2);
+
+               color.set(0.5f, 0.8f, 0.8f);
+
+               switch (joint.getType()) {
+               // TODO djm write after writing joints
+               case DISTANCE:
+                       m_debugDraw.drawSegment(p1, p2, color);
+                       break;
+
+               case PULLEY: {
+                       PulleyJoint pulley = (PulleyJoint)joint;
+                       Vec2 s1 = pulley.getGroundAnchorA();
+                       Vec2 s2 = pulley.getGroundAnchorB();
+                       m_debugDraw.drawSegment(s1, p1, color);
+                       m_debugDraw.drawSegment(s2, p2, color);
+                       m_debugDraw.drawSegment(s1, s2, color);
+               }
+                       break;
+               case CONSTANT_VOLUME:
+               case MOUSE:
+                       // don't draw this
+                       break;
+               default:
+                       m_debugDraw.drawSegment(x1, p1, color);
+                       m_debugDraw.drawSegment(p1, p2, color);
+                       m_debugDraw.drawSegment(x2, p2, color);
+               }
+               pool.pushVec2(2);
+       }
+
+       // NOTE this corresponds to the liquid test, so the debugdraw can draw
+       // the liquid particles correctly. They should be the same.
+       private static Integer LIQUID_INT = new Integer(1234598372);
+       private float liquidLength = .12f;
+       private float averageLinearVel = -1;
+       private final Vec2 liquidOffset = new Vec2();
+       private final Vec2 circCenterMoved = new Vec2();
+       private final Color3f liquidColor = new Color3f(.4f, .4f, 1f);
+
+       private final Vec2 center = new Vec2();
+       private final Vec2 axis = new Vec2();
+       private final Vec2 v1 = new Vec2();
+       private final Vec2 v2 = new Vec2();
+       private final Vec2Array tlvertices = new Vec2Array();
+
+       private void drawShape (Fixture fixture, Transform xf, Color3f color) {
+               switch (fixture.getType()) {
+               case CIRCLE: {
+                       CircleShape circle = (CircleShape)fixture.getShape();
+
+                       // Vec2 center = Mul(xf, circle.m_p);
+                       Transform.mulToOutUnsafe(xf, circle.m_p, center);
+                       float radius = circle.m_radius;
+                       xf.q.getXAxis(axis);
+
+                       if (fixture.getUserData() != null && fixture.getUserData().equals(LIQUID_INT)) {
+                               Body b = fixture.getBody();
+                               liquidOffset.set(b.m_linearVelocity);
+                               float linVelLength = b.m_linearVelocity.length();
+                               if (averageLinearVel == -1) {
+                                       averageLinearVel = linVelLength;
+                               } else {
+                                       averageLinearVel = .98f * averageLinearVel + .02f * linVelLength;
+                               }
+                               liquidOffset.mulLocal(liquidLength / averageLinearVel / 2);
+                               circCenterMoved.set(center).addLocal(liquidOffset);
+                               center.subLocal(liquidOffset);
+                               m_debugDraw.drawSegment(center, circCenterMoved, liquidColor);
+                               return;
+                       }
+
+                       m_debugDraw.drawSolidCircle(center, radius, axis, color);
+               }
+                       break;
+
+               case POLYGON: {
+                       PolygonShape poly = (PolygonShape)fixture.getShape();
+                       int vertexCount = poly.m_count;
+                       assert (vertexCount <= Settings.maxPolygonVertices);
+                       Vec2[] vertices = tlvertices.get(Settings.maxPolygonVertices);
+
+                       for (int i = 0; i < vertexCount; ++i) {
+                               // vertices[i] = Mul(xf, poly.m_vertices[i]);
+                               Transform.mulToOutUnsafe(xf, poly.m_vertices[i], vertices[i]);
+                       }
+
+                       m_debugDraw.drawSolidPolygon(vertices, vertexCount, color);
+               }
+                       break;
+               case EDGE: {
+                       EdgeShape edge = (EdgeShape)fixture.getShape();
+                       Transform.mulToOutUnsafe(xf, edge.m_vertex1, v1);
+                       Transform.mulToOutUnsafe(xf, edge.m_vertex2, v2);
+                       m_debugDraw.drawSegment(v1, v2, color);
+               }
+                       break;
+
+               case CHAIN: {
+                       ChainShape chain = (ChainShape)fixture.getShape();
+                       int count = chain.m_count;
+                       Vec2[] vertices = chain.m_vertices;
+
+                       Transform.mulToOutUnsafe(xf, vertices[0], v1);
+                       for (int i = 1; i < count; ++i) {
+                               Transform.mulToOutUnsafe(xf, vertices[i], v2);
+                               m_debugDraw.drawSegment(v1, v2, color);
+                               m_debugDraw.drawCircle(v1, 0.05f, color);
+                               v1.set(v2);
+                       }
+               }
+                       break;
+               default:
+                       break;
+               }
+       }
 }
 
-
 class WorldQueryWrapper implements TreeCallback {
-  public boolean treeCallback(int nodeId) {
-    FixtureProxy proxy = (FixtureProxy) broadPhase.getUserData(nodeId);
-    return callback.reportFixture(proxy.fixture);
-  }
+       public boolean treeCallback (int nodeId) {
+               FixtureProxy proxy = (FixtureProxy)broadPhase.getUserData(nodeId);
+               return callback.reportFixture(proxy.fixture);
+       }
 
-  BroadPhase broadPhase;
-  QueryCallback callback;
+       BroadPhase broadPhase;
+       QueryCallback callback;
 };
 
-
 class WorldRayCastWrapper implements TreeRayCastCallback {
 
-  // djm pooling
-  private final RayCastOutput output = new RayCastOutput();
-  private final Vec2 temp = new Vec2();
-  private final Vec2 point = new Vec2();
-
-  public float raycastCallback(RayCastInput input, int nodeId) {
-    Object userData = broadPhase.getUserData(nodeId);
-    FixtureProxy proxy = (FixtureProxy) userData;
-    Fixture fixture = proxy.fixture;
-    int index = proxy.childIndex;
-    boolean hit = fixture.raycast(output, input, index);
-
-    if (hit) {
-      float fraction = output.fraction;
-      // Vec2 point = (1.0f - fraction) * input.p1 + fraction * input.p2;
-      temp.set(input.p2).mulLocal(fraction);
-      point.set(input.p1).mulLocal(1 - fraction).addLocal(temp);
-      return callback.reportFixture(fixture, point, output.normal, fraction);
-    }
-
-    return input.maxFraction;
-  }
-
-  BroadPhase broadPhase;
-  RayCastCallback callback;
+       // djm pooling
+       private final RayCastOutput output = new RayCastOutput();
+       private final Vec2 temp = new Vec2();
+       private final Vec2 point = new Vec2();
+
+       public float raycastCallback (RayCastInput input, int nodeId) {
+               Object userData = broadPhase.getUserData(nodeId);
+               FixtureProxy proxy = (FixtureProxy)userData;
+               Fixture fixture = proxy.fixture;
+               int index = proxy.childIndex;
+               boolean hit = fixture.raycast(output, input, index);
+
+               if (hit) {
+                       float fraction = output.fraction;
+                       // Vec2 point = (1.0f - fraction) * input.p1 + fraction * input.p2;
+                       temp.set(input.p2).mulLocal(fraction);
+                       point.set(input.p1).mulLocal(1 - fraction).addLocal(temp);
+                       return callback.reportFixture(fixture, point, output.normal, fraction);
+               }
+
+               return input.maxFraction;
+       }
+
+       BroadPhase broadPhase;
+       RayCastCallback callback;
 };
index d23c014..51686e3 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.collision.Manifold;\r
@@ -34,24 +35,23 @@ import org.jbox2d.pooling.IWorldPool;
 \r
 public class ChainAndCircleContact extends Contact {\r
 \r
-  public ChainAndCircleContact(IWorldPool argPool) {\r
-    super(argPool);\r
-  }\r
+       public ChainAndCircleContact (IWorldPool argPool) {\r
+               super(argPool);\r
+       }\r
 \r
-  @Override\r
-  public void init(Fixture fA, int indexA, Fixture fB, int indexB) {\r
-    super.init(fA, indexA, fB, indexB);\r
-    assert (m_fixtureA.getType() == ShapeType.CHAIN);\r
-    assert (m_fixtureB.getType() == ShapeType.CIRCLE);\r
-  }\r
+       @Override\r
+       public void init (Fixture fA, int indexA, Fixture fB, int indexB) {\r
+               super.init(fA, indexA, fB, indexB);\r
+               assert (m_fixtureA.getType() == ShapeType.CHAIN);\r
+               assert (m_fixtureB.getType() == ShapeType.CIRCLE);\r
+       }\r
 \r
-  private final EdgeShape edge = new EdgeShape();\r
+       private final EdgeShape edge = new EdgeShape();\r
 \r
-  @Override\r
-  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {\r
-    ChainShape chain = (ChainShape) m_fixtureA.getShape();\r
-    chain.getChildEdge(edge, m_indexA);\r
-    pool.getCollision().collideEdgeAndCircle(manifold, edge, xfA,\r
-        (CircleShape) m_fixtureB.getShape(), xfB);\r
-  }\r
+       @Override\r
+       public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {\r
+               ChainShape chain = (ChainShape)m_fixtureA.getShape();\r
+               chain.getChildEdge(edge, m_indexA);\r
+               pool.getCollision().collideEdgeAndCircle(manifold, edge, xfA, (CircleShape)m_fixtureB.getShape(), xfB);\r
+       }\r
 }\r
index 2a7595f..9c401b2 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.collision.Manifold;\r
@@ -34,24 +35,23 @@ import org.jbox2d.pooling.IWorldPool;
 \r
 public class ChainAndPolygonContact extends Contact {\r
 \r
-  public ChainAndPolygonContact(IWorldPool argPool) {\r
-    super(argPool);\r
-  }\r
+       public ChainAndPolygonContact (IWorldPool argPool) {\r
+               super(argPool);\r
+       }\r
 \r
-  @Override\r
-  public void init(Fixture fA, int indexA, Fixture fB, int indexB) {\r
-    super.init(fA, indexA, fB, indexB);\r
-    assert (m_fixtureA.getType() == ShapeType.CHAIN);\r
-    assert (m_fixtureB.getType() == ShapeType.POLYGON);\r
-  }\r
+       @Override\r
+       public void init (Fixture fA, int indexA, Fixture fB, int indexB) {\r
+               super.init(fA, indexA, fB, indexB);\r
+               assert (m_fixtureA.getType() == ShapeType.CHAIN);\r
+               assert (m_fixtureB.getType() == ShapeType.POLYGON);\r
+       }\r
 \r
-  private final EdgeShape edge = new EdgeShape();\r
+       private final EdgeShape edge = new EdgeShape();\r
 \r
-  @Override\r
-  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {\r
-    ChainShape chain = (ChainShape) m_fixtureA.getShape();\r
-    chain.getChildEdge(edge, m_indexA);\r
-    pool.getCollision().collideEdgeAndPolygon(manifold, edge, xfA,\r
-        (PolygonShape) m_fixtureB.getShape(), xfB);\r
-  }\r
+       @Override\r
+       public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {\r
+               ChainShape chain = (ChainShape)m_fixtureA.getShape();\r
+               chain.getChildEdge(edge, m_indexA);\r
+               pool.getCollision().collideEdgeAndPolygon(manifold, edge, xfA, (PolygonShape)m_fixtureB.getShape(), xfB);\r
+       }\r
 }\r
index 5698fc9..1651305 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.collision.Manifold;
@@ -32,19 +33,19 @@ import org.jbox2d.pooling.IWorldPool;
 
 public class CircleContact extends Contact {
 
-  public CircleContact(IWorldPool argPool) {
-    super(argPool);
-  }
+       public CircleContact (IWorldPool argPool) {
+               super(argPool);
+       }
 
-  public void init(Fixture fixtureA, Fixture fixtureB) {
-    super.init(fixtureA, 0, fixtureB, 0);
-    assert (m_fixtureA.getType() == ShapeType.CIRCLE);
-    assert (m_fixtureB.getType() == ShapeType.CIRCLE);
-  }
+       public void init (Fixture fixtureA, Fixture fixtureB) {
+               super.init(fixtureA, 0, fixtureB, 0);
+               assert (m_fixtureA.getType() == ShapeType.CIRCLE);
+               assert (m_fixtureB.getType() == ShapeType.CIRCLE);
+       }
 
-  @Override
-  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {
-    pool.getCollision().collideCircles(manifold, (CircleShape) m_fixtureA.getShape(), xfA,
-        (CircleShape) m_fixtureB.getShape(), xfB);
-  }
+       @Override
+       public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {
+               pool.getCollision().collideCircles(manifold, (CircleShape)m_fixtureA.getShape(), xfA, (CircleShape)m_fixtureB.getShape(),
+                       xfB);
+       }
 }
index ec7da36..a963154 100644 (file)
@@ -21,8 +21,8 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
-package org.jbox2d.dynamics.contacts;
 
+package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.callbacks.ContactListener;
 import org.jbox2d.collision.ContactID;
@@ -36,330 +36,304 @@ import org.jbox2d.dynamics.Body;
 import org.jbox2d.dynamics.Fixture;
 import org.jbox2d.pooling.IWorldPool;
 
-/**
- * The class manages contact between two shapes. A contact exists for each overlapping AABB in the
- * broad-phase (except if filtered). Therefore a contact object may exist that has no contact
- * points.
+/** The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if
+ * filtered). Therefore a contact object may exist that has no contact points.
  * 
- * @author daniel
- */
+ * @author daniel */
 public abstract class Contact {
 
-  // Flags stored in m_flags
-  // Used when crawling contact graph when forming islands.
-  public static final int ISLAND_FLAG = 0x0001;
-  // Set when the shapes are touching.
-  public static final int TOUCHING_FLAG = 0x0002; // NO_UCD
-  // This contact can be disabled (by user)
-  public static final int ENABLED_FLAG = 0x0004;
-  // This contact needs filtering because a fixture filter was changed.
-  public static final int FILTER_FLAG = 0x0008;
-  // This bullet contact had a TOI event
-  public static final int BULLET_HIT_FLAG = 0x0010;
-
-  public static final int TOI_FLAG = 0x0020;
-
-  public int m_flags;
-
-  // World pool and list pointers.
-  public Contact m_prev;
-  public Contact m_next;
-
-  // Nodes for connecting bodies.
-  public ContactEdge m_nodeA = null;
-  public ContactEdge m_nodeB = null;
-
-  public Fixture m_fixtureA;
-  public Fixture m_fixtureB;
-
-  public int m_indexA;
-  public int m_indexB;
-
-  public final Manifold m_manifold;
-
-  public float m_toiCount;
-  public float m_toi;
-
-  public float m_friction;
-  public float m_restitution;
-
-  public float m_tangentSpeed;
-
-  protected final IWorldPool pool;
-
-  protected Contact(IWorldPool argPool) {
-    m_fixtureA = null;
-    m_fixtureB = null;
-    m_nodeA = new ContactEdge();
-    m_nodeB = new ContactEdge();
-    m_manifold = new Manifold();
-    pool = argPool;
-  }
-
-  /** initialization for pooling */
-  public void init(Fixture fA, int indexA, Fixture fB, int indexB) {
-    m_flags = 0;
-
-    m_fixtureA = fA;
-    m_fixtureB = fB;
-
-    m_indexA = indexA;
-    m_indexB = indexB;
-
-    m_manifold.pointCount = 0;
-
-    m_prev = null;
-    m_next = null;
-
-    m_nodeA.contact = null;
-    m_nodeA.prev = null;
-    m_nodeA.next = null;
-    m_nodeA.other = null;
-
-    m_nodeB.contact = null;
-    m_nodeB.prev = null;
-    m_nodeB.next = null;
-    m_nodeB.other = null;
-
-    m_toiCount = 0;
-    m_friction = Contact.mixFriction(fA.m_friction, fB.m_friction);
-    m_restitution = Contact.mixRestitution(fA.m_restitution, fB.m_restitution);
-
-    m_tangentSpeed = 0;
-  }
-
-  /**
-   * Get the contact manifold. Do not set the point count to zero. Instead call Disable.
-   */
-  public Manifold getManifold() {
-    return m_manifold;
-  }
-
-  /**
-   * Get the world manifold.
-   */
-  public void getWorldManifold(WorldManifold worldManifold) {
-    final Body bodyA = m_fixtureA.getBody();
-    final Body bodyB = m_fixtureB.getBody();
-    final Shape shapeA = m_fixtureA.getShape();
-    final Shape shapeB = m_fixtureB.getShape();
-
-    worldManifold.initialize(m_manifold, bodyA.getTransform(), shapeA.m_radius,
-        bodyB.getTransform(), shapeB.m_radius);
-  }
-
-  /**
-   * Is this contact touching
-   * 
-   * @return
-   */
-  public boolean isTouching() {
-    return (m_flags & TOUCHING_FLAG) == TOUCHING_FLAG;
-  }
-
-  /**
-   * Enable/disable this contact. This can be used inside the pre-solve contact listener. The
-   * contact is only disabled for the current time step (or sub-step in continuous collisions).
-   * 
-   * @param flag
-   */
-  public void setEnabled(boolean flag) {
-    if (flag) {
-      m_flags |= ENABLED_FLAG;
-    } else {
-      m_flags &= ~ENABLED_FLAG;
-    }
-  }
-
-  /**
-   * Has this contact been disabled?
-   * 
-   * @return
-   */
-  public boolean isEnabled() {
-    return (m_flags & ENABLED_FLAG) == ENABLED_FLAG;
-  }
-
-  /**
-   * Get the next contact in the world's contact list.
-   * 
-   * @return
-   */
-  public Contact getNext() {
-    return m_next;
-  }
-
-  /**
-   * Get the first fixture in this contact.
-   * 
-   * @return
-   */
-  public Fixture getFixtureA() {
-    return m_fixtureA;
-  }
-
-  public int getChildIndexA() {
-    return m_indexA;
-  }
-
-  /**
-   * Get the second fixture in this contact.
-   * 
-   * @return
-   */
-  public Fixture getFixtureB() {
-    return m_fixtureB;
-  }
-
-  public int getChildIndexB() {
-    return m_indexB;
-  }
-
-  public void setFriction(float friction) {
-    m_friction = friction;
-  }
-
-  public float getFriction() {
-    return m_friction;
-  }
-
-  public void resetFriction() {
-    m_friction = Contact.mixFriction(m_fixtureA.m_friction, m_fixtureB.m_friction);
-  }
-
-  public void setRestitution(float restitution) {
-    m_restitution = restitution;
-  }
-
-  public float getRestitution() {
-    return m_restitution;
-  }
-
-  public void resetRestitution() {
-    m_restitution = Contact.mixRestitution(m_fixtureA.m_restitution, m_fixtureB.m_restitution);
-  }
-
-  public void setTangentSpeed(float speed) {
-    m_tangentSpeed = speed;
-  }
-
-  public float getTangentSpeed() {
-    return m_tangentSpeed;
-  }
-
-  public abstract void evaluate(Manifold manifold, Transform xfA, Transform xfB);
-
-  /**
-   * Flag this contact for filtering. Filtering will occur the next time step.
-   */
-  public void flagForFiltering() {
-    m_flags |= FILTER_FLAG;
-  }
-
-  // djm pooling
-  private final Manifold oldManifold = new Manifold();
-
-  public void update(ContactListener listener) {
-
-    oldManifold.set(m_manifold);
-
-    // Re-enable this contact.
-    m_flags |= ENABLED_FLAG;
-
-    boolean touching = false;
-    boolean wasTouching = (m_flags & TOUCHING_FLAG) == TOUCHING_FLAG;
-
-    boolean sensorA = m_fixtureA.isSensor();
-    boolean sensorB = m_fixtureB.isSensor();
-    boolean sensor = sensorA || sensorB;
-
-    Body bodyA = m_fixtureA.getBody();
-    Body bodyB = m_fixtureB.getBody();
-    Transform xfA = bodyA.getTransform();
-    Transform xfB = bodyB.getTransform();
-    // log.debug("TransformA: "+xfA);
-    // log.debug("TransformB: "+xfB);
-
-    if (sensor) {
-      Shape shapeA = m_fixtureA.getShape();
-      Shape shapeB = m_fixtureB.getShape();
-      touching = pool.getCollision().testOverlap(shapeA, m_indexA, shapeB, m_indexB, xfA, xfB);
-
-      // Sensors don't generate manifolds.
-      m_manifold.pointCount = 0;
-    } else {
-      evaluate(m_manifold, xfA, xfB);
-      touching = m_manifold.pointCount > 0;
-
-      // Match old contact ids to new contact ids and copy the
-      // stored impulses to warm start the solver.
-      for (int i = 0; i < m_manifold.pointCount; ++i) {
-        ManifoldPoint mp2 = m_manifold.points[i];
-        mp2.normalImpulse = 0.0f;
-        mp2.tangentImpulse = 0.0f;
-        ContactID id2 = mp2.id;
-
-        for (int j = 0; j < oldManifold.pointCount; ++j) {
-          ManifoldPoint mp1 = oldManifold.points[j];
-
-          if (mp1.id.isEqual(id2)) {
-            mp2.normalImpulse = mp1.normalImpulse;
-            mp2.tangentImpulse = mp1.tangentImpulse;
-            break;
-          }
-        }
-      }
-
-      if (touching != wasTouching) {
-        bodyA.setAwake(true);
-        bodyB.setAwake(true);
-      }
-    }
-
-    if (touching) {
-      m_flags |= TOUCHING_FLAG;
-    } else {
-      m_flags &= ~TOUCHING_FLAG;
-    }
-
-    if (listener == null) {
-      return;
-    }
-
-    if (wasTouching == false && touching == true) {
-      listener.beginContact(this);
-    }
-
-    if (wasTouching == true && touching == false) {
-      listener.endContact(this);
-    }
-
-    if (sensor == false && touching) {
-      listener.preSolve(this, oldManifold);
-    }
-  }
-
-  /**
-   * Friction mixing law. The idea is to allow either fixture to drive the restitution to zero. For
-   * example, anything slides on ice.
-   * 
-   * @param friction1
-   * @param friction2
-   * @return
-   */
-  public static final float mixFriction(float friction1, float friction2) {
-    return MathUtils.sqrt(friction1 * friction2);
-  }
-
-  /**
-   * Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For
-   * example, a superball bounces on anything.
-   * 
-   * @param restitution1
-   * @param restitution2
-   * @return
-   */
-  public static final float mixRestitution(float restitution1, float restitution2) {
-    return restitution1 > restitution2 ? restitution1 : restitution2;
-  }
+       // Flags stored in m_flags
+       // Used when crawling contact graph when forming islands.
+       public static final int ISLAND_FLAG = 0x0001;
+       // Set when the shapes are touching.
+       public static final int TOUCHING_FLAG = 0x0002; // NO_UCD
+       // This contact can be disabled (by user)
+       public static final int ENABLED_FLAG = 0x0004;
+       // This contact needs filtering because a fixture filter was changed.
+       public static final int FILTER_FLAG = 0x0008;
+       // This bullet contact had a TOI event
+       public static final int BULLET_HIT_FLAG = 0x0010;
+
+       public static final int TOI_FLAG = 0x0020;
+
+       public int m_flags;
+
+       // World pool and list pointers.
+       public Contact m_prev;
+       public Contact m_next;
+
+       // Nodes for connecting bodies.
+       public ContactEdge m_nodeA = null;
+       public ContactEdge m_nodeB = null;
+
+       public Fixture m_fixtureA;
+       public Fixture m_fixtureB;
+
+       public int m_indexA;
+       public int m_indexB;
+
+       public final Manifold m_manifold;
+
+       public float m_toiCount;
+       public float m_toi;
+
+       public float m_friction;
+       public float m_restitution;
+
+       public float m_tangentSpeed;
+
+       protected final IWorldPool pool;
+
+       protected Contact (IWorldPool argPool) {
+               m_fixtureA = null;
+               m_fixtureB = null;
+               m_nodeA = new ContactEdge();
+               m_nodeB = new ContactEdge();
+               m_manifold = new Manifold();
+               pool = argPool;
+       }
+
+       /** initialization for pooling */
+       public void init (Fixture fA, int indexA, Fixture fB, int indexB) {
+               m_flags = 0;
+
+               m_fixtureA = fA;
+               m_fixtureB = fB;
+
+               m_indexA = indexA;
+               m_indexB = indexB;
+
+               m_manifold.pointCount = 0;
+
+               m_prev = null;
+               m_next = null;
+
+               m_nodeA.contact = null;
+               m_nodeA.prev = null;
+               m_nodeA.next = null;
+               m_nodeA.other = null;
+
+               m_nodeB.contact = null;
+               m_nodeB.prev = null;
+               m_nodeB.next = null;
+               m_nodeB.other = null;
+
+               m_toiCount = 0;
+               m_friction = Contact.mixFriction(fA.m_friction, fB.m_friction);
+               m_restitution = Contact.mixRestitution(fA.m_restitution, fB.m_restitution);
+
+               m_tangentSpeed = 0;
+       }
+
+       /** Get the contact manifold. Do not set the point count to zero. Instead call Disable. */
+       public Manifold getManifold () {
+               return m_manifold;
+       }
+
+       /** Get the world manifold. */
+       public void getWorldManifold (WorldManifold worldManifold) {
+               final Body bodyA = m_fixtureA.getBody();
+               final Body bodyB = m_fixtureB.getBody();
+               final Shape shapeA = m_fixtureA.getShape();
+               final Shape shapeB = m_fixtureB.getShape();
+
+               worldManifold.initialize(m_manifold, bodyA.getTransform(), shapeA.m_radius, bodyB.getTransform(), shapeB.m_radius);
+       }
+
+       /** Is this contact touching
+        * 
+        * @return */
+       public boolean isTouching () {
+               return (m_flags & TOUCHING_FLAG) == TOUCHING_FLAG;
+       }
+
+       /** Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is only disabled for the
+        * current time step (or sub-step in continuous collisions).
+        * 
+        * @param flag */
+       public void setEnabled (boolean flag) {
+               if (flag) {
+                       m_flags |= ENABLED_FLAG;
+               } else {
+                       m_flags &= ~ENABLED_FLAG;
+               }
+       }
+
+       /** Has this contact been disabled?
+        * 
+        * @return */
+       public boolean isEnabled () {
+               return (m_flags & ENABLED_FLAG) == ENABLED_FLAG;
+       }
+
+       /** Get the next contact in the world's contact list.
+        * 
+        * @return */
+       public Contact getNext () {
+               return m_next;
+       }
+
+       /** Get the first fixture in this contact.
+        * 
+        * @return */
+       public Fixture getFixtureA () {
+               return m_fixtureA;
+       }
+
+       public int getChildIndexA () {
+               return m_indexA;
+       }
+
+       /** Get the second fixture in this contact.
+        * 
+        * @return */
+       public Fixture getFixtureB () {
+               return m_fixtureB;
+       }
+
+       public int getChildIndexB () {
+               return m_indexB;
+       }
+
+       public void setFriction (float friction) {
+               m_friction = friction;
+       }
+
+       public float getFriction () {
+               return m_friction;
+       }
+
+       public void resetFriction () {
+               m_friction = Contact.mixFriction(m_fixtureA.m_friction, m_fixtureB.m_friction);
+       }
+
+       public void setRestitution (float restitution) {
+               m_restitution = restitution;
+       }
+
+       public float getRestitution () {
+               return m_restitution;
+       }
+
+       public void resetRestitution () {
+               m_restitution = Contact.mixRestitution(m_fixtureA.m_restitution, m_fixtureB.m_restitution);
+       }
+
+       public void setTangentSpeed (float speed) {
+               m_tangentSpeed = speed;
+       }
+
+       public float getTangentSpeed () {
+               return m_tangentSpeed;
+       }
+
+       public abstract void evaluate (Manifold manifold, Transform xfA, Transform xfB);
+
+       /** Flag this contact for filtering. Filtering will occur the next time step. */
+       public void flagForFiltering () {
+               m_flags |= FILTER_FLAG;
+       }
+
+       // djm pooling
+       private final Manifold oldManifold = new Manifold();
+
+       public void update (ContactListener listener) {
+
+               oldManifold.set(m_manifold);
+
+               // Re-enable this contact.
+               m_flags |= ENABLED_FLAG;
+
+               boolean touching = false;
+               boolean wasTouching = (m_flags & TOUCHING_FLAG) == TOUCHING_FLAG;
+
+               boolean sensorA = m_fixtureA.isSensor();
+               boolean sensorB = m_fixtureB.isSensor();
+               boolean sensor = sensorA || sensorB;
+
+               Body bodyA = m_fixtureA.getBody();
+               Body bodyB = m_fixtureB.getBody();
+               Transform xfA = bodyA.getTransform();
+               Transform xfB = bodyB.getTransform();
+               // log.debug("TransformA: "+xfA);
+               // log.debug("TransformB: "+xfB);
+
+               if (sensor) {
+                       Shape shapeA = m_fixtureA.getShape();
+                       Shape shapeB = m_fixtureB.getShape();
+                       touching = pool.getCollision().testOverlap(shapeA, m_indexA, shapeB, m_indexB, xfA, xfB);
+
+                       // Sensors don't generate manifolds.
+                       m_manifold.pointCount = 0;
+               } else {
+                       evaluate(m_manifold, xfA, xfB);
+                       touching = m_manifold.pointCount > 0;
+
+                       // Match old contact ids to new contact ids and copy the
+                       // stored impulses to warm start the solver.
+                       for (int i = 0; i < m_manifold.pointCount; ++i) {
+                               ManifoldPoint mp2 = m_manifold.points[i];
+                               mp2.normalImpulse = 0.0f;
+                               mp2.tangentImpulse = 0.0f;
+                               ContactID id2 = mp2.id;
+
+                               for (int j = 0; j < oldManifold.pointCount; ++j) {
+                                       ManifoldPoint mp1 = oldManifold.points[j];
+
+                                       if (mp1.id.isEqual(id2)) {
+                                               mp2.normalImpulse = mp1.normalImpulse;
+                                               mp2.tangentImpulse = mp1.tangentImpulse;
+                                               break;
+                                       }
+                               }
+                       }
+
+                       if (touching != wasTouching) {
+                               bodyA.setAwake(true);
+                               bodyB.setAwake(true);
+                       }
+               }
+
+               if (touching) {
+                       m_flags |= TOUCHING_FLAG;
+               } else {
+                       m_flags &= ~TOUCHING_FLAG;
+               }
+
+               if (listener == null) {
+                       return;
+               }
+
+               if (wasTouching == false && touching == true) {
+                       listener.beginContact(this);
+               }
+
+               if (wasTouching == true && touching == false) {
+                       listener.endContact(this);
+               }
+
+               if (sensor == false && touching) {
+                       listener.preSolve(this, oldManifold);
+               }
+       }
+
+       /** Friction mixing law. The idea is to allow either fixture to drive the restitution to zero. For example, anything slides on
+        * ice.
+        * 
+        * @param friction1
+        * @param friction2
+        * @return */
+       public static final float mixFriction (float friction1, float friction2) {
+               return MathUtils.sqrt(friction1 * friction2);
+       }
+
+       /** Restitution mixing law. The idea is allow for anything to bounce off an inelastic surface. For example, a superball bounces
+        * on anything.
+        * 
+        * @param restitution1
+        * @param restitution2
+        * @return */
+       public static final float mixRestitution (float restitution1, float restitution2) {
+               return restitution1 > restitution2 ? restitution1 : restitution2;
+       }
 }
index 5d7e281..149eaa7 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.dynamics.Fixture;
@@ -29,7 +30,7 @@ import org.jbox2d.pooling.IWorldPool;
 // updated to rev 100
 public interface ContactCreator {
 
-       public Contact contactCreateFcn(IWorldPool argPool, Fixture fixtureA, Fixture fixtureB);
-       
-       public void contactDestroyFcn(IWorldPool argPool, Contact contact);
+       public Contact contactCreateFcn (IWorldPool argPool, Fixture fixtureA, Fixture fixtureB);
+
+       public void contactDestroyFcn (IWorldPool argPool, Contact contact);
 }
index 36b3d3a..b0e0e13 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.dynamics.Body;
 
-/**
- * A contact edge is used to connect bodies and contacts together in a contact graph where each body
- * is a node and each contact is an edge. A contact edge belongs to a doubly linked list maintained
- * in each attached body. Each contact has two contact nodes, one for each attached body.
+/** A contact edge is used to connect bodies and contacts together in a contact graph where each body is a node and each contact is
+ * an edge. A contact edge belongs to a doubly linked list maintained in each attached body. Each contact has two contact nodes,
+ * one for each attached body.
  * 
- * @author daniel
- */
+ * @author daniel */
 public class ContactEdge {
 
-  /**
-   * provides quick access to the other body attached.
-   */
-  public Body other = null;
+       /** provides quick access to the other body attached. */
+       public Body other = null;
 
-  /**
-   * the contact
-   */
-  public Contact contact = null;
+       /** the contact */
+       public Contact contact = null;
 
-  /**
-   * the previous contact edge in the body's contact list
-   */
-  public ContactEdge prev = null;
+       /** the previous contact edge in the body's contact list */
+       public ContactEdge prev = null;
 
-  /**
-   * the next contact edge in the body's contact list
-   */
-  public ContactEdge next = null;
+       /** the next contact edge in the body's contact list */
+       public ContactEdge next = null;
 }
index 329839c..8632b54 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.collision.Manifold.ManifoldType;\r
@@ -28,22 +29,22 @@ import org.jbox2d.common.Settings;
 import org.jbox2d.common.Vec2;\r
 \r
 public class ContactPositionConstraint {\r
-  Vec2[] localPoints = new Vec2[Settings.maxManifoldPoints];\r
-  final Vec2 localNormal = new Vec2();\r
-  final Vec2 localPoint = new Vec2();\r
-  int indexA;\r
-  int indexB;\r
-  float invMassA, invMassB;\r
-  final Vec2 localCenterA = new Vec2();\r
-  final Vec2 localCenterB = new Vec2();\r
-  float invIA, invIB;\r
-  ManifoldType type;\r
-  float radiusA, radiusB;\r
-  int pointCount;\r
+       Vec2[] localPoints = new Vec2[Settings.maxManifoldPoints];\r
+       final Vec2 localNormal = new Vec2();\r
+       final Vec2 localPoint = new Vec2();\r
+       int indexA;\r
+       int indexB;\r
+       float invMassA, invMassB;\r
+       final Vec2 localCenterA = new Vec2();\r
+       final Vec2 localCenterB = new Vec2();\r
+       float invIA, invIB;\r
+       ManifoldType type;\r
+       float radiusA, radiusB;\r
+       int pointCount;\r
 \r
-  public ContactPositionConstraint() {\r
-    for (int i = 0; i < localPoints.length; i++) {\r
-      localPoints[i] = new Vec2();\r
-    }\r
-  }\r
-}
\ No newline at end of file
+       public ContactPositionConstraint () {\r
+               for (int i = 0; i < localPoints.length; i++) {\r
+                       localPoints[i] = new Vec2();\r
+               }\r
+       }\r
+}\r
index 74168a8..8e51bd1 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.pooling.IDynamicStack;
 
 public class ContactRegister {
-  public IDynamicStack<Contact> creator;
-  public boolean primary;
+       public IDynamicStack<Contact> creator;
+       public boolean primary;
 }
index 6f04db2..e0f00c3 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.collision.Manifold;
@@ -38,1063 +39,1032 @@ import org.jbox2d.dynamics.Fixture;
 import org.jbox2d.dynamics.TimeStep;
 import org.jbox2d.dynamics.contacts.ContactVelocityConstraint.VelocityConstraintPoint;
 
-/**
- * @author Daniel
- */
+/** @author Daniel */
 public class ContactSolver {
 
-  public static final boolean DEBUG_SOLVER = false;
-  public static final float k_errorTol = 1e-3f;
-  /**
-   * For each solver, this is the initial number of constraints in the array, which expands as
-   * needed.
-   */
-  public static final int INITIAL_NUM_CONSTRAINTS = 256;
-  
-  
-
-  /**
-   * Ensure a reasonable condition number. for the block solver
-   */
-  public static final float k_maxConditionNumber = 100.0f;
-
-  public TimeStep m_step;
-  public Position[] m_positions;
-  public Velocity[] m_velocities;
-  public ContactPositionConstraint[] m_positionConstraints;
-  public ContactVelocityConstraint[] m_velocityConstraints;
-  public Contact[] m_contacts;
-  public int m_count;
-
-  public ContactSolver() {
-    m_positionConstraints = new ContactPositionConstraint[INITIAL_NUM_CONSTRAINTS];
-    m_velocityConstraints = new ContactVelocityConstraint[INITIAL_NUM_CONSTRAINTS];
-    for (int i = 0; i < INITIAL_NUM_CONSTRAINTS; i++) {
-      m_positionConstraints[i] = new ContactPositionConstraint();
-      m_velocityConstraints[i] = new ContactVelocityConstraint();
-    }
-  }
-
-  // djm pooling
-  private final Vec2 tangent = new Vec2();
-  private final Vec2 temp1 = new Vec2();
-  private final Vec2 temp2 = new Vec2();
-
-  public final void init(ContactSolverDef def) {
-    //System.out.println("Initializing contact solver");
-    m_step = def.step;
-    m_count = def.count;
-
-
-    if (m_positionConstraints.length < m_count) {
-      ContactPositionConstraint[] old = m_positionConstraints;
-      m_positionConstraints = new ContactPositionConstraint[MathUtils.max(old.length * 2, m_count)];
-      System.arraycopy(old, 0, m_positionConstraints, 0, old.length);
-      for (int i = old.length; i < m_positionConstraints.length; i++) {
-        m_positionConstraints[i] = new ContactPositionConstraint();
-      }
-    }
-
-    if (m_velocityConstraints.length < m_count) {
-      ContactVelocityConstraint[] old = m_velocityConstraints;
-      m_velocityConstraints = new ContactVelocityConstraint[MathUtils.max(old.length * 2, m_count)];
-      System.arraycopy(old, 0, m_velocityConstraints, 0, old.length);
-      for (int i = old.length; i < m_velocityConstraints.length; i++) {
-        m_velocityConstraints[i] = new ContactVelocityConstraint();
-      }
-    }
-
-    m_positions = def.positions;
-    m_velocities = def.velocities;
-    m_contacts = def.contacts;
-
-    for (int i = 0; i < m_count; ++i) {
-      //System.out.println("contacts: " + m_count);
-      final Contact contact = m_contacts[i];
-
-      final Fixture fixtureA = contact.m_fixtureA;
-      final Fixture fixtureB = contact.m_fixtureB;
-      final Shape shapeA = fixtureA.getShape();
-      final Shape shapeB = fixtureB.getShape();
-      final float radiusA = shapeA.m_radius;
-      final float radiusB = shapeB.m_radius;
-      final Body bodyA = fixtureA.getBody();
-      final Body bodyB = fixtureB.getBody();
-      final Manifold manifold = contact.getManifold();
-
-      int pointCount = manifold.pointCount;
-      assert (pointCount > 0);
-
-      ContactVelocityConstraint vc = m_velocityConstraints[i];
-      vc.friction = contact.m_friction;
-      vc.restitution = contact.m_restitution;
-      vc.tangentSpeed = contact.m_tangentSpeed;
-      vc.indexA = bodyA.m_islandIndex;
-      vc.indexB = bodyB.m_islandIndex;
-      vc.invMassA = bodyA.m_invMass;
-      vc.invMassB = bodyB.m_invMass;
-      vc.invIA = bodyA.m_invI;
-      vc.invIB = bodyB.m_invI;
-      vc.contactIndex = i;
-      vc.pointCount = pointCount;
-      vc.K.setZero();
-      vc.normalMass.setZero();
-
-      ContactPositionConstraint pc = m_positionConstraints[i];
-      pc.indexA = bodyA.m_islandIndex;
-      pc.indexB = bodyB.m_islandIndex;
-      pc.invMassA = bodyA.m_invMass;
-      pc.invMassB = bodyB.m_invMass;
-      pc.localCenterA.set(bodyA.m_sweep.localCenter);
-      pc.localCenterB.set(bodyB.m_sweep.localCenter);
-      pc.invIA = bodyA.m_invI;
-      pc.invIB = bodyB.m_invI;
-      pc.localNormal.set(manifold.localNormal);
-      pc.localPoint.set(manifold.localPoint);
-      pc.pointCount = pointCount;
-      pc.radiusA = radiusA;
-      pc.radiusB = radiusB;
-      pc.type = manifold.type;
-
-      //System.out.println("contact point count: " + pointCount);
-      for (int j = 0; j < pointCount; j++) {
-        ManifoldPoint cp = manifold.points[j];
-        VelocityConstraintPoint vcp = vc.points[j];
-
-        if (m_step.warmStarting) {
-//          assert(cp.normalImpulse == 0);
-          //System.out.println("contact normal impulse: " + cp.normalImpulse);
-          vcp.normalImpulse = m_step.dtRatio * cp.normalImpulse;
-          vcp.tangentImpulse = m_step.dtRatio * cp.tangentImpulse;
-        } else {
-          vcp.normalImpulse = 0;
-          vcp.tangentImpulse = 0;
-        }
-
-        vcp.rA.setZero();
-        vcp.rB.setZero();
-        vcp.normalMass = 0;
-        vcp.tangentMass = 0;
-        vcp.velocityBias = 0;
-
-        pc.localPoints[j].set(cp.localPoint);
-      }
-    }
-  }
-
-  // djm pooling, and from above
-  private final Vec2 P = new Vec2();
-  private final Vec2 temp = new Vec2();
-
-  public void warmStart() {
-    // Warm start.
-    for (int i = 0; i < m_count; ++i) {
-      final ContactVelocityConstraint vc = m_velocityConstraints[i];
-
-      int indexA = vc.indexA;
-      int indexB = vc.indexB;
-      float mA = vc.invMassA;
-      float iA = vc.invIA;
-      float mB = vc.invMassB;
-      float iB = vc.invIB;
-      int pointCount = vc.pointCount;
-
-
-      Vec2 vA = m_velocities[indexA].v;
-      float wA = m_velocities[indexA].w;
-      Vec2 vB = m_velocities[indexB].v;
-      float wB = m_velocities[indexB].w;
-
-      Vec2 normal = vc.normal;
-      Vec2.crossToOutUnsafe(normal, 1.0f, tangent);
-
-      for (int j = 0; j < pointCount; ++j) {
-        VelocityConstraintPoint vcp = vc.points[j];
-        //System.out.println("vcp normal impulse is " + vcp.normalImpulse);
-        temp.set(normal).mulLocal(vcp.normalImpulse);
-        P.set(tangent).mulLocal(vcp.tangentImpulse).addLocal(temp);
-       
-        wA -= iA * Vec2.cross(vcp.rA, P);
-        vA.subLocal(temp.set(P).mulLocal(mA));
-//        assert(vA.x == 0);
-//        assert(wA == 0);
-        wB += iB * Vec2.cross(vcp.rB, P);
-        vB.addLocal(temp.set(P).mulLocal(mB));
-//        assert(vB.x == 0);
-//        assert(wB == 0);
-      }
-      m_velocities[indexA].w = wA;
-      m_velocities[indexB].w = wB;
-
-      //System.out.println("Ending velocity for " + indexA + " is " + vA.x + "," + vA.y + " - " + wA);
-      //System.out.println("Ending velocity for " + indexB + " is " + vB.x + "," + vB.y + " - " + wB);
-    }
-  }
-
-  // djm pooling, and from above
-  private final Transform xfA = new Transform();
-  private final Transform xfB = new Transform();
-  private final WorldManifold worldManifold = new WorldManifold();
-
-  public final void initializeVelocityConstraints() {
-
-    //System.out.println("Initializing velocity constraints for " + m_count + " contacts");
-    // Warm start.
-    for (int i = 0; i < m_count; ++i) {
-      ContactVelocityConstraint vc = m_velocityConstraints[i];
-      ContactPositionConstraint pc = m_positionConstraints[i];
-
-      float radiusA = pc.radiusA;
-      float radiusB = pc.radiusB;
-      Manifold manifold = m_contacts[vc.contactIndex].getManifold();
-
-      int indexA = vc.indexA;
-      int indexB = vc.indexB;
-
-      float mA = vc.invMassA;
-      float mB = vc.invMassB;
-      float iA = vc.invIA;
-      float iB = vc.invIB;
-      Vec2 localCenterA = pc.localCenterA;
-      Vec2 localCenterB = pc.localCenterB;
-
-      Vec2 cA = m_positions[indexA].c;
-      float aA = m_positions[indexA].a;
-      Vec2 vA = m_velocities[indexA].v;
-      float wA = m_velocities[indexA].w;
-
-      Vec2 cB = m_positions[indexB].c;
-      float aB = m_positions[indexB].a;
-      Vec2 vB = m_velocities[indexB].v;
-      float wB = m_velocities[indexB].w;
-
-      assert (manifold.pointCount > 0);
-
-      xfA.q.set(aA);
-      xfB.q.set(aB);
-      Rot.mulToOutUnsafe(xfA.q, localCenterA, temp);
-      xfA.p.set(cA).subLocal(temp);
-      Rot.mulToOutUnsafe(xfB.q, localCenterB, temp);
-      xfB.p.set(cB).subLocal(temp);
-
-      worldManifold.initialize(manifold, xfA, radiusA, xfB, radiusB);
-
-      vc.normal.set(worldManifold.normal);
-
-      int pointCount = vc.pointCount;
-      for (int j = 0; j < pointCount; ++j) {
-        VelocityConstraintPoint vcp = vc.points[j];
-
-        vcp.rA.set(worldManifold.points[j]).subLocal(cA);
-        vcp.rB.set(worldManifold.points[j]).subLocal(cB);
-
-        float rnA = Vec2.cross(vcp.rA, vc.normal);
-        float rnB = Vec2.cross(vcp.rB, vc.normal);
-
-        float kNormal = mA + mB + iA * rnA * rnA + iB * rnB * rnB;
-
-        vcp.normalMass = kNormal > 0.0f ? 1.0f / kNormal : 0.0f;
-
-        Vec2.crossToOutUnsafe(vc.normal, 1.0f, tangent);
-
-        float rtA = Vec2.cross(vcp.rA, tangent);
-        float rtB = Vec2.cross(vcp.rB, tangent);
-
-        float kTangent = mA + mB + iA * rtA * rtA + iB * rtB * rtB;
-
-        vcp.tangentMass = kTangent > 0.0f ? 1.0f / kTangent : 0.0f;
-
-        // Setup a velocity bias for restitution.
-        vcp.velocityBias = 0.0f;
-        Vec2.crossToOutUnsafe(wB, vcp.rB, temp1);
-        Vec2.crossToOutUnsafe(wA, vcp.rA, temp2);
-        temp.set(vB).addLocal(temp1).subLocal(vA).subLocal(temp2);
-        float vRel = Vec2.dot(vc.normal, temp);
-        if (vRel < -Settings.velocityThreshold) {
-          vcp.velocityBias = -vc.restitution * vRel;
-        }
-      }
-
-      // If we have two points, then prepare the block solver.
-      if (vc.pointCount == 2) {
-        VelocityConstraintPoint vcp1 = vc.points[0];
-        VelocityConstraintPoint vcp2 = vc.points[1];
-
-        float rn1A = Vec2.cross(vcp1.rA, vc.normal);
-        float rn1B = Vec2.cross(vcp1.rB, vc.normal);
-        float rn2A = Vec2.cross(vcp2.rA, vc.normal);
-        float rn2B = Vec2.cross(vcp2.rB, vc.normal);
-
-        float k11 = mA + mB + iA * rn1A * rn1A + iB * rn1B * rn1B;
-        float k22 = mA + mB + iA * rn2A * rn2A + iB * rn2B * rn2B;
-        float k12 = mA + mB + iA * rn1A * rn2A + iB * rn1B * rn2B;
-        if (k11 * k11 < k_maxConditionNumber * (k11 * k22 - k12 * k12)) {
-          // K is safe to invert.
-          vc.K.ex.set(k11, k12);
-          vc.K.ey.set(k12, k22);
-          vc.K.invertToOut(vc.normalMass);
-        } else {
-          // The constraints are redundant, just use one.
-          // TODO_ERIN use deepest?
-          vc.pointCount = 1;
-        }
-      }
-    }
-  }
-
-  // djm pooling from above
-  private final Vec2 dv = new Vec2();
-  private final Vec2 a = new Vec2();
-  private final Vec2 b = new Vec2();
-  private final Vec2 dv1 = new Vec2();
-  private final Vec2 dv2 = new Vec2();
-  private final Vec2 x = new Vec2();
-  private final Vec2 d = new Vec2();
-  private final Vec2 P1 = new Vec2();
-  private final Vec2 P2 = new Vec2();
-
-  public final void solveVelocityConstraints() {
-    for (int i = 0; i < m_count; ++i) {
-      final ContactVelocityConstraint vc = m_velocityConstraints[i];
-
-      int indexA = vc.indexA;
-      int indexB = vc.indexB;
-
-      float mA = vc.invMassA;
-      float mB = vc.invMassB;
-      float iA = vc.invIA;
-      float iB = vc.invIB;
-      int pointCount = vc.pointCount;
-
-      Vec2 vA = m_velocities[indexA].v;
-      float wA = m_velocities[indexA].w;
-      Vec2 vB = m_velocities[indexB].v;
-      float wB = m_velocities[indexB].w;
-//      assert(wA == 0);
-//      assert(wB == 0);
-
-      Vec2 normal = vc.normal;
-//      Vec2.crossToOutUnsafe(normal, 1f, tangent);
-      tangent.x = 1.0f * vc.normal.y;
-      tangent.y = -1.0f * vc.normal.x;
-      final float friction = vc.friction;
-
-      assert (pointCount == 1 || pointCount == 2);
-
-      // Solve tangent constraints
-      for (int j = 0; j < pointCount; ++j) {
-        final VelocityConstraintPoint vcp = vc.points[j];
-//        Vec2.crossToOutUnsafe(wA, vcp.rA, temp);
-//        Vec2.crossToOutUnsafe(wB, vcp.rB, dv);
-//        dv.addLocal(vB).subLocal(vA).subLocal(temp);
-        final Vec2 a = vcp.rA;
-        dv.x = -wB * vcp.rB.y + vB.x - vA.x + wA * a.y;
-        dv.y = wB * vcp.rB.x + vB.y - vA.y - wA * a.x;
-
-        // Compute tangent force
-        final float vt = dv.x * tangent.x + dv.y * tangent.y - vc.tangentSpeed;
-        float lambda = vcp.tangentMass * (-vt);
-
-        // Clamp the accumulated force
-        final float maxFriction = friction * vcp.normalImpulse;
-        final float newImpulse =
-            MathUtils.clamp(vcp.tangentImpulse + lambda, -maxFriction, maxFriction);
-        lambda = newImpulse - vcp.tangentImpulse;
-        vcp.tangentImpulse = newImpulse;
-
-        // Apply contact impulse
-        // Vec2 P = lambda * tangent;
-
-        final float Px = tangent.x * lambda;
-        final float Py = tangent.y * lambda;
-
-        // vA -= invMassA * P;
-        vA.x -= Px * mA;
-        vA.y -= Py * mA;
-        wA -= iA * (vcp.rA.x * Py - vcp.rA.y * Px);
-
-        // vB += invMassB * P;
-        vB.x += Px * mB;
-        vB.y += Py * mB;
-        wB += iB * (vcp.rB.x * Py - vcp.rB.y * Px);
-
-        //System.out.println("tangent solve velocity (point "+j+") for " + indexA + " is " + vA.x + "," + vA.y + " rot " + wA);
-        //System.out.println("tangent solve velocity (point "+j+") for " + indexB + " is " + vB.x + "," + vB.y + " rot " + wB);
-      }
-
-      // Solve normal constraints
-      if (vc.pointCount == 1) {
-        final VelocityConstraintPoint vcp = vc.points[0];
-        Vec2 a1 = vcp.rA;
-
-        // Relative velocity at contact
-        // Vec2 dv = vB + Cross(wB, vcp.rB) - vA - Cross(wA, vcp.rA);
-
-//         Vec2.crossToOut(wA, vcp.rA, temp1);
-//         Vec2.crossToOut(wB, vcp.rB, dv);
-//         dv.addLocal(vB).subLocal(vA).subLocal(temp1);
+       public static final boolean DEBUG_SOLVER = false;
+       public static final float k_errorTol = 1e-3f;
+       /** For each solver, this is the initial number of constraints in the array, which expands as needed. */
+       public static final int INITIAL_NUM_CONSTRAINTS = 256;
+
+       /** Ensure a reasonable condition number. for the block solver */
+       public static final float k_maxConditionNumber = 100.0f;
+
+       public TimeStep m_step;
+       public Position[] m_positions;
+       public Velocity[] m_velocities;
+       public ContactPositionConstraint[] m_positionConstraints;
+       public ContactVelocityConstraint[] m_velocityConstraints;
+       public Contact[] m_contacts;
+       public int m_count;
+
+       public ContactSolver () {
+               m_positionConstraints = new ContactPositionConstraint[INITIAL_NUM_CONSTRAINTS];
+               m_velocityConstraints = new ContactVelocityConstraint[INITIAL_NUM_CONSTRAINTS];
+               for (int i = 0; i < INITIAL_NUM_CONSTRAINTS; i++) {
+                       m_positionConstraints[i] = new ContactPositionConstraint();
+                       m_velocityConstraints[i] = new ContactVelocityConstraint();
+               }
+       }
+
+       // djm pooling
+       private final Vec2 tangent = new Vec2();
+       private final Vec2 temp1 = new Vec2();
+       private final Vec2 temp2 = new Vec2();
+
+       public final void init (ContactSolverDef def) {
+               // System.out.println("Initializing contact solver");
+               m_step = def.step;
+               m_count = def.count;
+
+               if (m_positionConstraints.length < m_count) {
+                       ContactPositionConstraint[] old = m_positionConstraints;
+                       m_positionConstraints = new ContactPositionConstraint[MathUtils.max(old.length * 2, m_count)];
+                       System.arraycopy(old, 0, m_positionConstraints, 0, old.length);
+                       for (int i = old.length; i < m_positionConstraints.length; i++) {
+                               m_positionConstraints[i] = new ContactPositionConstraint();
+                       }
+               }
+
+               if (m_velocityConstraints.length < m_count) {
+                       ContactVelocityConstraint[] old = m_velocityConstraints;
+                       m_velocityConstraints = new ContactVelocityConstraint[MathUtils.max(old.length * 2, m_count)];
+                       System.arraycopy(old, 0, m_velocityConstraints, 0, old.length);
+                       for (int i = old.length; i < m_velocityConstraints.length; i++) {
+                               m_velocityConstraints[i] = new ContactVelocityConstraint();
+                       }
+               }
+
+               m_positions = def.positions;
+               m_velocities = def.velocities;
+               m_contacts = def.contacts;
+
+               for (int i = 0; i < m_count; ++i) {
+                       // System.out.println("contacts: " + m_count);
+                       final Contact contact = m_contacts[i];
+
+                       final Fixture fixtureA = contact.m_fixtureA;
+                       final Fixture fixtureB = contact.m_fixtureB;
+                       final Shape shapeA = fixtureA.getShape();
+                       final Shape shapeB = fixtureB.getShape();
+                       final float radiusA = shapeA.m_radius;
+                       final float radiusB = shapeB.m_radius;
+                       final Body bodyA = fixtureA.getBody();
+                       final Body bodyB = fixtureB.getBody();
+                       final Manifold manifold = contact.getManifold();
+
+                       int pointCount = manifold.pointCount;
+                       assert (pointCount > 0);
+
+                       ContactVelocityConstraint vc = m_velocityConstraints[i];
+                       vc.friction = contact.m_friction;
+                       vc.restitution = contact.m_restitution;
+                       vc.tangentSpeed = contact.m_tangentSpeed;
+                       vc.indexA = bodyA.m_islandIndex;
+                       vc.indexB = bodyB.m_islandIndex;
+                       vc.invMassA = bodyA.m_invMass;
+                       vc.invMassB = bodyB.m_invMass;
+                       vc.invIA = bodyA.m_invI;
+                       vc.invIB = bodyB.m_invI;
+                       vc.contactIndex = i;
+                       vc.pointCount = pointCount;
+                       vc.K.setZero();
+                       vc.normalMass.setZero();
+
+                       ContactPositionConstraint pc = m_positionConstraints[i];
+                       pc.indexA = bodyA.m_islandIndex;
+                       pc.indexB = bodyB.m_islandIndex;
+                       pc.invMassA = bodyA.m_invMass;
+                       pc.invMassB = bodyB.m_invMass;
+                       pc.localCenterA.set(bodyA.m_sweep.localCenter);
+                       pc.localCenterB.set(bodyB.m_sweep.localCenter);
+                       pc.invIA = bodyA.m_invI;
+                       pc.invIB = bodyB.m_invI;
+                       pc.localNormal.set(manifold.localNormal);
+                       pc.localPoint.set(manifold.localPoint);
+                       pc.pointCount = pointCount;
+                       pc.radiusA = radiusA;
+                       pc.radiusB = radiusB;
+                       pc.type = manifold.type;
+
+                       // System.out.println("contact point count: " + pointCount);
+                       for (int j = 0; j < pointCount; j++) {
+                               ManifoldPoint cp = manifold.points[j];
+                               VelocityConstraintPoint vcp = vc.points[j];
+
+                               if (m_step.warmStarting) {
+// assert(cp.normalImpulse == 0);
+                                       // System.out.println("contact normal impulse: " + cp.normalImpulse);
+                                       vcp.normalImpulse = m_step.dtRatio * cp.normalImpulse;
+                                       vcp.tangentImpulse = m_step.dtRatio * cp.tangentImpulse;
+                               } else {
+                                       vcp.normalImpulse = 0;
+                                       vcp.tangentImpulse = 0;
+                               }
+
+                               vcp.rA.setZero();
+                               vcp.rB.setZero();
+                               vcp.normalMass = 0;
+                               vcp.tangentMass = 0;
+                               vcp.velocityBias = 0;
+
+                               pc.localPoints[j].set(cp.localPoint);
+                       }
+               }
+       }
+
+       // djm pooling, and from above
+       private final Vec2 P = new Vec2();
+       private final Vec2 temp = new Vec2();
+
+       public void warmStart () {
+               // Warm start.
+               for (int i = 0; i < m_count; ++i) {
+                       final ContactVelocityConstraint vc = m_velocityConstraints[i];
+
+                       int indexA = vc.indexA;
+                       int indexB = vc.indexB;
+                       float mA = vc.invMassA;
+                       float iA = vc.invIA;
+                       float mB = vc.invMassB;
+                       float iB = vc.invIB;
+                       int pointCount = vc.pointCount;
+
+                       Vec2 vA = m_velocities[indexA].v;
+                       float wA = m_velocities[indexA].w;
+                       Vec2 vB = m_velocities[indexB].v;
+                       float wB = m_velocities[indexB].w;
+
+                       Vec2 normal = vc.normal;
+                       Vec2.crossToOutUnsafe(normal, 1.0f, tangent);
+
+                       for (int j = 0; j < pointCount; ++j) {
+                               VelocityConstraintPoint vcp = vc.points[j];
+                               // System.out.println("vcp normal impulse is " + vcp.normalImpulse);
+                               temp.set(normal).mulLocal(vcp.normalImpulse);
+                               P.set(tangent).mulLocal(vcp.tangentImpulse).addLocal(temp);
+
+                               wA -= iA * Vec2.cross(vcp.rA, P);
+                               vA.subLocal(temp.set(P).mulLocal(mA));
+// assert(vA.x == 0);
+// assert(wA == 0);
+                               wB += iB * Vec2.cross(vcp.rB, P);
+                               vB.addLocal(temp.set(P).mulLocal(mB));
+// assert(vB.x == 0);
+// assert(wB == 0);
+                       }
+                       m_velocities[indexA].w = wA;
+                       m_velocities[indexB].w = wB;
+
+                       // System.out.println("Ending velocity for " + indexA + " is " + vA.x + "," + vA.y + " - " + wA);
+                       // System.out.println("Ending velocity for " + indexB + " is " + vB.x + "," + vB.y + " - " + wB);
+               }
+       }
+
+       // djm pooling, and from above
+       private final Transform xfA = new Transform();
+       private final Transform xfB = new Transform();
+       private final WorldManifold worldManifold = new WorldManifold();
+
+       public final void initializeVelocityConstraints () {
+
+               // System.out.println("Initializing velocity constraints for " + m_count + " contacts");
+               // Warm start.
+               for (int i = 0; i < m_count; ++i) {
+                       ContactVelocityConstraint vc = m_velocityConstraints[i];
+                       ContactPositionConstraint pc = m_positionConstraints[i];
+
+                       float radiusA = pc.radiusA;
+                       float radiusB = pc.radiusB;
+                       Manifold manifold = m_contacts[vc.contactIndex].getManifold();
+
+                       int indexA = vc.indexA;
+                       int indexB = vc.indexB;
+
+                       float mA = vc.invMassA;
+                       float mB = vc.invMassB;
+                       float iA = vc.invIA;
+                       float iB = vc.invIB;
+                       Vec2 localCenterA = pc.localCenterA;
+                       Vec2 localCenterB = pc.localCenterB;
+
+                       Vec2 cA = m_positions[indexA].c;
+                       float aA = m_positions[indexA].a;
+                       Vec2 vA = m_velocities[indexA].v;
+                       float wA = m_velocities[indexA].w;
+
+                       Vec2 cB = m_positions[indexB].c;
+                       float aB = m_positions[indexB].a;
+                       Vec2 vB = m_velocities[indexB].v;
+                       float wB = m_velocities[indexB].w;
+
+                       assert (manifold.pointCount > 0);
+
+                       xfA.q.set(aA);
+                       xfB.q.set(aB);
+                       Rot.mulToOutUnsafe(xfA.q, localCenterA, temp);
+                       xfA.p.set(cA).subLocal(temp);
+                       Rot.mulToOutUnsafe(xfB.q, localCenterB, temp);
+                       xfB.p.set(cB).subLocal(temp);
+
+                       worldManifold.initialize(manifold, xfA, radiusA, xfB, radiusB);
+
+                       vc.normal.set(worldManifold.normal);
+
+                       int pointCount = vc.pointCount;
+                       for (int j = 0; j < pointCount; ++j) {
+                               VelocityConstraintPoint vcp = vc.points[j];
+
+                               vcp.rA.set(worldManifold.points[j]).subLocal(cA);
+                               vcp.rB.set(worldManifold.points[j]).subLocal(cB);
+
+                               float rnA = Vec2.cross(vcp.rA, vc.normal);
+                               float rnB = Vec2.cross(vcp.rB, vc.normal);
+
+                               float kNormal = mA + mB + iA * rnA * rnA + iB * rnB * rnB;
+
+                               vcp.normalMass = kNormal > 0.0f ? 1.0f / kNormal : 0.0f;
+
+                               Vec2.crossToOutUnsafe(vc.normal, 1.0f, tangent);
+
+                               float rtA = Vec2.cross(vcp.rA, tangent);
+                               float rtB = Vec2.cross(vcp.rB, tangent);
+
+                               float kTangent = mA + mB + iA * rtA * rtA + iB * rtB * rtB;
+
+                               vcp.tangentMass = kTangent > 0.0f ? 1.0f / kTangent : 0.0f;
+
+                               // Setup a velocity bias for restitution.
+                               vcp.velocityBias = 0.0f;
+                               Vec2.crossToOutUnsafe(wB, vcp.rB, temp1);
+                               Vec2.crossToOutUnsafe(wA, vcp.rA, temp2);
+                               temp.set(vB).addLocal(temp1).subLocal(vA).subLocal(temp2);
+                               float vRel = Vec2.dot(vc.normal, temp);
+                               if (vRel < -Settings.velocityThreshold) {
+                                       vcp.velocityBias = -vc.restitution * vRel;
+                               }
+                       }
+
+                       // If we have two points, then prepare the block solver.
+                       if (vc.pointCount == 2) {
+                               VelocityConstraintPoint vcp1 = vc.points[0];
+                               VelocityConstraintPoint vcp2 = vc.points[1];
+
+                               float rn1A = Vec2.cross(vcp1.rA, vc.normal);
+                               float rn1B = Vec2.cross(vcp1.rB, vc.normal);
+                               float rn2A = Vec2.cross(vcp2.rA, vc.normal);
+                               float rn2B = Vec2.cross(vcp2.rB, vc.normal);
+
+                               float k11 = mA + mB + iA * rn1A * rn1A + iB * rn1B * rn1B;
+                               float k22 = mA + mB + iA * rn2A * rn2A + iB * rn2B * rn2B;
+                               float k12 = mA + mB + iA * rn1A * rn2A + iB * rn1B * rn2B;
+                               if (k11 * k11 < k_maxConditionNumber * (k11 * k22 - k12 * k12)) {
+                                       // K is safe to invert.
+                                       vc.K.ex.set(k11, k12);
+                                       vc.K.ey.set(k12, k22);
+                                       vc.K.invertToOut(vc.normalMass);
+                               } else {
+                                       // The constraints are redundant, just use one.
+                                       // TODO_ERIN use deepest?
+                                       vc.pointCount = 1;
+                               }
+                       }
+               }
+       }
+
+       // djm pooling from above
+       private final Vec2 dv = new Vec2();
+       private final Vec2 a = new Vec2();
+       private final Vec2 b = new Vec2();
+       private final Vec2 dv1 = new Vec2();
+       private final Vec2 dv2 = new Vec2();
+       private final Vec2 x = new Vec2();
+       private final Vec2 d = new Vec2();
+       private final Vec2 P1 = new Vec2();
+       private final Vec2 P2 = new Vec2();
+
+       public final void solveVelocityConstraints () {
+               for (int i = 0; i < m_count; ++i) {
+                       final ContactVelocityConstraint vc = m_velocityConstraints[i];
+
+                       int indexA = vc.indexA;
+                       int indexB = vc.indexB;
+
+                       float mA = vc.invMassA;
+                       float mB = vc.invMassB;
+                       float iA = vc.invIA;
+                       float iB = vc.invIB;
+                       int pointCount = vc.pointCount;
+
+                       Vec2 vA = m_velocities[indexA].v;
+                       float wA = m_velocities[indexA].w;
+                       Vec2 vB = m_velocities[indexB].v;
+                       float wB = m_velocities[indexB].w;
+// assert(wA == 0);
+// assert(wB == 0);
+
+                       Vec2 normal = vc.normal;
+// Vec2.crossToOutUnsafe(normal, 1f, tangent);
+                       tangent.x = 1.0f * vc.normal.y;
+                       tangent.y = -1.0f * vc.normal.x;
+                       final float friction = vc.friction;
+
+                       assert (pointCount == 1 || pointCount == 2);
+
+                       // Solve tangent constraints
+                       for (int j = 0; j < pointCount; ++j) {
+                               final VelocityConstraintPoint vcp = vc.points[j];
+// Vec2.crossToOutUnsafe(wA, vcp.rA, temp);
+// Vec2.crossToOutUnsafe(wB, vcp.rB, dv);
+// dv.addLocal(vB).subLocal(vA).subLocal(temp);
+                               final Vec2 a = vcp.rA;
+                               dv.x = -wB * vcp.rB.y + vB.x - vA.x + wA * a.y;
+                               dv.y = wB * vcp.rB.x + vB.y - vA.y - wA * a.x;
+
+                               // Compute tangent force
+                               final float vt = dv.x * tangent.x + dv.y * tangent.y - vc.tangentSpeed;
+                               float lambda = vcp.tangentMass * (-vt);
+
+                               // Clamp the accumulated force
+                               final float maxFriction = friction * vcp.normalImpulse;
+                               final float newImpulse = MathUtils.clamp(vcp.tangentImpulse + lambda, -maxFriction, maxFriction);
+                               lambda = newImpulse - vcp.tangentImpulse;
+                               vcp.tangentImpulse = newImpulse;
+
+                               // Apply contact impulse
+                               // Vec2 P = lambda * tangent;
+
+                               final float Px = tangent.x * lambda;
+                               final float Py = tangent.y * lambda;
+
+                               // vA -= invMassA * P;
+                               vA.x -= Px * mA;
+                               vA.y -= Py * mA;
+                               wA -= iA * (vcp.rA.x * Py - vcp.rA.y * Px);
+
+                               // vB += invMassB * P;
+                               vB.x += Px * mB;
+                               vB.y += Py * mB;
+                               wB += iB * (vcp.rB.x * Py - vcp.rB.y * Px);
+
+                               // System.out.println("tangent solve velocity (point "+j+") for " + indexA + " is " + vA.x + "," + vA.y + " rot " +
+// wA);
+                               // System.out.println("tangent solve velocity (point "+j+") for " + indexB + " is " + vB.x + "," + vB.y + " rot " +
+// wB);
+                       }
+
+                       // Solve normal constraints
+                       if (vc.pointCount == 1) {
+                               final VelocityConstraintPoint vcp = vc.points[0];
+                               Vec2 a1 = vcp.rA;
+
+                               // Relative velocity at contact
+                               // Vec2 dv = vB + Cross(wB, vcp.rB) - vA - Cross(wA, vcp.rA);
+
+// Vec2.crossToOut(wA, vcp.rA, temp1);
+// Vec2.crossToOut(wB, vcp.rB, dv);
+// dv.addLocal(vB).subLocal(vA).subLocal(temp1);
 //
-        dv.x = -wB * vcp.rB.y + vB.x - vA.x + wA * a1.y;
-        dv.y = wB * vcp.rB.x + vB.y - vA.y - wA * a1.x;
-
-        // Compute normal impulse
-        final float vn = dv.x * normal.x + dv.y * normal.y;
-        float lambda = -vcp.normalMass * (vn - vcp.velocityBias);
-
-        // Clamp the accumulated impulse
-        float a = vcp.normalImpulse + lambda;
-        final float newImpulse = (a > 0.0f ? a : 0.0f);
-        lambda = newImpulse - vcp.normalImpulse;
-//        assert(newImpulse == 0);
-        vcp.normalImpulse = newImpulse;
-
-        // Apply contact impulse
-        float Px = normal.x * lambda;
-        float Py = normal.y * lambda;
-
-        // vA -= invMassA * P;
-        vA.x -= Px * mA;
-        vA.y -= Py * mA;
-        wA -= iA * (vcp.rA.x * Py - vcp.rA.y * Px);
-//        assert(vA.x == 0);
-
-        // vB += invMassB * P;
-        vB.x += Px * mB;
-        vB.y += Py * mB;
-        wB += iB * (vcp.rB.x * Py - vcp.rB.y * Px);
-//        assert(vB.x == 0);
-      } else {
-        // Block solver developed in collaboration with Dirk Gregorius (back in 01/07 on
-        // Box2D_Lite).
-        // Build the mini LCP for this contact patch
-        //
-        // vn = A * x + b, vn >= 0, , vn >= 0, x >= 0 and vn_i * x_i = 0 with i = 1..2
-        //
-        // A = J * W * JT and J = ( -n, -r1 x n, n, r2 x n )
-        // b = vn_0 - velocityBias
-        //
-        // The system is solved using the "Total enumeration method" (s. Murty). The complementary
-        // constraint vn_i * x_i
-        // implies that we must have in any solution either vn_i = 0 or x_i = 0. So for the 2D
-        // contact problem the cases
-        // vn1 = 0 and vn2 = 0, x1 = 0 and x2 = 0, x1 = 0 and vn2 = 0, x2 = 0 and vn1 = 0 need to be
-        // tested. The first valid
-        // solution that satisfies the problem is chosen.
-        //
-        // In order to account of the accumulated impulse 'a' (because of the iterative nature of
-        // the solver which only requires
-        // that the accumulated impulse is clamped and not the incremental impulse) we change the
-        // impulse variable (x_i).
-        //
-        // Substitute:
-        //
-        // x = a + d
-        //
-        // a := old total impulse
-        // x := new total impulse
-        // d := incremental impulse
-        //
-        // For the current iteration we extend the formula for the incremental impulse
-        // to compute the new total impulse:
-        //
-        // vn = A * d + b
-        // = A * (x - a) + b
-        // = A * x + b - A * a
-        // = A * x + b'
-        // b' = b - A * a;
-
-        final VelocityConstraintPoint cp1 = vc.points[0];
-        final VelocityConstraintPoint cp2 = vc.points[1];
-        a.x = cp1.normalImpulse;
-        a.y = cp2.normalImpulse;
-
-        assert (a.x >= 0.0f && a.y >= 0.0f);
-        // Relative velocity at contact
-        // Vec2 dv1 = vB + Cross(wB, cp1.rB) - vA - Cross(wA, cp1.rA);
-        dv1.x = -wB * cp1.rB.y + vB.x - vA.x + wA * cp1.rA.y;
-        dv1.y = wB * cp1.rB.x + vB.y - vA.y - wA * cp1.rA.x;
-
-        // Vec2 dv2 = vB + Cross(wB, cp2.rB) - vA - Cross(wA, cp2.rA);
-        dv2.x = -wB * cp2.rB.y + vB.x - vA.x + wA * cp2.rA.y;
-        dv2.y = wB * cp2.rB.x + vB.y - vA.y - wA * cp2.rA.x;
-
-        // Compute normal velocity
-        float vn1 = dv1.x * normal.x + dv1.y * normal.y;
-        float vn2 = dv2.x * normal.x + dv2.y * normal.y;
-
-        b.x = vn1 - cp1.velocityBias;
-        b.y = vn2 - cp2.velocityBias;
-        //System.out.println("b is " + b.x + "," + b.y);
-
-        // Compute b'
-        Mat22 R = vc.K;
-        b.x -= R.ex.x * a.x + R.ey.x * a.y;
-        b.y -= R.ex.y * a.x + R.ey.y * a.y;
-        //System.out.println("b' is " + b.x + "," + b.y);
-
-        // final float k_errorTol = 1e-3f;
-        // B2_NOT_USED(k_errorTol);
-        for (;;) {
-          //
-          // Case 1: vn = 0
-          //
-          // 0 = A * x' + b'
-          //
-          // Solve for x':
-          //
-          // x' = - inv(A) * b'
-          //
-          // Vec2 x = - Mul(c.normalMass, b);
-          Mat22.mulToOutUnsafe(vc.normalMass, b, x);
-          x.mulLocal(-1);
-
-          if (x.x >= 0.0f && x.y >= 0.0f) {
-            //System.out.println("case 1");
-            // Get the incremental impulse
-            // Vec2 d = x - a;
-            d.set(x).subLocal(a);
-
-            // Apply incremental impulse
-            // Vec2 P1 = d.x * normal;
-            // Vec2 P2 = d.y * normal;
-            P1.set(normal).mulLocal(d.x);
-            P2.set(normal).mulLocal(d.y);
-
-            /*
-             * vA -= invMassA * (P1 + P2); wA -= invIA * (Cross(cp1.rA, P1) + Cross(cp2.rA, P2));
-             * 
-             * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
-             */
-
-            temp1.set(P1).addLocal(P2);
-            temp2.set(temp1).mulLocal(mA);
-            vA.subLocal(temp2);
-            temp2.set(temp1).mulLocal(mB);
-            vB.addLocal(temp2);
-//            assert(vA.x == 0);
-//            assert(vB.x == 0);
-
-            wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
-            wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
-
-            // Accumulate
-//            if(x.x != 0 || x.y != 0) {
-//              assert(x.x != 0 || x.y != 0);              
-//            }
-            cp1.normalImpulse = x.x;
-            cp2.normalImpulse = x.y;
-
-            /*
-             * #if B2_DEBUG_SOLVER == 1 // Postconditions dv1 = vB + Cross(wB, cp1.rB) - vA -
-             * Cross(wA, cp1.rA); dv2 = vB + Cross(wB, cp2.rB) - vA - Cross(wA, cp2.rA);
-             * 
-             * // Compute normal velocity vn1 = Dot(dv1, normal); vn2 = Dot(dv2, normal);
-             * 
-             * assert(Abs(vn1 - cp1.velocityBias) < k_errorTol); assert(Abs(vn2 - cp2.velocityBias)
-             * < k_errorTol); #endif
-             */
-            if (DEBUG_SOLVER) {
-              // Postconditions
-              Vec2 dv1 =
-                  vB.add(Vec2.cross(wB, cp1.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp1.rA)));
-              Vec2 dv2 =
-                  vB.add(Vec2.cross(wB, cp2.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp2.rA)));
-              // Compute normal velocity
-              vn1 = Vec2.dot(dv1, normal);
-              vn2 = Vec2.dot(dv2, normal);
-              
-              assert(MathUtils.abs(vn1 - cp1.velocityBias) < k_errorTol);
-              assert(MathUtils.abs(vn2 - cp2.velocityBias) < k_errorTol);
-            }
-            break;
-          }
-
-          //
-          // Case 2: vn1 = 0 and x2 = 0
-          //
-          // 0 = a11 * x1' + a12 * 0 + b1'
-          // vn2 = a21 * x1' + a22 * 0 + '
-          //
-          x.x = -cp1.normalMass * b.x;
-          x.y = 0.0f;
-          vn1 = 0.0f;
-          vn2 = vc.K.ex.y * x.x + b.y;
-
-          if (x.x >= 0.0f && vn2 >= 0.0f) {
-            //System.out.println("case 2");
-            // Get the incremental impulse
-            d.set(x).subLocal(a);
-
-            // Apply incremental impulse
-            // Vec2 P1 = d.x * normal;
-            // Vec2 P2 = d.y * normal;
-            P1.set(normal).mulLocal(d.x);
-            P2.set(normal).mulLocal(d.y);
-
-            /*
-             * Vec2 P1 = d.x * normal; Vec2 P2 = d.y * normal; vA -= invMassA * (P1 + P2); wA -=
-             * invIA * (Cross(cp1.rA, P1) + Cross(cp2.rA, P2));
-             * 
-             * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
-             */
-
-            temp1.set(P1).addLocal(P2);
-            temp2.set(temp1).mulLocal(mA);
-            vA.subLocal(temp2);
-            temp2.set(temp1).mulLocal(mB);
-            vB.addLocal(temp2);
-//            assert(vA.x == 0);
-//            assert(vB.x == 0);
-
-            wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
-            wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
-
-
-            // Accumulate
-//            assert(x.x == 0 && x.y == 0);
-            cp1.normalImpulse = x.x;
-            cp2.normalImpulse = x.y;
-
-            /*
-             * #if B2_DEBUG_SOLVER == 1 // Postconditions dv1 = vB + Cross(wB, cp1.rB) - vA -
-             * Cross(wA, cp1.rA);
-             * 
-             * // Compute normal velocity vn1 = Dot(dv1, normal);
-             * 
-             * assert(Abs(vn1 - cp1.velocityBias) < k_errorTol); #endif
-             */
-            if(DEBUG_SOLVER) {
-              // Postconditions
-              Vec2 dv1 = vB.add(Vec2.cross(wB, cp1.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp1.rA)));
-              // Compute normal velocity
-              vn1 = Vec2.dot(dv1, normal);
-              
-              assert(MathUtils.abs(vn1 - cp1.velocityBias) < k_errorTol);
-            }
-            break;
-          }
-
-
-          //
-          // Case 3: wB = 0 and x1 = 0
-          //
-          // vn1 = a11 * 0 + a12 * x2' + b1'
-          // 0 = a21 * 0 + a22 * x2' + '
-          //
-          x.x = 0.0f;
-          x.y = -cp2.normalMass * b.y;
-          vn1 = vc.K.ey.x * x.y + b.x;
-          vn2 = 0.0f;
-
-          if (x.y >= 0.0f && vn1 >= 0.0f) {
-            //System.out.println("case 3");
-            // Resubstitute for the incremental impulse
-            d.set(x).subLocal(a);
-
-            // Apply incremental impulse
-            /*
-             * Vec2 P1 = d.x * normal; Vec2 P2 = d.y * normal; vA -= invMassA * (P1 + P2); wA -=
-             * invIA * (Cross(cp1.rA, P1) + Cross(cp2.rA, P2));
-             * 
-             * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
-             */
-
-            P1.set(normal).mulLocal(d.x);
-            P2.set(normal).mulLocal(d.y);
-
-            temp1.set(P1).addLocal(P2);
-            temp2.set(temp1).mulLocal(mA);
-            vA.subLocal(temp2);
-            temp2.set(temp1).mulLocal(mB);
-            vB.addLocal(temp2);
-//            assert(vA.x == 0);
-//            assert(vB.x == 0);
-
-            wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
-            wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
-
-            // Accumulate
-//            assert(x.x == 0 && x.y == 0);
-            cp1.normalImpulse = x.x;
-            cp2.normalImpulse = x.y;
-
-            /*
-             * #if B2_DEBUG_SOLVER == 1 // Postconditions dv2 = vB + Cross(wB, cp2.rB) - vA -
-             * Cross(wA, cp2.rA);
-             * 
-             * // Compute normal velocity vn2 = Dot(dv2, normal);
-             * 
-             * assert(Abs(vn2 - cp2.velocityBias) < k_errorTol); #endif
-             */
-            if (DEBUG_SOLVER) {
-              // Postconditions
-              Vec2 dv2 =
-                  vB.add(Vec2.cross(wB, cp2.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp2.rA)));
-              // Compute normal velocity
-              vn2 = Vec2.dot(dv2, normal);
-              
-              assert(MathUtils.abs(vn2 - cp2.velocityBias) < k_errorTol);
-            }
-            break;
-          }
-
-          //
-          // Case 4: x1 = 0 and x2 = 0
-          //
-          // vn1 = b1
-          // vn2 = ;
-          x.x = 0.0f;
-          x.y = 0.0f;
-          vn1 = b.x;
-          vn2 = b.y;
-
-          if (vn1 >= 0.0f && vn2 >= 0.0f) {
-            //System.out.println("case 4");
-            // Resubstitute for the incremental impulse
-            d.set(x).subLocal(a);
-
-            // Apply incremental impulse
-            /*
-             * Vec2 P1 = d.x * normal; Vec2 P2 = d.y * normal; vA -= invMassA * (P1 + P2); wA -=
-             * invIA * (Cross(cp1.rA, P1) + Cross(cp2.rA, P2));
-             * 
-             * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
-             */
-
-            P1.set(normal).mulLocal(d.x);
-            P2.set(normal).mulLocal(d.y);
-
-            temp1.set(P1).addLocal(P2);
-            temp2.set(temp1).mulLocal(mA);
-            vA.subLocal(temp2);
-            temp2.set(temp1).mulLocal(mB);
-            vB.addLocal(temp2);
-//            assert(vA.x == 0);
-//            assert(vB.x == 0);
-
-            wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
-            wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
-
-
-            // Accumulate
-//            assert(x.x == 0 && x.y == 0);
-            cp1.normalImpulse = x.x;
-            cp2.normalImpulse = x.y;
-
-            break;
-          }
-
-          // No solution, give up. This is hit sometimes, but it doesn't seem to matter.
-          break;
-        }
-      }
-
-      m_velocities[indexA].v.set(vA);
-      m_velocities[indexA].w = wA;
-      m_velocities[indexB].v.set(vB);
-      m_velocities[indexB].w = wB;
-
-      //System.out.println("Ending velocity for " + indexA + " is " + vA.x + "," + vA.y + " rot " + wA);
-      //System.out.println("Ending velocity for " + indexB + " is " + vB.x + "," + vB.y + " rot " + wB);
-    }
-  }
-
-  public void storeImpulses() {
-    for (int i = 0; i < m_count; i++) {
-      final ContactVelocityConstraint vc = m_velocityConstraints[i];
-      final Manifold manifold = m_contacts[vc.contactIndex].getManifold();
-
-      for (int j = 0; j < vc.pointCount; j++) {
-        manifold.points[j].normalImpulse = vc.points[j].normalImpulse;
-        manifold.points[j].tangentImpulse = vc.points[j].tangentImpulse;
-      }
-    }
-  }
-
-  /*
-   * #if 0 // Sequential solver. bool ContactSolver::SolvePositionConstraints(float baumgarte) {
-   * float minSeparation = 0.0f;
-   * 
-   * for (int i = 0; i < m_constraintCount; ++i) { ContactConstraint* c = m_constraints + i; Body*
-   * bodyA = c.bodyA; Body* bodyB = c.bodyB; float invMassA = bodyA.m_mass * bodyA.m_invMass; float
-   * invIA = bodyA.m_mass * bodyA.m_invI; float invMassB = bodyB.m_mass * bodyB.m_invMass; float
-   * invIB = bodyB.m_mass * bodyB.m_invI;
-   * 
-   * Vec2 normal = c.normal;
-   * 
-   * // Solve normal constraints for (int j = 0; j < c.pointCount; ++j) { ContactConstraintPoint*
-   * ccp = c.points + j;
-   * 
-   * Vec2 r1 = Mul(bodyA.GetXForm().R, ccp.localAnchorA - bodyA.GetLocalCenter()); Vec2 r2 =
-   * Mul(bodyB.GetXForm().R, ccp.localAnchorB - bodyB.GetLocalCenter());
-   * 
-   * Vec2 p1 = bodyA.m_sweep.c + r1; Vec2 p2 = bodyB.m_sweep.c + r2; Vec2 dp = p2 - p1;
-   * 
-   * // Approximate the current separation. float separation = Dot(dp, normal) + ccp.separation;
-   * 
-   * // Track max constraint error. minSeparation = Min(minSeparation, separation);
-   * 
-   * // Prevent large corrections and allow slop. float C = Clamp(baumgarte * (separation +
-   * _linearSlop), -_maxLinearCorrection, 0.0f);
-   * 
-   * // Compute normal impulse float impulse = -ccp.equalizedMass * C;
-   * 
-   * Vec2 P = impulse * normal;
-   * 
-   * bodyA.m_sweep.c -= invMassA * P; bodyA.m_sweep.a -= invIA * Cross(r1, P);
-   * bodyA.SynchronizeTransform();
-   * 
-   * bodyB.m_sweep.c += invMassB * P; bodyB.m_sweep.a += invIB * Cross(r2, P);
-   * bodyB.SynchronizeTransform(); } }
-   * 
-   * // We can't expect minSpeparation >= -_linearSlop because we don't // push the separation above
-   * -_linearSlop. return minSeparation >= -1.5f * _linearSlop; }
-   */
-
-  // djm pooling, and from above
-  private final PositionSolverManifold psolver = new PositionSolverManifold();
-  private final Vec2 rA = new Vec2();
-  private final Vec2 rB = new Vec2();
-
-  /**
-   * Sequential solver.
-   */
-  public final boolean solvePositionConstraints() {
-    float minSeparation = 0.0f;
-
-    for (int i = 0; i < m_count; ++i) {
-      ContactPositionConstraint pc = m_positionConstraints[i];
-
-      int indexA = pc.indexA;
-      int indexB = pc.indexB;
-
-      float mA = pc.invMassA;
-      float iA = pc.invIA;
-      Vec2 localCenterA = pc.localCenterA;
-      float mB = pc.invMassB;
-      float iB = pc.invIB;
-      Vec2 localCenterB = pc.localCenterB;
-      int pointCount = pc.pointCount;
-
-      Vec2 cA = m_positions[indexA].c;
-      float aA = m_positions[indexA].a;
-      Vec2 cB = m_positions[indexB].c;
-      float aB = m_positions[indexB].a;
-      //System.out.println("cA: " + cA.x + "," + cA.y + " - rot " + aA);
-      //System.out.println("cB: " + cB.x + "," + cB.y + " - rot " + aB);
-
-      // Solve normal constraints
-      for (int j = 0; j < pointCount; ++j) {
-        xfA.q.set(aA);
-        xfB.q.set(aB);
-        Rot.mulToOutUnsafe(xfA.q, localCenterA, xfA.p);
-        xfA.p.negateLocal().addLocal(cA);
-        Rot.mulToOutUnsafe(xfB.q, localCenterB, xfB.p);
-        xfB.p.negateLocal().addLocal(cB);
-
-        final PositionSolverManifold psm = psolver;
-        psm.initialize(pc, xfA, xfB, j);
-        final Vec2 normal = psm.normal;
-
-        final Vec2 point = psm.point;
-        final float separation = psm.separation;
-
-        rA.set(point).subLocal(cA);
-        rB.set(point).subLocal(cB);
-
-        // Track max constraint error.
-        minSeparation = MathUtils.min(minSeparation, separation);
-
-        // Prevent large corrections and allow slop.
-        final float C =
-            MathUtils.clamp(Settings.baumgarte * (separation + Settings.linearSlop),
-                -Settings.maxLinearCorrection, 0.0f);
-
-        // Compute the effective mass.
-        final float rnA = Vec2.cross(rA, normal);
-        final float rnB = Vec2.cross(rB, normal);
-        final float K = mA + mB + iA * rnA * rnA + iB * rnB * rnB;
-
-        // Compute normal impulse
-        final float impulse = K > 0.0f ? -C / K : 0.0f;
-
-        P.set(normal).mulLocal(impulse);
-
-        cA.subLocal(temp.set(P).mulLocal(mA));
-        aA -= iA * Vec2.cross(rA, P);
-
-
-        cB.addLocal(temp.set(P).mulLocal(mB));
-        aB += iB * Vec2.cross(rB, P);
-      }
-
-      m_positions[indexA].c.set(cA);
-      m_positions[indexA].a = aA;
-
-      m_positions[indexB].c.set(cB);
-      m_positions[indexB].a = aB;
-      //System.out.println("ending pos "+indexA+": " + cA.x + "," + cA.y + " - rot " + aA);
-      //System.out.println("ending pos "+indexB+": " + cB.x + "," + cB.y + " - rot " + aB);
-    }
-
-    // We can't expect minSpeparation >= -linearSlop because we don't
-    // push the separation above -linearSlop.
-    return minSeparation >= -3.0f * Settings.linearSlop;
-  }
-
-  // Sequential position solver for position constraints.
-  public boolean solveTOIPositionConstraints(int toiIndexA, int toiIndexB) {
-    float minSeparation = 0.0f;
-
-    for (int i = 0; i < m_count; ++i) {
-      ContactPositionConstraint pc = m_positionConstraints[i];
-
-      int indexA = pc.indexA;
-      int indexB = pc.indexB;
-      Vec2 localCenterA = pc.localCenterA;
-      Vec2 localCenterB = pc.localCenterB;
-      int pointCount = pc.pointCount;
-
-      float mA = 0.0f;
-      float iA = 0.0f;
-      if (indexA == toiIndexA || indexA == toiIndexB) {
-        mA = pc.invMassA;
-        iA = pc.invIA;
-      }
-
-      float mB = pc.invMassB;
-      float iB = pc.invIB;
-      if (indexB == toiIndexA || indexB == toiIndexB) {
-        mB = pc.invMassB;
-        iB = pc.invIB;
-      }
-
-      Vec2 cA = m_positions[indexA].c;
-      float aA = m_positions[indexA].a;
-
-      Vec2 cB = m_positions[indexB].c;
-      float aB = m_positions[indexB].a;
-
-      // Solve normal constraints
-      for (int j = 0; j < pointCount; ++j) {
-        xfA.q.set(aA);
-        xfB.q.set(aB);
-        Rot.mulToOutUnsafe(xfA.q, localCenterA, xfA.p);
-        xfA.p.negateLocal().addLocal(cA);
-        Rot.mulToOutUnsafe(xfB.q, localCenterB, xfB.p);
-        xfB.p.negateLocal().addLocal(cB);
-
-        final PositionSolverManifold psm = psolver;
-        psm.initialize(pc, xfA, xfB, j);
-        Vec2 normal = psm.normal;
-
-        Vec2 point = psm.point;
-        float separation = psm.separation;
-
-        rA.set(point).subLocal(cA);
-        rB.set(point).subLocal(cB);
-
-        // Track max constraint error.
-        minSeparation = MathUtils.min(minSeparation, separation);
-
-        // Prevent large corrections and allow slop.
-        float C =
-            MathUtils.clamp(Settings.toiBaugarte * (separation + Settings.linearSlop),
-                -Settings.maxLinearCorrection, 0.0f);
-
-        // Compute the effective mass.
-        float rnA = Vec2.cross(rA, normal);
-        float rnB = Vec2.cross(rB, normal);
-        float K = mA + mB + iA * rnA * rnA + iB * rnB * rnB;
-
-        // Compute normal impulse
-        float impulse = K > 0.0f ? -C / K : 0.0f;
-
-        P.set(normal).mulLocal(impulse);
-
-        cA.subLocal(temp.set(P).mulLocal(mA));
-        aA -= iA * Vec2.cross(rA, P);
-
-        cB.addLocal(temp.set(P).mulLocal(mB));
-        aB += iB * Vec2.cross(rB, P);
-      }
-
-      m_positions[indexA].c.set(cA);
-      m_positions[indexA].a = aA;
-
-      m_positions[indexB].c.set(cB);
-      m_positions[indexB].a = aB;
-    }
-
-    // We can't expect minSpeparation >= -_linearSlop because we don't
-    // push the separation above -_linearSlop.
-    return minSeparation >= -1.5f * Settings.linearSlop;
-  }
-
-  public static class ContactSolverDef {
-    public TimeStep step;
-    public Contact[] contacts;
-    public int count;
-    public Position[] positions;
-    public Velocity[] velocities;
-  }
+                               dv.x = -wB * vcp.rB.y + vB.x - vA.x + wA * a1.y;
+                               dv.y = wB * vcp.rB.x + vB.y - vA.y - wA * a1.x;
+
+                               // Compute normal impulse
+                               final float vn = dv.x * normal.x + dv.y * normal.y;
+                               float lambda = -vcp.normalMass * (vn - vcp.velocityBias);
+
+                               // Clamp the accumulated impulse
+                               float a = vcp.normalImpulse + lambda;
+                               final float newImpulse = (a > 0.0f ? a : 0.0f);
+                               lambda = newImpulse - vcp.normalImpulse;
+// assert(newImpulse == 0);
+                               vcp.normalImpulse = newImpulse;
+
+                               // Apply contact impulse
+                               float Px = normal.x * lambda;
+                               float Py = normal.y * lambda;
+
+                               // vA -= invMassA * P;
+                               vA.x -= Px * mA;
+                               vA.y -= Py * mA;
+                               wA -= iA * (vcp.rA.x * Py - vcp.rA.y * Px);
+// assert(vA.x == 0);
+
+                               // vB += invMassB * P;
+                               vB.x += Px * mB;
+                               vB.y += Py * mB;
+                               wB += iB * (vcp.rB.x * Py - vcp.rB.y * Px);
+// assert(vB.x == 0);
+                       } else {
+                               // Block solver developed in collaboration with Dirk Gregorius (back in 01/07 on
+                               // Box2D_Lite).
+                               // Build the mini LCP for this contact patch
+                               //
+                               // vn = A * x + b, vn >= 0, , vn >= 0, x >= 0 and vn_i * x_i = 0 with i = 1..2
+                               //
+                               // A = J * W * JT and J = ( -n, -r1 x n, n, r2 x n )
+                               // b = vn_0 - velocityBias
+                               //
+                               // The system is solved using the "Total enumeration method" (s. Murty). The complementary
+                               // constraint vn_i * x_i
+                               // implies that we must have in any solution either vn_i = 0 or x_i = 0. So for the 2D
+                               // contact problem the cases
+                               // vn1 = 0 and vn2 = 0, x1 = 0 and x2 = 0, x1 = 0 and vn2 = 0, x2 = 0 and vn1 = 0 need to be
+                               // tested. The first valid
+                               // solution that satisfies the problem is chosen.
+                               //
+                               // In order to account of the accumulated impulse 'a' (because of the iterative nature of
+                               // the solver which only requires
+                               // that the accumulated impulse is clamped and not the incremental impulse) we change the
+                               // impulse variable (x_i).
+                               //
+                               // Substitute:
+                               //
+                               // x = a + d
+                               //
+                               // a := old total impulse
+                               // x := new total impulse
+                               // d := incremental impulse
+                               //
+                               // For the current iteration we extend the formula for the incremental impulse
+                               // to compute the new total impulse:
+                               //
+                               // vn = A * d + b
+                               // = A * (x - a) + b
+                               // = A * x + b - A * a
+                               // = A * x + b'
+                               // b' = b - A * a;
+
+                               final VelocityConstraintPoint cp1 = vc.points[0];
+                               final VelocityConstraintPoint cp2 = vc.points[1];
+                               a.x = cp1.normalImpulse;
+                               a.y = cp2.normalImpulse;
+
+                               assert (a.x >= 0.0f && a.y >= 0.0f);
+                               // Relative velocity at contact
+                               // Vec2 dv1 = vB + Cross(wB, cp1.rB) - vA - Cross(wA, cp1.rA);
+                               dv1.x = -wB * cp1.rB.y + vB.x - vA.x + wA * cp1.rA.y;
+                               dv1.y = wB * cp1.rB.x + vB.y - vA.y - wA * cp1.rA.x;
+
+                               // Vec2 dv2 = vB + Cross(wB, cp2.rB) - vA - Cross(wA, cp2.rA);
+                               dv2.x = -wB * cp2.rB.y + vB.x - vA.x + wA * cp2.rA.y;
+                               dv2.y = wB * cp2.rB.x + vB.y - vA.y - wA * cp2.rA.x;
+
+                               // Compute normal velocity
+                               float vn1 = dv1.x * normal.x + dv1.y * normal.y;
+                               float vn2 = dv2.x * normal.x + dv2.y * normal.y;
+
+                               b.x = vn1 - cp1.velocityBias;
+                               b.y = vn2 - cp2.velocityBias;
+                               // System.out.println("b is " + b.x + "," + b.y);
+
+                               // Compute b'
+                               Mat22 R = vc.K;
+                               b.x -= R.ex.x * a.x + R.ey.x * a.y;
+                               b.y -= R.ex.y * a.x + R.ey.y * a.y;
+                               // System.out.println("b' is " + b.x + "," + b.y);
+
+                               // final float k_errorTol = 1e-3f;
+                               // B2_NOT_USED(k_errorTol);
+                               for (;;) {
+                                       //
+                                       // Case 1: vn = 0
+                                       //
+                                       // 0 = A * x' + b'
+                                       //
+                                       // Solve for x':
+                                       //
+                                       // x' = - inv(A) * b'
+                                       //
+                                       // Vec2 x = - Mul(c.normalMass, b);
+                                       Mat22.mulToOutUnsafe(vc.normalMass, b, x);
+                                       x.mulLocal(-1);
+
+                                       if (x.x >= 0.0f && x.y >= 0.0f) {
+                                               // System.out.println("case 1");
+                                               // Get the incremental impulse
+                                               // Vec2 d = x - a;
+                                               d.set(x).subLocal(a);
+
+                                               // Apply incremental impulse
+                                               // Vec2 P1 = d.x * normal;
+                                               // Vec2 P2 = d.y * normal;
+                                               P1.set(normal).mulLocal(d.x);
+                                               P2.set(normal).mulLocal(d.y);
+
+                                               /*
+                                                * vA -= invMassA * (P1 + P2); wA -= invIA * (Cross(cp1.rA, P1) + Cross(cp2.rA, P2));
+                                                * 
+                                                * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
+                                                */
+
+                                               temp1.set(P1).addLocal(P2);
+                                               temp2.set(temp1).mulLocal(mA);
+                                               vA.subLocal(temp2);
+                                               temp2.set(temp1).mulLocal(mB);
+                                               vB.addLocal(temp2);
+// assert(vA.x == 0);
+// assert(vB.x == 0);
+
+                                               wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
+                                               wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
+
+                                               // Accumulate
+// if(x.x != 0 || x.y != 0) {
+// assert(x.x != 0 || x.y != 0);
+// }
+                                               cp1.normalImpulse = x.x;
+                                               cp2.normalImpulse = x.y;
+
+                                               /*
+                                                * #if B2_DEBUG_SOLVER == 1 // Postconditions dv1 = vB + Cross(wB, cp1.rB) - vA - Cross(wA, cp1.rA); dv2 = vB +
+                                                * Cross(wB, cp2.rB) - vA - Cross(wA, cp2.rA);
+                                                * 
+                                                * // Compute normal velocity vn1 = Dot(dv1, normal); vn2 = Dot(dv2, normal);
+                                                * 
+                                                * assert(Abs(vn1 - cp1.velocityBias) < k_errorTol); assert(Abs(vn2 - cp2.velocityBias) < k_errorTol); #endif
+                                                */
+                                               if (DEBUG_SOLVER) {
+                                                       // Postconditions
+                                                       Vec2 dv1 = vB.add(Vec2.cross(wB, cp1.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp1.rA)));
+                                                       Vec2 dv2 = vB.add(Vec2.cross(wB, cp2.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp2.rA)));
+                                                       // Compute normal velocity
+                                                       vn1 = Vec2.dot(dv1, normal);
+                                                       vn2 = Vec2.dot(dv2, normal);
+
+                                                       assert (MathUtils.abs(vn1 - cp1.velocityBias) < k_errorTol);
+                                                       assert (MathUtils.abs(vn2 - cp2.velocityBias) < k_errorTol);
+                                               }
+                                               break;
+                                       }
+
+                                       //
+                                       // Case 2: vn1 = 0 and x2 = 0
+                                       //
+                                       // 0 = a11 * x1' + a12 * 0 + b1'
+                                       // vn2 = a21 * x1' + a22 * 0 + '
+                                       //
+                                       x.x = -cp1.normalMass * b.x;
+                                       x.y = 0.0f;
+                                       vn1 = 0.0f;
+                                       vn2 = vc.K.ex.y * x.x + b.y;
+
+                                       if (x.x >= 0.0f && vn2 >= 0.0f) {
+                                               // System.out.println("case 2");
+                                               // Get the incremental impulse
+                                               d.set(x).subLocal(a);
+
+                                               // Apply incremental impulse
+                                               // Vec2 P1 = d.x * normal;
+                                               // Vec2 P2 = d.y * normal;
+                                               P1.set(normal).mulLocal(d.x);
+                                               P2.set(normal).mulLocal(d.y);
+
+                                               /*
+                                                * Vec2 P1 = d.x * normal; Vec2 P2 = d.y * normal; vA -= invMassA * (P1 + P2); wA -= invIA * (Cross(cp1.rA, P1)
+                                                * + Cross(cp2.rA, P2));
+                                                * 
+                                                * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
+                                                */
+
+                                               temp1.set(P1).addLocal(P2);
+                                               temp2.set(temp1).mulLocal(mA);
+                                               vA.subLocal(temp2);
+                                               temp2.set(temp1).mulLocal(mB);
+                                               vB.addLocal(temp2);
+// assert(vA.x == 0);
+// assert(vB.x == 0);
+
+                                               wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
+                                               wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
+
+                                               // Accumulate
+// assert(x.x == 0 && x.y == 0);
+                                               cp1.normalImpulse = x.x;
+                                               cp2.normalImpulse = x.y;
+
+                                               /*
+                                                * #if B2_DEBUG_SOLVER == 1 // Postconditions dv1 = vB + Cross(wB, cp1.rB) - vA - Cross(wA, cp1.rA);
+                                                * 
+                                                * // Compute normal velocity vn1 = Dot(dv1, normal);
+                                                * 
+                                                * assert(Abs(vn1 - cp1.velocityBias) < k_errorTol); #endif
+                                                */
+                                               if (DEBUG_SOLVER) {
+                                                       // Postconditions
+                                                       Vec2 dv1 = vB.add(Vec2.cross(wB, cp1.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp1.rA)));
+                                                       // Compute normal velocity
+                                                       vn1 = Vec2.dot(dv1, normal);
+
+                                                       assert (MathUtils.abs(vn1 - cp1.velocityBias) < k_errorTol);
+                                               }
+                                               break;
+                                       }
+
+                                       //
+                                       // Case 3: wB = 0 and x1 = 0
+                                       //
+                                       // vn1 = a11 * 0 + a12 * x2' + b1'
+                                       // 0 = a21 * 0 + a22 * x2' + '
+                                       //
+                                       x.x = 0.0f;
+                                       x.y = -cp2.normalMass * b.y;
+                                       vn1 = vc.K.ey.x * x.y + b.x;
+                                       vn2 = 0.0f;
+
+                                       if (x.y >= 0.0f && vn1 >= 0.0f) {
+                                               // System.out.println("case 3");
+                                               // Resubstitute for the incremental impulse
+                                               d.set(x).subLocal(a);
+
+                                               // Apply incremental impulse
+                                               /*
+                                                * Vec2 P1 = d.x * normal; Vec2 P2 = d.y * normal; vA -= invMassA * (P1 + P2); wA -= invIA * (Cross(cp1.rA, P1)
+                                                * + Cross(cp2.rA, P2));
+                                                * 
+                                                * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
+                                                */
+
+                                               P1.set(normal).mulLocal(d.x);
+                                               P2.set(normal).mulLocal(d.y);
+
+                                               temp1.set(P1).addLocal(P2);
+                                               temp2.set(temp1).mulLocal(mA);
+                                               vA.subLocal(temp2);
+                                               temp2.set(temp1).mulLocal(mB);
+                                               vB.addLocal(temp2);
+// assert(vA.x == 0);
+// assert(vB.x == 0);
+
+                                               wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
+                                               wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
+
+                                               // Accumulate
+// assert(x.x == 0 && x.y == 0);
+                                               cp1.normalImpulse = x.x;
+                                               cp2.normalImpulse = x.y;
+
+                                               /*
+                                                * #if B2_DEBUG_SOLVER == 1 // Postconditions dv2 = vB + Cross(wB, cp2.rB) - vA - Cross(wA, cp2.rA);
+                                                * 
+                                                * // Compute normal velocity vn2 = Dot(dv2, normal);
+                                                * 
+                                                * assert(Abs(vn2 - cp2.velocityBias) < k_errorTol); #endif
+                                                */
+                                               if (DEBUG_SOLVER) {
+                                                       // Postconditions
+                                                       Vec2 dv2 = vB.add(Vec2.cross(wB, cp2.rB).subLocal(vA).subLocal(Vec2.cross(wA, cp2.rA)));
+                                                       // Compute normal velocity
+                                                       vn2 = Vec2.dot(dv2, normal);
+
+                                                       assert (MathUtils.abs(vn2 - cp2.velocityBias) < k_errorTol);
+                                               }
+                                               break;
+                                       }
+
+                                       //
+                                       // Case 4: x1 = 0 and x2 = 0
+                                       //
+                                       // vn1 = b1
+                                       // vn2 = ;
+                                       x.x = 0.0f;
+                                       x.y = 0.0f;
+                                       vn1 = b.x;
+                                       vn2 = b.y;
+
+                                       if (vn1 >= 0.0f && vn2 >= 0.0f) {
+                                               // System.out.println("case 4");
+                                               // Resubstitute for the incremental impulse
+                                               d.set(x).subLocal(a);
+
+                                               // Apply incremental impulse
+                                               /*
+                                                * Vec2 P1 = d.x * normal; Vec2 P2 = d.y * normal; vA -= invMassA * (P1 + P2); wA -= invIA * (Cross(cp1.rA, P1)
+                                                * + Cross(cp2.rA, P2));
+                                                * 
+                                                * vB += invMassB * (P1 + P2); wB += invIB * (Cross(cp1.rB, P1) + Cross(cp2.rB, P2));
+                                                */
+
+                                               P1.set(normal).mulLocal(d.x);
+                                               P2.set(normal).mulLocal(d.y);
+
+                                               temp1.set(P1).addLocal(P2);
+                                               temp2.set(temp1).mulLocal(mA);
+                                               vA.subLocal(temp2);
+                                               temp2.set(temp1).mulLocal(mB);
+                                               vB.addLocal(temp2);
+// assert(vA.x == 0);
+// assert(vB.x == 0);
+
+                                               wA -= iA * (Vec2.cross(cp1.rA, P1) + Vec2.cross(cp2.rA, P2));
+                                               wB += iB * (Vec2.cross(cp1.rB, P1) + Vec2.cross(cp2.rB, P2));
+
+                                               // Accumulate
+// assert(x.x == 0 && x.y == 0);
+                                               cp1.normalImpulse = x.x;
+                                               cp2.normalImpulse = x.y;
+
+                                               break;
+                                       }
+
+                                       // No solution, give up. This is hit sometimes, but it doesn't seem to matter.
+                                       break;
+                               }
+                       }
+
+                       m_velocities[indexA].v.set(vA);
+                       m_velocities[indexA].w = wA;
+                       m_velocities[indexB].v.set(vB);
+                       m_velocities[indexB].w = wB;
+
+                       // System.out.println("Ending velocity for " + indexA + " is " + vA.x + "," + vA.y + " rot " + wA);
+                       // System.out.println("Ending velocity for " + indexB + " is " + vB.x + "," + vB.y + " rot " + wB);
+               }
+       }
+
+       public void storeImpulses () {
+               for (int i = 0; i < m_count; i++) {
+                       final ContactVelocityConstraint vc = m_velocityConstraints[i];
+                       final Manifold manifold = m_contacts[vc.contactIndex].getManifold();
+
+                       for (int j = 0; j < vc.pointCount; j++) {
+                               manifold.points[j].normalImpulse = vc.points[j].normalImpulse;
+                               manifold.points[j].tangentImpulse = vc.points[j].tangentImpulse;
+                       }
+               }
+       }
+
+       /*
+        * #if 0 // Sequential solver. bool ContactSolver::SolvePositionConstraints(float baumgarte) { float minSeparation = 0.0f;
+        * 
+        * for (int i = 0; i < m_constraintCount; ++i) { ContactConstraint* c = m_constraints + i; Body* bodyA = c.bodyA; Body* bodyB =
+        * c.bodyB; float invMassA = bodyA.m_mass * bodyA.m_invMass; float invIA = bodyA.m_mass * bodyA.m_invI; float invMassB =
+        * bodyB.m_mass * bodyB.m_invMass; float invIB = bodyB.m_mass * bodyB.m_invI;
+        * 
+        * Vec2 normal = c.normal;
+        * 
+        * // Solve normal constraints for (int j = 0; j < c.pointCount; ++j) { ContactConstraintPoint* ccp = c.points + j;
+        * 
+        * Vec2 r1 = Mul(bodyA.GetXForm().R, ccp.localAnchorA - bodyA.GetLocalCenter()); Vec2 r2 = Mul(bodyB.GetXForm().R,
+        * ccp.localAnchorB - bodyB.GetLocalCenter());
+        * 
+        * Vec2 p1 = bodyA.m_sweep.c + r1; Vec2 p2 = bodyB.m_sweep.c + r2; Vec2 dp = p2 - p1;
+        * 
+        * // Approximate the current separation. float separation = Dot(dp, normal) + ccp.separation;
+        * 
+        * // Track max constraint error. minSeparation = Min(minSeparation, separation);
+        * 
+        * // Prevent large corrections and allow slop. float C = Clamp(baumgarte * (separation + _linearSlop), -_maxLinearCorrection,
+        * 0.0f);
+        * 
+        * // Compute normal impulse float impulse = -ccp.equalizedMass * C;
+        * 
+        * Vec2 P = impulse * normal;
+        * 
+        * bodyA.m_sweep.c -= invMassA * P; bodyA.m_sweep.a -= invIA * Cross(r1, P); bodyA.SynchronizeTransform();
+        * 
+        * bodyB.m_sweep.c += invMassB * P; bodyB.m_sweep.a += invIB * Cross(r2, P); bodyB.SynchronizeTransform(); } }
+        * 
+        * // We can't expect minSpeparation >= -_linearSlop because we don't // push the separation above -_linearSlop. return
+        * minSeparation >= -1.5f * _linearSlop; }
+        */
+
+       // djm pooling, and from above
+       private final PositionSolverManifold psolver = new PositionSolverManifold();
+       private final Vec2 rA = new Vec2();
+       private final Vec2 rB = new Vec2();
+
+       /** Sequential solver. */
+       public final boolean solvePositionConstraints () {
+               float minSeparation = 0.0f;
+
+               for (int i = 0; i < m_count; ++i) {
+                       ContactPositionConstraint pc = m_positionConstraints[i];
+
+                       int indexA = pc.indexA;
+                       int indexB = pc.indexB;
+
+                       float mA = pc.invMassA;
+                       float iA = pc.invIA;
+                       Vec2 localCenterA = pc.localCenterA;
+                       float mB = pc.invMassB;
+                       float iB = pc.invIB;
+                       Vec2 localCenterB = pc.localCenterB;
+                       int pointCount = pc.pointCount;
+
+                       Vec2 cA = m_positions[indexA].c;
+                       float aA = m_positions[indexA].a;
+                       Vec2 cB = m_positions[indexB].c;
+                       float aB = m_positions[indexB].a;
+                       // System.out.println("cA: " + cA.x + "," + cA.y + " - rot " + aA);
+                       // System.out.println("cB: " + cB.x + "," + cB.y + " - rot " + aB);
+
+                       // Solve normal constraints
+                       for (int j = 0; j < pointCount; ++j) {
+                               xfA.q.set(aA);
+                               xfB.q.set(aB);
+                               Rot.mulToOutUnsafe(xfA.q, localCenterA, xfA.p);
+                               xfA.p.negateLocal().addLocal(cA);
+                               Rot.mulToOutUnsafe(xfB.q, localCenterB, xfB.p);
+                               xfB.p.negateLocal().addLocal(cB);
+
+                               final PositionSolverManifold psm = psolver;
+                               psm.initialize(pc, xfA, xfB, j);
+                               final Vec2 normal = psm.normal;
+
+                               final Vec2 point = psm.point;
+                               final float separation = psm.separation;
+
+                               rA.set(point).subLocal(cA);
+                               rB.set(point).subLocal(cB);
+
+                               // Track max constraint error.
+                               minSeparation = MathUtils.min(minSeparation, separation);
+
+                               // Prevent large corrections and allow slop.
+                               final float C = MathUtils.clamp(Settings.baumgarte * (separation + Settings.linearSlop),
+                                       -Settings.maxLinearCorrection, 0.0f);
+
+                               // Compute the effective mass.
+                               final float rnA = Vec2.cross(rA, normal);
+                               final float rnB = Vec2.cross(rB, normal);
+                               final float K = mA + mB + iA * rnA * rnA + iB * rnB * rnB;
+
+                               // Compute normal impulse
+                               final float impulse = K > 0.0f ? -C / K : 0.0f;
+
+                               P.set(normal).mulLocal(impulse);
+
+                               cA.subLocal(temp.set(P).mulLocal(mA));
+                               aA -= iA * Vec2.cross(rA, P);
+
+                               cB.addLocal(temp.set(P).mulLocal(mB));
+                               aB += iB * Vec2.cross(rB, P);
+                       }
+
+                       m_positions[indexA].c.set(cA);
+                       m_positions[indexA].a = aA;
+
+                       m_positions[indexB].c.set(cB);
+                       m_positions[indexB].a = aB;
+                       // System.out.println("ending pos "+indexA+": " + cA.x + "," + cA.y + " - rot " + aA);
+                       // System.out.println("ending pos "+indexB+": " + cB.x + "," + cB.y + " - rot " + aB);
+               }
+
+               // We can't expect minSpeparation >= -linearSlop because we don't
+               // push the separation above -linearSlop.
+               return minSeparation >= -3.0f * Settings.linearSlop;
+       }
+
+       // Sequential position solver for position constraints.
+       public boolean solveTOIPositionConstraints (int toiIndexA, int toiIndexB) {
+               float minSeparation = 0.0f;
+
+               for (int i = 0; i < m_count; ++i) {
+                       ContactPositionConstraint pc = m_positionConstraints[i];
+
+                       int indexA = pc.indexA;
+                       int indexB = pc.indexB;
+                       Vec2 localCenterA = pc.localCenterA;
+                       Vec2 localCenterB = pc.localCenterB;
+                       int pointCount = pc.pointCount;
+
+                       float mA = 0.0f;
+                       float iA = 0.0f;
+                       if (indexA == toiIndexA || indexA == toiIndexB) {
+                               mA = pc.invMassA;
+                               iA = pc.invIA;
+                       }
+
+                       float mB = pc.invMassB;
+                       float iB = pc.invIB;
+                       if (indexB == toiIndexA || indexB == toiIndexB) {
+                               mB = pc.invMassB;
+                               iB = pc.invIB;
+                       }
+
+                       Vec2 cA = m_positions[indexA].c;
+                       float aA = m_positions[indexA].a;
+
+                       Vec2 cB = m_positions[indexB].c;
+                       float aB = m_positions[indexB].a;
+
+                       // Solve normal constraints
+                       for (int j = 0; j < pointCount; ++j) {
+                               xfA.q.set(aA);
+                               xfB.q.set(aB);
+                               Rot.mulToOutUnsafe(xfA.q, localCenterA, xfA.p);
+                               xfA.p.negateLocal().addLocal(cA);
+                               Rot.mulToOutUnsafe(xfB.q, localCenterB, xfB.p);
+                               xfB.p.negateLocal().addLocal(cB);
+
+                               final PositionSolverManifold psm = psolver;
+                               psm.initialize(pc, xfA, xfB, j);
+                               Vec2 normal = psm.normal;
+
+                               Vec2 point = psm.point;
+                               float separation = psm.separation;
+
+                               rA.set(point).subLocal(cA);
+                               rB.set(point).subLocal(cB);
+
+                               // Track max constraint error.
+                               minSeparation = MathUtils.min(minSeparation, separation);
+
+                               // Prevent large corrections and allow slop.
+                               float C = MathUtils.clamp(Settings.toiBaugarte * (separation + Settings.linearSlop), -Settings.maxLinearCorrection,
+                                       0.0f);
+
+                               // Compute the effective mass.
+                               float rnA = Vec2.cross(rA, normal);
+                               float rnB = Vec2.cross(rB, normal);
+                               float K = mA + mB + iA * rnA * rnA + iB * rnB * rnB;
+
+                               // Compute normal impulse
+                               float impulse = K > 0.0f ? -C / K : 0.0f;
+
+                               P.set(normal).mulLocal(impulse);
+
+                               cA.subLocal(temp.set(P).mulLocal(mA));
+                               aA -= iA * Vec2.cross(rA, P);
+
+                               cB.addLocal(temp.set(P).mulLocal(mB));
+                               aB += iB * Vec2.cross(rB, P);
+                       }
+
+                       m_positions[indexA].c.set(cA);
+                       m_positions[indexA].a = aA;
+
+                       m_positions[indexB].c.set(cB);
+                       m_positions[indexB].a = aB;
+               }
+
+               // We can't expect minSpeparation >= -_linearSlop because we don't
+               // push the separation above -_linearSlop.
+               return minSeparation >= -1.5f * Settings.linearSlop;
+       }
+
+       public static class ContactSolverDef {
+               public TimeStep step;
+               public Contact[] contacts;
+               public int count;
+               public Position[] positions;
+               public Velocity[] velocities;
+       }
 }
 
-
-
 class PositionSolverManifold {
 
-  public final Vec2 normal = new Vec2();
-  public final Vec2 point = new Vec2();
-  public float separation;
-
-  // djm pooling
-  private final Vec2 pointA = new Vec2();
-  private final Vec2 pointB = new Vec2();
-  private final Vec2 temp = new Vec2();
-  private final Vec2 planePoint = new Vec2();
-  private final Vec2 clipPoint = new Vec2();
-
-  public void initialize(ContactPositionConstraint pc, Transform xfA, Transform xfB, int index) {
-    assert (pc.pointCount > 0);
-
-    switch (pc.type) {
-      case CIRCLES: {
-        Transform.mulToOutUnsafe(xfA, pc.localPoint, pointA);
-        Transform.mulToOutUnsafe(xfB, pc.localPoints[0], pointB);
-        normal.set(pointB).subLocal(pointA);
-        normal.normalize();
-
-        point.set(pointA).addLocal(pointB).mulLocal(.5f);
-        temp.set(pointB).subLocal(pointA);
-        separation = Vec2.dot(temp, normal) - pc.radiusA - pc.radiusB;
-        break;
-      }
-
-      case FACE_A: {
-        Rot.mulToOutUnsafe(xfA.q, pc.localNormal, normal);
-        Transform.mulToOutUnsafe(xfA, pc.localPoint, planePoint);
-
-        Transform.mulToOutUnsafe(xfB, pc.localPoints[index], clipPoint);
-        temp.set(clipPoint).subLocal(planePoint);
-        separation = Vec2.dot(temp, normal) - pc.radiusA - pc.radiusB;
-        point.set(clipPoint);
-        break;
-      }
-
-      case FACE_B: {
-        Rot.mulToOutUnsafe(xfB.q, pc.localNormal, normal);
-        Transform.mulToOutUnsafe(xfB, pc.localPoint, planePoint);
-
-        Transform.mulToOutUnsafe(xfA, pc.localPoints[index], clipPoint);
-        temp.set(clipPoint).subLocal(planePoint);
-        separation = Vec2.dot(temp, normal) - pc.radiusA - pc.radiusB;
-        point.set(clipPoint);
-
-        // Ensure normal points from A to B
-        normal.negateLocal();
-      }
-        break;
-    }
-  }
+       public final Vec2 normal = new Vec2();
+       public final Vec2 point = new Vec2();
+       public float separation;
+
+       // djm pooling
+       private final Vec2 pointA = new Vec2();
+       private final Vec2 pointB = new Vec2();
+       private final Vec2 temp = new Vec2();
+       private final Vec2 planePoint = new Vec2();
+       private final Vec2 clipPoint = new Vec2();
+
+       public void initialize (ContactPositionConstraint pc, Transform xfA, Transform xfB, int index) {
+               assert (pc.pointCount > 0);
+
+               switch (pc.type) {
+               case CIRCLES: {
+                       Transform.mulToOutUnsafe(xfA, pc.localPoint, pointA);
+                       Transform.mulToOutUnsafe(xfB, pc.localPoints[0], pointB);
+                       normal.set(pointB).subLocal(pointA);
+                       normal.normalize();
+
+                       point.set(pointA).addLocal(pointB).mulLocal(.5f);
+                       temp.set(pointB).subLocal(pointA);
+                       separation = Vec2.dot(temp, normal) - pc.radiusA - pc.radiusB;
+                       break;
+               }
+
+               case FACE_A: {
+                       Rot.mulToOutUnsafe(xfA.q, pc.localNormal, normal);
+                       Transform.mulToOutUnsafe(xfA, pc.localPoint, planePoint);
+
+                       Transform.mulToOutUnsafe(xfB, pc.localPoints[index], clipPoint);
+                       temp.set(clipPoint).subLocal(planePoint);
+                       separation = Vec2.dot(temp, normal) - pc.radiusA - pc.radiusB;
+                       point.set(clipPoint);
+                       break;
+               }
+
+               case FACE_B: {
+                       Rot.mulToOutUnsafe(xfB.q, pc.localNormal, normal);
+                       Transform.mulToOutUnsafe(xfB, pc.localPoint, planePoint);
+
+                       Transform.mulToOutUnsafe(xfA, pc.localPoints[index], clipPoint);
+                       temp.set(clipPoint).subLocal(planePoint);
+                       separation = Vec2.dot(temp, normal) - pc.radiusA - pc.radiusB;
+                       point.set(clipPoint);
+
+                       // Ensure normal points from A to B
+                       normal.negateLocal();
+               }
+                       break;
+               }
+       }
 }
index 708c470..6205282 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.common.Mat22;\r
@@ -28,33 +29,33 @@ import org.jbox2d.common.Settings;
 import org.jbox2d.common.Vec2;\r
 \r
 public class ContactVelocityConstraint {\r
-  public VelocityConstraintPoint[] points = new VelocityConstraintPoint[Settings.maxManifoldPoints];\r
-  public final Vec2 normal = new Vec2();\r
-  public final Mat22 normalMass = new Mat22();\r
-  public final Mat22 K = new Mat22();\r
-  public int indexA;\r
-  public int indexB;\r
-  public float invMassA, invMassB;\r
-  public float invIA, invIB;\r
-  public float friction;\r
-  public float restitution;\r
-  public float tangentSpeed;\r
-  public int pointCount;\r
-  public int contactIndex;\r
+       public VelocityConstraintPoint[] points = new VelocityConstraintPoint[Settings.maxManifoldPoints];\r
+       public final Vec2 normal = new Vec2();\r
+       public final Mat22 normalMass = new Mat22();\r
+       public final Mat22 K = new Mat22();\r
+       public int indexA;\r
+       public int indexB;\r
+       public float invMassA, invMassB;\r
+       public float invIA, invIB;\r
+       public float friction;\r
+       public float restitution;\r
+       public float tangentSpeed;\r
+       public int pointCount;\r
+       public int contactIndex;\r
 \r
-  public ContactVelocityConstraint() {\r
-    for (int i = 0; i < points.length; i++) {\r
-      points[i] = new VelocityConstraintPoint();\r
-    }\r
-  }\r
+       public ContactVelocityConstraint () {\r
+               for (int i = 0; i < points.length; i++) {\r
+                       points[i] = new VelocityConstraintPoint();\r
+               }\r
+       }\r
 \r
-  public static class VelocityConstraintPoint {\r
-    public final Vec2 rA = new Vec2();\r
-    public final Vec2 rB = new Vec2();\r
-    public float normalImpulse;\r
-    public float tangentImpulse;\r
-    public float normalMass;\r
-    public float tangentMass;\r
-    public float velocityBias;\r
-  }\r
+       public static class VelocityConstraintPoint {\r
+               public final Vec2 rA = new Vec2();\r
+               public final Vec2 rB = new Vec2();\r
+               public float normalImpulse;\r
+               public float tangentImpulse;\r
+               public float normalMass;\r
+               public float tangentMass;\r
+               public float velocityBias;\r
+       }\r
 }\r
index 4a2d840..35f774b 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.collision.Manifold;\r
@@ -33,20 +34,20 @@ import org.jbox2d.pooling.IWorldPool;
 \r
 public class EdgeAndCircleContact extends Contact {\r
 \r
-  public EdgeAndCircleContact(IWorldPool argPool) {\r
-    super(argPool);\r
-  }\r
+       public EdgeAndCircleContact (IWorldPool argPool) {\r
+               super(argPool);\r
+       }\r
 \r
-  @Override\r
-  public void init(Fixture fA, int indexA, Fixture fB, int indexB) {\r
-    super.init(fA, indexA, fB, indexB);\r
-    assert (m_fixtureA.getType() == ShapeType.EDGE);\r
-    assert (m_fixtureB.getType() == ShapeType.CIRCLE);\r
-  }\r
+       @Override\r
+       public void init (Fixture fA, int indexA, Fixture fB, int indexB) {\r
+               super.init(fA, indexA, fB, indexB);\r
+               assert (m_fixtureA.getType() == ShapeType.EDGE);\r
+               assert (m_fixtureB.getType() == ShapeType.CIRCLE);\r
+       }\r
 \r
-  @Override\r
-  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {\r
-    pool.getCollision().collideEdgeAndCircle(manifold, (EdgeShape) m_fixtureA.getShape(), xfA,\r
-        (CircleShape) m_fixtureB.getShape(), xfB);\r
-  }\r
+       @Override\r
+       public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {\r
+               pool.getCollision().collideEdgeAndCircle(manifold, (EdgeShape)m_fixtureA.getShape(), xfA,\r
+                       (CircleShape)m_fixtureB.getShape(), xfB);\r
+       }\r
 }\r
index ce1b2b7..76a304a 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.collision.Manifold;\r
@@ -33,20 +34,20 @@ import org.jbox2d.pooling.IWorldPool;
 \r
 public class EdgeAndPolygonContact extends Contact {\r
 \r
-  public EdgeAndPolygonContact(IWorldPool argPool) {\r
-    super(argPool);\r
-  }\r
+       public EdgeAndPolygonContact (IWorldPool argPool) {\r
+               super(argPool);\r
+       }\r
 \r
-  @Override\r
-  public void init(Fixture fA, int indexA, Fixture fB, int indexB) {\r
-    super.init(fA, indexA, fB, indexB);\r
-    assert (m_fixtureA.getType() == ShapeType.EDGE);\r
-    assert (m_fixtureB.getType() == ShapeType.POLYGON);\r
-  }\r
+       @Override\r
+       public void init (Fixture fA, int indexA, Fixture fB, int indexB) {\r
+               super.init(fA, indexA, fB, indexB);\r
+               assert (m_fixtureA.getType() == ShapeType.EDGE);\r
+               assert (m_fixtureB.getType() == ShapeType.POLYGON);\r
+       }\r
 \r
-  @Override\r
-  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {\r
-    pool.getCollision().collideEdgeAndPolygon(manifold, (EdgeShape) m_fixtureA.getShape(), xfA,\r
-        (PolygonShape) m_fixtureB.getShape(), xfB);\r
-  }\r
+       @Override\r
+       public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {\r
+               pool.getCollision().collideEdgeAndPolygon(manifold, (EdgeShape)m_fixtureA.getShape(), xfA,\r
+                       (PolygonShape)m_fixtureB.getShape(), xfB);\r
+       }\r
 }\r
index ca8f6a2..9bf2dd7 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.collision.Manifold;
@@ -33,19 +34,19 @@ import org.jbox2d.pooling.IWorldPool;
 
 public class PolygonAndCircleContact extends Contact {
 
-  public PolygonAndCircleContact(IWorldPool argPool) {
-    super(argPool);
-  }
+       public PolygonAndCircleContact (IWorldPool argPool) {
+               super(argPool);
+       }
 
-  public void init(Fixture fixtureA, Fixture fixtureB) {
-    super.init(fixtureA, 0, fixtureB, 0);
-    assert (m_fixtureA.getType() == ShapeType.POLYGON);
-    assert (m_fixtureB.getType() == ShapeType.CIRCLE);
-  }
+       public void init (Fixture fixtureA, Fixture fixtureB) {
+               super.init(fixtureA, 0, fixtureB, 0);
+               assert (m_fixtureA.getType() == ShapeType.POLYGON);
+               assert (m_fixtureB.getType() == ShapeType.CIRCLE);
+       }
 
-  @Override
-  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {
-    pool.getCollision().collidePolygonAndCircle(manifold, (PolygonShape) m_fixtureA.getShape(),
-        xfA, (CircleShape) m_fixtureB.getShape(), xfB);
-  }
+       @Override
+       public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {
+               pool.getCollision().collidePolygonAndCircle(manifold, (PolygonShape)m_fixtureA.getShape(), xfA,
+                       (CircleShape)m_fixtureB.getShape(), xfB);
+       }
 }
index d2675f3..16d4c1a 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.contacts;
 
 import org.jbox2d.collision.Manifold;
@@ -32,19 +33,19 @@ import org.jbox2d.pooling.IWorldPool;
 
 public class PolygonContact extends Contact {
 
-  public PolygonContact(IWorldPool argPool) {
-    super(argPool);
-  }
+       public PolygonContact (IWorldPool argPool) {
+               super(argPool);
+       }
 
-  public void init(Fixture fixtureA, Fixture fixtureB) {
-    super.init(fixtureA, 0, fixtureB, 0);
-    assert (m_fixtureA.getType() == ShapeType.POLYGON);
-    assert (m_fixtureB.getType() == ShapeType.POLYGON);
-  }
+       public void init (Fixture fixtureA, Fixture fixtureB) {
+               super.init(fixtureA, 0, fixtureB, 0);
+               assert (m_fixtureA.getType() == ShapeType.POLYGON);
+               assert (m_fixtureB.getType() == ShapeType.POLYGON);
+       }
 
-  @Override
-  public void evaluate(Manifold manifold, Transform xfA, Transform xfB) {
-    pool.getCollision().collidePolygons(manifold, (PolygonShape) m_fixtureA.getShape(), xfA,
-        (PolygonShape) m_fixtureB.getShape(), xfB);
-  }
+       @Override
+       public void evaluate (Manifold manifold, Transform xfA, Transform xfB) {
+               pool.getCollision().collidePolygons(manifold, (PolygonShape)m_fixtureA.getShape(), xfA,
+                       (PolygonShape)m_fixtureB.getShape(), xfB);
+       }
 }
index 0533703..3b03788 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.common.Vec2;\r
 \r
 public class Position {\r
-  public final Vec2 c = new Vec2();\r
-  public float a;\r
+       public final Vec2 c = new Vec2();\r
+       public float a;\r
 }\r
index dcc6ab6..ee1393a 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.dynamics.contacts;\r
 \r
 import org.jbox2d.common.Vec2;\r
 \r
 public class Velocity {\r
-  public final Vec2 v = new Vec2();\r
-  public float w;\r
+       public final Vec2 v = new Vec2();\r
+       public float w;\r
 }\r
index 76d9d08..5ab8d38 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.MathUtils;
@@ -34,229 +35,223 @@ import org.jbox2d.dynamics.World;
 // TODO(dmurph): clean this up a bit, add docs
 public class ConstantVolumeJoint extends Joint {
 
-  public final Body[] bodies;
-  float[] targetLengths;
-  public float targetVolume;
-  // float relaxationFactor;//1.0 is perfectly stiff (but doesn't work, unstable)
-
-  Vec2[] normals;
-
-  TimeStep m_step;
-  private float m_impulse = 0.0f;
-
-  private World world;
-
-  DistanceJoint[] distanceJoints;
-
-  public final float frequencyHz;
-  public final float dampingRatio;
-
-  public Body[] getBodies() {
-    return bodies;
-  }
-
-  public DistanceJoint[] getJoints() {
-    return distanceJoints;
-  }
-
-  public void inflate(float factor) {
-    targetVolume *= factor;
-  }
-
-  public ConstantVolumeJoint(World argWorld, ConstantVolumeJointDef def) {
-    super(argWorld.getPool(), def);
-    world = argWorld;
-    if (def.bodies.size() <= 2) {
-      throw new IllegalArgumentException(
-          "You cannot create a constant volume joint with less than three bodies.");
-    }
-    bodies = def.bodies.toArray(new Body[0]);
-
-    targetLengths = new float[bodies.length];
-    for (int i = 0; i < targetLengths.length; ++i) {
-      final int next = (i == targetLengths.length - 1) ? 0 : i + 1;
-      float dist = bodies[i].getWorldCenter().sub(bodies[next].getWorldCenter()).length();
-      targetLengths[i] = dist;
-    }
-    targetVolume = getArea();
-
-    if (def.joints != null && def.joints.size() != def.bodies.size()) {
-      throw new IllegalArgumentException(
-          "Incorrect joint definition.  Joints have to correspond to the bodies");
-    }
-    if (def.joints == null) {
-      final DistanceJointDef djd = new DistanceJointDef();
-      distanceJoints = new DistanceJoint[bodies.length];
-      for (int i = 0; i < targetLengths.length; ++i) {
-        final int next = (i == targetLengths.length - 1) ? 0 : i + 1;
-        djd.frequencyHz = def.frequencyHz;// 20.0f;
-        djd.dampingRatio = def.dampingRatio;// 50.0f;
-        djd.initialize(bodies[i], bodies[next], bodies[i].getWorldCenter(),
-            bodies[next].getWorldCenter());
-        distanceJoints[i] = (DistanceJoint) world.createJoint(djd);
-      }
-    } else {
-      distanceJoints = def.joints.toArray(new DistanceJoint[0]);
-    }
-
-    frequencyHz = def.frequencyHz;
-    dampingRatio = def.dampingRatio;
-
-    normals = new Vec2[bodies.length];
-    for (int i = 0; i < normals.length; ++i) {
-      normals[i] = new Vec2();
-    }
-
-    this.m_bodyA = bodies[0];
-    this.m_bodyB = bodies[1];
-    this.m_collideConnected = false;
-  }
-
-  @Override
-  public void destructor() {
-    for (int i = 0; i < distanceJoints.length; ++i) {
-      world.destroyJoint(distanceJoints[i]);
-    }
-  }
-
-  private float getArea() {
-    float area = 0.0f;
-    // i'm glad i changed these all to member access
-    area += bodies[bodies.length - 1].getWorldCenter().x * bodies[0].getWorldCenter().y
-        - bodies[0].getWorldCenter().x * bodies[bodies.length - 1].getWorldCenter().y;
-    for (int i = 0; i < bodies.length - 1; ++i) {
-      area += bodies[i].getWorldCenter().x * bodies[i + 1].getWorldCenter().y
-          - bodies[i + 1].getWorldCenter().x * bodies[i].getWorldCenter().y;
-    }
-    area *= .5f;
-    return area;
-  }
-
-  /**
-   * Apply the position correction to the particles.
-   * 
-   * @param step
-   */
-  public boolean constrainEdges(final TimeStep step) {
-    float perimeter = 0.0f;
-    for (int i = 0; i < bodies.length; ++i) {
-      final int next = (i == bodies.length - 1) ? 0 : i + 1;
-      float dx = bodies[next].getWorldCenter().x - bodies[i].getWorldCenter().x;
-      float dy = bodies[next].getWorldCenter().y - bodies[i].getWorldCenter().y;
-      float dist = MathUtils.sqrt(dx * dx + dy * dy);
-      if (dist < Settings.EPSILON) {
-        dist = 1.0f;
-      }
-      normals[i].x = dy / dist;
-      normals[i].y = -dx / dist;
-      perimeter += dist;
-    }
-
-    final Vec2 delta = pool.popVec2();
-
-    float deltaArea = targetVolume - getArea();
-    float toExtrude = 0.5f * deltaArea / perimeter; // *relaxationFactor
-    // float sumdeltax = 0.0f;
-    boolean done = true;
-    for (int i = 0; i < bodies.length; ++i) {
-      final int next = (i == bodies.length - 1) ? 0 : i + 1;
-      delta.set(toExtrude * (normals[i].x + normals[next].x), toExtrude
-          * (normals[i].y + normals[next].y));
-      // sumdeltax += dx;
-      float norm = delta.length();
-      if (norm > Settings.maxLinearCorrection) {
-        delta.mulLocal(Settings.maxLinearCorrection / norm);
-      }
-      if (norm > Settings.linearSlop) {
-        done = false;
-      }
-      bodies[next].m_sweep.c.x += delta.x;
-      bodies[next].m_sweep.c.y += delta.y;
-      bodies[next].synchronizeTransform();
-      // bodies[next].m_linearVelocity.x += delta.x * step.inv_dt;
-      // bodies[next].m_linearVelocity.y += delta.y * step.inv_dt;
-    }
-
-    pool.pushVec2(1);
-    // System.out.println(sumdeltax);
-    return done;
-  }
-
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-
-    final Vec2[] d = pool.getVec2Array(bodies.length);
-
-    for (int i = 0; i < bodies.length; ++i) {
-      final int prev = (i == 0) ? bodies.length - 1 : i - 1;
-      final int next = (i == bodies.length - 1) ? 0 : i + 1;
-      d[i].set(bodies[next].getWorldCenter());
-      d[i].subLocal(bodies[prev].getWorldCenter());
-    }
-
-    if (data.step.warmStarting) {
-      m_impulse *= data.step.dtRatio;
-      // float lambda = -2.0f * crossMassSum / dotMassSum;
-      // System.out.println(crossMassSum + " " +dotMassSum);
-      // lambda = MathUtils.clamp(lambda, -Settings.maxLinearCorrection,
-      // Settings.maxLinearCorrection);
-      // m_impulse = lambda;
-      for (int i = 0; i < bodies.length; ++i) {
-        bodies[i].m_linearVelocity.x += bodies[i].m_invMass * d[i].y * .5f * m_impulse;
-        bodies[i].m_linearVelocity.y += bodies[i].m_invMass * -d[i].x * .5f * m_impulse;
-      }
-    } else {
-      m_impulse = 0.0f;
-    }
-  }
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-    return constrainEdges(data.step);
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-    float crossMassSum = 0.0f;
-    float dotMassSum = 0.0f;
-
-    final Vec2 d[] = pool.getVec2Array(bodies.length);
-
-    for (int i = 0; i < bodies.length; ++i) {
-      final int prev = (i == 0) ? bodies.length - 1 : i - 1;
-      final int next = (i == bodies.length - 1) ? 0 : i + 1;
-      d[i].set(bodies[next].getWorldCenter());
-      d[i].subLocal(bodies[prev].getWorldCenter());
-      dotMassSum += (d[i].lengthSquared()) / bodies[i].getMass();
-      crossMassSum += Vec2.cross(bodies[i].getLinearVelocity(), d[i]);
-    }
-    float lambda = -2.0f * crossMassSum / dotMassSum;
-    // System.out.println(crossMassSum + " " +dotMassSum);
-    // lambda = MathUtils.clamp(lambda, -Settings.maxLinearCorrection,
-    // Settings.maxLinearCorrection);
-    m_impulse += lambda;
-    // System.out.println(m_impulse);
-    for (int i = 0; i < bodies.length; ++i) {
-      bodies[i].m_linearVelocity.x += bodies[i].m_invMass * d[i].y * .5f * lambda;
-      bodies[i].m_linearVelocity.y += bodies[i].m_invMass * -d[i].x * .5f * lambda;
-    }
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-  }
-
-  @Override
-  public void getReactionForce(float inv_dt, Vec2 argOut) {
-  }
-
-  @Override
-  public float getReactionTorque(float inv_dt) {
-    return 0;
-  }
+       public final Body[] bodies;
+       float[] targetLengths;
+       public float targetVolume;
+       // float relaxationFactor;//1.0 is perfectly stiff (but doesn't work, unstable)
+
+       Vec2[] normals;
+
+       TimeStep m_step;
+       private float m_impulse = 0.0f;
+
+       private World world;
+
+       DistanceJoint[] distanceJoints;
+
+       public final float frequencyHz;
+       public final float dampingRatio;
+
+       public Body[] getBodies () {
+               return bodies;
+       }
+
+       public DistanceJoint[] getJoints () {
+               return distanceJoints;
+       }
+
+       public void inflate (float factor) {
+               targetVolume *= factor;
+       }
+
+       public ConstantVolumeJoint (World argWorld, ConstantVolumeJointDef def) {
+               super(argWorld.getPool(), def);
+               world = argWorld;
+               if (def.bodies.size() <= 2) {
+                       throw new IllegalArgumentException("You cannot create a constant volume joint with less than three bodies.");
+               }
+               bodies = def.bodies.toArray(new Body[0]);
+
+               targetLengths = new float[bodies.length];
+               for (int i = 0; i < targetLengths.length; ++i) {
+                       final int next = (i == targetLengths.length - 1) ? 0 : i + 1;
+                       float dist = bodies[i].getWorldCenter().sub(bodies[next].getWorldCenter()).length();
+                       targetLengths[i] = dist;
+               }
+               targetVolume = getArea();
+
+               if (def.joints != null && def.joints.size() != def.bodies.size()) {
+                       throw new IllegalArgumentException("Incorrect joint definition.  Joints have to correspond to the bodies");
+               }
+               if (def.joints == null) {
+                       final DistanceJointDef djd = new DistanceJointDef();
+                       distanceJoints = new DistanceJoint[bodies.length];
+                       for (int i = 0; i < targetLengths.length; ++i) {
+                               final int next = (i == targetLengths.length - 1) ? 0 : i + 1;
+                               djd.frequencyHz = def.frequencyHz;// 20.0f;
+                               djd.dampingRatio = def.dampingRatio;// 50.0f;
+                               djd.initialize(bodies[i], bodies[next], bodies[i].getWorldCenter(), bodies[next].getWorldCenter());
+                               distanceJoints[i] = (DistanceJoint)world.createJoint(djd);
+                       }
+               } else {
+                       distanceJoints = def.joints.toArray(new DistanceJoint[0]);
+               }
+
+               frequencyHz = def.frequencyHz;
+               dampingRatio = def.dampingRatio;
+
+               normals = new Vec2[bodies.length];
+               for (int i = 0; i < normals.length; ++i) {
+                       normals[i] = new Vec2();
+               }
+
+               this.m_bodyA = bodies[0];
+               this.m_bodyB = bodies[1];
+               this.m_collideConnected = false;
+       }
+
+       @Override
+       public void destructor () {
+               for (int i = 0; i < distanceJoints.length; ++i) {
+                       world.destroyJoint(distanceJoints[i]);
+               }
+       }
+
+       private float getArea () {
+               float area = 0.0f;
+               // i'm glad i changed these all to member access
+               area += bodies[bodies.length - 1].getWorldCenter().x * bodies[0].getWorldCenter().y - bodies[0].getWorldCenter().x
+                       * bodies[bodies.length - 1].getWorldCenter().y;
+               for (int i = 0; i < bodies.length - 1; ++i) {
+                       area += bodies[i].getWorldCenter().x * bodies[i + 1].getWorldCenter().y - bodies[i + 1].getWorldCenter().x
+                               * bodies[i].getWorldCenter().y;
+               }
+               area *= .5f;
+               return area;
+       }
+
+       /** Apply the position correction to the particles.
+        * 
+        * @param step */
+       public boolean constrainEdges (final TimeStep step) {
+               float perimeter = 0.0f;
+               for (int i = 0; i < bodies.length; ++i) {
+                       final int next = (i == bodies.length - 1) ? 0 : i + 1;
+                       float dx = bodies[next].getWorldCenter().x - bodies[i].getWorldCenter().x;
+                       float dy = bodies[next].getWorldCenter().y - bodies[i].getWorldCenter().y;
+                       float dist = MathUtils.sqrt(dx * dx + dy * dy);
+                       if (dist < Settings.EPSILON) {
+                               dist = 1.0f;
+                       }
+                       normals[i].x = dy / dist;
+                       normals[i].y = -dx / dist;
+                       perimeter += dist;
+               }
+
+               final Vec2 delta = pool.popVec2();
+
+               float deltaArea = targetVolume - getArea();
+               float toExtrude = 0.5f * deltaArea / perimeter; // *relaxationFactor
+               // float sumdeltax = 0.0f;
+               boolean done = true;
+               for (int i = 0; i < bodies.length; ++i) {
+                       final int next = (i == bodies.length - 1) ? 0 : i + 1;
+                       delta.set(toExtrude * (normals[i].x + normals[next].x), toExtrude * (normals[i].y + normals[next].y));
+                       // sumdeltax += dx;
+                       float norm = delta.length();
+                       if (norm > Settings.maxLinearCorrection) {
+                               delta.mulLocal(Settings.maxLinearCorrection / norm);
+                       }
+                       if (norm > Settings.linearSlop) {
+                               done = false;
+                       }
+                       bodies[next].m_sweep.c.x += delta.x;
+                       bodies[next].m_sweep.c.y += delta.y;
+                       bodies[next].synchronizeTransform();
+                       // bodies[next].m_linearVelocity.x += delta.x * step.inv_dt;
+                       // bodies[next].m_linearVelocity.y += delta.y * step.inv_dt;
+               }
+
+               pool.pushVec2(1);
+               // System.out.println(sumdeltax);
+               return done;
+       }
+
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+
+               final Vec2[] d = pool.getVec2Array(bodies.length);
+
+               for (int i = 0; i < bodies.length; ++i) {
+                       final int prev = (i == 0) ? bodies.length - 1 : i - 1;
+                       final int next = (i == bodies.length - 1) ? 0 : i + 1;
+                       d[i].set(bodies[next].getWorldCenter());
+                       d[i].subLocal(bodies[prev].getWorldCenter());
+               }
+
+               if (data.step.warmStarting) {
+                       m_impulse *= data.step.dtRatio;
+                       // float lambda = -2.0f * crossMassSum / dotMassSum;
+                       // System.out.println(crossMassSum + " " +dotMassSum);
+                       // lambda = MathUtils.clamp(lambda, -Settings.maxLinearCorrection,
+                       // Settings.maxLinearCorrection);
+                       // m_impulse = lambda;
+                       for (int i = 0; i < bodies.length; ++i) {
+                               bodies[i].m_linearVelocity.x += bodies[i].m_invMass * d[i].y * .5f * m_impulse;
+                               bodies[i].m_linearVelocity.y += bodies[i].m_invMass * -d[i].x * .5f * m_impulse;
+                       }
+               } else {
+                       m_impulse = 0.0f;
+               }
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+               return constrainEdges(data.step);
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+               float crossMassSum = 0.0f;
+               float dotMassSum = 0.0f;
+
+               final Vec2 d[] = pool.getVec2Array(bodies.length);
+
+               for (int i = 0; i < bodies.length; ++i) {
+                       final int prev = (i == 0) ? bodies.length - 1 : i - 1;
+                       final int next = (i == bodies.length - 1) ? 0 : i + 1;
+                       d[i].set(bodies[next].getWorldCenter());
+                       d[i].subLocal(bodies[prev].getWorldCenter());
+                       dotMassSum += (d[i].lengthSquared()) / bodies[i].getMass();
+                       crossMassSum += Vec2.cross(bodies[i].getLinearVelocity(), d[i]);
+               }
+               float lambda = -2.0f * crossMassSum / dotMassSum;
+               // System.out.println(crossMassSum + " " +dotMassSum);
+               // lambda = MathUtils.clamp(lambda, -Settings.maxLinearCorrection,
+               // Settings.maxLinearCorrection);
+               m_impulse += lambda;
+               // System.out.println(m_impulse);
+               for (int i = 0; i < bodies.length; ++i) {
+                       bodies[i].m_linearVelocity.x += bodies[i].m_invMass * d[i].y * .5f * lambda;
+                       bodies[i].m_linearVelocity.y += bodies[i].m_invMass * -d[i].x * .5f * lambda;
+               }
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+       }
+
+       @Override
+       public void getReactionForce (float inv_dt, Vec2 argOut) {
+       }
+
+       @Override
+       public float getReactionTorque (float inv_dt) {
+               return 0;
+       }
 
 }
index ec3f87b..2155be9 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import java.util.ArrayList;
 
 import org.jbox2d.dynamics.Body;
 
-/**
- * Definition for a {@link ConstantVolumeJoint}, which connects a group a bodies together
- * so they maintain a constant volume within them.
- */
+/** Definition for a {@link ConstantVolumeJoint}, which connects a group a bodies together so they maintain a constant volume
+ * within them. */
 public class ConstantVolumeJointDef extends JointDef {
        public float frequencyHz;
        public float dampingRatio;
-       
+
        ArrayList<Body> bodies;
        ArrayList<DistanceJoint> joints;
-       
-       //public float relaxationFactor;//1.0 is perfectly stiff (but doesn't work, unstable)
 
-       public ConstantVolumeJointDef() {
+       // public float relaxationFactor;//1.0 is perfectly stiff (but doesn't work, unstable)
+
+       public ConstantVolumeJointDef () {
                type = JointType.CONSTANT_VOLUME;
                bodies = new ArrayList<Body>();
                joints = null;
-               //relaxationFactor = 0.9f;
+               // relaxationFactor = 0.9f;
                collideConnected = false;
                frequencyHz = 0.0f;
                dampingRatio = 0.0f;
        }
-       
-       /**
-        * Adds a body to the group
-        * @param argBody
-        */
-       public void addBody(Body argBody) {
-         bodies.add(argBody);
+
+       /** Adds a body to the group
+        * @param argBody */
+       public void addBody (Body argBody) {
+               bodies.add(argBody);
                if (bodies.size() == 1) {
                        bodyA = argBody;
                }
@@ -63,16 +60,13 @@ public class ConstantVolumeJointDef extends JointDef {
                        bodyB = argBody;
                }
        }
-       
-       /**
-        * Adds a body and the pre-made distance joint.  Should only
-        * be used for deserialization.
-        */
-       public void addBodyAndJoint(Body argBody, DistanceJoint argJoint){
-         addBody(argBody);
-         if(joints == null){
-           joints = new ArrayList<DistanceJoint>();
-         }
-         joints.add(argJoint);
+
+       /** Adds a body and the pre-made distance joint. Should only be used for deserialization. */
+       public void addBodyAndJoint (Body argBody, DistanceJoint argJoint) {
+               addBody(argBody);
+               if (joints == null) {
+                       joints = new ArrayList<DistanceJoint>();
+               }
+               joints.add(argJoint);
        }
 }
index 10ee72c..70326f3 100644 (file)
@@ -60,297 +60,287 @@ import org.jbox2d.pooling.IWorldPool;
 //K = J * invM * JT
 //= invMass1 + invI1 * cross(r1, u)^2 + invMass2 + invI2 * cross(r2, u)^2
 
-/**
- * A distance joint constrains two points on two bodies to remain at a fixed distance from each
- * other. You can view this as a massless, rigid rod.
- */
+/** A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a
+ * massless, rigid rod. */
 public class DistanceJoint extends Joint {
 
-  public float m_frequencyHz;
-  public float m_dampingRatio;
-  public float m_bias;
-
-  // Solver shared
-  public final Vec2 m_localAnchorA;
-  public final Vec2 m_localAnchorB;
-  public float m_gamma;
-  public float m_impulse;
-  public float m_length;
-
-  // Solver temp
-  public int m_indexA;
-  public int m_indexB;
-  public final Vec2 m_u = new Vec2();
-  public final Vec2 m_rA = new Vec2();
-  public final Vec2 m_rB = new Vec2();
-  public final Vec2 m_localCenterA = new Vec2();
-  public final Vec2 m_localCenterB = new Vec2();
-  public float m_invMassA;
-  public float m_invMassB;
-  public float m_invIA;
-  public float m_invIB;
-  public float m_mass;
-
-  public DistanceJoint(IWorldPool argWorld, final DistanceJointDef def) {
-    super(argWorld, def);
-    m_localAnchorA = def.localAnchorA.clone();
-    m_localAnchorB = def.localAnchorB.clone();
-    m_length = def.length;
-    m_impulse = 0.0f;
-    m_frequencyHz = def.frequencyHz;
-    m_dampingRatio = def.dampingRatio;
-    m_gamma = 0.0f;
-    m_bias = 0.0f;
-  }
-
-  public void setFrequency(float hz) {
-    m_frequencyHz = hz;
-  }
-
-  public float getFrequency() {
-    return m_frequencyHz;
-  }
-
-  public float getLength() {
-    return m_length;
-  }
-
-  public void setLength(float argLength) {
-    m_length = argLength;
-  }
-
-  public void setDampingRatio(float damp) {
-    m_dampingRatio = damp;
-  }
-
-  public float getDampingRatio() {
-    return m_dampingRatio;
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-    m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-    m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
-  }
-
-  public Vec2 getLocalAnchorA() {
-    return m_localAnchorA;
-  }
-
-  public Vec2 getLocalAnchorB() {
-    return m_localAnchorB;
-  }
-
-  /**
-   * Get the reaction force given the inverse time step. Unit is N.
-   */
-  @Override
-  public void getReactionForce(float inv_dt, Vec2 argOut) {
-    argOut.x = m_impulse * m_u.x * inv_dt;
-    argOut.y = m_impulse * m_u.y * inv_dt;
-  }
-
-  /**
-   * Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a
-   * distance joint.
-   */
-  @Override
-  public float getReactionTorque(float inv_dt) {
-    return 0.0f;
-  }
-
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-
-    m_indexA = m_bodyA.m_islandIndex;
-    m_indexB = m_bodyB.m_islandIndex;
-    m_localCenterA.set(m_bodyA.m_sweep.localCenter);
-    m_localCenterB.set(m_bodyB.m_sweep.localCenter);
-    m_invMassA = m_bodyA.m_invMass;
-    m_invMassB = m_bodyB.m_invMass;
-    m_invIA = m_bodyA.m_invI;
-    m_invIB = m_bodyB.m_invI;
-
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-
-    qA.set(aA);
-    qB.set(aB);
-
-    // use m_u as temporary variable
-    Rot.mulToOutUnsafe(qA, m_u.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
-    Rot.mulToOutUnsafe(qB, m_u.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
-    m_u.set(cB).addLocal(m_rB).subLocal(cA).subLocal(m_rA);
-
-    pool.pushRot(2);
-
-    // Handle singularity.
-    float length = m_u.length();
-    if (length > Settings.linearSlop) {
-      m_u.x *= 1.0f / length;
-      m_u.y *= 1.0f / length;
-    } else {
-      m_u.set(0.0f, 0.0f);
-    }
-
-
-    float crAu = Vec2.cross(m_rA, m_u);
-    float crBu = Vec2.cross(m_rB, m_u);
-    float invMass = m_invMassA + m_invIA * crAu * crAu + m_invMassB + m_invIB * crBu * crBu;
-
-    // Compute the effective mass matrix.
-    m_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;
-
-    if (m_frequencyHz > 0.0f) {
-      float C = length - m_length;
-
-      // Frequency
-      float omega = 2.0f * MathUtils.PI * m_frequencyHz;
-
-      // Damping coefficient
-      float d = 2.0f * m_mass * m_dampingRatio * omega;
-
-      // Spring stiffness
-      float k = m_mass * omega * omega;
-
-      // magic formulas
-      float h = data.step.dt;
-      m_gamma = h * (d + h * k);
-      m_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f;
-      m_bias = C * h * k * m_gamma;
-
-      invMass += m_gamma;
-      m_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;
-    } else {
-      m_gamma = 0.0f;
-      m_bias = 0.0f;
-    }
-    if (data.step.warmStarting) {
-
-      // Scale the impulse to support a variable time step.
-      m_impulse *= data.step.dtRatio;
-
-      Vec2 P = pool.popVec2();
-      P.set(m_u).mulLocal(m_impulse);
-
-      vA.x -= m_invMassA * P.x;
-      vA.y -= m_invMassA * P.y;
-      wA -= m_invIA * Vec2.cross(m_rA, P);
-
-      vB.x += m_invMassB * P.x;
-      vB.y += m_invMassB * P.y;
-      wB += m_invIB * Vec2.cross(m_rB, P);
-
-      pool.pushVec2(1);
-    } else {
-      m_impulse = 0.0f;
-    }
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    final Vec2 vpA = pool.popVec2();
-    final Vec2 vpB = pool.popVec2();
-
-    // Cdot = dot(u, v + cross(w, r))
-    Vec2.crossToOutUnsafe(wA, m_rA, vpA);
-    vpA.addLocal(vA);
-    Vec2.crossToOutUnsafe(wB, m_rB, vpB);
-    vpB.addLocal(vB);
-    float Cdot = Vec2.dot(m_u, vpB.subLocal(vpA));
-
-    float impulse = -m_mass * (Cdot + m_bias + m_gamma * m_impulse);
-    m_impulse += impulse;
-
-
-    float Px = impulse * m_u.x;
-    float Py = impulse * m_u.y;
-
-    vA.x -= m_invMassA * Px;
-    vA.y -= m_invMassA * Py;
-    wA -= m_invIA * (m_rA.x * Py - m_rA.y * Px);
-    vB.x += m_invMassB * Px;
-    vB.y += m_invMassB * Py;
-    wB += m_invIB * (m_rB.x * Py - m_rB.y * Px);
-
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(2);
-  }
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-    if (m_frequencyHz > 0.0f) {
-      return true;
-    }
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 rA = pool.popVec2();
-    final Vec2 rB = pool.popVec2();
-    final Vec2 u = pool.popVec2();
-
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-
-    qA.set(aA);
-    qB.set(aB);
-
-    Rot.mulToOutUnsafe(qA, u.set(m_localAnchorA).subLocal(m_localCenterA), rA);
-    Rot.mulToOutUnsafe(qB, u.set(m_localAnchorB).subLocal(m_localCenterB), rB);
-    u.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
-
-
-    float length = u.normalize();
-    float C = length - m_length;
-    C = MathUtils.clamp(C, -Settings.maxLinearCorrection, Settings.maxLinearCorrection);
-
-    float impulse = -m_mass * C;
-    float Px = impulse * u.x;
-    float Py = impulse * u.y;
-
-    cA.x -= m_invMassA * Px;
-    cA.y -= m_invMassA * Py;
-    aA -= m_invIA * (rA.x * Py - rA.y * Px);
-    cB.x += m_invMassB * Px;
-    cB.y += m_invMassB * Py;
-    aB += m_invIB * (rB.x * Py - rB.y * Px);
-
-    data.positions[m_indexA].c.set(cA);
-    data.positions[m_indexA].a = aA;
-    data.positions[m_indexB].c.set(cB);
-    data.positions[m_indexB].a = aB;
-
-    pool.pushVec2(3);
-    pool.pushRot(2);
-
-    return MathUtils.abs(C) < Settings.linearSlop;
-  }
+       public float m_frequencyHz;
+       public float m_dampingRatio;
+       public float m_bias;
+
+       // Solver shared
+       public final Vec2 m_localAnchorA;
+       public final Vec2 m_localAnchorB;
+       public float m_gamma;
+       public float m_impulse;
+       public float m_length;
+
+       // Solver temp
+       public int m_indexA;
+       public int m_indexB;
+       public final Vec2 m_u = new Vec2();
+       public final Vec2 m_rA = new Vec2();
+       public final Vec2 m_rB = new Vec2();
+       public final Vec2 m_localCenterA = new Vec2();
+       public final Vec2 m_localCenterB = new Vec2();
+       public float m_invMassA;
+       public float m_invMassB;
+       public float m_invIA;
+       public float m_invIB;
+       public float m_mass;
+
+       public DistanceJoint (IWorldPool argWorld, final DistanceJointDef def) {
+               super(argWorld, def);
+               m_localAnchorA = def.localAnchorA.clone();
+               m_localAnchorB = def.localAnchorB.clone();
+               m_length = def.length;
+               m_impulse = 0.0f;
+               m_frequencyHz = def.frequencyHz;
+               m_dampingRatio = def.dampingRatio;
+               m_gamma = 0.0f;
+               m_bias = 0.0f;
+       }
+
+       public void setFrequency (float hz) {
+               m_frequencyHz = hz;
+       }
+
+       public float getFrequency () {
+               return m_frequencyHz;
+       }
+
+       public float getLength () {
+               return m_length;
+       }
+
+       public void setLength (float argLength) {
+               m_length = argLength;
+       }
+
+       public void setDampingRatio (float damp) {
+               m_dampingRatio = damp;
+       }
+
+       public float getDampingRatio () {
+               return m_dampingRatio;
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+               m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+               m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
+       }
+
+       public Vec2 getLocalAnchorA () {
+               return m_localAnchorA;
+       }
+
+       public Vec2 getLocalAnchorB () {
+               return m_localAnchorB;
+       }
+
+       /** Get the reaction force given the inverse time step. Unit is N. */
+       @Override
+       public void getReactionForce (float inv_dt, Vec2 argOut) {
+               argOut.x = m_impulse * m_u.x * inv_dt;
+               argOut.y = m_impulse * m_u.y * inv_dt;
+       }
+
+       /** Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint. */
+       @Override
+       public float getReactionTorque (float inv_dt) {
+               return 0.0f;
+       }
+
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+
+               m_indexA = m_bodyA.m_islandIndex;
+               m_indexB = m_bodyB.m_islandIndex;
+               m_localCenterA.set(m_bodyA.m_sweep.localCenter);
+               m_localCenterB.set(m_bodyB.m_sweep.localCenter);
+               m_invMassA = m_bodyA.m_invMass;
+               m_invMassB = m_bodyB.m_invMass;
+               m_invIA = m_bodyA.m_invI;
+               m_invIB = m_bodyB.m_invI;
+
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+
+               qA.set(aA);
+               qB.set(aB);
+
+               // use m_u as temporary variable
+               Rot.mulToOutUnsafe(qA, m_u.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
+               Rot.mulToOutUnsafe(qB, m_u.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
+               m_u.set(cB).addLocal(m_rB).subLocal(cA).subLocal(m_rA);
+
+               pool.pushRot(2);
+
+               // Handle singularity.
+               float length = m_u.length();
+               if (length > Settings.linearSlop) {
+                       m_u.x *= 1.0f / length;
+                       m_u.y *= 1.0f / length;
+               } else {
+                       m_u.set(0.0f, 0.0f);
+               }
+
+               float crAu = Vec2.cross(m_rA, m_u);
+               float crBu = Vec2.cross(m_rB, m_u);
+               float invMass = m_invMassA + m_invIA * crAu * crAu + m_invMassB + m_invIB * crBu * crBu;
+
+               // Compute the effective mass matrix.
+               m_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;
+
+               if (m_frequencyHz > 0.0f) {
+                       float C = length - m_length;
+
+                       // Frequency
+                       float omega = 2.0f * MathUtils.PI * m_frequencyHz;
+
+                       // Damping coefficient
+                       float d = 2.0f * m_mass * m_dampingRatio * omega;
+
+                       // Spring stiffness
+                       float k = m_mass * omega * omega;
+
+                       // magic formulas
+                       float h = data.step.dt;
+                       m_gamma = h * (d + h * k);
+                       m_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f;
+                       m_bias = C * h * k * m_gamma;
+
+                       invMass += m_gamma;
+                       m_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f;
+               } else {
+                       m_gamma = 0.0f;
+                       m_bias = 0.0f;
+               }
+               if (data.step.warmStarting) {
+
+                       // Scale the impulse to support a variable time step.
+                       m_impulse *= data.step.dtRatio;
+
+                       Vec2 P = pool.popVec2();
+                       P.set(m_u).mulLocal(m_impulse);
+
+                       vA.x -= m_invMassA * P.x;
+                       vA.y -= m_invMassA * P.y;
+                       wA -= m_invIA * Vec2.cross(m_rA, P);
+
+                       vB.x += m_invMassB * P.x;
+                       vB.y += m_invMassB * P.y;
+                       wB += m_invIB * Vec2.cross(m_rB, P);
+
+                       pool.pushVec2(1);
+               } else {
+                       m_impulse = 0.0f;
+               }
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Vec2 vpA = pool.popVec2();
+               final Vec2 vpB = pool.popVec2();
+
+               // Cdot = dot(u, v + cross(w, r))
+               Vec2.crossToOutUnsafe(wA, m_rA, vpA);
+               vpA.addLocal(vA);
+               Vec2.crossToOutUnsafe(wB, m_rB, vpB);
+               vpB.addLocal(vB);
+               float Cdot = Vec2.dot(m_u, vpB.subLocal(vpA));
+
+               float impulse = -m_mass * (Cdot + m_bias + m_gamma * m_impulse);
+               m_impulse += impulse;
+
+               float Px = impulse * m_u.x;
+               float Py = impulse * m_u.y;
+
+               vA.x -= m_invMassA * Px;
+               vA.y -= m_invMassA * Py;
+               wA -= m_invIA * (m_rA.x * Py - m_rA.y * Px);
+               vB.x += m_invMassB * Px;
+               vB.y += m_invMassB * Py;
+               wB += m_invIB * (m_rB.x * Py - m_rB.y * Px);
+
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(2);
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+               if (m_frequencyHz > 0.0f) {
+                       return true;
+               }
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 rA = pool.popVec2();
+               final Vec2 rB = pool.popVec2();
+               final Vec2 u = pool.popVec2();
+
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+
+               qA.set(aA);
+               qB.set(aB);
+
+               Rot.mulToOutUnsafe(qA, u.set(m_localAnchorA).subLocal(m_localCenterA), rA);
+               Rot.mulToOutUnsafe(qB, u.set(m_localAnchorB).subLocal(m_localCenterB), rB);
+               u.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
+
+               float length = u.normalize();
+               float C = length - m_length;
+               C = MathUtils.clamp(C, -Settings.maxLinearCorrection, Settings.maxLinearCorrection);
+
+               float impulse = -m_mass * C;
+               float Px = impulse * u.x;
+               float Py = impulse * u.y;
+
+               cA.x -= m_invMassA * Px;
+               cA.y -= m_invMassA * Py;
+               aA -= m_invIA * (rA.x * Py - rA.y * Px);
+               cB.x += m_invMassB * Px;
+               cB.y += m_invMassB * Py;
+               aB += m_invIB * (rB.x * Py - rB.y * Px);
+
+               data.positions[m_indexA].c.set(cA);
+               data.positions[m_indexA].a = aA;
+               data.positions[m_indexB].c.set(cB);
+               data.positions[m_indexB].a = aB;
+
+               pool.pushVec2(3);
+               pool.pushRot(2);
+
+               return MathUtils.abs(C) < Settings.linearSlop;
+       }
 }
index 39b6818..500cfc9 100644 (file)
@@ -51,14 +51,10 @@ import org.jbox2d.dynamics.Body;
 
 //Updated to rev 56->130->142 of b2DistanceJoint.cpp/.h
 
-/**
- * Distance joint definition. This requires defining an
- * anchor point on both bodies and the non-zero length of the
- * distance joint. The definition uses local anchor points
- * so that the initial configuration can violate the constraint
- * slightly. This helps when saving and loading a game.
- * @warning Do not use a zero or short length.
- */
+/** Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint.
+ * The definition uses local anchor points so that the initial configuration can violate the constraint slightly. This helps when
+ * saving and loading a game.
+ * @warning Do not use a zero or short length. */
 public class DistanceJointDef extends JointDef {
        /** The local anchor point relative to body1's origin. */
        public final Vec2 localAnchorA;
@@ -69,17 +65,13 @@ public class DistanceJointDef extends JointDef {
        /** The equilibrium length between the anchor points. */
        public float length;
 
-       /**
-        * The mass-spring-damper frequency in Hertz.
-        */
+       /** The mass-spring-damper frequency in Hertz. */
        public float frequencyHz;
 
-       /**
-        * The damping ratio. 0 = no damping, 1 = critical damping.
-        */
+       /** The damping ratio. 0 = no damping, 1 = critical damping. */
        public float dampingRatio;
 
-       public DistanceJointDef() {
+       public DistanceJointDef () {
                type = JointType.DISTANCE;
                localAnchorA = new Vec2(0.0f, 0.0f);
                localAnchorB = new Vec2(0.0f, 0.0f);
@@ -88,15 +80,12 @@ public class DistanceJointDef extends JointDef {
                dampingRatio = 0.0f;
        }
 
-       /**
-        * Initialize the bodies, anchors, and length using the world
-        * anchors.
+       /** Initialize the bodies, anchors, and length using the world anchors.
         * @param b1 First body
         * @param b2 Second body
         * @param anchor1 World anchor on first body
-        * @param anchor2 World anchor on second body
-        */
-       public void initialize(final Body b1, final Body b2, final Vec2 anchor1, final Vec2 anchor2) {
+        * @param anchor2 World anchor on second body */
+       public void initialize (final Body b1, final Body b2, final Vec2 anchor1, final Vec2 anchor2) {
                bodyA = b1;
                bodyB = b2;
                localAnchorA.set(bodyA.getLocalPoint(anchor1));
index d1041f9..b669067 100644 (file)
@@ -24,6 +24,7 @@
 /**
  * Created at 7:27:32 AM Jan 20, 2011
  */
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Mat22;
@@ -33,266 +34,258 @@ import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.SolverData;
 import org.jbox2d.pooling.IWorldPool;
 
-/**
- * @author Daniel Murphy
- */
+/** @author Daniel Murphy */
 public class FrictionJoint extends Joint {
 
-  private final Vec2 m_localAnchorA;
-  private final Vec2 m_localAnchorB;
-
-  // Solver shared
-  private final Vec2 m_linearImpulse;
-  private float m_angularImpulse;
-  private float m_maxForce;
-  private float m_maxTorque;
-
-  // Solver temp
-  public int m_indexA;
-  public int m_indexB;
-  public final Vec2 m_rA = new Vec2();
-  public final Vec2 m_rB = new Vec2();
-  public final Vec2 m_localCenterA = new Vec2();
-  public final Vec2 m_localCenterB = new Vec2();
-  public float m_invMassA;
-  public float m_invMassB;
-  public float m_invIA;
-  public float m_invIB;
-  public final Mat22 m_linearMass = new Mat22();
-  public float m_angularMass;
-
-  /**
-   * @param argWorldPool
-   * @param def
-   */
-  public FrictionJoint(IWorldPool argWorldPool, FrictionJointDef def) {
-    super(argWorldPool, def);
-    m_localAnchorA = new Vec2(def.localAnchorA);
-    m_localAnchorB = new Vec2(def.localAnchorB);
-
-    m_linearImpulse = new Vec2();
-    m_angularImpulse = 0.0f;
-
-    m_maxForce = def.maxForce;
-    m_maxTorque = def.maxTorque;
-  }
-
-  public Vec2 getLocalAnchorA() {
-    return m_localAnchorA;
-  }
-
-  public Vec2 getLocalAnchorB() {
-    return m_localAnchorB;
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-    m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-    m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
-  }
-
-  @Override
-  public void getReactionForce(float inv_dt, Vec2 argOut) {
-    argOut.set(m_linearImpulse).mulLocal(inv_dt);
-  }
-
-  @Override
-  public float getReactionTorque(float inv_dt) {
-    return inv_dt * m_angularImpulse;
-  }
-
-  public void setMaxForce(float force) {
-    assert (force >= 0.0f);
-    m_maxForce = force;
-  }
-
-  public float getMaxForce() {
-    return m_maxForce;
-  }
-
-  public void setMaxTorque(float torque) {
-    assert (torque >= 0.0f);
-    m_maxTorque = torque;
-  }
-
-  public float getMaxTorque() {
-    return m_maxTorque;
-  }
-
-  /**
-   * @see org.jbox2d.dynamics.joints.Joint#initVelocityConstraints(org.jbox2d.dynamics.TimeStep)
-   */
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-    m_indexA = m_bodyA.m_islandIndex;
-    m_indexB = m_bodyB.m_islandIndex;
-    m_localCenterA.set(m_bodyA.m_sweep.localCenter);
-    m_localCenterB.set(m_bodyB.m_sweep.localCenter);
-    m_invMassA = m_bodyA.m_invMass;
-    m_invMassB = m_bodyB.m_invMass;
-    m_invIA = m_bodyA.m_invI;
-    m_invIB = m_bodyB.m_invI;
-
-    float aA = data.positions[m_indexA].a;
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-
-    float aB = data.positions[m_indexB].a;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-
-    final Vec2 temp = pool.popVec2();
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-
-    qA.set(aA);
-    qB.set(aB);
-
-    // Compute the effective mass matrix.
-    Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
-
-    // J = [-I -r1_skew I r2_skew]
-    // [ 0 -1 0 1]
-    // r_skew = [-ry; rx]
-
-    // Matlab
-    // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB]
-    // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB]
-    // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB]
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    final Mat22 K = pool.popMat22();
-    K.ex.x = mA + mB + iA * m_rA.y * m_rA.y + iB * m_rB.y * m_rB.y;
-    K.ex.y = -iA * m_rA.x * m_rA.y - iB * m_rB.x * m_rB.y;
-    K.ey.x = K.ex.y;
-    K.ey.y = mA + mB + iA * m_rA.x * m_rA.x + iB * m_rB.x * m_rB.x;
-
-    K.invertToOut(m_linearMass);
-
-    m_angularMass = iA + iB;
-    if (m_angularMass > 0.0f) {
-      m_angularMass = 1.0f / m_angularMass;
-    }
-
-    if (data.step.warmStarting) {
-      // Scale impulses to support a variable time step.
-      m_linearImpulse.mulLocal(data.step.dtRatio);
-      m_angularImpulse *= data.step.dtRatio;
-
-      final Vec2 P = pool.popVec2();
-      P.set(m_linearImpulse);
-
-      temp.set(P).mulLocal(mA);
-      vA.subLocal(temp);
-      wA -= iA * (Vec2.cross(m_rA, P) + m_angularImpulse);
-
-      temp.set(P).mulLocal(mB);
-      vB.addLocal(temp);
-      wB += iB * (Vec2.cross(m_rB, P) + m_angularImpulse);
-
-      pool.pushVec2(1);
-    } else {
-      m_linearImpulse.setZero();
-      m_angularImpulse = 0.0f;
-    }
-    data.velocities[m_indexA].v.set(vA);
-    if( data.velocities[m_indexA].w != wA) {
-      assert(data.velocities[m_indexA].w != wA);
-    }
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushRot(2);
-    pool.pushVec2(1);
-    pool.pushMat22(1);
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    float h = data.step.dt;
-
-    // Solve angular friction
-    {
-      float Cdot = wB - wA;
-      float impulse = -m_angularMass * Cdot;
-
-      float oldImpulse = m_angularImpulse;
-      float maxImpulse = h * m_maxTorque;
-      m_angularImpulse = MathUtils.clamp(m_angularImpulse + impulse, -maxImpulse, maxImpulse);
-      impulse = m_angularImpulse - oldImpulse;
-
-      wA -= iA * impulse;
-      wB += iB * impulse;
-    }
-
-    // Solve linear friction
-    {
-      final Vec2 Cdot = pool.popVec2();
-      final Vec2 temp = pool.popVec2();
-
-      Vec2.crossToOutUnsafe(wA, m_rA, temp);
-      Vec2.crossToOutUnsafe(wB, m_rB, Cdot);
-      Cdot.addLocal(vB).subLocal(vA).subLocal(temp);
-
-      final Vec2 impulse = pool.popVec2();
-      Mat22.mulToOutUnsafe(m_linearMass, Cdot, impulse);
-      impulse.negateLocal();
-
-
-      final Vec2 oldImpulse = pool.popVec2();
-      oldImpulse.set(m_linearImpulse);
-      m_linearImpulse.addLocal(impulse);
-
-      float maxImpulse = h * m_maxForce;
-
-      if (m_linearImpulse.lengthSquared() > maxImpulse * maxImpulse) {
-        m_linearImpulse.normalize();
-        m_linearImpulse.mulLocal(maxImpulse);
-      }
-
-      impulse.set(m_linearImpulse).subLocal(oldImpulse);
-
-      temp.set(impulse).mulLocal(mA);
-      vA.subLocal(temp);
-      wA -= iA * Vec2.cross(m_rA, impulse);
-
-      temp.set(impulse).mulLocal(mB);
-      vB.addLocal(temp);
-      wB += iB * Vec2.cross(m_rB, impulse);
-      
-    }
-
-    data.velocities[m_indexA].v.set(vA);
-    if( data.velocities[m_indexA].w != wA) {
-      assert(data.velocities[m_indexA].w != wA);
-    }
-    data.velocities[m_indexA].w = wA;
-   
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(4);
-  }
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-    return true;
-  }
+       private final Vec2 m_localAnchorA;
+       private final Vec2 m_localAnchorB;
+
+       // Solver shared
+       private final Vec2 m_linearImpulse;
+       private float m_angularImpulse;
+       private float m_maxForce;
+       private float m_maxTorque;
+
+       // Solver temp
+       public int m_indexA;
+       public int m_indexB;
+       public final Vec2 m_rA = new Vec2();
+       public final Vec2 m_rB = new Vec2();
+       public final Vec2 m_localCenterA = new Vec2();
+       public final Vec2 m_localCenterB = new Vec2();
+       public float m_invMassA;
+       public float m_invMassB;
+       public float m_invIA;
+       public float m_invIB;
+       public final Mat22 m_linearMass = new Mat22();
+       public float m_angularMass;
+
+       /** @param argWorldPool
+        * @param def */
+       public FrictionJoint (IWorldPool argWorldPool, FrictionJointDef def) {
+               super(argWorldPool, def);
+               m_localAnchorA = new Vec2(def.localAnchorA);
+               m_localAnchorB = new Vec2(def.localAnchorB);
+
+               m_linearImpulse = new Vec2();
+               m_angularImpulse = 0.0f;
+
+               m_maxForce = def.maxForce;
+               m_maxTorque = def.maxTorque;
+       }
+
+       public Vec2 getLocalAnchorA () {
+               return m_localAnchorA;
+       }
+
+       public Vec2 getLocalAnchorB () {
+               return m_localAnchorB;
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+               m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+               m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
+       }
+
+       @Override
+       public void getReactionForce (float inv_dt, Vec2 argOut) {
+               argOut.set(m_linearImpulse).mulLocal(inv_dt);
+       }
+
+       @Override
+       public float getReactionTorque (float inv_dt) {
+               return inv_dt * m_angularImpulse;
+       }
+
+       public void setMaxForce (float force) {
+               assert (force >= 0.0f);
+               m_maxForce = force;
+       }
+
+       public float getMaxForce () {
+               return m_maxForce;
+       }
+
+       public void setMaxTorque (float torque) {
+               assert (torque >= 0.0f);
+               m_maxTorque = torque;
+       }
+
+       public float getMaxTorque () {
+               return m_maxTorque;
+       }
+
+       /** @see org.jbox2d.dynamics.joints.Joint#initVelocityConstraints(org.jbox2d.dynamics.TimeStep) */
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+               m_indexA = m_bodyA.m_islandIndex;
+               m_indexB = m_bodyB.m_islandIndex;
+               m_localCenterA.set(m_bodyA.m_sweep.localCenter);
+               m_localCenterB.set(m_bodyB.m_sweep.localCenter);
+               m_invMassA = m_bodyA.m_invMass;
+               m_invMassB = m_bodyB.m_invMass;
+               m_invIA = m_bodyA.m_invI;
+               m_invIB = m_bodyB.m_invI;
+
+               float aA = data.positions[m_indexA].a;
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+
+               float aB = data.positions[m_indexB].a;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Vec2 temp = pool.popVec2();
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+
+               qA.set(aA);
+               qB.set(aB);
+
+               // Compute the effective mass matrix.
+               Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
+
+               // J = [-I -r1_skew I r2_skew]
+               // [ 0 -1 0 1]
+               // r_skew = [-ry; rx]
+
+               // Matlab
+               // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB]
+               // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB]
+               // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB]
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               final Mat22 K = pool.popMat22();
+               K.ex.x = mA + mB + iA * m_rA.y * m_rA.y + iB * m_rB.y * m_rB.y;
+               K.ex.y = -iA * m_rA.x * m_rA.y - iB * m_rB.x * m_rB.y;
+               K.ey.x = K.ex.y;
+               K.ey.y = mA + mB + iA * m_rA.x * m_rA.x + iB * m_rB.x * m_rB.x;
+
+               K.invertToOut(m_linearMass);
+
+               m_angularMass = iA + iB;
+               if (m_angularMass > 0.0f) {
+                       m_angularMass = 1.0f / m_angularMass;
+               }
+
+               if (data.step.warmStarting) {
+                       // Scale impulses to support a variable time step.
+                       m_linearImpulse.mulLocal(data.step.dtRatio);
+                       m_angularImpulse *= data.step.dtRatio;
+
+                       final Vec2 P = pool.popVec2();
+                       P.set(m_linearImpulse);
+
+                       temp.set(P).mulLocal(mA);
+                       vA.subLocal(temp);
+                       wA -= iA * (Vec2.cross(m_rA, P) + m_angularImpulse);
+
+                       temp.set(P).mulLocal(mB);
+                       vB.addLocal(temp);
+                       wB += iB * (Vec2.cross(m_rB, P) + m_angularImpulse);
+
+                       pool.pushVec2(1);
+               } else {
+                       m_linearImpulse.setZero();
+                       m_angularImpulse = 0.0f;
+               }
+               data.velocities[m_indexA].v.set(vA);
+               if (data.velocities[m_indexA].w != wA) {
+                       assert (data.velocities[m_indexA].w != wA);
+               }
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushRot(2);
+               pool.pushVec2(1);
+               pool.pushMat22(1);
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               float h = data.step.dt;
+
+               // Solve angular friction
+               {
+                       float Cdot = wB - wA;
+                       float impulse = -m_angularMass * Cdot;
+
+                       float oldImpulse = m_angularImpulse;
+                       float maxImpulse = h * m_maxTorque;
+                       m_angularImpulse = MathUtils.clamp(m_angularImpulse + impulse, -maxImpulse, maxImpulse);
+                       impulse = m_angularImpulse - oldImpulse;
+
+                       wA -= iA * impulse;
+                       wB += iB * impulse;
+               }
+
+               // Solve linear friction
+               {
+                       final Vec2 Cdot = pool.popVec2();
+                       final Vec2 temp = pool.popVec2();
+
+                       Vec2.crossToOutUnsafe(wA, m_rA, temp);
+                       Vec2.crossToOutUnsafe(wB, m_rB, Cdot);
+                       Cdot.addLocal(vB).subLocal(vA).subLocal(temp);
+
+                       final Vec2 impulse = pool.popVec2();
+                       Mat22.mulToOutUnsafe(m_linearMass, Cdot, impulse);
+                       impulse.negateLocal();
+
+                       final Vec2 oldImpulse = pool.popVec2();
+                       oldImpulse.set(m_linearImpulse);
+                       m_linearImpulse.addLocal(impulse);
+
+                       float maxImpulse = h * m_maxForce;
+
+                       if (m_linearImpulse.lengthSquared() > maxImpulse * maxImpulse) {
+                               m_linearImpulse.normalize();
+                               m_linearImpulse.mulLocal(maxImpulse);
+                       }
+
+                       impulse.set(m_linearImpulse).subLocal(oldImpulse);
+
+                       temp.set(impulse).mulLocal(mA);
+                       vA.subLocal(temp);
+                       wA -= iA * Vec2.cross(m_rA, impulse);
+
+                       temp.set(impulse).mulLocal(mB);
+                       vB.addLocal(temp);
+                       wB += iB * Vec2.cross(m_rB, impulse);
+
+               }
+
+               data.velocities[m_indexA].v.set(vA);
+               if (data.velocities[m_indexA].w != wA) {
+                       assert (data.velocities[m_indexA].w != wA);
+               }
+               data.velocities[m_indexA].w = wA;
+
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(4);
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+               return true;
+       }
 }
index 94bc23d..3abd818 100644 (file)
 /**
  * Created at 7:23:39 AM Jan 20, 2011
  */
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Body;
 
-/**
- * Friction joint definition.
- * @author Daniel Murphy
- */
+/** Friction joint definition.
+ * @author Daniel Murphy */
 public class FrictionJointDef extends JointDef {
 
-
-       /**
-        * The local anchor point relative to bodyA's origin.
-        */
+       /** The local anchor point relative to bodyA's origin. */
        public final Vec2 localAnchorA;
 
-       /**
-        * The local anchor point relative to bodyB's origin.
-        */
+       /** The local anchor point relative to bodyB's origin. */
        public final Vec2 localAnchorB;
 
-       /**
-        * The maximum friction force in N.
-        */
+       /** The maximum friction force in N. */
        public float maxForce;
 
-       /**
-        * The maximum friction torque in N-m.
-        */
+       /** The maximum friction torque in N-m. */
        public float maxTorque;
-       
-       public FrictionJointDef(){
+
+       public FrictionJointDef () {
                type = JointType.FRICTION;
                localAnchorA = new Vec2();
                localAnchorB = new Vec2();
                maxForce = 0f;
                maxTorque = 0f;
        }
-       /**
-        * Initialize the bodies, anchors, axis, and reference angle using the world
-        * anchor and world axis.
-        */
-       public void initialize(Body bA, Body bB, Vec2 anchor){
+
+       /** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */
+       public void initialize (Body bA, Body bB, Vec2 anchor) {
                bodyA = bA;
                bodyB = bB;
                bA.getLocalPointToOut(anchor, localAnchorA);
index fe6f90c..0ff8364 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Vec2;
@@ -30,22 +31,22 @@ public class Jacobian {
        public final Vec2 linearA = new Vec2();
        public float angularA;
        public float angularB;
-       
-//     public void setZero(){
-//             linearA.setZero();
-//             linearB.setZero();
-//             angularA = 0f;
-//             angularB = 0f;
-//     }
-//     
-//     public void set(Vec2 x1, float a1, Vec2 x2, float a2){
-//             linearA.set(x1);
-//             linearB.set(x2);
-//             angularA = a1;
-//             angularB = a2;
-//     }
-//     
-//     public float compute(Vec2 x1, float a1, Vec2 x2, float a2){
-//             return Vec2.dot(linearA, x1) + angularA * a1 + Vec2.dot(linearB, x2) + angularB * a2;
-//     }
+
+// public void setZero(){
+// linearA.setZero();
+// linearB.setZero();
+// angularA = 0f;
+// angularB = 0f;
+// }
+//
+// public void set(Vec2 x1, float a1, Vec2 x2, float a2){
+// linearA.set(x1);
+// linearB.set(x2);
+// angularA = a1;
+// angularB = a2;
+// }
+//
+// public float compute(Vec2 x1, float a1, Vec2 x2, float a2){
+// return Vec2.dot(linearA, x1) + angularA * a1 + Vec2.dot(linearB, x2) + angularB * a2;
+// }
 }
index 8dfaa28..f6f0b6e 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Body;
 import org.jbox2d.dynamics.SolverData;
-import org.jbox2d.dynamics.TimeStep;
 import org.jbox2d.dynamics.World;
 import org.jbox2d.pooling.IWorldPool;
 
 // updated to rev 100
-/**
- * The base joint class. Joints are used to raint two bodies together in
- * various fashions. Some joints also feature limits and motors.
+/** The base joint class. Joints are used to raint two bodies together in various fashions. Some joints also feature limits and
+ * motors.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public abstract class Joint {
-       
-       public static Joint create(World argWorld, JointDef def) {
-               //Joint joint = null;
-               switch(def.type){
-                       case MOUSE:
-                               return new MouseJoint(argWorld.getPool(), (MouseJointDef) def);
-                       case DISTANCE:
-                               return new DistanceJoint(argWorld.getPool(), (DistanceJointDef) def);
-                       case PRISMATIC:
-                               return new PrismaticJoint(argWorld.getPool(), (PrismaticJointDef) def);
-                       case REVOLUTE:
-                               return new RevoluteJoint(argWorld.getPool(), (RevoluteJointDef) def);
-                       case WELD:
-                               return new WeldJoint(argWorld.getPool(), (WeldJointDef) def);
-                       case FRICTION:
-                               return new FrictionJoint(argWorld.getPool(), (FrictionJointDef) def);
-//                     case WHEEL:
-//                             return new WheelJoint(argWorld.getPool(), (LineJointDef) def);
-//                     case GEAR:
-//                             return new GearJoint(argWorld.getPool(), (GearJointDef) def);
-                       case PULLEY:
-                               return new PulleyJoint(argWorld.getPool(), (PulleyJointDef) def);
-                       case CONSTANT_VOLUME:
-                               return new ConstantVolumeJoint(argWorld, (ConstantVolumeJointDef) def);
+
+       public static Joint create (World argWorld, JointDef def) {
+               // Joint joint = null;
+               switch (def.type) {
+               case MOUSE:
+                       return new MouseJoint(argWorld.getPool(), (MouseJointDef)def);
+               case DISTANCE:
+                       return new DistanceJoint(argWorld.getPool(), (DistanceJointDef)def);
+               case PRISMATIC:
+                       return new PrismaticJoint(argWorld.getPool(), (PrismaticJointDef)def);
+               case REVOLUTE:
+                       return new RevoluteJoint(argWorld.getPool(), (RevoluteJointDef)def);
+               case WELD:
+                       return new WeldJoint(argWorld.getPool(), (WeldJointDef)def);
+               case FRICTION:
+                       return new FrictionJoint(argWorld.getPool(), (FrictionJointDef)def);
+// case WHEEL:
+// return new WheelJoint(argWorld.getPool(), (LineJointDef) def);
+// case GEAR:
+// return new GearJoint(argWorld.getPool(), (GearJointDef) def);
+               case PULLEY:
+                       return new PulleyJoint(argWorld.getPool(), (PulleyJointDef)def);
+               case CONSTANT_VOLUME:
+                       return new ConstantVolumeJoint(argWorld, (ConstantVolumeJointDef)def);
                }
                return null;
        }
-       
-       public static void destroy(Joint joint) {
+
+       public static void destroy (Joint joint) {
                joint.destructor();
        }
-       
+
        public JointType m_type;
        public Joint m_prev;
        public Joint m_next;
@@ -78,22 +76,22 @@ public abstract class Joint {
        public Body m_bodyA;
        public Body m_bodyB;
        public int m_index;
-       
+
        public boolean m_islandFlag;
        public boolean m_collideConnected;
-       
+
        public Object m_userData;
-       
+
        protected IWorldPool pool;
-       
+
        // Cache here per time step to reduce cache misses.
-//     final Vec2 m_localCenterA, m_localCenterB;
-//     float m_invMassA, m_invIA;
-//     float m_invMassB, m_invIB;
-       
-       protected Joint(IWorldPool argWorldPool, JointDef def) {
+// final Vec2 m_localCenterA, m_localCenterB;
+// float m_invMassA, m_invIA;
+// float m_invMassB, m_invIB;
+
+       protected Joint (IWorldPool argWorldPool, JointDef def) {
                assert (def.bodyA != def.bodyB);
-               
+
                pool = argWorldPool;
                m_type = def.type;
                m_prev = null;
@@ -104,129 +102,104 @@ public abstract class Joint {
                m_islandFlag = false;
                m_userData = def.userData;
                m_index = 0;
-               
+
                m_edgeA = new JointEdge();
                m_edgeA.joint = null;
                m_edgeA.other = null;
                m_edgeA.prev = null;
                m_edgeA.next = null;
-               
+
                m_edgeB = new JointEdge();
                m_edgeB.joint = null;
                m_edgeB.other = null;
                m_edgeB.prev = null;
                m_edgeB.next = null;
-               
-//             m_localCenterA = new Vec2();
-//             m_localCenterB = new Vec2();
+
+// m_localCenterA = new Vec2();
+// m_localCenterB = new Vec2();
        }
-       
-       /**
-        * get the type of the concrete joint.
+
+       /** get the type of the concrete joint.
         * 
-        * @return
-        */
-       public JointType getType() {
+        * @return */
+       public JointType getType () {
                return m_type;
        }
-       
-       /**
-        * get the first body attached to this joint.
-        */
-       public Body getBodyA() {
+
+       /** get the first body attached to this joint. */
+       public Body getBodyA () {
                return m_bodyA;
        }
-       
-       /**
-        * get the second body attached to this joint.
+
+       /** get the second body attached to this joint.
         * 
-        * @return
-        */
-       public Body getBodyB() {
+        * @return */
+       public Body getBodyB () {
                return m_bodyB;
        }
-       
-       /**
-        * get the anchor point on bodyA in world coordinates.
+
+       /** get the anchor point on bodyA in world coordinates.
         * 
-        * @return
-        */
-       public abstract void getAnchorA(Vec2 argOut);
-       
-       /**
-        * get the anchor point on bodyB in world coordinates.
+        * @return */
+       public abstract void getAnchorA (Vec2 argOut);
+
+       /** get the anchor point on bodyB in world coordinates.
         * 
-        * @return
-        */
-       public abstract void getAnchorB(Vec2 argOut);
-       
-       /**
-        * get the reaction force on body2 at the joint anchor in Newtons.
+        * @return */
+       public abstract void getAnchorB (Vec2 argOut);
+
+       /** get the reaction force on body2 at the joint anchor in Newtons.
         * 
         * @param inv_dt
-        * @return
-        */
-       public abstract void getReactionForce(float inv_dt, Vec2 argOut);
-       
-       /**
-        * get the reaction torque on body2 in N*m.
+        * @return */
+       public abstract void getReactionForce (float inv_dt, Vec2 argOut);
+
+       /** get the reaction torque on body2 in N*m.
         * 
         * @param inv_dt
-        * @return
-        */
-       public abstract float getReactionTorque(float inv_dt);
-       
-       /**
-        * get the next joint the world joint list.
-        */
-       public Joint getNext() {
+        * @return */
+       public abstract float getReactionTorque (float inv_dt);
+
+       /** get the next joint the world joint list. */
+       public Joint getNext () {
                return m_next;
        }
-       
-       /**
-        * get the user data pointer.
-        */
-       public Object getUserData() {
+
+       /** get the user data pointer. */
+       public Object getUserData () {
                return m_userData;
        }
-       
-       /**
-        * Set the user data pointer.
-        */
-       public void setUserData(Object data) {
+
+       /** Set the user data pointer. */
+       public void setUserData (Object data) {
                m_userData = data;
        }
-       
-       /// Get collide connected.
-    /// Note: modifying the collide connect flag won't work correctly because
-    /// the flag is only checked when fixture AABBs begin to overlap.
-    public boolean getCollideConnected() {
-      return m_collideConnected;
-    }
-       
-       /**
-        * Short-cut function to determine if either body is inactive.
+
+       // / Get collide connected.
+       // / Note: modifying the collide connect flag won't work correctly because
+       // / the flag is only checked when fixture AABBs begin to overlap.
+       public boolean getCollideConnected () {
+               return m_collideConnected;
+       }
+
+       /** Short-cut function to determine if either body is inactive.
         * 
-        * @return
-        */
-       public boolean IsActive() {
+        * @return */
+       public boolean IsActive () {
                return m_bodyA.isActive() && m_bodyB.isActive();
        }
-       
-       public abstract void initVelocityConstraints(SolverData data);
-       
-       public abstract void solveVelocityConstraints(SolverData data);
-       
-       /**
-        * This returns true if the position errors are within tolerance.
+
+       public abstract void initVelocityConstraints (SolverData data);
+
+       public abstract void solveVelocityConstraints (SolverData data);
+
+       /** This returns true if the position errors are within tolerance.
         * 
         * @param baumgarte
-        * @return
-        */
-       public abstract boolean solvePositionConstraints(SolverData data);
-       
-       /**
-        * Override to handle destruction of joint
-        */
-       public void destructor() { }
+        * @return */
+       public abstract boolean solvePositionConstraints (SolverData data);
+
+       /** Override to handle destruction of joint */
+       public void destructor () {
+       }
 }
index 99ea0a7..c44a654 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.dynamics.Body;
 
 //updated to rev 100
-/**
- * Joint definitions are used to construct joints.
- * @author Daniel Murphy
- */
+/** Joint definitions are used to construct joints.
+ * @author Daniel Murphy */
 public class JointDef {
 
-       public JointDef(){
+       public JointDef () {
                type = JointType.UNKNOWN;
                userData = null;
                bodyA = null;
                bodyB = null;
                collideConnected = false;
        }
-       /**
-        * The joint type is set automatically for concrete joint types.
-        */
+
+       /** The joint type is set automatically for concrete joint types. */
        public JointType type;
-       
-       /**
-        * Use this to attach application specific data to your joints.
-        */
+
+       /** Use this to attach application specific data to your joints. */
        public Object userData;
-       
-       /**
-        * The first attached body.
-        */
+
+       /** The first attached body. */
        public Body bodyA;
-       
-       /**
-        * The second attached body.
-        */
+
+       /** The second attached body. */
        public Body bodyB;
-       
-       /**
-        * Set this flag to true if the attached bodies should collide.
-        */
+
+       /** Set this flag to true if the attached bodies should collide. */
        public boolean collideConnected;
 }
index 2a57578..3c6e190 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.dynamics.Body;
 
 //updated to rev 100 - ec
-/**
- * A joint edge is used to connect bodies and joints together
- * in a joint graph where each body is a node and each joint
- * is an edge. A joint edge belongs to a doubly linked list
- * maintained in each attached body. Each joint has two joint
- * nodes, one for each attached body.
- * @author Daniel
- */
+/** A joint edge is used to connect bodies and joints together in a joint graph where each body is a node and each joint is an
+ * edge. A joint edge belongs to a doubly linked list maintained in each attached body. Each joint has two joint nodes, one for
+ * each attached body.
+ * @author Daniel */
 public class JointEdge {
-       
-       /**
-        * Provides quick access to the other body attached
-        */
+
+       /** Provides quick access to the other body attached */
        public Body other = null;
-       
-       /**
-        * the joint
-        */
+
+       /** the joint */
        public Joint joint = null;
-       
-       /**
-        * the previous joint edge in the body's joint list
-        */
+
+       /** the previous joint edge in the body's joint list */
        public JointEdge prev = null;
-       
-       /**
-        * the next joint edge in the body's joint list
-        */
+
+       /** the next joint edge in the body's joint list */
        public JointEdge next = null;
 }
index 410e323..eafab39 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 //updated to rev 100 - ec
 public enum JointType {
-       UNKNOWN, REVOLUTE, PRISMATIC, DISTANCE, PULLEY,
-       MOUSE, GEAR, WHEEL, WELD, FRICTION, ROPE, CONSTANT_VOLUME
+       UNKNOWN, REVOLUTE, PRISMATIC, DISTANCE, PULLEY, MOUSE, GEAR, WHEEL, WELD, FRICTION, ROPE, CONSTANT_VOLUME
 }
index eb6672a..a7ae48e 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 //updated to rev 100 - ec
index a06281e..5e9c004 100644 (file)
 /**
  * Created at 7:27:31 AM Jan 21, 2011
  */
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Body;
 
-/**
- * @author Daniel Murphy
- */
+/** @author Daniel Murphy */
 public class LineJointDef extends JointDef {
-       
-       /**
-        * The local anchor point relative to body1's origin.
-        */
+
+       /** The local anchor point relative to body1's origin. */
        public final Vec2 localAnchorA = new Vec2();
-       
-       /**
-        * The local anchor point relative to body2's origin.
-        */
+
+       /** The local anchor point relative to body2's origin. */
        public final Vec2 localAnchorB = new Vec2();
-       
-       /**
-        * The local translation axis in body1.
-        */
+
+       /** The local translation axis in body1. */
        public final Vec2 localAxisA = new Vec2();
-       
-       /**
-        * Enable/disable the joint limit.
-        */
+
+       /** Enable/disable the joint limit. */
        public boolean enableLimit;
-       
-       /**
-        * The lower translation limit, usually in meters.
-        */
+
+       /** The lower translation limit, usually in meters. */
        public float lowerTranslation;
-       
-       /**
-        * The upper translation limit, usually in meters.
-        */
+
+       /** The upper translation limit, usually in meters. */
        public float upperTranslation;
-       
-       /**
-        * Enable/disable the joint motor.
-        */
+
+       /** Enable/disable the joint motor. */
        public boolean enableMotor;
-       
-       /**
-        * The maximum motor torque, usually in N-m.
-        */
+
+       /** The maximum motor torque, usually in N-m. */
        public float maxMotorForce;
-       
-       /**
-        * The desired motor speed in radians per second.
-        */
+
+       /** The desired motor speed in radians per second. */
        public float motorSpeed;
-       
-       public LineJointDef() {
+
+       public LineJointDef () {
                type = JointType.WHEEL;
                localAxisA.set(1, 0);
                enableLimit = false;
@@ -89,8 +70,8 @@ public class LineJointDef extends JointDef {
                maxMotorForce = 0f;
                motorSpeed = 0f;
        }
-       
-       public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis) {
+
+       public void initialize (Body b1, Body b2, Vec2 anchor, Vec2 axis) {
                bodyA = b1;
                bodyB = b2;
                b1.getLocalPointToOut(anchor, localAnchorA);
index eba8249..4a89c9b 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Mat22;
@@ -32,234 +33,229 @@ import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.SolverData;
 import org.jbox2d.pooling.IWorldPool;
 
-/**
- * A mouse joint is used to make a point on a body track a specified world point. This a soft
- * constraint with a maximum force. This allows the constraint to stretch and without applying huge
- * forces. NOTE: this joint is not documented in the manual because it was developed to be used in
- * the testbed. If you want to learn how to use the mouse joint, look at the testbed.
+/** A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force.
+ * This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual
+ * because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.
  * 
- * @author Daniel
- */
+ * @author Daniel */
 public class MouseJoint extends Joint {
 
-  private final Vec2 m_localAnchorB = new Vec2();
-  private final Vec2 m_targetA = new Vec2();
-  private float m_frequencyHz;
-  private float m_dampingRatio;
-  private float m_beta;
-
-  // Solver shared
-  private final Vec2 m_impulse = new Vec2();
-  private float m_maxForce;
-  private float m_gamma;
-
-  // Solver temp
-  public int m_indexA;
-  public int m_indexB;
-  public final Vec2 m_rB = new Vec2();
-  public final Vec2 m_localCenterB = new Vec2();
-  public float m_invMassB;
-  public float m_invIB;
-  private final Mat22 m_mass = new Mat22();
-  private final Vec2 m_C = new Vec2();
-
-
-  protected MouseJoint(IWorldPool argWorld, MouseJointDef def) {
-    super(argWorld, def);
-    assert (def.target.isValid());
-    assert (def.maxForce >= 0);
-    assert (def.frequencyHz >= 0);
-    assert (def.dampingRatio >= 0);
-
-    m_targetA.set(def.target);
-    Transform.mulTransToOutUnsafe(m_bodyB.getTransform(), m_targetA, m_localAnchorB);
-
-    m_maxForce = def.maxForce;
-    m_impulse.setZero();
-
-    m_frequencyHz = def.frequencyHz;
-    m_dampingRatio = def.dampingRatio;
-
-    m_beta = 0;
-    m_gamma = 0;
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-    argOut.set(m_targetA);
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-    m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
-  }
-
-  @Override
-  public void getReactionForce(float invDt, Vec2 argOut) {
-    argOut.set(m_impulse).mulLocal(invDt);
-  }
-
-  @Override
-  public float getReactionTorque(float invDt) {
-    return invDt * 0.0f;
-  }
-
-
-  public void setTarget(Vec2 target) {
-    if (m_bodyB.isAwake() == false) {
-      m_bodyB.setAwake(true);
-    }
-    m_targetA.set(target);
-  }
-
-  public Vec2 getTarget() {
-    return m_targetA;
-  }
-
-  // / set/get the maximum force in Newtons.
-  public void setMaxForce(float force) {
-    m_maxForce = force;
-  }
-
-  public float getMaxForce() {
-    return m_maxForce;
-  }
-
-  // / set/get the frequency in Hertz.
-  public void setFrequency(float hz) {
-    m_frequencyHz = hz;
-  }
-
-  public float getFrequency() {
-    return m_frequencyHz;
-  }
-
-  // / set/get the damping ratio (dimensionless).
-  public void setDampingRatio(float ratio) {
-    m_dampingRatio = ratio;
-  }
-
-  public float getDampingRatio() {
-    return m_dampingRatio;
-  }
-
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-    m_indexA = m_bodyA.m_islandIndex;
-    m_indexB = m_bodyB.m_islandIndex;
-    m_localCenterB.set(m_bodyB.m_sweep.localCenter);
-    m_invMassB = m_bodyB.m_invMass;
-    m_invIB = m_bodyB.m_invI;
-
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    final Rot qB = pool.popRot();
-
-    qB.set(aB);
-
-    float mass = m_bodyB.getMass();
-
-    // Frequency
-    float omega = 2.0f * MathUtils.PI * m_frequencyHz;
-
-    // Damping coefficient
-    float d = 2.0f * mass * m_dampingRatio * omega;
-
-    // Spring stiffness
-    float k = mass * (omega * omega);
-
-    // magic formulas
-    // gamma has units of inverse mass.
-    // beta has units of inverse time.
-    float h = data.step.dt;
-    assert (d + h * k > Settings.EPSILON);
-    m_gamma = h * (d + h * k);
-    if (m_gamma != 0.0f) {
-      m_gamma = 1.0f / m_gamma;
-    }
-    m_beta = h * k * m_gamma;
-
-    Vec2 temp = pool.popVec2();
-
-    // Compute the effective mass matrix.
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
-
-    // K = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)]
-    // = [1/m1+1/m2 0 ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y]
-    // [ 0 1/m1+1/m2] [-r1.x*r1.y r1.x*r1.x] [-r1.x*r1.y r1.x*r1.x]
-    final Mat22 K = pool.popMat22();
-    K.ex.x = m_invMassB + m_invIB * m_rB.y * m_rB.y + m_gamma;
-    K.ex.y = -m_invIB * m_rB.x * m_rB.y;
-    K.ey.x = K.ex.y;
-    K.ey.y = m_invMassB + m_invIB * m_rB.x * m_rB.x + m_gamma;
-
-    K.invertToOut(m_mass);
-
-    m_C.set(cB).addLocal(m_rB).subLocal(m_targetA);
-    m_C.mulLocal(m_beta);
-
-    // Cheat with some damping
-    wB *= 0.98f;
-
-    if (data.step.warmStarting) {
-      m_impulse.mulLocal(data.step.dtRatio);
-      vB.x += m_invMassB * m_impulse.x;
-      vB.y += m_invMassB * m_impulse.y;
-      wB += m_invIB * Vec2.cross(m_rB, m_impulse);
-    } else {
-      m_impulse.setZero();
-    }
-
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(1);
-    pool.pushMat22(1);
-    pool.pushRot(1);
-  }
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-    return true;
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    // Cdot = v + cross(w, r)
-    final Vec2 Cdot = pool.popVec2();
-    Vec2.crossToOutUnsafe(wB, m_rB, Cdot);
-    Cdot.addLocal(vB);
-
-    final Vec2 impulse = pool.popVec2();
-    final Vec2 temp = pool.popVec2();
-
-    temp.set(m_impulse).mulLocal(m_gamma).addLocal(m_C).addLocal(Cdot).negateLocal();
-    Mat22.mulToOutUnsafe(m_mass, temp, impulse);
-
-    Vec2 oldImpulse = temp;
-    oldImpulse.set(m_impulse);
-    m_impulse.addLocal(impulse);
-    float maxImpulse = data.step.dt * m_maxForce;
-    if (m_impulse.lengthSquared() > maxImpulse * maxImpulse) {
-      m_impulse.mulLocal(maxImpulse / m_impulse.length());
-    }
-    impulse.set(m_impulse).subLocal(oldImpulse);
-
-    vB.x += m_invMassB * m_impulse.x;
-    vB.y += m_invMassB * m_impulse.y;
-    wB += m_invIB * Vec2.cross(m_rB, impulse);
-
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-    
-    pool.pushVec2(3);
-  }
+       private final Vec2 m_localAnchorB = new Vec2();
+       private final Vec2 m_targetA = new Vec2();
+       private float m_frequencyHz;
+       private float m_dampingRatio;
+       private float m_beta;
+
+       // Solver shared
+       private final Vec2 m_impulse = new Vec2();
+       private float m_maxForce;
+       private float m_gamma;
+
+       // Solver temp
+       public int m_indexA;
+       public int m_indexB;
+       public final Vec2 m_rB = new Vec2();
+       public final Vec2 m_localCenterB = new Vec2();
+       public float m_invMassB;
+       public float m_invIB;
+       private final Mat22 m_mass = new Mat22();
+       private final Vec2 m_C = new Vec2();
+
+       protected MouseJoint (IWorldPool argWorld, MouseJointDef def) {
+               super(argWorld, def);
+               assert (def.target.isValid());
+               assert (def.maxForce >= 0);
+               assert (def.frequencyHz >= 0);
+               assert (def.dampingRatio >= 0);
+
+               m_targetA.set(def.target);
+               Transform.mulTransToOutUnsafe(m_bodyB.getTransform(), m_targetA, m_localAnchorB);
+
+               m_maxForce = def.maxForce;
+               m_impulse.setZero();
+
+               m_frequencyHz = def.frequencyHz;
+               m_dampingRatio = def.dampingRatio;
+
+               m_beta = 0;
+               m_gamma = 0;
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+               argOut.set(m_targetA);
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+               m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
+       }
+
+       @Override
+       public void getReactionForce (float invDt, Vec2 argOut) {
+               argOut.set(m_impulse).mulLocal(invDt);
+       }
+
+       @Override
+       public float getReactionTorque (float invDt) {
+               return invDt * 0.0f;
+       }
+
+       public void setTarget (Vec2 target) {
+               if (m_bodyB.isAwake() == false) {
+                       m_bodyB.setAwake(true);
+               }
+               m_targetA.set(target);
+       }
+
+       public Vec2 getTarget () {
+               return m_targetA;
+       }
+
+       // / set/get the maximum force in Newtons.
+       public void setMaxForce (float force) {
+               m_maxForce = force;
+       }
+
+       public float getMaxForce () {
+               return m_maxForce;
+       }
+
+       // / set/get the frequency in Hertz.
+       public void setFrequency (float hz) {
+               m_frequencyHz = hz;
+       }
+
+       public float getFrequency () {
+               return m_frequencyHz;
+       }
+
+       // / set/get the damping ratio (dimensionless).
+       public void setDampingRatio (float ratio) {
+               m_dampingRatio = ratio;
+       }
+
+       public float getDampingRatio () {
+               return m_dampingRatio;
+       }
+
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+               m_indexA = m_bodyA.m_islandIndex;
+               m_indexB = m_bodyB.m_islandIndex;
+               m_localCenterB.set(m_bodyB.m_sweep.localCenter);
+               m_invMassB = m_bodyB.m_invMass;
+               m_invIB = m_bodyB.m_invI;
+
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Rot qB = pool.popRot();
+
+               qB.set(aB);
+
+               float mass = m_bodyB.getMass();
+
+               // Frequency
+               float omega = 2.0f * MathUtils.PI * m_frequencyHz;
+
+               // Damping coefficient
+               float d = 2.0f * mass * m_dampingRatio * omega;
+
+               // Spring stiffness
+               float k = mass * (omega * omega);
+
+               // magic formulas
+               // gamma has units of inverse mass.
+               // beta has units of inverse time.
+               float h = data.step.dt;
+               assert (d + h * k > Settings.EPSILON);
+               m_gamma = h * (d + h * k);
+               if (m_gamma != 0.0f) {
+                       m_gamma = 1.0f / m_gamma;
+               }
+               m_beta = h * k * m_gamma;
+
+               Vec2 temp = pool.popVec2();
+
+               // Compute the effective mass matrix.
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
+
+               // K = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)]
+               // = [1/m1+1/m2 0 ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y]
+               // [ 0 1/m1+1/m2] [-r1.x*r1.y r1.x*r1.x] [-r1.x*r1.y r1.x*r1.x]
+               final Mat22 K = pool.popMat22();
+               K.ex.x = m_invMassB + m_invIB * m_rB.y * m_rB.y + m_gamma;
+               K.ex.y = -m_invIB * m_rB.x * m_rB.y;
+               K.ey.x = K.ex.y;
+               K.ey.y = m_invMassB + m_invIB * m_rB.x * m_rB.x + m_gamma;
+
+               K.invertToOut(m_mass);
+
+               m_C.set(cB).addLocal(m_rB).subLocal(m_targetA);
+               m_C.mulLocal(m_beta);
+
+               // Cheat with some damping
+               wB *= 0.98f;
+
+               if (data.step.warmStarting) {
+                       m_impulse.mulLocal(data.step.dtRatio);
+                       vB.x += m_invMassB * m_impulse.x;
+                       vB.y += m_invMassB * m_impulse.y;
+                       wB += m_invIB * Vec2.cross(m_rB, m_impulse);
+               } else {
+                       m_impulse.setZero();
+               }
+
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(1);
+               pool.pushMat22(1);
+               pool.pushRot(1);
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+               return true;
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               // Cdot = v + cross(w, r)
+               final Vec2 Cdot = pool.popVec2();
+               Vec2.crossToOutUnsafe(wB, m_rB, Cdot);
+               Cdot.addLocal(vB);
+
+               final Vec2 impulse = pool.popVec2();
+               final Vec2 temp = pool.popVec2();
+
+               temp.set(m_impulse).mulLocal(m_gamma).addLocal(m_C).addLocal(Cdot).negateLocal();
+               Mat22.mulToOutUnsafe(m_mass, temp, impulse);
+
+               Vec2 oldImpulse = temp;
+               oldImpulse.set(m_impulse);
+               m_impulse.addLocal(impulse);
+               float maxImpulse = data.step.dt * m_maxForce;
+               if (m_impulse.lengthSquared() > maxImpulse * maxImpulse) {
+                       m_impulse.mulLocal(maxImpulse / m_impulse.length());
+               }
+               impulse.set(m_impulse).subLocal(oldImpulse);
+
+               vB.x += m_invMassB * m_impulse.x;
+               vB.y += m_invMassB * m_impulse.y;
+               wB += m_invIB * Vec2.cross(m_rB, impulse);
+
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(3);
+       }
 
 }
index d1c2673..b956bb5 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Vec2;
 
-/**
- * Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
+/** Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
  * 
- * @author Daniel
- */
+ * @author Daniel */
 public class MouseJointDef extends JointDef {
-  /**
-   * The initial world target point. This is assumed to coincide with the body anchor initially.
-   */
-  public final Vec2 target = new Vec2();
+       /** The initial world target point. This is assumed to coincide with the body anchor initially. */
+       public final Vec2 target = new Vec2();
 
-  /**
-   * The maximum constraint force that can be exerted to move the candidate body. Usually you will
-   * express as some multiple of the weight (multiplier * mass * gravity).
-   */
-  public float maxForce;
+       /** The maximum constraint force that can be exerted to move the candidate body. Usually you will express as some multiple of
+        * the weight (multiplier * mass * gravity). */
+       public float maxForce;
 
-  /**
-   * The response speed.
-   */
-  public float frequencyHz;
+       /** The response speed. */
+       public float frequencyHz;
 
-  /**
-   * The damping ratio. 0 = no damping, 1 = critical damping.
-   */
-  public float dampingRatio;
+       /** The damping ratio. 0 = no damping, 1 = critical damping. */
+       public float dampingRatio;
 
-  public MouseJointDef() {
-    type = JointType.MOUSE;
-    target.set(0, 0);
-    maxForce = 0;
-    frequencyHz = 5;
-    dampingRatio = .7f;
-  }
+       public MouseJointDef () {
+               type = JointType.MOUSE;
+               target.set(0, 0);
+               maxForce = 0;
+               frequencyHz = 5;
+               dampingRatio = .7f;
+       }
 }
index bb997c7..7abb853 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Mat22;
@@ -54,7 +55,6 @@ import org.jbox2d.pooling.IWorldPool;
 //s1 = cross(d + r1, a) = cross(p2 - x1, a)
 //s2 = cross(r2, a) = cross(p2 - x2, a)
 
-
 //Motor/Limit linear constraint
 //C = dot(ax1, d)
 //Cdot = = -dot(ax1, v1) - dot(cross(d + r1, ax1), w1) + dot(ax1, v2) + dot(cross(r2, ax1), v2)
@@ -100,713 +100,679 @@ import org.jbox2d.pooling.IWorldPool;
 //
 //Now compute impulse to be applied:
 //df = f2 - f1
-/**
- * A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in
- * bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion
- * and a joint motor to drive the motion or to model joint friction.
+/** A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in bodyA. Relative rotation is
+ * prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint
+ * friction.
  * 
- * @author Daniel
- */
+ * @author Daniel */
 public class PrismaticJoint extends Joint {
 
-  // Solver shared
-  public final Vec2 m_localAnchorA;
-  public final Vec2 m_localAnchorB;
-  public final Vec2 m_localXAxisA;
-  public final Vec2 m_localYAxisA;
-  public float m_referenceAngle;
-  public final Vec3 m_impulse;
-  public float m_motorImpulse;
-  public float m_lowerTranslation;
-  public float m_upperTranslation;
-  public float m_maxMotorForce;
-  public float m_motorSpeed;
-  public boolean m_enableLimit;
-  public boolean m_enableMotor;
-  public LimitState m_limitState;
-
-  // Solver temp
-  public int m_indexA;
-  public int m_indexB;
-  public final Vec2 m_rA = new Vec2();
-  public final Vec2 m_rB = new Vec2();
-  public final Vec2 m_localCenterA = new Vec2();
-  public final Vec2 m_localCenterB = new Vec2();
-  public float m_invMassA;
-  public float m_invMassB;
-  public float m_invIA;
-  public float m_invIB;
-  public final Vec2 m_axis, m_perp;
-  public float m_s1, m_s2;
-  public float m_a1, m_a2;
-  public final Mat33 m_K;
-  public float m_motorMass; // effective mass for motor/limit translational constraint.
-
-  public PrismaticJoint(IWorldPool argWorld, PrismaticJointDef def) {
-    super(argWorld, def);
-    m_localAnchorA = new Vec2(def.localAnchorA);
-    m_localAnchorB = new Vec2(def.localAnchorB);
-    m_localXAxisA = new Vec2(def.localAxisA);
-    m_localXAxisA.normalize();
-    m_localYAxisA = new Vec2();
-    Vec2.crossToOutUnsafe(1f, m_localXAxisA, m_localYAxisA);
-    m_referenceAngle = def.referenceAngle;
-
-    m_impulse = new Vec3();
-    m_motorMass = 0.0f;
-    m_motorImpulse = 0.0f;
-
-    m_lowerTranslation = def.lowerTranslation;
-    m_upperTranslation = def.upperTranslation;
-    m_maxMotorForce = def.maxMotorForce;
-    m_motorSpeed = def.motorSpeed;
-    m_enableLimit = def.enableLimit;
-    m_enableMotor = def.enableMotor;
-    m_limitState = LimitState.INACTIVE;
-
-    m_K = new Mat33();
-    m_axis = new Vec2();
-    m_perp = new Vec2();
-  }
-
-  public Vec2 getLocalAnchorA() {
-    return m_localAnchorA;
-  }
-
-  public Vec2 getLocalAnchorB() {
-    return m_localAnchorB;
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-    m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-    m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
-  }
-
-  @Override
-  public void getReactionForce(float inv_dt, Vec2 argOut) {
-    Vec2 temp = pool.popVec2();
-    temp.set(m_axis).mulLocal(m_motorImpulse + m_impulse.z);
-    argOut.set(m_perp).mulLocal(m_impulse.x).addLocal(temp).mulLocal(inv_dt);
-    pool.pushVec2(1);
-  }
-
-  @Override
-  public float getReactionTorque(float inv_dt) {
-    return inv_dt * m_impulse.y;
-  }
-
-  /**
-   * Get the current joint translation, usually in meters. public float getJointTranslation() { Vec2
-   * pA = pool.popVec2(); Vec2 pB = pool.popVec2(); Vec2 axis = pool.popVec2();
-   * 
-   * m_bodyA.getWorldPointToOut(m_localAnchorA, pA); m_bodyB.getWorldPointToOut(m_localAnchorB, pB);
-   * pB.subLocal(pA); m_bodyA.getWorldVectorToOut(m_localXAxisA, axis);
-   * 
-   * float translation = Vec2.dot(pB, axis);
-   * 
-   * pool.pushVec2(3); return translation; }
-   * 
-   * /** Get the current joint translation speed, usually in meters per second.
-   * 
-   * @return
-   */
-  public float getJointSpeed() {
-    Body bA = m_bodyA;
-    Body bB = m_bodyB;
-
-    Vec2[] pc = pool.popVec2(9);
-    Vec2 temp = pc[0];
-    Vec2 rA = pc[1];
-    Vec2 rB = pc[2];
-    Vec2 p1 = pc[3];
-    Vec2 p2 = pc[4];
-    Vec2 d = pc[5];
-    Vec2 axis = pc[6];
-    Vec2 temp2 = pc[7];
-    Vec2 temp3 = pc[8];
-
-    temp.set(m_localAnchorA).subLocal(bA.m_sweep.localCenter);
-    Rot.mulToOutUnsafe(bA.m_xf.q, temp, rA);
-
-    temp.set(m_localAnchorB).subLocal(bB.m_sweep.localCenter);
-    Rot.mulToOutUnsafe(bB.m_xf.q, temp, rB);
-
-    p1.set(bA.m_sweep.c).addLocal(rA);
-    p2.set(bB.m_sweep.c).addLocal(rB);
-
-    d.set(p2).subLocal(p1);
-    Rot.mulToOutUnsafe(bA.m_xf.q, m_localXAxisA, axis);
-
-    Vec2 vA = bA.m_linearVelocity;
-    Vec2 vB = bB.m_linearVelocity;
-    float wA = bA.m_angularVelocity;
-    float wB = bB.m_angularVelocity;
-
-
-    Vec2.crossToOutUnsafe(wA, axis, temp);
-    Vec2.crossToOutUnsafe(wB, rB, temp2);
-    Vec2.crossToOutUnsafe(wA, rA, temp3);
-
-    temp2.addLocal(vB).subLocal(vA).subLocal(temp3);
-    float speed = Vec2.dot(d, temp) + Vec2.dot(axis, temp2);
-
-    pool.pushVec2(9);
-
-    return speed;
-  }
-
-  /**
-   * Is the joint limit enabled?
-   * 
-   * @return
-   */
-  public boolean isLimitEnabled() {
-    return m_enableLimit;
-  }
-
-  /**
-   * Enable/disable the joint limit.
-   * 
-   * @param flag
-   */
-  public void enableLimit(boolean flag) {
-    if (flag != m_enableLimit) {
-      m_bodyA.setAwake(true);
-      m_bodyB.setAwake(true);
-      m_enableLimit = flag;
-      m_impulse.z = 0.0f;
-    }
-  }
-
-  /**
-   * Get the lower joint limit, usually in meters.
-   * 
-   * @return
-   */
-  public float getLowerLimit() {
-    return m_lowerTranslation;
-  }
-
-  /**
-   * Get the upper joint limit, usually in meters.
-   * 
-   * @return
-   */
-  public float getUpperLimit() {
-    return m_upperTranslation;
-  }
-
-  /**
-   * Set the joint limits, usually in meters.
-   * 
-   * @param lower
-   * @param upper
-   */
-  public void setLimits(float lower, float upper) {
-    assert (lower <= upper);
-    if (lower != m_lowerTranslation || upper != m_upperTranslation) {
-      m_bodyA.setAwake(true);
-      m_bodyB.setAwake(true);
-      m_lowerTranslation = lower;
-      m_upperTranslation = upper;
-      m_impulse.z = 0.0f;
-    }
-  }
-
-  /**
-   * Is the joint motor enabled?
-   * 
-   * @return
-   */
-  public boolean isMotorEnabled() {
-    return m_enableMotor;
-  }
-
-  /**
-   * Enable/disable the joint motor.
-   * 
-   * @param flag
-   */
-  public void enableMotor(boolean flag) {
-    m_bodyA.setAwake(true);
-    m_bodyB.setAwake(true);
-    m_enableMotor = flag;
-  }
-
-  /**
-   * Set the motor speed, usually in meters per second.
-   * 
-   * @param speed
-   */
-  public void setMotorSpeed(float speed) {
-    m_bodyA.setAwake(true);
-    m_bodyB.setAwake(true);
-    m_motorSpeed = speed;
-  }
-
-  /**
-   * Get the motor speed, usually in meters per second.
-   * 
-   * @return
-   */
-  public float getMotorSpeed() {
-    return m_motorSpeed;
-  }
-
-  /**
-   * Set the maximum motor force, usually in N.
-   * 
-   * @param force
-   */
-  public void setMaxMotorForce(float force) {
-    m_bodyA.setAwake(true);
-    m_bodyB.setAwake(true);
-    m_maxMotorForce = force;
-  }
-
-  /**
-   * Get the current motor force, usually in N.
-   * 
-   * @param inv_dt
-   * @return
-   */
-  public float getMotorForce(float inv_dt) {
-    return m_motorImpulse * inv_dt;
-  }
-
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-    m_indexA = m_bodyA.m_islandIndex;
-    m_indexB = m_bodyB.m_islandIndex;
-    m_localCenterA.set(m_bodyA.m_sweep.localCenter);
-    m_localCenterB.set(m_bodyB.m_sweep.localCenter);
-    m_invMassA = m_bodyA.m_invMass;
-    m_invMassB = m_bodyB.m_invMass;
-    m_invIA = m_bodyA.m_invI;
-    m_invIB = m_bodyB.m_invI;
-
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 d = pool.popVec2();
-    final Vec2 temp = pool.popVec2();
-    final Vec2 rA = pool.popVec2();
-    final Vec2 rB = pool.popVec2();
-
-    qA.set(aA);
-    qB.set(aB);
-
-    // Compute the effective masses.
-    Rot.mulToOutUnsafe(qA, d.set(m_localAnchorA).subLocal(m_localCenterA), rA);
-    Rot.mulToOutUnsafe(qB, d.set(m_localAnchorB).subLocal(m_localCenterB), rB);
-    d.set(cB).subLocal(cA).addLocal(rB).subLocal(rA);
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    // Compute motor Jacobian and effective mass.
-    {
-      Rot.mulToOutUnsafe(qA, m_localXAxisA, m_axis);
-      temp.set(d).addLocal(rA);
-      m_a1 = Vec2.cross(temp, m_axis);
-      m_a2 = Vec2.cross(rB, m_axis);
-
-      m_motorMass = mA + mB + iA * m_a1 * m_a1 + iB * m_a2 * m_a2;
-      if (m_motorMass > 0.0f) {
-        m_motorMass = 1.0f / m_motorMass;
-      }
-    }
-
-    // Prismatic constraint.
-    {
-      Rot.mulToOutUnsafe(qA, m_localYAxisA, m_perp);
-
-      temp.set(d).addLocal(rA);
-      m_s1 = Vec2.cross(temp, m_perp);
-      m_s2 = Vec2.cross(rB, m_perp);
-
-      float k11 = mA + mB + iA * m_s1 * m_s1 + iB * m_s2 * m_s2;
-      float k12 = iA * m_s1 + iB * m_s2;
-      float k13 = iA * m_s1 * m_a1 + iB * m_s2 * m_a2;
-      float k22 = iA + iB;
-      if (k22 == 0.0f) {
-        // For bodies with fixed rotation.
-        k22 = 1.0f;
-      }
-      float k23 = iA * m_a1 + iB * m_a2;
-      float k33 = mA + mB + iA * m_a1 * m_a1 + iB * m_a2 * m_a2;
-
-      m_K.ex.set(k11, k12, k13);
-      m_K.ey.set(k12, k22, k23);
-      m_K.ez.set(k13, k23, k33);
-    }
-
-    // Compute motor and limit terms.
-    if (m_enableLimit) {
-
-      float jointTranslation = Vec2.dot(m_axis, d);
-      if (MathUtils.abs(m_upperTranslation - m_lowerTranslation) < 2.0f * Settings.linearSlop) {
-        m_limitState = LimitState.EQUAL;
-      } else if (jointTranslation <= m_lowerTranslation) {
-        if (m_limitState != LimitState.AT_LOWER) {
-          m_limitState = LimitState.AT_LOWER;
-          m_impulse.z = 0.0f;
-        }
-      } else if (jointTranslation >= m_upperTranslation) {
-        if (m_limitState != LimitState.AT_UPPER) {
-          m_limitState = LimitState.AT_UPPER;
-          m_impulse.z = 0.0f;
-        }
-      } else {
-        m_limitState = LimitState.INACTIVE;
-        m_impulse.z = 0.0f;
-      }
-    } else {
-      m_limitState = LimitState.INACTIVE;
-      m_impulse.z = 0.0f;
-    }
-
-    if (m_enableMotor == false) {
-      m_motorImpulse = 0.0f;
-    }
-
-    if (data.step.warmStarting) {
-      // Account for variable time step.
-      m_impulse.mulLocal(data.step.dtRatio);
-      m_motorImpulse *= data.step.dtRatio;
-
-      final Vec2 P = pool.popVec2();
-      temp.set(m_axis).mulLocal(m_motorImpulse + m_impulse.z);
-      P.set(m_perp).mulLocal(m_impulse.x).addLocal(temp);
-
-      float LA = m_impulse.x * m_s1 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a1;
-      float LB = m_impulse.x * m_s2 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a2;
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * LA;
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * LB;
-
-      pool.pushVec2(1);
-    } else {
-      m_impulse.setZero();
-      m_motorImpulse = 0.0f;
-    }
-
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushRot(2);
-    pool.pushVec2(4);
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    final Vec2 temp = pool.popVec2();
-
-    // Solve linear motor constraint.
-    if (m_enableMotor && m_limitState != LimitState.EQUAL) {
-      temp.set(vB).subLocal(vA);
-      float Cdot = Vec2.dot(m_axis, temp) + m_a2 * wB - m_a1 * wA;
-      float impulse = m_motorMass * (m_motorSpeed - Cdot);
-      float oldImpulse = m_motorImpulse;
-      float maxImpulse = data.step.dt * m_maxMotorForce;
-      m_motorImpulse = MathUtils.clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);
-      impulse = m_motorImpulse - oldImpulse;
-
-      final Vec2 P = pool.popVec2();
-      P.set(m_axis).mulLocal(impulse);
-      float LA = impulse * m_a1;
-      float LB = impulse * m_a2;
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * LA;
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * LB;
-
-      pool.pushVec2(1);
-    }
-
-    final Vec2 Cdot1 = pool.popVec2();
-    temp.set(vB).subLocal(vA);
-    Cdot1.x = Vec2.dot(m_perp, temp) + m_s2 * wB - m_s1 * wA;
-    Cdot1.y = wB - wA;
-    // System.out.println(Cdot1);
-
-    if (m_enableLimit && m_limitState != LimitState.INACTIVE) {
-      // Solve prismatic and limit constraint in block form.
-      float Cdot2;
-      temp.set(vB).subLocal(vA);
-      Cdot2 = Vec2.dot(m_axis, temp) + m_a2 * wB - m_a1 * wA;
-
-      final Vec3 Cdot = pool.popVec3();
-      Cdot.set(Cdot1.x, Cdot1.y, Cdot2);
-
-      final Vec3 f1 = pool.popVec3();
-      final Vec3 df = pool.popVec3();
-
-      f1.set(m_impulse);
-      m_K.solve33ToOut(Cdot.negateLocal(), df);
-      // Cdot.negateLocal(); not used anymore
-      m_impulse.addLocal(df);
-
-      if (m_limitState == LimitState.AT_LOWER) {
-        m_impulse.z = MathUtils.max(m_impulse.z, 0.0f);
-      } else if (m_limitState == LimitState.AT_UPPER) {
-        m_impulse.z = MathUtils.min(m_impulse.z, 0.0f);
-      }
-
-      // f2(1:2) = invK(1:2,1:2) * (-Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3))) +
-      // f1(1:2)
-      final Vec2 b = pool.popVec2();
-      final Vec2 f2r = pool.popVec2();
-
-      temp.set(m_K.ez.x, m_K.ez.y).mulLocal(m_impulse.z - f1.z);
-      b.set(Cdot1).negateLocal().subLocal(temp);
-
-      temp.set(f1.x, f1.y);
-      m_K.solve22ToOut(b, f2r);
-      f2r.addLocal(temp);
-      m_impulse.x = f2r.x;
-      m_impulse.y = f2r.y;
-
-      df.set(m_impulse).subLocal(f1);
-
-      final Vec2 P = pool.popVec2();
-      temp.set(m_axis).mulLocal(df.z);
-      P.set(m_perp).mulLocal(df.x).addLocal(temp);
-
-      float LA = df.x * m_s1 + df.y + df.z * m_a1;
-      float LB = df.x * m_s2 + df.y + df.z * m_a2;
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * LA;
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * LB;
-
-      pool.pushVec2(3);
-      pool.pushVec3(3);
-    } else {
-      // Limit is inactive, just solve the prismatic constraint in block form.
-      final Vec2 df = pool.popVec2();
-      m_K.solve22ToOut(Cdot1.negateLocal(), df);
-      Cdot1.negateLocal();
-
-      m_impulse.x += df.x;
-      m_impulse.y += df.y;
-
-      final Vec2 P = pool.popVec2();
-      P.set(m_perp).mulLocal(df.x);
-      float LA = df.x * m_s1 + df.y;
-      float LB = df.x * m_s2 + df.y;
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * LA;
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * LB;
-
-      final Vec2 Cdot10 = pool.popVec2();
-      Cdot10.set(Cdot1);
-
-      Cdot1.x = Vec2.dot(m_perp, temp.set(vB).subLocal(vA)) + m_s2 * wB - m_s1 * wA;
-      Cdot1.y = wB - wA;
-
-      if (MathUtils.abs(Cdot1.x) > 0.01f || MathUtils.abs(Cdot1.y) > 0.01f) {
-        // djm note: what's happening here?
-        Mat33.mul22ToOutUnsafe(m_K, df, temp);
-        Cdot1.x += 0.0f;
-      }
-
-      pool.pushVec2(3);
-    }
-
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(2);
-  }
-
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 rA = pool.popVec2();
-    final Vec2 rB = pool.popVec2();
-    final Vec2 d = pool.popVec2();
-    final Vec2 axis = pool.popVec2();
-    final Vec2 perp = pool.popVec2();
-    final Vec2 temp = pool.popVec2();
-    final Vec2 C1 = pool.popVec2();
-
-    final Vec3 impulse = pool.popVec3();
-
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-
-    qA.set(aA);
-    qB.set(aB);
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    // Compute fresh Jacobians
-    Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), rA);
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), rB);
-    d.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
-
-    Rot.mulToOutUnsafe(qA, m_localXAxisA, axis);
-    float a1 = Vec2.cross(temp.set(d).addLocal(rA), axis);
-    float a2 = Vec2.cross(rB, axis);
-    Rot.mulToOutUnsafe(qA, m_localYAxisA, perp);
-
-    float s1 = Vec2.cross(temp.set(d).addLocal(rA), perp);
-    float s2 = Vec2.cross(rB, perp);
-
-    C1.x = Vec2.dot(perp, d);
-    C1.y = aB - aA - m_referenceAngle;
-
-    float linearError = MathUtils.abs(C1.x);
-    float angularError = MathUtils.abs(C1.y);
-
-    boolean active = false;
-    float C2 = 0.0f;
-    if (m_enableLimit) {
-      float translation = Vec2.dot(axis, d);
-      if (MathUtils.abs(m_upperTranslation - m_lowerTranslation) < 2.0f * Settings.linearSlop) {
-        // Prevent large angular corrections
-        C2 =
-            MathUtils.clamp(translation, -Settings.maxLinearCorrection,
-                Settings.maxLinearCorrection);
-        linearError = MathUtils.max(linearError, MathUtils.abs(translation));
-        active = true;
-      } else if (translation <= m_lowerTranslation) {
-        // Prevent large linear corrections and allow some slop.
-        C2 =
-            MathUtils.clamp(translation - m_lowerTranslation + Settings.linearSlop,
-                -Settings.maxLinearCorrection, 0.0f);
-        linearError = MathUtils.max(linearError, m_lowerTranslation - translation);
-        active = true;
-      } else if (translation >= m_upperTranslation) {
-        // Prevent large linear corrections and allow some slop.
-        C2 =
-            MathUtils.clamp(translation - m_upperTranslation - Settings.linearSlop, 0.0f,
-                Settings.maxLinearCorrection);
-        linearError = MathUtils.max(linearError, translation - m_upperTranslation);
-        active = true;
-      }
-    }
-
-    if (active) {
-      float k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2;
-      float k12 = iA * s1 + iB * s2;
-      float k13 = iA * s1 * a1 + iB * s2 * a2;
-      float k22 = iA + iB;
-      if (k22 == 0.0f) {
-        // For fixed rotation
-        k22 = 1.0f;
-      }
-      float k23 = iA * a1 + iB * a2;
-      float k33 = mA + mB + iA * a1 * a1 + iB * a2 * a2;
-
-      final Mat33 K = pool.popMat33();
-      K.ex.set(k11, k12, k13);
-      K.ey.set(k12, k22, k23);
-      K.ez.set(k13, k23, k33);
-
-      final Vec3 C = pool.popVec3();
-      C.x = C1.x;
-      C.y = C1.y;
-      C.z = C2;
-
-      K.solve33ToOut(C.negateLocal(), impulse);
-      pool.pushVec3(1);
-      pool.pushMat33(1);
-    } else {
-      float k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2;
-      float k12 = iA * s1 + iB * s2;
-      float k22 = iA + iB;
-      if (k22 == 0.0f) {
-        k22 = 1.0f;
-      }
-
-      final Mat22 K = pool.popMat22();
-      K.ex.set(k11, k12);
-      K.ey.set(k12, k22);
-
-      // temp is impulse1
-      K.solveToOut(C1.negateLocal(), temp);
-      C1.negateLocal();
-
-      impulse.x = temp.x;
-      impulse.y = temp.y;
-      impulse.z = 0.0f;
-
-      pool.pushMat22(1);
-    }
-
-    float Px = impulse.x * perp.x + impulse.z * axis.x;
-    float Py = impulse.x * perp.y + impulse.z * axis.y;
-    float LA = impulse.x * s1 + impulse.y + impulse.z * a1;
-    float LB = impulse.x * s2 + impulse.y + impulse.z * a2;
-
-    cA.x -= mA * Px;
-    cA.y -= mA * Py;
-    aA -= iA * LA;
-    cB.x += mB * Px;
-    cB.y += mB * Py;
-    aB += iB * LB;
-
-    data.positions[m_indexA].c.set(cA);
-    data.positions[m_indexA].a = aA;
-    data.positions[m_indexB].c.set(cB);
-    data.positions[m_indexB].a = aB;
-
-    pool.pushVec2(7);
-    pool.pushVec3(1);
-    pool.pushRot(2);
-
-    return linearError <= Settings.linearSlop && angularError <= Settings.angularSlop;
-  }
+       // Solver shared
+       public final Vec2 m_localAnchorA;
+       public final Vec2 m_localAnchorB;
+       public final Vec2 m_localXAxisA;
+       public final Vec2 m_localYAxisA;
+       public float m_referenceAngle;
+       public final Vec3 m_impulse;
+       public float m_motorImpulse;
+       public float m_lowerTranslation;
+       public float m_upperTranslation;
+       public float m_maxMotorForce;
+       public float m_motorSpeed;
+       public boolean m_enableLimit;
+       public boolean m_enableMotor;
+       public LimitState m_limitState;
+
+       // Solver temp
+       public int m_indexA;
+       public int m_indexB;
+       public final Vec2 m_rA = new Vec2();
+       public final Vec2 m_rB = new Vec2();
+       public final Vec2 m_localCenterA = new Vec2();
+       public final Vec2 m_localCenterB = new Vec2();
+       public float m_invMassA;
+       public float m_invMassB;
+       public float m_invIA;
+       public float m_invIB;
+       public final Vec2 m_axis, m_perp;
+       public float m_s1, m_s2;
+       public float m_a1, m_a2;
+       public final Mat33 m_K;
+       public float m_motorMass; // effective mass for motor/limit translational constraint.
+
+       public PrismaticJoint (IWorldPool argWorld, PrismaticJointDef def) {
+               super(argWorld, def);
+               m_localAnchorA = new Vec2(def.localAnchorA);
+               m_localAnchorB = new Vec2(def.localAnchorB);
+               m_localXAxisA = new Vec2(def.localAxisA);
+               m_localXAxisA.normalize();
+               m_localYAxisA = new Vec2();
+               Vec2.crossToOutUnsafe(1f, m_localXAxisA, m_localYAxisA);
+               m_referenceAngle = def.referenceAngle;
+
+               m_impulse = new Vec3();
+               m_motorMass = 0.0f;
+               m_motorImpulse = 0.0f;
+
+               m_lowerTranslation = def.lowerTranslation;
+               m_upperTranslation = def.upperTranslation;
+               m_maxMotorForce = def.maxMotorForce;
+               m_motorSpeed = def.motorSpeed;
+               m_enableLimit = def.enableLimit;
+               m_enableMotor = def.enableMotor;
+               m_limitState = LimitState.INACTIVE;
+
+               m_K = new Mat33();
+               m_axis = new Vec2();
+               m_perp = new Vec2();
+       }
+
+       public Vec2 getLocalAnchorA () {
+               return m_localAnchorA;
+       }
+
+       public Vec2 getLocalAnchorB () {
+               return m_localAnchorB;
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+               m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+               m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
+       }
+
+       @Override
+       public void getReactionForce (float inv_dt, Vec2 argOut) {
+               Vec2 temp = pool.popVec2();
+               temp.set(m_axis).mulLocal(m_motorImpulse + m_impulse.z);
+               argOut.set(m_perp).mulLocal(m_impulse.x).addLocal(temp).mulLocal(inv_dt);
+               pool.pushVec2(1);
+       }
+
+       @Override
+       public float getReactionTorque (float inv_dt) {
+               return inv_dt * m_impulse.y;
+       }
+
+       /** Get the current joint translation, usually in meters. public float getJointTranslation() { Vec2 pA = pool.popVec2(); Vec2 pB
+        * = pool.popVec2(); Vec2 axis = pool.popVec2();
+        * 
+        * m_bodyA.getWorldPointToOut(m_localAnchorA, pA); m_bodyB.getWorldPointToOut(m_localAnchorB, pB); pB.subLocal(pA);
+        * m_bodyA.getWorldVectorToOut(m_localXAxisA, axis);
+        * 
+        * float translation = Vec2.dot(pB, axis);
+        * 
+        * pool.pushVec2(3); return translation; }
+        * 
+        * /** Get the current joint translation speed, usually in meters per second.
+        * 
+        * @return */
+       public float getJointSpeed () {
+               Body bA = m_bodyA;
+               Body bB = m_bodyB;
+
+               Vec2[] pc = pool.popVec2(9);
+               Vec2 temp = pc[0];
+               Vec2 rA = pc[1];
+               Vec2 rB = pc[2];
+               Vec2 p1 = pc[3];
+               Vec2 p2 = pc[4];
+               Vec2 d = pc[5];
+               Vec2 axis = pc[6];
+               Vec2 temp2 = pc[7];
+               Vec2 temp3 = pc[8];
+
+               temp.set(m_localAnchorA).subLocal(bA.m_sweep.localCenter);
+               Rot.mulToOutUnsafe(bA.m_xf.q, temp, rA);
+
+               temp.set(m_localAnchorB).subLocal(bB.m_sweep.localCenter);
+               Rot.mulToOutUnsafe(bB.m_xf.q, temp, rB);
+
+               p1.set(bA.m_sweep.c).addLocal(rA);
+               p2.set(bB.m_sweep.c).addLocal(rB);
+
+               d.set(p2).subLocal(p1);
+               Rot.mulToOutUnsafe(bA.m_xf.q, m_localXAxisA, axis);
+
+               Vec2 vA = bA.m_linearVelocity;
+               Vec2 vB = bB.m_linearVelocity;
+               float wA = bA.m_angularVelocity;
+               float wB = bB.m_angularVelocity;
+
+               Vec2.crossToOutUnsafe(wA, axis, temp);
+               Vec2.crossToOutUnsafe(wB, rB, temp2);
+               Vec2.crossToOutUnsafe(wA, rA, temp3);
+
+               temp2.addLocal(vB).subLocal(vA).subLocal(temp3);
+               float speed = Vec2.dot(d, temp) + Vec2.dot(axis, temp2);
+
+               pool.pushVec2(9);
+
+               return speed;
+       }
+
+       /** Is the joint limit enabled?
+        * 
+        * @return */
+       public boolean isLimitEnabled () {
+               return m_enableLimit;
+       }
+
+       /** Enable/disable the joint limit.
+        * 
+        * @param flag */
+       public void enableLimit (boolean flag) {
+               if (flag != m_enableLimit) {
+                       m_bodyA.setAwake(true);
+                       m_bodyB.setAwake(true);
+                       m_enableLimit = flag;
+                       m_impulse.z = 0.0f;
+               }
+       }
+
+       /** Get the lower joint limit, usually in meters.
+        * 
+        * @return */
+       public float getLowerLimit () {
+               return m_lowerTranslation;
+       }
+
+       /** Get the upper joint limit, usually in meters.
+        * 
+        * @return */
+       public float getUpperLimit () {
+               return m_upperTranslation;
+       }
+
+       /** Set the joint limits, usually in meters.
+        * 
+        * @param lower
+        * @param upper */
+       public void setLimits (float lower, float upper) {
+               assert (lower <= upper);
+               if (lower != m_lowerTranslation || upper != m_upperTranslation) {
+                       m_bodyA.setAwake(true);
+                       m_bodyB.setAwake(true);
+                       m_lowerTranslation = lower;
+                       m_upperTranslation = upper;
+                       m_impulse.z = 0.0f;
+               }
+       }
+
+       /** Is the joint motor enabled?
+        * 
+        * @return */
+       public boolean isMotorEnabled () {
+               return m_enableMotor;
+       }
+
+       /** Enable/disable the joint motor.
+        * 
+        * @param flag */
+       public void enableMotor (boolean flag) {
+               m_bodyA.setAwake(true);
+               m_bodyB.setAwake(true);
+               m_enableMotor = flag;
+       }
+
+       /** Set the motor speed, usually in meters per second.
+        * 
+        * @param speed */
+       public void setMotorSpeed (float speed) {
+               m_bodyA.setAwake(true);
+               m_bodyB.setAwake(true);
+               m_motorSpeed = speed;
+       }
+
+       /** Get the motor speed, usually in meters per second.
+        * 
+        * @return */
+       public float getMotorSpeed () {
+               return m_motorSpeed;
+       }
+
+       /** Set the maximum motor force, usually in N.
+        * 
+        * @param force */
+       public void setMaxMotorForce (float force) {
+               m_bodyA.setAwake(true);
+               m_bodyB.setAwake(true);
+               m_maxMotorForce = force;
+       }
+
+       /** Get the current motor force, usually in N.
+        * 
+        * @param inv_dt
+        * @return */
+       public float getMotorForce (float inv_dt) {
+               return m_motorImpulse * inv_dt;
+       }
+
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+               m_indexA = m_bodyA.m_islandIndex;
+               m_indexB = m_bodyB.m_islandIndex;
+               m_localCenterA.set(m_bodyA.m_sweep.localCenter);
+               m_localCenterB.set(m_bodyB.m_sweep.localCenter);
+               m_invMassA = m_bodyA.m_invMass;
+               m_invMassB = m_bodyB.m_invMass;
+               m_invIA = m_bodyA.m_invI;
+               m_invIB = m_bodyB.m_invI;
+
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 d = pool.popVec2();
+               final Vec2 temp = pool.popVec2();
+               final Vec2 rA = pool.popVec2();
+               final Vec2 rB = pool.popVec2();
+
+               qA.set(aA);
+               qB.set(aB);
+
+               // Compute the effective masses.
+               Rot.mulToOutUnsafe(qA, d.set(m_localAnchorA).subLocal(m_localCenterA), rA);
+               Rot.mulToOutUnsafe(qB, d.set(m_localAnchorB).subLocal(m_localCenterB), rB);
+               d.set(cB).subLocal(cA).addLocal(rB).subLocal(rA);
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               // Compute motor Jacobian and effective mass.
+               {
+                       Rot.mulToOutUnsafe(qA, m_localXAxisA, m_axis);
+                       temp.set(d).addLocal(rA);
+                       m_a1 = Vec2.cross(temp, m_axis);
+                       m_a2 = Vec2.cross(rB, m_axis);
+
+                       m_motorMass = mA + mB + iA * m_a1 * m_a1 + iB * m_a2 * m_a2;
+                       if (m_motorMass > 0.0f) {
+                               m_motorMass = 1.0f / m_motorMass;
+                       }
+               }
+
+               // Prismatic constraint.
+               {
+                       Rot.mulToOutUnsafe(qA, m_localYAxisA, m_perp);
+
+                       temp.set(d).addLocal(rA);
+                       m_s1 = Vec2.cross(temp, m_perp);
+                       m_s2 = Vec2.cross(rB, m_perp);
+
+                       float k11 = mA + mB + iA * m_s1 * m_s1 + iB * m_s2 * m_s2;
+                       float k12 = iA * m_s1 + iB * m_s2;
+                       float k13 = iA * m_s1 * m_a1 + iB * m_s2 * m_a2;
+                       float k22 = iA + iB;
+                       if (k22 == 0.0f) {
+                               // For bodies with fixed rotation.
+                               k22 = 1.0f;
+                       }
+                       float k23 = iA * m_a1 + iB * m_a2;
+                       float k33 = mA + mB + iA * m_a1 * m_a1 + iB * m_a2 * m_a2;
+
+                       m_K.ex.set(k11, k12, k13);
+                       m_K.ey.set(k12, k22, k23);
+                       m_K.ez.set(k13, k23, k33);
+               }
+
+               // Compute motor and limit terms.
+               if (m_enableLimit) {
+
+                       float jointTranslation = Vec2.dot(m_axis, d);
+                       if (MathUtils.abs(m_upperTranslation - m_lowerTranslation) < 2.0f * Settings.linearSlop) {
+                               m_limitState = LimitState.EQUAL;
+                       } else if (jointTranslation <= m_lowerTranslation) {
+                               if (m_limitState != LimitState.AT_LOWER) {
+                                       m_limitState = LimitState.AT_LOWER;
+                                       m_impulse.z = 0.0f;
+                               }
+                       } else if (jointTranslation >= m_upperTranslation) {
+                               if (m_limitState != LimitState.AT_UPPER) {
+                                       m_limitState = LimitState.AT_UPPER;
+                                       m_impulse.z = 0.0f;
+                               }
+                       } else {
+                               m_limitState = LimitState.INACTIVE;
+                               m_impulse.z = 0.0f;
+                       }
+               } else {
+                       m_limitState = LimitState.INACTIVE;
+                       m_impulse.z = 0.0f;
+               }
+
+               if (m_enableMotor == false) {
+                       m_motorImpulse = 0.0f;
+               }
+
+               if (data.step.warmStarting) {
+                       // Account for variable time step.
+                       m_impulse.mulLocal(data.step.dtRatio);
+                       m_motorImpulse *= data.step.dtRatio;
+
+                       final Vec2 P = pool.popVec2();
+                       temp.set(m_axis).mulLocal(m_motorImpulse + m_impulse.z);
+                       P.set(m_perp).mulLocal(m_impulse.x).addLocal(temp);
+
+                       float LA = m_impulse.x * m_s1 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a1;
+                       float LB = m_impulse.x * m_s2 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a2;
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * LA;
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * LB;
+
+                       pool.pushVec2(1);
+               } else {
+                       m_impulse.setZero();
+                       m_motorImpulse = 0.0f;
+               }
+
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushRot(2);
+               pool.pushVec2(4);
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               final Vec2 temp = pool.popVec2();
+
+               // Solve linear motor constraint.
+               if (m_enableMotor && m_limitState != LimitState.EQUAL) {
+                       temp.set(vB).subLocal(vA);
+                       float Cdot = Vec2.dot(m_axis, temp) + m_a2 * wB - m_a1 * wA;
+                       float impulse = m_motorMass * (m_motorSpeed - Cdot);
+                       float oldImpulse = m_motorImpulse;
+                       float maxImpulse = data.step.dt * m_maxMotorForce;
+                       m_motorImpulse = MathUtils.clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);
+                       impulse = m_motorImpulse - oldImpulse;
+
+                       final Vec2 P = pool.popVec2();
+                       P.set(m_axis).mulLocal(impulse);
+                       float LA = impulse * m_a1;
+                       float LB = impulse * m_a2;
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * LA;
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * LB;
+
+                       pool.pushVec2(1);
+               }
+
+               final Vec2 Cdot1 = pool.popVec2();
+               temp.set(vB).subLocal(vA);
+               Cdot1.x = Vec2.dot(m_perp, temp) + m_s2 * wB - m_s1 * wA;
+               Cdot1.y = wB - wA;
+               // System.out.println(Cdot1);
+
+               if (m_enableLimit && m_limitState != LimitState.INACTIVE) {
+                       // Solve prismatic and limit constraint in block form.
+                       float Cdot2;
+                       temp.set(vB).subLocal(vA);
+                       Cdot2 = Vec2.dot(m_axis, temp) + m_a2 * wB - m_a1 * wA;
+
+                       final Vec3 Cdot = pool.popVec3();
+                       Cdot.set(Cdot1.x, Cdot1.y, Cdot2);
+
+                       final Vec3 f1 = pool.popVec3();
+                       final Vec3 df = pool.popVec3();
+
+                       f1.set(m_impulse);
+                       m_K.solve33ToOut(Cdot.negateLocal(), df);
+                       // Cdot.negateLocal(); not used anymore
+                       m_impulse.addLocal(df);
+
+                       if (m_limitState == LimitState.AT_LOWER) {
+                               m_impulse.z = MathUtils.max(m_impulse.z, 0.0f);
+                       } else if (m_limitState == LimitState.AT_UPPER) {
+                               m_impulse.z = MathUtils.min(m_impulse.z, 0.0f);
+                       }
+
+                       // f2(1:2) = invK(1:2,1:2) * (-Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3))) +
+                       // f1(1:2)
+                       final Vec2 b = pool.popVec2();
+                       final Vec2 f2r = pool.popVec2();
+
+                       temp.set(m_K.ez.x, m_K.ez.y).mulLocal(m_impulse.z - f1.z);
+                       b.set(Cdot1).negateLocal().subLocal(temp);
+
+                       temp.set(f1.x, f1.y);
+                       m_K.solve22ToOut(b, f2r);
+                       f2r.addLocal(temp);
+                       m_impulse.x = f2r.x;
+                       m_impulse.y = f2r.y;
+
+                       df.set(m_impulse).subLocal(f1);
+
+                       final Vec2 P = pool.popVec2();
+                       temp.set(m_axis).mulLocal(df.z);
+                       P.set(m_perp).mulLocal(df.x).addLocal(temp);
+
+                       float LA = df.x * m_s1 + df.y + df.z * m_a1;
+                       float LB = df.x * m_s2 + df.y + df.z * m_a2;
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * LA;
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * LB;
+
+                       pool.pushVec2(3);
+                       pool.pushVec3(3);
+               } else {
+                       // Limit is inactive, just solve the prismatic constraint in block form.
+                       final Vec2 df = pool.popVec2();
+                       m_K.solve22ToOut(Cdot1.negateLocal(), df);
+                       Cdot1.negateLocal();
+
+                       m_impulse.x += df.x;
+                       m_impulse.y += df.y;
+
+                       final Vec2 P = pool.popVec2();
+                       P.set(m_perp).mulLocal(df.x);
+                       float LA = df.x * m_s1 + df.y;
+                       float LB = df.x * m_s2 + df.y;
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * LA;
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * LB;
+
+                       final Vec2 Cdot10 = pool.popVec2();
+                       Cdot10.set(Cdot1);
+
+                       Cdot1.x = Vec2.dot(m_perp, temp.set(vB).subLocal(vA)) + m_s2 * wB - m_s1 * wA;
+                       Cdot1.y = wB - wA;
+
+                       if (MathUtils.abs(Cdot1.x) > 0.01f || MathUtils.abs(Cdot1.y) > 0.01f) {
+                               // djm note: what's happening here?
+                               Mat33.mul22ToOutUnsafe(m_K, df, temp);
+                               Cdot1.x += 0.0f;
+                       }
+
+                       pool.pushVec2(3);
+               }
+
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(2);
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 rA = pool.popVec2();
+               final Vec2 rB = pool.popVec2();
+               final Vec2 d = pool.popVec2();
+               final Vec2 axis = pool.popVec2();
+               final Vec2 perp = pool.popVec2();
+               final Vec2 temp = pool.popVec2();
+               final Vec2 C1 = pool.popVec2();
+
+               final Vec3 impulse = pool.popVec3();
+
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+
+               qA.set(aA);
+               qB.set(aB);
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               // Compute fresh Jacobians
+               Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), rA);
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), rB);
+               d.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
+
+               Rot.mulToOutUnsafe(qA, m_localXAxisA, axis);
+               float a1 = Vec2.cross(temp.set(d).addLocal(rA), axis);
+               float a2 = Vec2.cross(rB, axis);
+               Rot.mulToOutUnsafe(qA, m_localYAxisA, perp);
+
+               float s1 = Vec2.cross(temp.set(d).addLocal(rA), perp);
+               float s2 = Vec2.cross(rB, perp);
+
+               C1.x = Vec2.dot(perp, d);
+               C1.y = aB - aA - m_referenceAngle;
+
+               float linearError = MathUtils.abs(C1.x);
+               float angularError = MathUtils.abs(C1.y);
+
+               boolean active = false;
+               float C2 = 0.0f;
+               if (m_enableLimit) {
+                       float translation = Vec2.dot(axis, d);
+                       if (MathUtils.abs(m_upperTranslation - m_lowerTranslation) < 2.0f * Settings.linearSlop) {
+                               // Prevent large angular corrections
+                               C2 = MathUtils.clamp(translation, -Settings.maxLinearCorrection, Settings.maxLinearCorrection);
+                               linearError = MathUtils.max(linearError, MathUtils.abs(translation));
+                               active = true;
+                       } else if (translation <= m_lowerTranslation) {
+                               // Prevent large linear corrections and allow some slop.
+                               C2 = MathUtils.clamp(translation - m_lowerTranslation + Settings.linearSlop, -Settings.maxLinearCorrection, 0.0f);
+                               linearError = MathUtils.max(linearError, m_lowerTranslation - translation);
+                               active = true;
+                       } else if (translation >= m_upperTranslation) {
+                               // Prevent large linear corrections and allow some slop.
+                               C2 = MathUtils.clamp(translation - m_upperTranslation - Settings.linearSlop, 0.0f, Settings.maxLinearCorrection);
+                               linearError = MathUtils.max(linearError, translation - m_upperTranslation);
+                               active = true;
+                       }
+               }
+
+               if (active) {
+                       float k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2;
+                       float k12 = iA * s1 + iB * s2;
+                       float k13 = iA * s1 * a1 + iB * s2 * a2;
+                       float k22 = iA + iB;
+                       if (k22 == 0.0f) {
+                               // For fixed rotation
+                               k22 = 1.0f;
+                       }
+                       float k23 = iA * a1 + iB * a2;
+                       float k33 = mA + mB + iA * a1 * a1 + iB * a2 * a2;
+
+                       final Mat33 K = pool.popMat33();
+                       K.ex.set(k11, k12, k13);
+                       K.ey.set(k12, k22, k23);
+                       K.ez.set(k13, k23, k33);
+
+                       final Vec3 C = pool.popVec3();
+                       C.x = C1.x;
+                       C.y = C1.y;
+                       C.z = C2;
+
+                       K.solve33ToOut(C.negateLocal(), impulse);
+                       pool.pushVec3(1);
+                       pool.pushMat33(1);
+               } else {
+                       float k11 = mA + mB + iA * s1 * s1 + iB * s2 * s2;
+                       float k12 = iA * s1 + iB * s2;
+                       float k22 = iA + iB;
+                       if (k22 == 0.0f) {
+                               k22 = 1.0f;
+                       }
+
+                       final Mat22 K = pool.popMat22();
+                       K.ex.set(k11, k12);
+                       K.ey.set(k12, k22);
+
+                       // temp is impulse1
+                       K.solveToOut(C1.negateLocal(), temp);
+                       C1.negateLocal();
+
+                       impulse.x = temp.x;
+                       impulse.y = temp.y;
+                       impulse.z = 0.0f;
+
+                       pool.pushMat22(1);
+               }
+
+               float Px = impulse.x * perp.x + impulse.z * axis.x;
+               float Py = impulse.x * perp.y + impulse.z * axis.y;
+               float LA = impulse.x * s1 + impulse.y + impulse.z * a1;
+               float LB = impulse.x * s2 + impulse.y + impulse.z * a2;
+
+               cA.x -= mA * Px;
+               cA.y -= mA * Py;
+               aA -= iA * LA;
+               cB.x += mB * Px;
+               cB.y += mB * Py;
+               aB += iB * LB;
+
+               data.positions[m_indexA].c.set(cA);
+               data.positions[m_indexA].a = aA;
+               data.positions[m_indexB].c.set(cB);
+               data.positions[m_indexB].a = aB;
+
+               pool.pushVec2(7);
+               pool.pushVec3(1);
+               pool.pushRot(2);
+
+               return linearError <= Settings.linearSlop && angularError <= Settings.angularSlop;
+       }
 }
index b605f21..5ecf769 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Body;
 
-/**
- * Prismatic joint definition. This requires defining a line of
- * motion using an axis and an anchor point. The definition uses local
- * anchor points and a local axis so that the initial configuration
- * can violate the constraint slightly. The joint translation is zero
- * when the local anchor points coincide in world space. Using local
- * anchors and a local axis helps when saving and loading a game.
+/** Prismatic joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses
+ * local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint
+ * translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when
+ * saving and loading a game.
  * @warning at least one body should by dynamic with a non-fixed rotation.
- * @author Daniel
- *
- */
+ * @author Daniel */
 public class PrismaticJointDef extends JointDef {
 
-
-       /**
-        * The local anchor point relative to body1's origin.
-        */
+       /** The local anchor point relative to body1's origin. */
        public final Vec2 localAnchorA;
 
-       /**
-        * The local anchor point relative to body2's origin.
-        */
+       /** The local anchor point relative to body2's origin. */
        public final Vec2 localAnchorB;
 
-       /**
-        * The local translation axis in body1.
-        */
+       /** The local translation axis in body1. */
        public final Vec2 localAxisA;
 
-       /**
-        * The constrained angle between the bodies: body2_angle - body1_angle.
-        */
+       /** The constrained angle between the bodies: body2_angle - body1_angle. */
        public float referenceAngle;
 
-       /**
-        * Enable/disable the joint limit.
-        */
+       /** Enable/disable the joint limit. */
        public boolean enableLimit;
 
-       /**
-        * The lower translation limit, usually in meters.
-        */
+       /** The lower translation limit, usually in meters. */
        public float lowerTranslation;
 
-       /**
-        * The upper translation limit, usually in meters.
-        */
+       /** The upper translation limit, usually in meters. */
        public float upperTranslation;
 
-       /**
-        * Enable/disable the joint motor.
-        */
+       /** Enable/disable the joint motor. */
        public boolean enableMotor;
 
-       /**
-        * The maximum motor torque, usually in N-m.
-        */
+       /** The maximum motor torque, usually in N-m. */
        public float maxMotorForce;
 
-       /**
-        * The desired motor speed in radians per second.
-        */
+       /** The desired motor speed in radians per second. */
        public float motorSpeed;
-       
-       public PrismaticJointDef(){
+
+       public PrismaticJointDef () {
                type = JointType.PRISMATIC;
                localAnchorA = new Vec2();
                localAnchorB = new Vec2();
@@ -104,12 +79,8 @@ public class PrismaticJointDef extends JointDef {
                motorSpeed = 0.0f;
        }
 
-       
-       /**
-        * Initialize the bodies, anchors, axis, and reference angle using the world
-        * anchor and world axis.
-        */
-       public void initialize(Body b1, Body b2, Vec2 anchor, Vec2 axis){
+       /** Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. */
+       public void initialize (Body b1, Body b2, Vec2 anchor, Vec2 axis) {
                bodyA = b1;
                bodyB = b2;
                bodyA.getLocalPointToOut(anchor, localAnchorA);
index e661605..f327424 100644 (file)
@@ -24,6 +24,7 @@
 /**
  * Created at 12:12:02 PM Jan 23, 2011
  */
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.MathUtils;
@@ -33,355 +34,350 @@ import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.SolverData;
 import org.jbox2d.pooling.IWorldPool;
 
-/**
- * The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a
- * ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by
- * the ratio. Warning: the pulley joint can get a bit squirrelly by itself. They often work better
- * when combined with prismatic joints. You should also cover the the anchor points with static
+/** The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio
+ * * length2 <= constant Yes, the force transmitted is scaled by the ratio. Warning: the pulley joint can get a bit squirrelly by
+ * itself. They often work better when combined with prismatic joints. You should also cover the the anchor points with static
  * shapes to prevent one side from going to zero length.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class PulleyJoint extends Joint {
 
-  public static final float MIN_PULLEY_LENGTH = 2.0f;
-
-  public final Vec2 m_groundAnchorA = new Vec2();
-  public final Vec2 m_groundAnchorB = new Vec2();
-  private float m_lengthA;
-  private float m_LengthB;
-
-  // Solver shared
-  public final Vec2 m_localAnchorA = new Vec2();
-  public final Vec2 m_localAnchorB = new Vec2();
-  private float m_constant;
-  private float m_ratio;
-  private float m_impulse;
-
-  // Solver temp
-  public int m_indexA;
-  public int m_indexB;
-  private final Vec2 m_uA = new Vec2();
-  private final Vec2 m_uB = new Vec2();
-  public final Vec2 m_rA = new Vec2();
-  public final Vec2 m_rB = new Vec2();
-  private final Vec2 m_localCenterA = new Vec2();
-  private final Vec2 m_localCenterB = new Vec2();
-  public float m_invMassA;
-  public float m_invMassB;
-  public float m_invIA;
-  public float m_invIB;
-  private float m_mass;
-
-  /**
-   * @param argWorldPool
-   * @param def
-   */
-  public PulleyJoint(IWorldPool argWorldPool, PulleyJointDef def) {
-    super(argWorldPool, def);
-    m_groundAnchorA.set(def.groundAnchorA);
-    m_groundAnchorB.set(def.groundAnchorB);
-    m_localAnchorA.set(def.localAnchorA);
-    m_localAnchorB.set(def.localAnchorB);
-
-    assert (def.ratio != 0.0f);
-    m_ratio = def.ratio;
-
-    m_lengthA = def.lengthA;
-    m_LengthB = def.lengthB;
-
-    m_constant = def.lengthA + m_ratio * def.lengthB;
-    m_impulse = 0.0f;
-  }
-
-  public float getLengthA() {
-    return m_lengthA;
-  }
-
-  public float getLengthB() {
-    return m_LengthB;
-  }
-
-  public float getCurrentLengthA() {
-    final Vec2 p = pool.popVec2();
-    m_bodyA.getWorldPointToOut(m_localAnchorA, p);
-    p.subLocal(m_groundAnchorA);
-    float length = p.length();
-    pool.pushVec2(1);
-    return length;
-  }
-
-  public float getCurrentLengthB() {
-    final Vec2 p = pool.popVec2();
-    m_bodyB.getWorldPointToOut(m_localAnchorB, p);
-    p.subLocal(m_groundAnchorB);
-    float length = p.length();
-    pool.pushVec2(1);
-    return length;
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-    m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-    m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
-  }
-
-  @Override
-  public void getReactionForce(float inv_dt, Vec2 argOut) {
-    argOut.set(m_uB).mulLocal(m_impulse).mulLocal(inv_dt);
-  }
-
-  @Override
-  public float getReactionTorque(float inv_dt) {
-    return 0f;
-  }
-
-  public Vec2 getGroundAnchorA() {
-    return m_groundAnchorA;
-  }
-
-  public Vec2 getGroundAnchorB() {
-    return m_groundAnchorB;
-  }
-
-  public float getLength1() {
-    final Vec2 p = pool.popVec2();
-    m_bodyA.getWorldPointToOut(m_localAnchorA, p);
-    p.subLocal(m_groundAnchorA);
-
-    float len = p.length();
-    pool.pushVec2(1);
-    return len;
-  }
-
-  public float getLength2() {
-    final Vec2 p = pool.popVec2();
-    m_bodyB.getWorldPointToOut(m_localAnchorB, p);
-    p.subLocal(m_groundAnchorB);
-
-    float len = p.length();
-    pool.pushVec2(1);
-    return len;
-  }
-
-  public float getRatio() {
-    return m_ratio;
-  }
-
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-    m_indexA = m_bodyA.m_islandIndex;
-    m_indexB = m_bodyB.m_islandIndex;
-    m_localCenterA.set(m_bodyA.m_sweep.localCenter);
-    m_localCenterB.set(m_bodyB.m_sweep.localCenter);
-    m_invMassA = m_bodyA.m_invMass;
-    m_invMassB = m_bodyB.m_invMass;
-    m_invIA = m_bodyA.m_invI;
-    m_invIB = m_bodyB.m_invI;
-
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 temp = pool.popVec2();
-
-    qA.set(aA);
-    qB.set(aB);
-
-    // Compute the effective masses.
-    Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
-    
-    m_uA.set(cA).addLocal(m_rA).subLocal(m_groundAnchorA);
-    m_uB.set(cB).addLocal(m_rB).subLocal(m_groundAnchorB);
-
-    float lengthA = m_uA.length();
-    float lengthB = m_uB.length();
-
-    if (lengthA > 10f * Settings.linearSlop) {
-      m_uA.mulLocal(1.0f / lengthA);
-    } else {
-      m_uA.setZero();
-    }
-
-    if (lengthB > 10f * Settings.linearSlop) {
-      m_uB.mulLocal(1.0f / lengthB);
-    } else {
-      m_uB.setZero();
-    }
-
-    // Compute effective mass.
-    float ruA = Vec2.cross(m_rA, m_uA);
-    float ruB = Vec2.cross(m_rB, m_uB);
-
-    float mA = m_invMassA + m_invIA * ruA * ruA;
-    float mB = m_invMassB + m_invIB * ruB * ruB;
-
-    m_mass = mA + m_ratio * m_ratio * mB;
-
-    if (m_mass > 0.0f) {
-      m_mass = 1.0f / m_mass;
-    }
-
-    if (data.step.warmStarting) {
-
-      // Scale impulses to support variable time steps.
-      m_impulse *= data.step.dtRatio;
-
-      // Warm starting.
-      final Vec2 PA = pool.popVec2();
-      final Vec2 PB = pool.popVec2();
-
-      PA.set(m_uA).mulLocal(-m_impulse);
-      PB.set(m_uB).mulLocal(-m_ratio * m_impulse);
-
-      vA.x += m_invMassA * PA.x;
-      vA.y += m_invMassA * PA.y;
-      wA += m_invIA * Vec2.cross(m_rA, PA);
-      vB.x += m_invMassB * PB.x;
-      vB.y += m_invMassB * PB.y;
-      wB += m_invIB * Vec2.cross(m_rB, PB);
-
-      pool.pushVec2(2);
-    } else {
-      m_impulse = 0.0f;
-    }
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(1);
-    pool.pushRot(2);
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    final Vec2 vpA = pool.popVec2();
-    final Vec2 vpB = pool.popVec2();
-    final Vec2 PA = pool.popVec2();
-    final Vec2 PB = pool.popVec2();
-
-    Vec2.crossToOutUnsafe(wA, m_rA, vpA);
-    vpA.addLocal(vA);
-    Vec2.crossToOutUnsafe(wB, m_rB, vpB);
-    vpB.addLocal(vB);
-
-    float Cdot = -Vec2.dot(m_uA, vpA) - m_ratio * Vec2.dot(m_uB, vpB);
-    float impulse = -m_mass * Cdot;
-    m_impulse += impulse;
-
-    PA.set(m_uA).mulLocal(-impulse);
-    PB.set(m_uB).mulLocal(-m_ratio * impulse);
-    vA.x += m_invMassA * PA.x;
-    vA.y += m_invMassA * PA.y;
-    wA += m_invIA * Vec2.cross(m_rA, PA);
-    vB.x += m_invMassB * PB.x;
-    vB.y += m_invMassB * PB.y;
-    wB += m_invIB * Vec2.cross(m_rB, PB);
-
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(4);
-  }
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 rA = pool.popVec2();
-    final Vec2 rB = pool.popVec2();
-    final Vec2 uA = pool.popVec2();
-    final Vec2 uB = pool.popVec2();
-    final Vec2 temp = pool.popVec2();
-    final Vec2 PA = pool.popVec2();
-    final Vec2 PB = pool.popVec2();
-
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-
-    qA.set(aA);
-    qB.set(aB);
-
-    Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), rA);
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), rB);
-
-    uA.set(cA).addLocal(rA).subLocal(m_groundAnchorA);
-    uB.set(cB).addLocal(rB).subLocal(m_groundAnchorB);
-
-    float lengthA = uA.length();
-    float lengthB = uB.length();
-
-    if (lengthA > 10.0f * Settings.linearSlop) {
-      uA.mulLocal(1.0f / lengthA);
-    } else {
-      uA.setZero();
-    }
-
-    if (lengthB > 10.0f * Settings.linearSlop) {
-      uB.mulLocal(1.0f / lengthB);
-    } else {
-      uB.setZero();
-    }
-
-    // Compute effective mass.
-    float ruA = Vec2.cross(rA, uA);
-    float ruB = Vec2.cross(rB, uB);
-
-    float mA = m_invMassA + m_invIA * ruA * ruA;
-    float mB = m_invMassB + m_invIB * ruB * ruB;
-
-    float mass = mA + m_ratio * m_ratio * mB;
-
-    if (mass > 0.0f) {
-      mass = 1.0f / mass;
-    }
-
-    float C = m_constant - lengthA - m_ratio * lengthB;
-    float linearError = MathUtils.abs(C);
-
-    float impulse = -mass * C;
-
-    PA.set(uA).mulLocal(-impulse);
-    PB.set(uB).mulLocal(-m_ratio * impulse);
-
-    cA.x += m_invMassA * PA.x;
-    cA.y += m_invMassA * PA.y;
-    aA += m_invIA * Vec2.cross(rA, PA);
-    cB.x += m_invMassB * PB.x;
-    cB.y += m_invMassB * PB.y;
-    aB += m_invIB * Vec2.cross(rB, PB);
-
-    data.positions[m_indexA].c.set(cA);
-    data.positions[m_indexA].a = aA;
-    data.positions[m_indexB].c.set(cB);
-    data.positions[m_indexB].a = aB;
-
-    pool.pushRot(2);
-    pool.pushVec2(7);
-
-    return linearError < Settings.linearSlop;
-  }
+       public static final float MIN_PULLEY_LENGTH = 2.0f;
+
+       public final Vec2 m_groundAnchorA = new Vec2();
+       public final Vec2 m_groundAnchorB = new Vec2();
+       private float m_lengthA;
+       private float m_LengthB;
+
+       // Solver shared
+       public final Vec2 m_localAnchorA = new Vec2();
+       public final Vec2 m_localAnchorB = new Vec2();
+       private float m_constant;
+       private float m_ratio;
+       private float m_impulse;
+
+       // Solver temp
+       public int m_indexA;
+       public int m_indexB;
+       private final Vec2 m_uA = new Vec2();
+       private final Vec2 m_uB = new Vec2();
+       public final Vec2 m_rA = new Vec2();
+       public final Vec2 m_rB = new Vec2();
+       private final Vec2 m_localCenterA = new Vec2();
+       private final Vec2 m_localCenterB = new Vec2();
+       public float m_invMassA;
+       public float m_invMassB;
+       public float m_invIA;
+       public float m_invIB;
+       private float m_mass;
+
+       /** @param argWorldPool
+        * @param def */
+       public PulleyJoint (IWorldPool argWorldPool, PulleyJointDef def) {
+               super(argWorldPool, def);
+               m_groundAnchorA.set(def.groundAnchorA);
+               m_groundAnchorB.set(def.groundAnchorB);
+               m_localAnchorA.set(def.localAnchorA);
+               m_localAnchorB.set(def.localAnchorB);
+
+               assert (def.ratio != 0.0f);
+               m_ratio = def.ratio;
+
+               m_lengthA = def.lengthA;
+               m_LengthB = def.lengthB;
+
+               m_constant = def.lengthA + m_ratio * def.lengthB;
+               m_impulse = 0.0f;
+       }
+
+       public float getLengthA () {
+               return m_lengthA;
+       }
+
+       public float getLengthB () {
+               return m_LengthB;
+       }
+
+       public float getCurrentLengthA () {
+               final Vec2 p = pool.popVec2();
+               m_bodyA.getWorldPointToOut(m_localAnchorA, p);
+               p.subLocal(m_groundAnchorA);
+               float length = p.length();
+               pool.pushVec2(1);
+               return length;
+       }
+
+       public float getCurrentLengthB () {
+               final Vec2 p = pool.popVec2();
+               m_bodyB.getWorldPointToOut(m_localAnchorB, p);
+               p.subLocal(m_groundAnchorB);
+               float length = p.length();
+               pool.pushVec2(1);
+               return length;
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+               m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+               m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
+       }
+
+       @Override
+       public void getReactionForce (float inv_dt, Vec2 argOut) {
+               argOut.set(m_uB).mulLocal(m_impulse).mulLocal(inv_dt);
+       }
+
+       @Override
+       public float getReactionTorque (float inv_dt) {
+               return 0f;
+       }
+
+       public Vec2 getGroundAnchorA () {
+               return m_groundAnchorA;
+       }
+
+       public Vec2 getGroundAnchorB () {
+               return m_groundAnchorB;
+       }
+
+       public float getLength1 () {
+               final Vec2 p = pool.popVec2();
+               m_bodyA.getWorldPointToOut(m_localAnchorA, p);
+               p.subLocal(m_groundAnchorA);
+
+               float len = p.length();
+               pool.pushVec2(1);
+               return len;
+       }
+
+       public float getLength2 () {
+               final Vec2 p = pool.popVec2();
+               m_bodyB.getWorldPointToOut(m_localAnchorB, p);
+               p.subLocal(m_groundAnchorB);
+
+               float len = p.length();
+               pool.pushVec2(1);
+               return len;
+       }
+
+       public float getRatio () {
+               return m_ratio;
+       }
+
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+               m_indexA = m_bodyA.m_islandIndex;
+               m_indexB = m_bodyB.m_islandIndex;
+               m_localCenterA.set(m_bodyA.m_sweep.localCenter);
+               m_localCenterB.set(m_bodyB.m_sweep.localCenter);
+               m_invMassA = m_bodyA.m_invMass;
+               m_invMassB = m_bodyB.m_invMass;
+               m_invIA = m_bodyA.m_invI;
+               m_invIB = m_bodyB.m_invI;
+
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 temp = pool.popVec2();
+
+               qA.set(aA);
+               qB.set(aB);
+
+               // Compute the effective masses.
+               Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
+
+               m_uA.set(cA).addLocal(m_rA).subLocal(m_groundAnchorA);
+               m_uB.set(cB).addLocal(m_rB).subLocal(m_groundAnchorB);
+
+               float lengthA = m_uA.length();
+               float lengthB = m_uB.length();
+
+               if (lengthA > 10f * Settings.linearSlop) {
+                       m_uA.mulLocal(1.0f / lengthA);
+               } else {
+                       m_uA.setZero();
+               }
+
+               if (lengthB > 10f * Settings.linearSlop) {
+                       m_uB.mulLocal(1.0f / lengthB);
+               } else {
+                       m_uB.setZero();
+               }
+
+               // Compute effective mass.
+               float ruA = Vec2.cross(m_rA, m_uA);
+               float ruB = Vec2.cross(m_rB, m_uB);
+
+               float mA = m_invMassA + m_invIA * ruA * ruA;
+               float mB = m_invMassB + m_invIB * ruB * ruB;
+
+               m_mass = mA + m_ratio * m_ratio * mB;
+
+               if (m_mass > 0.0f) {
+                       m_mass = 1.0f / m_mass;
+               }
+
+               if (data.step.warmStarting) {
+
+                       // Scale impulses to support variable time steps.
+                       m_impulse *= data.step.dtRatio;
+
+                       // Warm starting.
+                       final Vec2 PA = pool.popVec2();
+                       final Vec2 PB = pool.popVec2();
+
+                       PA.set(m_uA).mulLocal(-m_impulse);
+                       PB.set(m_uB).mulLocal(-m_ratio * m_impulse);
+
+                       vA.x += m_invMassA * PA.x;
+                       vA.y += m_invMassA * PA.y;
+                       wA += m_invIA * Vec2.cross(m_rA, PA);
+                       vB.x += m_invMassB * PB.x;
+                       vB.y += m_invMassB * PB.y;
+                       wB += m_invIB * Vec2.cross(m_rB, PB);
+
+                       pool.pushVec2(2);
+               } else {
+                       m_impulse = 0.0f;
+               }
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(1);
+               pool.pushRot(2);
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Vec2 vpA = pool.popVec2();
+               final Vec2 vpB = pool.popVec2();
+               final Vec2 PA = pool.popVec2();
+               final Vec2 PB = pool.popVec2();
+
+               Vec2.crossToOutUnsafe(wA, m_rA, vpA);
+               vpA.addLocal(vA);
+               Vec2.crossToOutUnsafe(wB, m_rB, vpB);
+               vpB.addLocal(vB);
+
+               float Cdot = -Vec2.dot(m_uA, vpA) - m_ratio * Vec2.dot(m_uB, vpB);
+               float impulse = -m_mass * Cdot;
+               m_impulse += impulse;
+
+               PA.set(m_uA).mulLocal(-impulse);
+               PB.set(m_uB).mulLocal(-m_ratio * impulse);
+               vA.x += m_invMassA * PA.x;
+               vA.y += m_invMassA * PA.y;
+               wA += m_invIA * Vec2.cross(m_rA, PA);
+               vB.x += m_invMassB * PB.x;
+               vB.y += m_invMassB * PB.y;
+               wB += m_invIB * Vec2.cross(m_rB, PB);
+
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(4);
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 rA = pool.popVec2();
+               final Vec2 rB = pool.popVec2();
+               final Vec2 uA = pool.popVec2();
+               final Vec2 uB = pool.popVec2();
+               final Vec2 temp = pool.popVec2();
+               final Vec2 PA = pool.popVec2();
+               final Vec2 PB = pool.popVec2();
+
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+
+               qA.set(aA);
+               qB.set(aB);
+
+               Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), rA);
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), rB);
+
+               uA.set(cA).addLocal(rA).subLocal(m_groundAnchorA);
+               uB.set(cB).addLocal(rB).subLocal(m_groundAnchorB);
+
+               float lengthA = uA.length();
+               float lengthB = uB.length();
+
+               if (lengthA > 10.0f * Settings.linearSlop) {
+                       uA.mulLocal(1.0f / lengthA);
+               } else {
+                       uA.setZero();
+               }
+
+               if (lengthB > 10.0f * Settings.linearSlop) {
+                       uB.mulLocal(1.0f / lengthB);
+               } else {
+                       uB.setZero();
+               }
+
+               // Compute effective mass.
+               float ruA = Vec2.cross(rA, uA);
+               float ruB = Vec2.cross(rB, uB);
+
+               float mA = m_invMassA + m_invIA * ruA * ruA;
+               float mB = m_invMassB + m_invIB * ruB * ruB;
+
+               float mass = mA + m_ratio * m_ratio * mB;
+
+               if (mass > 0.0f) {
+                       mass = 1.0f / mass;
+               }
+
+               float C = m_constant - lengthA - m_ratio * lengthB;
+               float linearError = MathUtils.abs(C);
+
+               float impulse = -mass * C;
+
+               PA.set(uA).mulLocal(-impulse);
+               PB.set(uB).mulLocal(-m_ratio * impulse);
+
+               cA.x += m_invMassA * PA.x;
+               cA.y += m_invMassA * PA.y;
+               aA += m_invIA * Vec2.cross(rA, PA);
+               cB.x += m_invMassB * PB.x;
+               cB.y += m_invMassB * PB.y;
+               aB += m_invIB * Vec2.cross(rB, PB);
+
+               data.positions[m_indexA].c.set(cA);
+               data.positions[m_indexA].a = aA;
+               data.positions[m_indexB].c.set(cB);
+               data.positions[m_indexB].a = aB;
+
+               pool.pushRot(2);
+               pool.pushVec2(7);
+
+               return linearError < Settings.linearSlop;
+       }
 }
index b3050ac..af5085d 100644 (file)
 /**
  * Created at 12:11:41 PM Jan 23, 2011
  */
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Settings;
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Body;
 
-/**
- * Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a
- * pulley ratio.
+/** Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class PulleyJointDef extends JointDef {
 
-  /**
-   * The first ground anchor in world coordinates. This point never moves.
-   */
-  public Vec2 groundAnchorA;
+       /** The first ground anchor in world coordinates. This point never moves. */
+       public Vec2 groundAnchorA;
 
-  /**
-   * The second ground anchor in world coordinates. This point never moves.
-   */
-  public Vec2 groundAnchorB;
+       /** The second ground anchor in world coordinates. This point never moves. */
+       public Vec2 groundAnchorB;
 
-  /**
-   * The local anchor point relative to bodyA's origin.
-   */
-  public Vec2 localAnchorA;
+       /** The local anchor point relative to bodyA's origin. */
+       public Vec2 localAnchorA;
 
-  /**
-   * The local anchor point relative to bodyB's origin.
-   */
-  public Vec2 localAnchorB;
+       /** The local anchor point relative to bodyB's origin. */
+       public Vec2 localAnchorB;
 
-  /**
-   * The a reference length for the segment attached to bodyA.
-   */
-  public float lengthA;
+       /** The a reference length for the segment attached to bodyA. */
+       public float lengthA;
 
-  /**
-   * The a reference length for the segment attached to bodyB.
-   */
-  public float lengthB;
+       /** The a reference length for the segment attached to bodyB. */
+       public float lengthB;
 
-  /**
-   * The pulley ratio, used to simulate a block-and-tackle.
-   */
-  public float ratio;
+       /** The pulley ratio, used to simulate a block-and-tackle. */
+       public float ratio;
 
-  public PulleyJointDef() {
-    type = JointType.PULLEY;
-    groundAnchorA = new Vec2(-1.0f, 1.0f);
-    groundAnchorB = new Vec2(1.0f, 1.0f);
-    localAnchorA = new Vec2(-1.0f, 0.0f);
-    localAnchorB = new Vec2(1.0f, 0.0f);
-    lengthA = 0.0f;
-    lengthB = 0.0f;
-    ratio = 1.0f;
-    collideConnected = true;
-  }
+       public PulleyJointDef () {
+               type = JointType.PULLEY;
+               groundAnchorA = new Vec2(-1.0f, 1.0f);
+               groundAnchorB = new Vec2(1.0f, 1.0f);
+               localAnchorA = new Vec2(-1.0f, 0.0f);
+               localAnchorB = new Vec2(1.0f, 0.0f);
+               lengthA = 0.0f;
+               lengthB = 0.0f;
+               ratio = 1.0f;
+               collideConnected = true;
+       }
 
-  /**
-   * Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.
-   */
-  public void initialize(Body b1, Body b2, Vec2 ga1, Vec2 ga2, Vec2 anchor1, Vec2 anchor2, float r) {
-    bodyA = b1;
-    bodyB = b2;
-    groundAnchorA = ga1;
-    groundAnchorB = ga2;
-    localAnchorA = bodyA.getLocalPoint(anchor1);
-    localAnchorB = bodyB.getLocalPoint(anchor2);
-    Vec2 d1 = anchor1.sub(ga1);
-    lengthA = d1.length();
-    Vec2 d2 = anchor2.sub(ga2);
-    lengthB = d2.length();
-    ratio = r;
-    assert (ratio > Settings.EPSILON);
-  }
+       /** Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. */
+       public void initialize (Body b1, Body b2, Vec2 ga1, Vec2 ga2, Vec2 anchor1, Vec2 anchor2, float r) {
+               bodyA = b1;
+               bodyB = b2;
+               groundAnchorA = ga1;
+               groundAnchorB = ga2;
+               localAnchorA = bodyA.getLocalPoint(anchor1);
+               localAnchorB = bodyB.getLocalPoint(anchor2);
+               Vec2 d1 = anchor1.sub(ga1);
+               lengthA = d1.length();
+               Vec2 d2 = anchor2.sub(ga2);
+               lengthB = d2.length();
+               ratio = r;
+               assert (ratio > Settings.EPSILON);
+       }
 }
index 9aed98b..0d3404a 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Mat22;
@@ -47,488 +48,483 @@ import org.jbox2d.pooling.IWorldPool;
 //J = [0 0 -1 0 0 1]
 //K = invI1 + invI2
 
-/**
- * A revolute joint constrains two bodies to share a common point while they are free to rotate
- * about the point. The relative rotation about the shared point is the joint angle. You can limit
- * the relative rotation with a joint limit that specifies a lower and upper angle. You can use a
- * motor to drive the relative rotation about the shared point. A maximum motor torque is provided
- * so that infinite forces are not generated.
+/** A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative
+ * rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a
+ * lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is
+ * provided so that infinite forces are not generated.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class RevoluteJoint extends Joint {
 
-  // Solver shared
-  public final Vec2 m_localAnchorA = new Vec2();
-  public final Vec2 m_localAnchorB = new Vec2();
-  public final Vec3 m_impulse = new Vec3();
-  public float m_motorImpulse;
-
-  public boolean m_enableMotor;
-  public float m_maxMotorTorque;
-  public float m_motorSpeed;
-
-  public boolean m_enableLimit;
-  public float m_referenceAngle;
-  public float m_lowerAngle;
-  public float m_upperAngle;
-
-  // Solver temp
-  public int m_indexA;
-  public int m_indexB;
-  public final Vec2 m_rA = new Vec2();
-  public final Vec2 m_rB = new Vec2();
-  public final Vec2 m_localCenterA = new Vec2();
-  public final Vec2 m_localCenterB = new Vec2();
-  public float m_invMassA;
-  public float m_invMassB;
-  public float m_invIA;
-  public float m_invIB;
-  public final Mat33 m_mass = new Mat33(); // effective mass for point-to-point constraint.
-  public float m_motorMass; // effective mass for motor/limit angular constraint.
-  public LimitState m_limitState;
-
-  public RevoluteJoint(IWorldPool argWorld, RevoluteJointDef def) {
-    super(argWorld, def);
-    m_localAnchorA.set(def.localAnchorA);
-    m_localAnchorB.set(def.localAnchorB);
-    m_referenceAngle = def.referenceAngle;
-
-    m_motorImpulse = 0;
-
-    m_lowerAngle = def.lowerAngle;
-    m_upperAngle = def.upperAngle;
-    m_maxMotorTorque = def.maxMotorTorque;
-    m_motorSpeed = def.motorSpeed;
-    m_enableLimit = def.enableLimit;
-    m_enableMotor = def.enableMotor;
-    m_limitState = LimitState.INACTIVE;
-  }
-
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-    m_indexA = m_bodyA.m_islandIndex;
-    m_indexB = m_bodyB.m_islandIndex;
-    m_localCenterA.set(m_bodyA.m_sweep.localCenter);
-    m_localCenterB.set(m_bodyB.m_sweep.localCenter);
-    m_invMassA = m_bodyA.m_invMass;
-    m_invMassB = m_bodyB.m_invMass;
-    m_invIA = m_bodyA.m_invI;
-    m_invIB = m_bodyB.m_invI;
-
-    // Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-
-    // Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 temp = pool.popVec2();
-
-    qA.set(aA);
-    qB.set(aB);
-
-    // Compute the effective masses.
-    Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
-
-    // J = [-I -r1_skew I r2_skew]
-    // [ 0 -1 0 1]
-    // r_skew = [-ry; rx]
-
-    // Matlab
-    // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB]
-    // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB]
-    // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB]
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    boolean fixedRotation = (iA + iB == 0.0f);
-
-    m_mass.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB;
-    m_mass.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB;
-    m_mass.ez.x = -m_rA.y * iA - m_rB.y * iB;
-    m_mass.ex.y = m_mass.ey.x;
-    m_mass.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB;
-    m_mass.ez.y = m_rA.x * iA + m_rB.x * iB;
-    m_mass.ex.z = m_mass.ez.x;
-    m_mass.ey.z = m_mass.ez.y;
-    m_mass.ez.z = iA + iB;
-
-    m_motorMass = iA + iB;
-    if (m_motorMass > 0.0f) {
-      m_motorMass = 1.0f / m_motorMass;
-    }
-
-    if (m_enableMotor == false || fixedRotation) {
-      m_motorImpulse = 0.0f;
-    }
-
-    if (m_enableLimit && fixedRotation == false) {
-      float jointAngle = aB - aA - m_referenceAngle;
-      if (MathUtils.abs(m_upperAngle - m_lowerAngle) < 2.0f * Settings.angularSlop) {
-        m_limitState = LimitState.EQUAL;
-      } else if (jointAngle <= m_lowerAngle) {
-        if (m_limitState != LimitState.AT_LOWER) {
-          m_impulse.z = 0.0f;
-        }
-        m_limitState = LimitState.AT_LOWER;
-      } else if (jointAngle >= m_upperAngle) {
-        if (m_limitState != LimitState.AT_UPPER) {
-          m_impulse.z = 0.0f;
-        }
-        m_limitState = LimitState.AT_UPPER;
-      } else {
-        m_limitState = LimitState.INACTIVE;
-        m_impulse.z = 0.0f;
-      }
-    } else {
-      m_limitState = LimitState.INACTIVE;
-    }
-
-    if (data.step.warmStarting) {
-      final Vec2 P = pool.popVec2();
-      // Scale impulses to support a variable time step.
-      m_impulse.x *= data.step.dtRatio;
-      m_impulse.y *= data.step.dtRatio;
-      m_motorImpulse *= data.step.dtRatio;
-
-      P.x = m_impulse.x;
-      P.y = m_impulse.y;
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * (Vec2.cross(m_rA, P) + m_motorImpulse + m_impulse.z);
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * (Vec2.cross(m_rB, P) + m_motorImpulse + m_impulse.z);
-      pool.pushVec2(1);
-    } else {
-      m_impulse.setZero();
-      m_motorImpulse = 0.0f;
-    }
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(1);
-    pool.pushRot(2);
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    boolean fixedRotation = (iA + iB == 0.0f);
-
-    // Solve motor constraint.
-    if (m_enableMotor && m_limitState != LimitState.EQUAL && fixedRotation == false) {
-      float Cdot = wB - wA - m_motorSpeed;
-      float impulse = -m_motorMass * Cdot;
-      float oldImpulse = m_motorImpulse;
-      float maxImpulse = data.step.dt * m_maxMotorTorque;
-      m_motorImpulse = MathUtils.clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);
-      impulse = m_motorImpulse - oldImpulse;
-
-      wA -= iA * impulse;
-      wB += iB * impulse;
-    }
-    final Vec2 temp = pool.popVec2();
-
-    // Solve limit constraint.
-    if (m_enableLimit && m_limitState != LimitState.INACTIVE && fixedRotation == false) {
-
-      final Vec2 Cdot1 = pool.popVec2();
-      final Vec3 Cdot = pool.popVec3();
-
-      // Solve point-to-point constraint
-      Vec2.crossToOutUnsafe(wA, m_rA, temp);
-      Vec2.crossToOutUnsafe(wB, m_rB, Cdot1);
-      Cdot1.addLocal(vB).subLocal(vA).subLocal(temp);
-      float Cdot2 = wB - wA;
-      Cdot.set(Cdot1.x, Cdot1.y, Cdot2);
-
-      Vec3 impulse = pool.popVec3();
-      m_mass.solve33ToOut(Cdot, impulse);
-      impulse.negateLocal();
-
-      if (m_limitState == LimitState.EQUAL) {
-        m_impulse.addLocal(impulse);
-      } else if (m_limitState == LimitState.AT_LOWER) {
-        float newImpulse = m_impulse.z + impulse.z;
-        if (newImpulse < 0.0f) {
-          final Vec2 rhs = pool.popVec2();
-          rhs.set(m_mass.ez.x, m_mass.ez.y).mulLocal(m_impulse.z).subLocal(Cdot1);
-          m_mass.solve22ToOut(rhs, temp);
-          impulse.x = temp.x;
-          impulse.y = temp.y;
-          impulse.z = -m_impulse.z;
-          m_impulse.x += temp.x;
-          m_impulse.y += temp.y;
-          m_impulse.z = 0.0f;
-          pool.pushVec2(1);
-        } else {
-          m_impulse.addLocal(impulse);
-        }
-      } else if (m_limitState == LimitState.AT_UPPER) {
-        float newImpulse = m_impulse.z + impulse.z;
-        if (newImpulse > 0.0f) {
-          final Vec2 rhs = pool.popVec2();
-          rhs.set(m_mass.ez.x, m_mass.ez.y).mulLocal(m_impulse.z).subLocal(Cdot1);
-          m_mass.solve22ToOut(rhs, temp);
-          impulse.x = temp.x;
-          impulse.y = temp.y;
-          impulse.z = -m_impulse.z;
-          m_impulse.x += temp.x;
-          m_impulse.y += temp.y;
-          m_impulse.z = 0.0f;
-          pool.pushVec2(1);
-        } else {
-          m_impulse.addLocal(impulse);
-        }
-      }
-      final Vec2 P = pool.popVec2();
-
-      P.set(impulse.x, impulse.y);
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * (Vec2.cross(m_rA, P) + impulse.z);
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * (Vec2.cross(m_rB, P) + impulse.z);
-
-      pool.pushVec2(2);
-      pool.pushVec3(2);
-    } else {
-
-      // Solve point-to-point constraint
-      Vec2 Cdot = pool.popVec2();
-      Vec2 impulse = pool.popVec2();
-
-      Vec2.crossToOutUnsafe(wA, m_rA, temp);
-      Vec2.crossToOutUnsafe(wB, m_rB, Cdot);
-      Cdot.addLocal(vB).subLocal(vA).subLocal(temp);
-      m_mass.solve22ToOut(Cdot.negateLocal(), impulse); // just leave negated
-
-      m_impulse.x += impulse.x;
-      m_impulse.y += impulse.y;
-
-      vA.x -= mA * impulse.x;
-      vA.y -= mA * impulse.y;
-      wA -= iA * Vec2.cross(m_rA, impulse);
-
-      vB.x += mB * impulse.x;
-      vB.y += mB * impulse.y;
-      wB += iB * Vec2.cross(m_rB, impulse);
-
-      pool.pushVec2(2);
-    }
-
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(1);
-  }
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-
-    qA.set(aA);
-    qB.set(aB);
-
-    float angularError = 0.0f;
-    float positionError = 0.0f;
-
-    boolean fixedRotation = (m_invIA + m_invIB == 0.0f);
-
-    // Solve angular limit constraint.
-    if (m_enableLimit && m_limitState != LimitState.INACTIVE && fixedRotation == false) {
-      float angle = aB - aA - m_referenceAngle;
-      float limitImpulse = 0.0f;
-
-      if (m_limitState == LimitState.EQUAL) {
-        // Prevent large angular corrections
-        float C =
-            MathUtils.clamp(angle - m_lowerAngle, -Settings.maxAngularCorrection,
-                Settings.maxAngularCorrection);
-        limitImpulse = -m_motorMass * C;
-        angularError = MathUtils.abs(C);
-      } else if (m_limitState == LimitState.AT_LOWER) {
-        float C = angle - m_lowerAngle;
-        angularError = -C;
-
-        // Prevent large angular corrections and allow some slop.
-        C = MathUtils.clamp(C + Settings.angularSlop, -Settings.maxAngularCorrection, 0.0f);
-        limitImpulse = -m_motorMass * C;
-      } else if (m_limitState == LimitState.AT_UPPER) {
-        float C = angle - m_upperAngle;
-        angularError = C;
-
-        // Prevent large angular corrections and allow some slop.
-        C = MathUtils.clamp(C - Settings.angularSlop, 0.0f, Settings.maxAngularCorrection);
-        limitImpulse = -m_motorMass * C;
-      }
-
-      aA -= m_invIA * limitImpulse;
-      aB += m_invIB * limitImpulse;
-    }
-    // Solve point-to-point constraint.
-    {
-      qA.set(aA);
-      qB.set(aB);
-
-      final Vec2 rA = pool.popVec2();
-      final Vec2 rB = pool.popVec2();
-      final Vec2 C = pool.popVec2();
-      final Vec2 impulse = pool.popVec2();
-
-      Rot.mulToOutUnsafe(qA, C.set(m_localAnchorA).subLocal(m_localCenterA), rA);
-      Rot.mulToOutUnsafe(qB, C.set(m_localAnchorB).subLocal(m_localCenterB), rB);
-      C.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
-      positionError = C.length();
-
-      float mA = m_invMassA, mB = m_invMassB;
-      float iA = m_invIA, iB = m_invIB;
-
-      final Mat22 K = pool.popMat22();
-      K.ex.x = mA + mB + iA * rA.y * rA.y + iB * rB.y * rB.y;
-      K.ex.y = -iA * rA.x * rA.y - iB * rB.x * rB.y;
-      K.ey.x = K.ex.y;
-      K.ey.y = mA + mB + iA * rA.x * rA.x + iB * rB.x * rB.x;
-      K.solveToOut(C, impulse);
-      impulse.negateLocal();
-
-      cA.x -= mA * impulse.x;
-      cA.y -= mA * impulse.y;
-      aA -= iA * Vec2.cross(rA, impulse);
-
-      cB.x += mB * impulse.x;
-      cB.y += mB * impulse.y;
-      aB += iB * Vec2.cross(rB, impulse);
-
-      pool.pushVec2(4);
-      pool.pushMat22(1);
-    }
-    data.positions[m_indexA].c.set(cA);
-    data.positions[m_indexA].a = aA;
-    data.positions[m_indexB].c.set(cB);
-    data.positions[m_indexB].a = aB;
-
-    pool.pushRot(2);
-
-    return positionError <= Settings.linearSlop && angularError <= Settings.angularSlop;
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-    m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-    m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
-  }
-
-  @Override
-  public void getReactionForce(float inv_dt, Vec2 argOut) {
-    argOut.set(m_impulse.x, m_impulse.y).mulLocal(inv_dt);
-  }
-
-  @Override
-  public float getReactionTorque(float inv_dt) {
-    return inv_dt * m_impulse.z;
-  }
-
-  public float getJointAngle() {
-    final Body b1 = m_bodyA;
-    final Body b2 = m_bodyB;
-    return b2.m_sweep.a - b1.m_sweep.a - m_referenceAngle;
-  }
-
-  public float getJointSpeed() {
-    final Body b1 = m_bodyA;
-    final Body b2 = m_bodyB;
-    return b2.m_angularVelocity - b1.m_angularVelocity;
-  }
-
-  public boolean isMotorEnabled() {
-    return m_enableMotor;
-  }
-
-  public void enableMotor(boolean flag) {
-    m_bodyA.setAwake(true);
-    m_bodyB.setAwake(true);
-    m_enableMotor = flag;
-  }
-
-  public float getMotorTorque(float inv_dt) {
-    return m_motorImpulse * inv_dt;
-  }
-
-  public void setMotorSpeed(final float speed) {
-    m_bodyA.setAwake(true);
-    m_bodyB.setAwake(true);
-    m_motorSpeed = speed;
-  }
-
-  public void setMaxMotorTorque(final float torque) {
-    m_bodyA.setAwake(true);
-    m_bodyB.setAwake(true);
-    m_maxMotorTorque = torque;
-  }
-
-  public boolean isLimitEnabled() {
-    return m_enableLimit;
-  }
-
-  public void enableLimit(final boolean flag) {
-    if (flag != m_enableLimit) {
-      m_bodyA.setAwake(true);
-      m_bodyB.setAwake(true);
-      m_enableLimit = flag;
-      m_impulse.z = 0.0f;
-    }
-  }
-
-  public float getLowerLimit() {
-    return m_lowerAngle;
-  }
-
-  public float getUpperLimit() {
-    return m_upperAngle;
-  }
-
-  public void setLimits(final float lower, final float upper) {
-    assert (lower <= upper);
-    if (lower != m_lowerAngle || upper != m_upperAngle) {
-      m_bodyA.setAwake(true);
-      m_bodyB.setAwake(true);
-      m_impulse.z = 0.0f;
-      m_lowerAngle = lower;
-      m_upperAngle = upper;
-    }
-  }
+       // Solver shared
+       public final Vec2 m_localAnchorA = new Vec2();
+       public final Vec2 m_localAnchorB = new Vec2();
+       public final Vec3 m_impulse = new Vec3();
+       public float m_motorImpulse;
+
+       public boolean m_enableMotor;
+       public float m_maxMotorTorque;
+       public float m_motorSpeed;
+
+       public boolean m_enableLimit;
+       public float m_referenceAngle;
+       public float m_lowerAngle;
+       public float m_upperAngle;
+
+       // Solver temp
+       public int m_indexA;
+       public int m_indexB;
+       public final Vec2 m_rA = new Vec2();
+       public final Vec2 m_rB = new Vec2();
+       public final Vec2 m_localCenterA = new Vec2();
+       public final Vec2 m_localCenterB = new Vec2();
+       public float m_invMassA;
+       public float m_invMassB;
+       public float m_invIA;
+       public float m_invIB;
+       public final Mat33 m_mass = new Mat33(); // effective mass for point-to-point constraint.
+       public float m_motorMass; // effective mass for motor/limit angular constraint.
+       public LimitState m_limitState;
+
+       public RevoluteJoint (IWorldPool argWorld, RevoluteJointDef def) {
+               super(argWorld, def);
+               m_localAnchorA.set(def.localAnchorA);
+               m_localAnchorB.set(def.localAnchorB);
+               m_referenceAngle = def.referenceAngle;
+
+               m_motorImpulse = 0;
+
+               m_lowerAngle = def.lowerAngle;
+               m_upperAngle = def.upperAngle;
+               m_maxMotorTorque = def.maxMotorTorque;
+               m_motorSpeed = def.motorSpeed;
+               m_enableLimit = def.enableLimit;
+               m_enableMotor = def.enableMotor;
+               m_limitState = LimitState.INACTIVE;
+       }
+
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+               m_indexA = m_bodyA.m_islandIndex;
+               m_indexB = m_bodyB.m_islandIndex;
+               m_localCenterA.set(m_bodyA.m_sweep.localCenter);
+               m_localCenterB.set(m_bodyB.m_sweep.localCenter);
+               m_invMassA = m_bodyA.m_invMass;
+               m_invMassB = m_bodyB.m_invMass;
+               m_invIA = m_bodyA.m_invI;
+               m_invIB = m_bodyB.m_invI;
+
+               // Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+
+               // Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 temp = pool.popVec2();
+
+               qA.set(aA);
+               qB.set(aB);
+
+               // Compute the effective masses.
+               Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
+
+               // J = [-I -r1_skew I r2_skew]
+               // [ 0 -1 0 1]
+               // r_skew = [-ry; rx]
+
+               // Matlab
+               // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB]
+               // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB]
+               // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB]
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               boolean fixedRotation = (iA + iB == 0.0f);
+
+               m_mass.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB;
+               m_mass.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB;
+               m_mass.ez.x = -m_rA.y * iA - m_rB.y * iB;
+               m_mass.ex.y = m_mass.ey.x;
+               m_mass.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB;
+               m_mass.ez.y = m_rA.x * iA + m_rB.x * iB;
+               m_mass.ex.z = m_mass.ez.x;
+               m_mass.ey.z = m_mass.ez.y;
+               m_mass.ez.z = iA + iB;
+
+               m_motorMass = iA + iB;
+               if (m_motorMass > 0.0f) {
+                       m_motorMass = 1.0f / m_motorMass;
+               }
+
+               if (m_enableMotor == false || fixedRotation) {
+                       m_motorImpulse = 0.0f;
+               }
+
+               if (m_enableLimit && fixedRotation == false) {
+                       float jointAngle = aB - aA - m_referenceAngle;
+                       if (MathUtils.abs(m_upperAngle - m_lowerAngle) < 2.0f * Settings.angularSlop) {
+                               m_limitState = LimitState.EQUAL;
+                       } else if (jointAngle <= m_lowerAngle) {
+                               if (m_limitState != LimitState.AT_LOWER) {
+                                       m_impulse.z = 0.0f;
+                               }
+                               m_limitState = LimitState.AT_LOWER;
+                       } else if (jointAngle >= m_upperAngle) {
+                               if (m_limitState != LimitState.AT_UPPER) {
+                                       m_impulse.z = 0.0f;
+                               }
+                               m_limitState = LimitState.AT_UPPER;
+                       } else {
+                               m_limitState = LimitState.INACTIVE;
+                               m_impulse.z = 0.0f;
+                       }
+               } else {
+                       m_limitState = LimitState.INACTIVE;
+               }
+
+               if (data.step.warmStarting) {
+                       final Vec2 P = pool.popVec2();
+                       // Scale impulses to support a variable time step.
+                       m_impulse.x *= data.step.dtRatio;
+                       m_impulse.y *= data.step.dtRatio;
+                       m_motorImpulse *= data.step.dtRatio;
+
+                       P.x = m_impulse.x;
+                       P.y = m_impulse.y;
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * (Vec2.cross(m_rA, P) + m_motorImpulse + m_impulse.z);
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * (Vec2.cross(m_rB, P) + m_motorImpulse + m_impulse.z);
+                       pool.pushVec2(1);
+               } else {
+                       m_impulse.setZero();
+                       m_motorImpulse = 0.0f;
+               }
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(1);
+               pool.pushRot(2);
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               boolean fixedRotation = (iA + iB == 0.0f);
+
+               // Solve motor constraint.
+               if (m_enableMotor && m_limitState != LimitState.EQUAL && fixedRotation == false) {
+                       float Cdot = wB - wA - m_motorSpeed;
+                       float impulse = -m_motorMass * Cdot;
+                       float oldImpulse = m_motorImpulse;
+                       float maxImpulse = data.step.dt * m_maxMotorTorque;
+                       m_motorImpulse = MathUtils.clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse);
+                       impulse = m_motorImpulse - oldImpulse;
+
+                       wA -= iA * impulse;
+                       wB += iB * impulse;
+               }
+               final Vec2 temp = pool.popVec2();
+
+               // Solve limit constraint.
+               if (m_enableLimit && m_limitState != LimitState.INACTIVE && fixedRotation == false) {
+
+                       final Vec2 Cdot1 = pool.popVec2();
+                       final Vec3 Cdot = pool.popVec3();
+
+                       // Solve point-to-point constraint
+                       Vec2.crossToOutUnsafe(wA, m_rA, temp);
+                       Vec2.crossToOutUnsafe(wB, m_rB, Cdot1);
+                       Cdot1.addLocal(vB).subLocal(vA).subLocal(temp);
+                       float Cdot2 = wB - wA;
+                       Cdot.set(Cdot1.x, Cdot1.y, Cdot2);
+
+                       Vec3 impulse = pool.popVec3();
+                       m_mass.solve33ToOut(Cdot, impulse);
+                       impulse.negateLocal();
+
+                       if (m_limitState == LimitState.EQUAL) {
+                               m_impulse.addLocal(impulse);
+                       } else if (m_limitState == LimitState.AT_LOWER) {
+                               float newImpulse = m_impulse.z + impulse.z;
+                               if (newImpulse < 0.0f) {
+                                       final Vec2 rhs = pool.popVec2();
+                                       rhs.set(m_mass.ez.x, m_mass.ez.y).mulLocal(m_impulse.z).subLocal(Cdot1);
+                                       m_mass.solve22ToOut(rhs, temp);
+                                       impulse.x = temp.x;
+                                       impulse.y = temp.y;
+                                       impulse.z = -m_impulse.z;
+                                       m_impulse.x += temp.x;
+                                       m_impulse.y += temp.y;
+                                       m_impulse.z = 0.0f;
+                                       pool.pushVec2(1);
+                               } else {
+                                       m_impulse.addLocal(impulse);
+                               }
+                       } else if (m_limitState == LimitState.AT_UPPER) {
+                               float newImpulse = m_impulse.z + impulse.z;
+                               if (newImpulse > 0.0f) {
+                                       final Vec2 rhs = pool.popVec2();
+                                       rhs.set(m_mass.ez.x, m_mass.ez.y).mulLocal(m_impulse.z).subLocal(Cdot1);
+                                       m_mass.solve22ToOut(rhs, temp);
+                                       impulse.x = temp.x;
+                                       impulse.y = temp.y;
+                                       impulse.z = -m_impulse.z;
+                                       m_impulse.x += temp.x;
+                                       m_impulse.y += temp.y;
+                                       m_impulse.z = 0.0f;
+                                       pool.pushVec2(1);
+                               } else {
+                                       m_impulse.addLocal(impulse);
+                               }
+                       }
+                       final Vec2 P = pool.popVec2();
+
+                       P.set(impulse.x, impulse.y);
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * (Vec2.cross(m_rA, P) + impulse.z);
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * (Vec2.cross(m_rB, P) + impulse.z);
+
+                       pool.pushVec2(2);
+                       pool.pushVec3(2);
+               } else {
+
+                       // Solve point-to-point constraint
+                       Vec2 Cdot = pool.popVec2();
+                       Vec2 impulse = pool.popVec2();
+
+                       Vec2.crossToOutUnsafe(wA, m_rA, temp);
+                       Vec2.crossToOutUnsafe(wB, m_rB, Cdot);
+                       Cdot.addLocal(vB).subLocal(vA).subLocal(temp);
+                       m_mass.solve22ToOut(Cdot.negateLocal(), impulse); // just leave negated
+
+                       m_impulse.x += impulse.x;
+                       m_impulse.y += impulse.y;
+
+                       vA.x -= mA * impulse.x;
+                       vA.y -= mA * impulse.y;
+                       wA -= iA * Vec2.cross(m_rA, impulse);
+
+                       vB.x += mB * impulse.x;
+                       vB.y += mB * impulse.y;
+                       wB += iB * Vec2.cross(m_rB, impulse);
+
+                       pool.pushVec2(2);
+               }
+
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(1);
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+
+               qA.set(aA);
+               qB.set(aB);
+
+               float angularError = 0.0f;
+               float positionError = 0.0f;
+
+               boolean fixedRotation = (m_invIA + m_invIB == 0.0f);
+
+               // Solve angular limit constraint.
+               if (m_enableLimit && m_limitState != LimitState.INACTIVE && fixedRotation == false) {
+                       float angle = aB - aA - m_referenceAngle;
+                       float limitImpulse = 0.0f;
+
+                       if (m_limitState == LimitState.EQUAL) {
+                               // Prevent large angular corrections
+                               float C = MathUtils.clamp(angle - m_lowerAngle, -Settings.maxAngularCorrection, Settings.maxAngularCorrection);
+                               limitImpulse = -m_motorMass * C;
+                               angularError = MathUtils.abs(C);
+                       } else if (m_limitState == LimitState.AT_LOWER) {
+                               float C = angle - m_lowerAngle;
+                               angularError = -C;
+
+                               // Prevent large angular corrections and allow some slop.
+                               C = MathUtils.clamp(C + Settings.angularSlop, -Settings.maxAngularCorrection, 0.0f);
+                               limitImpulse = -m_motorMass * C;
+                       } else if (m_limitState == LimitState.AT_UPPER) {
+                               float C = angle - m_upperAngle;
+                               angularError = C;
+
+                               // Prevent large angular corrections and allow some slop.
+                               C = MathUtils.clamp(C - Settings.angularSlop, 0.0f, Settings.maxAngularCorrection);
+                               limitImpulse = -m_motorMass * C;
+                       }
+
+                       aA -= m_invIA * limitImpulse;
+                       aB += m_invIB * limitImpulse;
+               }
+               // Solve point-to-point constraint.
+               {
+                       qA.set(aA);
+                       qB.set(aB);
+
+                       final Vec2 rA = pool.popVec2();
+                       final Vec2 rB = pool.popVec2();
+                       final Vec2 C = pool.popVec2();
+                       final Vec2 impulse = pool.popVec2();
+
+                       Rot.mulToOutUnsafe(qA, C.set(m_localAnchorA).subLocal(m_localCenterA), rA);
+                       Rot.mulToOutUnsafe(qB, C.set(m_localAnchorB).subLocal(m_localCenterB), rB);
+                       C.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
+                       positionError = C.length();
+
+                       float mA = m_invMassA, mB = m_invMassB;
+                       float iA = m_invIA, iB = m_invIB;
+
+                       final Mat22 K = pool.popMat22();
+                       K.ex.x = mA + mB + iA * rA.y * rA.y + iB * rB.y * rB.y;
+                       K.ex.y = -iA * rA.x * rA.y - iB * rB.x * rB.y;
+                       K.ey.x = K.ex.y;
+                       K.ey.y = mA + mB + iA * rA.x * rA.x + iB * rB.x * rB.x;
+                       K.solveToOut(C, impulse);
+                       impulse.negateLocal();
+
+                       cA.x -= mA * impulse.x;
+                       cA.y -= mA * impulse.y;
+                       aA -= iA * Vec2.cross(rA, impulse);
+
+                       cB.x += mB * impulse.x;
+                       cB.y += mB * impulse.y;
+                       aB += iB * Vec2.cross(rB, impulse);
+
+                       pool.pushVec2(4);
+                       pool.pushMat22(1);
+               }
+               data.positions[m_indexA].c.set(cA);
+               data.positions[m_indexA].a = aA;
+               data.positions[m_indexB].c.set(cB);
+               data.positions[m_indexB].a = aB;
+
+               pool.pushRot(2);
+
+               return positionError <= Settings.linearSlop && angularError <= Settings.angularSlop;
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+               m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+               m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
+       }
+
+       @Override
+       public void getReactionForce (float inv_dt, Vec2 argOut) {
+               argOut.set(m_impulse.x, m_impulse.y).mulLocal(inv_dt);
+       }
+
+       @Override
+       public float getReactionTorque (float inv_dt) {
+               return inv_dt * m_impulse.z;
+       }
+
+       public float getJointAngle () {
+               final Body b1 = m_bodyA;
+               final Body b2 = m_bodyB;
+               return b2.m_sweep.a - b1.m_sweep.a - m_referenceAngle;
+       }
+
+       public float getJointSpeed () {
+               final Body b1 = m_bodyA;
+               final Body b2 = m_bodyB;
+               return b2.m_angularVelocity - b1.m_angularVelocity;
+       }
+
+       public boolean isMotorEnabled () {
+               return m_enableMotor;
+       }
+
+       public void enableMotor (boolean flag) {
+               m_bodyA.setAwake(true);
+               m_bodyB.setAwake(true);
+               m_enableMotor = flag;
+       }
+
+       public float getMotorTorque (float inv_dt) {
+               return m_motorImpulse * inv_dt;
+       }
+
+       public void setMotorSpeed (final float speed) {
+               m_bodyA.setAwake(true);
+               m_bodyB.setAwake(true);
+               m_motorSpeed = speed;
+       }
+
+       public void setMaxMotorTorque (final float torque) {
+               m_bodyA.setAwake(true);
+               m_bodyB.setAwake(true);
+               m_maxMotorTorque = torque;
+       }
+
+       public boolean isLimitEnabled () {
+               return m_enableLimit;
+       }
+
+       public void enableLimit (final boolean flag) {
+               if (flag != m_enableLimit) {
+                       m_bodyA.setAwake(true);
+                       m_bodyB.setAwake(true);
+                       m_enableLimit = flag;
+                       m_impulse.z = 0.0f;
+               }
+       }
+
+       public float getLowerLimit () {
+               return m_lowerAngle;
+       }
+
+       public float getUpperLimit () {
+               return m_upperAngle;
+       }
+
+       public void setLimits (final float lower, final float upper) {
+               assert (lower <= upper);
+               if (lower != m_lowerAngle || upper != m_upperAngle) {
+                       m_bodyA.setAwake(true);
+                       m_bodyB.setAwake(true);
+                       m_impulse.z = 0.0f;
+                       m_lowerAngle = lower;
+                       m_upperAngle = upper;
+               }
+       }
 }
index 1651bf7..3dc0d0f 100644 (file)
@@ -49,70 +49,44 @@ package org.jbox2d.dynamics.joints;
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Body;
 
-/**
- *  Revolute joint definition. This requires defining an
- *  anchor point where the bodies are joined. The definition
- *  uses local anchor points so that the initial configuration
- *  can violate the constraint slightly. You also need to
- *  specify the initial relative angle for joint limits. This
- *  helps when saving and loading a game.
- *  The local anchor points are measured from the body's origin
- *  rather than the center of mass because:<br/>
- *  <ul>
- *  <li>you might not know where the center of mass will be.</li>
- *  <li>if you add/remove shapes from a body and recompute the mass,
- *     the joints will be broken.</li></ul>
- */
+/** Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor
+ * points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative
+ * angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin
+ * rather than the center of mass because:<br/>
+ * <ul>
+ * <li>you might not know where the center of mass will be.</li>
+ * <li>if you add/remove shapes from a body and recompute the mass, the joints will be broken.</li>
+ * </ul> */
 public class RevoluteJointDef extends JointDef {
-       
 
-       /**
-        *  The local anchor point relative to body1's origin.
-        */
+       /** The local anchor point relative to body1's origin. */
        public Vec2 localAnchorA;
 
-       /**
-        *  The local anchor point relative to body2's origin.
-        */
+       /** The local anchor point relative to body2's origin. */
        public Vec2 localAnchorB;
 
-       /**
-        *  The body2 angle minus body1 angle in the reference state (radians).
-        */
+       /** The body2 angle minus body1 angle in the reference state (radians). */
        public float referenceAngle;
 
-       /**
-        *  A flag to enable joint limits.
-        */
+       /** A flag to enable joint limits. */
        public boolean enableLimit;
 
-       /**
-        *  The lower angle for the joint limit (radians).
-        */
+       /** The lower angle for the joint limit (radians). */
        public float lowerAngle;
 
-       /**
-        *  The upper angle for the joint limit (radians).
-        */
+       /** The upper angle for the joint limit (radians). */
        public float upperAngle;
 
-       /**
-        *  A flag to enable the joint motor.
-        */
+       /** A flag to enable the joint motor. */
        public boolean enableMotor;
 
-       /**
-        *  The desired motor speed. Usually in radians per second.
-        */
+       /** The desired motor speed. Usually in radians per second. */
        public float motorSpeed;
 
-       /**
-        *  The maximum motor torque used to achieve the desired motor speed.
-        *  Usually in N-m.
-        */
+       /** The maximum motor torque used to achieve the desired motor speed. Usually in N-m. */
        public float maxMotorTorque;
-       
-       public RevoluteJointDef() {
+
+       public RevoluteJointDef () {
                type = JointType.REVOLUTE;
                localAnchorA = new Vec2(0.0f, 0.0f);
                localAnchorB = new Vec2(0.0f, 0.0f);
@@ -125,14 +99,11 @@ public class RevoluteJointDef extends JointDef {
                enableMotor = false;
        }
 
-       /**
-        * Initialize the bodies, anchors, and reference angle using the world
-        * anchor.
+       /** Initialize the bodies, anchors, and reference angle using the world anchor.
         * @param b1
         * @param b2
-        * @param anchor
-        */
-       public void initialize(final Body b1, final Body b2, final Vec2 anchor) {
+        * @param anchor */
+       public void initialize (final Body b1, final Body b2, final Vec2 anchor) {
                bodyA = b1;
                bodyB = b2;
                bodyA.getLocalPointToOut(anchor, localAnchorA);
index 0c27c80..90eb79e 100644 (file)
@@ -24,6 +24,7 @@
 /**
  * Created at 3:38:38 AM Jan 15, 2011
  */
+
 package org.jbox2d.dynamics.joints;
 
 import org.jbox2d.common.Mat33;
@@ -49,377 +50,372 @@ import org.jbox2d.pooling.IWorldPool;
 //J = [0 0 -1 0 0 1]
 //K = invI1 + invI2
 
-/**
- * A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the
- * island constraint solver is approximate.
+/** A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is
+ * approximate.
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class WeldJoint extends Joint {
 
-  private float m_frequencyHz;
-  private float m_dampingRatio;
-  private float m_bias;
-
-  // Solver shared
-  private final Vec2 m_localAnchorA;
-  private final Vec2 m_localAnchorB;
-  private float m_referenceAngle;
-  private float m_gamma;
-  private final Vec3 m_impulse;
-
-
-  // Solver temp
-  private int m_indexA;
-  private int m_indexB;
-  private final Vec2 m_rA = new Vec2();
-  private final Vec2 m_rB = new Vec2();
-  private final Vec2 m_localCenterA = new Vec2();
-  private final Vec2 m_localCenterB = new Vec2();
-  private float m_invMassA;
-  private float m_invMassB;
-  private float m_invIA;
-  private float m_invIB;
-  private final Mat33 m_mass = new Mat33();
-
-  /**
-   * @param argWorld
-   * @param def
-   */
-  protected WeldJoint(IWorldPool argWorld, WeldJointDef def) {
-    super(argWorld, def);
-    m_localAnchorA = new Vec2(def.localAnchorA);
-    m_localAnchorB = new Vec2(def.localAnchorB);
-    m_referenceAngle = def.referenceAngle;
-    m_frequencyHz = def.frequencyHz;
-    m_dampingRatio = def.dampingRatio;
-
-    m_impulse = new Vec3();
-    m_impulse.setZero();
-
-  }
-
-  public Vec2 getLocalAnchorA() {
-    return m_localAnchorA;
-  }
-
-  public Vec2 getLocalAnchorB() {
-    return m_localAnchorB;
-  }
-
-  public float getFrequency() {
-    return m_frequencyHz;
-  }
-
-  public void setFrequency(float frequencyHz) {
-    this.m_frequencyHz = frequencyHz;
-  }
-
-  public float getDampingRatio() {
-    return m_dampingRatio;
-  }
-
-  public void setDampingRatio(float dampingRatio) {
-    this.m_dampingRatio = dampingRatio;
-  }
-
-  @Override
-  public void getAnchorA(Vec2 argOut) {
-    m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
-  }
-
-  @Override
-  public void getAnchorB(Vec2 argOut) {
-    m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
-  }
-
-  @Override
-  public void getReactionForce(float inv_dt, Vec2 argOut) {
-    argOut.set(m_impulse.x, m_impulse.y);
-    argOut.mulLocal(inv_dt);
-  }
-
-  @Override
-  public float getReactionTorque(float inv_dt) {
-    return inv_dt * m_impulse.z;
-  }
-
-  @Override
-  public void initVelocityConstraints(final SolverData data) {
-    m_indexA = m_bodyA.m_islandIndex;
-    m_indexB = m_bodyB.m_islandIndex;
-    m_localCenterA.set(m_bodyA.m_sweep.localCenter);
-    m_localCenterB.set(m_bodyB.m_sweep.localCenter);
-    m_invMassA = m_bodyA.m_invMass;
-    m_invMassB = m_bodyB.m_invMass;
-    m_invIA = m_bodyA.m_invI;
-    m_invIB = m_bodyB.m_invI;
-
-    // Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-
-    // Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 temp = pool.popVec2();
-
-    qA.set(aA);
-    qB.set(aB);
-
-    // Compute the effective masses.
-    Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
-
-    // J = [-I -r1_skew I r2_skew]
-    // [ 0 -1 0 1]
-    // r_skew = [-ry; rx]
-
-    // Matlab
-    // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB]
-    // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB]
-    // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB]
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    final Mat33 K = pool.popMat33();
-
-    K.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB;
-    K.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB;
-    K.ez.x = -m_rA.y * iA - m_rB.y * iB;
-    K.ex.y = K.ey.x;
-    K.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB;
-    K.ez.y = m_rA.x * iA + m_rB.x * iB;
-    K.ex.z = K.ez.x;
-    K.ey.z = K.ez.y;
-    K.ez.z = iA + iB;
-
-    if (m_frequencyHz > 0.0f) {
-      K.getInverse22(m_mass);
-
-      float invM = iA + iB;
-      float m = invM > 0.0f ? 1.0f / invM : 0.0f;
-
-      float C = aB - aA - m_referenceAngle;
-
-      // Frequency
-      float omega = 2.0f * MathUtils.PI * m_frequencyHz;
-
-      // Damping coefficient
-      float d = 2.0f * m * m_dampingRatio * omega;
-
-      // Spring stiffness
-      float k = m * omega * omega;
-
-      // magic formulas
-      float h = data.step.dt;
-      m_gamma = h * (d + h * k);
-      m_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f;
-      m_bias = C * h * k * m_gamma;
-
-      invM += m_gamma;
-      m_mass.ez.z = invM != 0.0f ? 1.0f / invM : 0.0f;
-    } else {
-      K.getSymInverse33(m_mass);
-      m_gamma = 0.0f;
-      m_bias = 0.0f;
-    }
-
-    if (data.step.warmStarting) {
-      final Vec2 P = pool.popVec2();
-      // Scale impulses to support a variable time step.
-      m_impulse.mulLocal(data.step.dtRatio);
-
-      P.set(m_impulse.x, m_impulse.y);
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * (Vec2.cross(m_rA, P) + m_impulse.z);
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * (Vec2.cross(m_rB, P) + m_impulse.z);
-      pool.pushVec2(1);
-    } else {
-      m_impulse.setZero();
-    }
-
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(1);
-    pool.pushRot(2);
-    pool.pushMat33(1);
-  }
-
-  @Override
-  public void solveVelocityConstraints(final SolverData data) {
-    Vec2 vA = data.velocities[m_indexA].v;
-    float wA = data.velocities[m_indexA].w;
-    Vec2 vB = data.velocities[m_indexB].v;
-    float wB = data.velocities[m_indexB].w;
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    final Vec2 Cdot1 = pool.popVec2();
-    final Vec2 P = pool.popVec2();
-    final Vec2 temp = pool.popVec2();
-    if (m_frequencyHz > 0.0f) {
-      float Cdot2 = wB - wA;
-
-      float impulse2 = -m_mass.ez.z * (Cdot2 + m_bias + m_gamma * m_impulse.z);
-      m_impulse.z += impulse2;
-
-      wA -= iA * impulse2;
-      wB += iB * impulse2;
-
-      Vec2.crossToOutUnsafe(wB, m_rB, Cdot1);
-      Vec2.crossToOutUnsafe(wA, m_rA, temp);
-      Cdot1.addLocal(vB).subLocal(vA).subLocal(temp);
-
-      final Vec2 impulse1 = P;
-      Mat33.mul22ToOutUnsafe(m_mass, Cdot1, impulse1);
-      impulse1.negateLocal();
-
-      m_impulse.x += impulse1.x;
-      m_impulse.y += impulse1.y;
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * Vec2.cross(m_rA, P);
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * Vec2.cross(m_rB, P);
-    } else {
-      Vec2.crossToOutUnsafe(wA, m_rA, temp);
-      Vec2.crossToOutUnsafe(wB, m_rB, Cdot1);
-      Cdot1.addLocal(vB).subLocal(vA).subLocal(temp);
-      float Cdot2 = wB - wA;
-
-      final Vec3 Cdot = pool.popVec3();
-      Cdot.set(Cdot1.x, Cdot1.y, Cdot2);
-
-      final Vec3 impulse = pool.popVec3();
-      Mat33.mulToOutUnsafe(m_mass, Cdot, impulse);
-      impulse.negateLocal();
-      m_impulse.addLocal(impulse);
-
-      P.set(impulse.x, impulse.y);
-
-      vA.x -= mA * P.x;
-      vA.y -= mA * P.y;
-      wA -= iA * (Vec2.cross(m_rA, P) + impulse.z);
-
-      vB.x += mB * P.x;
-      vB.y += mB * P.y;
-      wB += iB * (Vec2.cross(m_rB, P) + impulse.z);
-
-      pool.pushVec3(2);
-    }
-
-    data.velocities[m_indexA].v.set(vA);
-    data.velocities[m_indexA].w = wA;
-    data.velocities[m_indexB].v.set(vB);
-    data.velocities[m_indexB].w = wB;
-
-    pool.pushVec2(3);
-  }
-
-  @Override
-  public boolean solvePositionConstraints(final SolverData data) {
-    Vec2 cA = data.positions[m_indexA].c;
-    float aA = data.positions[m_indexA].a;
-    Vec2 cB = data.positions[m_indexB].c;
-    float aB = data.positions[m_indexB].a;
-    final Rot qA = pool.popRot();
-    final Rot qB = pool.popRot();
-    final Vec2 temp = pool.popVec2();
-    final Vec2 rA = pool.popVec2();
-    final Vec2 rB = pool.popVec2();
-
-    qA.set(aA);
-    qB.set(aB);
-
-    float mA = m_invMassA, mB = m_invMassB;
-    float iA = m_invIA, iB = m_invIB;
-
-    Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), rA);
-    Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), rB);
-    float positionError, angularError;
-
-    final Mat33 K = pool.popMat33();
-    final Vec2 C1 = pool.popVec2();
-    final Vec2 P = pool.popVec2();
-
-    K.ex.x = mA + mB + rA.y * rA.y * iA + rB.y * rB.y * iB;
-    K.ey.x = -rA.y * rA.x * iA - rB.y * rB.x * iB;
-    K.ez.x = -rA.y * iA - rB.y * iB;
-    K.ex.y = K.ey.x;
-    K.ey.y = mA + mB + rA.x * rA.x * iA + rB.x * rB.x * iB;
-    K.ez.y = rA.x * iA + rB.x * iB;
-    K.ex.z = K.ez.x;
-    K.ey.z = K.ez.y;
-    K.ez.z = iA + iB;
-    if (m_frequencyHz > 0.0f) {
-      C1.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
-
-      positionError = C1.length();
-      angularError = 0.0f;
-
-      K.solve22ToOut(C1, P);
-      P.negateLocal();
-
-      cA.x -= mA * P.x;
-      cA.y -= mA * P.y;
-      aA -= iA * Vec2.cross(rA, P);
-
-      cB.x += mB * P.x;
-      cB.y += mB * P.y;
-      aB += iB * Vec2.cross(rB, P);
-    } else {
-      C1.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
-      float C2 = aB - aA - m_referenceAngle;
-
-      positionError = C1.length();
-      angularError = MathUtils.abs(C2);
-
-      final Vec3 C = pool.popVec3();
-      final Vec3 impulse = pool.popVec3();
-      C.set(C1.x, C1.y, C2);
-
-      K.solve33ToOut(C, impulse);
-      impulse.negateLocal();
-      P.set(impulse.x, impulse.y);
-
-      cA.x -= mA * P.x;
-      cA.y -= mA * P.y;
-      aA -= iA * (Vec2.cross(rA, P) + impulse.z);
-
-      cB.x += mB * P.x;
-      cB.y += mB * P.y;
-      aB += iB * (Vec2.cross(rB, P) + impulse.z);
-      pool.pushVec3(2);
-    }
-
-    data.positions[m_indexA].c.set(cA);
-    data.positions[m_indexA].a = aA;
-    data.positions[m_indexB].c.set(cB);
-    data.positions[m_indexB].a = aB;
-
-    pool.pushVec2(5);
-    pool.pushRot(2);
-    pool.pushMat33(1);
-
-    return positionError <= Settings.linearSlop && angularError <= Settings.angularSlop;
-  }
+       private float m_frequencyHz;
+       private float m_dampingRatio;
+       private float m_bias;
+
+       // Solver shared
+       private final Vec2 m_localAnchorA;
+       private final Vec2 m_localAnchorB;
+       private float m_referenceAngle;
+       private float m_gamma;
+       private final Vec3 m_impulse;
+
+       // Solver temp
+       private int m_indexA;
+       private int m_indexB;
+       private final Vec2 m_rA = new Vec2();
+       private final Vec2 m_rB = new Vec2();
+       private final Vec2 m_localCenterA = new Vec2();
+       private final Vec2 m_localCenterB = new Vec2();
+       private float m_invMassA;
+       private float m_invMassB;
+       private float m_invIA;
+       private float m_invIB;
+       private final Mat33 m_mass = new Mat33();
+
+       /** @param argWorld
+        * @param def */
+       protected WeldJoint (IWorldPool argWorld, WeldJointDef def) {
+               super(argWorld, def);
+               m_localAnchorA = new Vec2(def.localAnchorA);
+               m_localAnchorB = new Vec2(def.localAnchorB);
+               m_referenceAngle = def.referenceAngle;
+               m_frequencyHz = def.frequencyHz;
+               m_dampingRatio = def.dampingRatio;
+
+               m_impulse = new Vec3();
+               m_impulse.setZero();
+
+       }
+
+       public Vec2 getLocalAnchorA () {
+               return m_localAnchorA;
+       }
+
+       public Vec2 getLocalAnchorB () {
+               return m_localAnchorB;
+       }
+
+       public float getFrequency () {
+               return m_frequencyHz;
+       }
+
+       public void setFrequency (float frequencyHz) {
+               this.m_frequencyHz = frequencyHz;
+       }
+
+       public float getDampingRatio () {
+               return m_dampingRatio;
+       }
+
+       public void setDampingRatio (float dampingRatio) {
+               this.m_dampingRatio = dampingRatio;
+       }
+
+       @Override
+       public void getAnchorA (Vec2 argOut) {
+               m_bodyA.getWorldPointToOut(m_localAnchorA, argOut);
+       }
+
+       @Override
+       public void getAnchorB (Vec2 argOut) {
+               m_bodyB.getWorldPointToOut(m_localAnchorB, argOut);
+       }
+
+       @Override
+       public void getReactionForce (float inv_dt, Vec2 argOut) {
+               argOut.set(m_impulse.x, m_impulse.y);
+               argOut.mulLocal(inv_dt);
+       }
+
+       @Override
+       public float getReactionTorque (float inv_dt) {
+               return inv_dt * m_impulse.z;
+       }
+
+       @Override
+       public void initVelocityConstraints (final SolverData data) {
+               m_indexA = m_bodyA.m_islandIndex;
+               m_indexB = m_bodyB.m_islandIndex;
+               m_localCenterA.set(m_bodyA.m_sweep.localCenter);
+               m_localCenterB.set(m_bodyB.m_sweep.localCenter);
+               m_invMassA = m_bodyA.m_invMass;
+               m_invMassB = m_bodyB.m_invMass;
+               m_invIA = m_bodyA.m_invI;
+               m_invIB = m_bodyB.m_invI;
+
+               // Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+
+               // Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 temp = pool.popVec2();
+
+               qA.set(aA);
+               qB.set(aB);
+
+               // Compute the effective masses.
+               Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), m_rA);
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), m_rB);
+
+               // J = [-I -r1_skew I r2_skew]
+               // [ 0 -1 0 1]
+               // r_skew = [-ry; rx]
+
+               // Matlab
+               // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB]
+               // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB]
+               // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB]
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               final Mat33 K = pool.popMat33();
+
+               K.ex.x = mA + mB + m_rA.y * m_rA.y * iA + m_rB.y * m_rB.y * iB;
+               K.ey.x = -m_rA.y * m_rA.x * iA - m_rB.y * m_rB.x * iB;
+               K.ez.x = -m_rA.y * iA - m_rB.y * iB;
+               K.ex.y = K.ey.x;
+               K.ey.y = mA + mB + m_rA.x * m_rA.x * iA + m_rB.x * m_rB.x * iB;
+               K.ez.y = m_rA.x * iA + m_rB.x * iB;
+               K.ex.z = K.ez.x;
+               K.ey.z = K.ez.y;
+               K.ez.z = iA + iB;
+
+               if (m_frequencyHz > 0.0f) {
+                       K.getInverse22(m_mass);
+
+                       float invM = iA + iB;
+                       float m = invM > 0.0f ? 1.0f / invM : 0.0f;
+
+                       float C = aB - aA - m_referenceAngle;
+
+                       // Frequency
+                       float omega = 2.0f * MathUtils.PI * m_frequencyHz;
+
+                       // Damping coefficient
+                       float d = 2.0f * m * m_dampingRatio * omega;
+
+                       // Spring stiffness
+                       float k = m * omega * omega;
+
+                       // magic formulas
+                       float h = data.step.dt;
+                       m_gamma = h * (d + h * k);
+                       m_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f;
+                       m_bias = C * h * k * m_gamma;
+
+                       invM += m_gamma;
+                       m_mass.ez.z = invM != 0.0f ? 1.0f / invM : 0.0f;
+               } else {
+                       K.getSymInverse33(m_mass);
+                       m_gamma = 0.0f;
+                       m_bias = 0.0f;
+               }
+
+               if (data.step.warmStarting) {
+                       final Vec2 P = pool.popVec2();
+                       // Scale impulses to support a variable time step.
+                       m_impulse.mulLocal(data.step.dtRatio);
+
+                       P.set(m_impulse.x, m_impulse.y);
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * (Vec2.cross(m_rA, P) + m_impulse.z);
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * (Vec2.cross(m_rB, P) + m_impulse.z);
+                       pool.pushVec2(1);
+               } else {
+                       m_impulse.setZero();
+               }
+
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(1);
+               pool.pushRot(2);
+               pool.pushMat33(1);
+       }
+
+       @Override
+       public void solveVelocityConstraints (final SolverData data) {
+               Vec2 vA = data.velocities[m_indexA].v;
+               float wA = data.velocities[m_indexA].w;
+               Vec2 vB = data.velocities[m_indexB].v;
+               float wB = data.velocities[m_indexB].w;
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               final Vec2 Cdot1 = pool.popVec2();
+               final Vec2 P = pool.popVec2();
+               final Vec2 temp = pool.popVec2();
+               if (m_frequencyHz > 0.0f) {
+                       float Cdot2 = wB - wA;
+
+                       float impulse2 = -m_mass.ez.z * (Cdot2 + m_bias + m_gamma * m_impulse.z);
+                       m_impulse.z += impulse2;
+
+                       wA -= iA * impulse2;
+                       wB += iB * impulse2;
+
+                       Vec2.crossToOutUnsafe(wB, m_rB, Cdot1);
+                       Vec2.crossToOutUnsafe(wA, m_rA, temp);
+                       Cdot1.addLocal(vB).subLocal(vA).subLocal(temp);
+
+                       final Vec2 impulse1 = P;
+                       Mat33.mul22ToOutUnsafe(m_mass, Cdot1, impulse1);
+                       impulse1.negateLocal();
+
+                       m_impulse.x += impulse1.x;
+                       m_impulse.y += impulse1.y;
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * Vec2.cross(m_rA, P);
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * Vec2.cross(m_rB, P);
+               } else {
+                       Vec2.crossToOutUnsafe(wA, m_rA, temp);
+                       Vec2.crossToOutUnsafe(wB, m_rB, Cdot1);
+                       Cdot1.addLocal(vB).subLocal(vA).subLocal(temp);
+                       float Cdot2 = wB - wA;
+
+                       final Vec3 Cdot = pool.popVec3();
+                       Cdot.set(Cdot1.x, Cdot1.y, Cdot2);
+
+                       final Vec3 impulse = pool.popVec3();
+                       Mat33.mulToOutUnsafe(m_mass, Cdot, impulse);
+                       impulse.negateLocal();
+                       m_impulse.addLocal(impulse);
+
+                       P.set(impulse.x, impulse.y);
+
+                       vA.x -= mA * P.x;
+                       vA.y -= mA * P.y;
+                       wA -= iA * (Vec2.cross(m_rA, P) + impulse.z);
+
+                       vB.x += mB * P.x;
+                       vB.y += mB * P.y;
+                       wB += iB * (Vec2.cross(m_rB, P) + impulse.z);
+
+                       pool.pushVec3(2);
+               }
+
+               data.velocities[m_indexA].v.set(vA);
+               data.velocities[m_indexA].w = wA;
+               data.velocities[m_indexB].v.set(vB);
+               data.velocities[m_indexB].w = wB;
+
+               pool.pushVec2(3);
+       }
+
+       @Override
+       public boolean solvePositionConstraints (final SolverData data) {
+               Vec2 cA = data.positions[m_indexA].c;
+               float aA = data.positions[m_indexA].a;
+               Vec2 cB = data.positions[m_indexB].c;
+               float aB = data.positions[m_indexB].a;
+               final Rot qA = pool.popRot();
+               final Rot qB = pool.popRot();
+               final Vec2 temp = pool.popVec2();
+               final Vec2 rA = pool.popVec2();
+               final Vec2 rB = pool.popVec2();
+
+               qA.set(aA);
+               qB.set(aB);
+
+               float mA = m_invMassA, mB = m_invMassB;
+               float iA = m_invIA, iB = m_invIB;
+
+               Rot.mulToOutUnsafe(qA, temp.set(m_localAnchorA).subLocal(m_localCenterA), rA);
+               Rot.mulToOutUnsafe(qB, temp.set(m_localAnchorB).subLocal(m_localCenterB), rB);
+               float positionError, angularError;
+
+               final Mat33 K = pool.popMat33();
+               final Vec2 C1 = pool.popVec2();
+               final Vec2 P = pool.popVec2();
+
+               K.ex.x = mA + mB + rA.y * rA.y * iA + rB.y * rB.y * iB;
+               K.ey.x = -rA.y * rA.x * iA - rB.y * rB.x * iB;
+               K.ez.x = -rA.y * iA - rB.y * iB;
+               K.ex.y = K.ey.x;
+               K.ey.y = mA + mB + rA.x * rA.x * iA + rB.x * rB.x * iB;
+               K.ez.y = rA.x * iA + rB.x * iB;
+               K.ex.z = K.ez.x;
+               K.ey.z = K.ez.y;
+               K.ez.z = iA + iB;
+               if (m_frequencyHz > 0.0f) {
+                       C1.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
+
+                       positionError = C1.length();
+                       angularError = 0.0f;
+
+                       K.solve22ToOut(C1, P);
+                       P.negateLocal();
+
+                       cA.x -= mA * P.x;
+                       cA.y -= mA * P.y;
+                       aA -= iA * Vec2.cross(rA, P);
+
+                       cB.x += mB * P.x;
+                       cB.y += mB * P.y;
+                       aB += iB * Vec2.cross(rB, P);
+               } else {
+                       C1.set(cB).addLocal(rB).subLocal(cA).subLocal(rA);
+                       float C2 = aB - aA - m_referenceAngle;
+
+                       positionError = C1.length();
+                       angularError = MathUtils.abs(C2);
+
+                       final Vec3 C = pool.popVec3();
+                       final Vec3 impulse = pool.popVec3();
+                       C.set(C1.x, C1.y, C2);
+
+                       K.solve33ToOut(C, impulse);
+                       impulse.negateLocal();
+                       P.set(impulse.x, impulse.y);
+
+                       cA.x -= mA * P.x;
+                       cA.y -= mA * P.y;
+                       aA -= iA * (Vec2.cross(rA, P) + impulse.z);
+
+                       cB.x += mB * P.x;
+                       cB.y += mB * P.y;
+                       aB += iB * (Vec2.cross(rB, P) + impulse.z);
+                       pool.pushVec3(2);
+               }
+
+               data.positions[m_indexA].c.set(cA);
+               data.positions[m_indexA].a = aA;
+               data.positions[m_indexB].c.set(cB);
+               data.positions[m_indexB].a = aB;
+
+               pool.pushVec2(5);
+               pool.pushRot(2);
+               pool.pushMat33(1);
+
+               return positionError <= Settings.linearSlop && angularError <= Settings.angularSlop;
+       }
 }
index 317e9c6..7d4436b 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.dynamics.joints;
+
 import org.jbox2d.common.Vec2;
 import org.jbox2d.dynamics.Body;
-import org.jbox2d.dynamics.joints.JointDef;
-import org.jbox2d.dynamics.joints.JointType;
 
 /**
  * Created at 3:38:52 AM Jan 15, 2011
  */
 
-/**
- * @author Daniel Murphy
- */
+/** @author Daniel Murphy */
 public class WeldJointDef extends JointDef {
-       /**
-        * The local anchor point relative to body1's origin.
-        */
+       /** The local anchor point relative to body1's origin. */
        public final Vec2 localAnchorA;
 
-       /**
-        * The local anchor point relative to body2's origin.
-        */
-       public final Vec2  localAnchorB;
+       /** The local anchor point relative to body2's origin. */
+       public final Vec2 localAnchorB;
 
-       /**
-        * The body2 angle minus body1 angle in the reference state (radians).
-        */
+       /** The body2 angle minus body1 angle in the reference state (radians). */
        public float referenceAngle;
-       
-       /**
-        * The mass-spring-damper frequency in Hertz. Rotation only.
-        * Disable softness with a value of 0.
-        */
+
+       /** The mass-spring-damper frequency in Hertz. Rotation only. Disable softness with a value of 0. */
        public float frequencyHz;
-       
-       /**
-        * The damping ratio. 0 = no damping, 1 = critical damping.
-        */
+
+       /** The damping ratio. 0 = no damping, 1 = critical damping. */
        public float dampingRatio;
-       
-       public WeldJointDef(){
+
+       public WeldJointDef () {
                type = JointType.WELD;
                localAnchorA = new Vec2();
                localAnchorB = new Vec2();
                referenceAngle = 0.0f;
        }
-       
-       /**
-        * Initialize the bodies, anchors, and reference angle using a world
-        * anchor point.
+
+       /** Initialize the bodies, anchors, and reference angle using a world anchor point.
         * @param bA
         * @param bB
-        * @param anchor
-        */
-       public void initialize(Body bA, Body bB, Vec2 anchor){
+        * @param anchor */
+       public void initialize (Body bA, Body bB, Vec2 anchor) {
                bodyA = bA;
                bodyB = bB;
                bodyA.getLocalPointToOut(anchor, localAnchorA);
index ce5ce04..06fa7e1 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.pooling;
 
-/**
- * Same functionality of a regular java.util stack.  Object
- * return order does not matter.
+/** Same functionality of a regular java.util stack. Object return order does not matter.
  * @author Daniel
- *
- * @param <E>
- */
+ * 
+ * @param <E> */
 public interface IDynamicStack<E> {
 
-       /**
-        * Pops an item off the stack
-        * @return
-        */
-       public E pop();
+       /** Pops an item off the stack
+        * @return */
+       public E pop ();
 
-       /**
-        * Pushes an item back on the stack
-        * @param argObject
-        */
-       public void push(E argObject);
+       /** Pushes an item back on the stack
+        * @param argObject */
+       public void push (E argObject);
 
 }
index 4ea1218..307abef 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.pooling;
 
-/**
- * This stack assumes that when you push 'n' items back,
- * you're pushing back the last 'n' items popped.
+/** This stack assumes that when you push 'n' items back, you're pushing back the last 'n' items popped.
  * @author Daniel
- *
- * @param <E>
- */
+ * 
+ * @param <E> */
 public interface IOrderedStack<E> {
 
-       /**
-        * Returns the next object in the pool
-        * @return
-        */
-       public E pop();
+       /** Returns the next object in the pool
+        * @return */
+       public E pop ();
 
-       /**
-        * Returns the next 'argNum' objects in the pool
-        * in an array
+       /** Returns the next 'argNum' objects in the pool in an array
         * @param argNum
-        * @return an array containing the next pool objects in
-        *                 items 0-argNum.  Array length and uniqueness not
-        *                 guaranteed.
-        */
-       public E[] pop(int argNum);
+        * @return an array containing the next pool objects in items 0-argNum. Array length and uniqueness not guaranteed. */
+       public E[] pop (int argNum);
 
-       /**
-        * Tells the stack to take back the last 'argNum' items
-        * @param argNum
-        */
-       public void push(int argNum);
+       /** Tells the stack to take back the last 'argNum' items
+        * @param argNum */
+       public void push (int argNum);
 
 }
index 866e230..babb775 100644 (file)
@@ -21,6 +21,7 @@
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.pooling;
 
 import org.jbox2d.collision.AABB;
@@ -34,68 +35,65 @@ import org.jbox2d.common.Vec2;
 import org.jbox2d.common.Vec3;
 import org.jbox2d.dynamics.contacts.Contact;
 
-/**
- * World pool interface
- * @author Daniel
- *
- */
+/** World pool interface
+ * @author Daniel */
 public interface IWorldPool {
 
-       public IDynamicStack<Contact> getPolyContactStack();
+       public IDynamicStack<Contact> getPolyContactStack ();
+
+       public IDynamicStack<Contact> getCircleContactStack ();
+
+       public IDynamicStack<Contact> getPolyCircleContactStack ();
+
+       public IDynamicStack<Contact> getEdgeCircleContactStack ();
+
+       public IDynamicStack<Contact> getEdgePolyContactStack ();
+
+       public IDynamicStack<Contact> getChainCircleContactStack ();
+
+       public IDynamicStack<Contact> getChainPolyContactStack ();
+
+       public Vec2 popVec2 ();
+
+       public Vec2[] popVec2 (int num);
 
-       public IDynamicStack<Contact> getCircleContactStack();
+       public void pushVec2 (int num);
 
-       public IDynamicStack<Contact> getPolyCircleContactStack();
-       
-    public IDynamicStack<Contact> getEdgeCircleContactStack();
-    
-    public IDynamicStack<Contact> getEdgePolyContactStack();
+       public Vec3 popVec3 ();
 
-    public IDynamicStack<Contact> getChainCircleContactStack();
-    
-    public IDynamicStack<Contact> getChainPolyContactStack();
-    
-       public Vec2 popVec2();
+       public Vec3[] popVec3 (int num);
 
-       public Vec2[] popVec2(int num);
+       public void pushVec3 (int num);
 
-       public void pushVec2(int num);
+       public Mat22 popMat22 ();
 
-       public Vec3 popVec3();
+       public Mat22[] popMat22 (int num);
 
-       public Vec3[] popVec3(int num);
+       public void pushMat22 (int num);
 
-       public void pushVec3(int num);
+       public Mat33 popMat33 ();
 
-       public Mat22 popMat22();
+       public void pushMat33 (int num);
 
-       public Mat22[] popMat22(int num);
+       public AABB popAABB ();
 
-       public void pushMat22(int num);
-       
-       public Mat33 popMat33();
-       
-       public void pushMat33(int num);
+       public AABB[] popAABB (int num);
 
-       public AABB popAABB();
+       public void pushAABB (int num);
 
-       public AABB[] popAABB(int num);
+       public Rot popRot ();
 
-       public void pushAABB(int num);
-       
-       public Rot popRot();
+       public void pushRot (int num);
 
-       public void pushRot(int num);
-       
-       public Collision getCollision();
+       public Collision getCollision ();
 
-       public TimeOfImpact getTimeOfImpact();
+       public TimeOfImpact getTimeOfImpact ();
 
-       public Distance getDistance();
+       public Distance getDistance ();
 
-       public float[] getFloatArray(int argLength);
+       public float[] getFloatArray (int argLength);
 
-       public int[] getIntArray(int argLength);
+       public int[] getIntArray (int argLength);
 
-       public Vec2[] getVec2Array(int argLength);
+       public Vec2[] getVec2Array (int argLength);
 }
index 31d0365..b685fb8 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.pooling.arrays;
 
 import java.util.HashMap;
 
-/**
- * Not thread safe float[] pooling.
- * @author Daniel
- */
+/** Not thread safe float[] pooling.
+ * @author Daniel */
 public class FloatArray {
-       
+
        private final HashMap<Integer, float[]> map = new HashMap<Integer, float[]>();
-       
-       public float[] get( int argLength){
-               assert(argLength > 0);
-                               
-               if(!map.containsKey(argLength)){
+
+       public float[] get (int argLength) {
+               assert (argLength > 0);
+
+               if (!map.containsKey(argLength)) {
                        map.put(argLength, getInitializedArray(argLength));
                }
-               
-               assert(map.get(argLength).length == argLength) : "Array not built of correct length";
+
+               assert (map.get(argLength).length == argLength) : "Array not built of correct length";
                return map.get(argLength);
        }
-       
-       protected float[] getInitializedArray(int argLength){
+
+       protected float[] getInitializedArray (int argLength) {
                return new float[argLength];
        }
 }
index fb4a2e6..9bd6bb5 100644 (file)
 /**
  * Created at 4:14:34 AM Jul 17, 2010
  */
+
 package org.jbox2d.pooling.arrays;
 
 import java.util.HashMap;
 
-/**
- * Not thread safe int[] pooling
- * @author Daniel Murphy
- */
+/** Not thread safe int[] pooling
+ * @author Daniel Murphy */
 public class IntArray {
-       
+
        private final HashMap<Integer, int[]> map = new HashMap<Integer, int[]>();
-       
-       public int[] get( int argLength){
-               assert(argLength > 0);
-               
-               if(!map.containsKey(argLength)){
+
+       public int[] get (int argLength) {
+               assert (argLength > 0);
+
+               if (!map.containsKey(argLength)) {
                        map.put(argLength, getInitializedArray(argLength));
                }
-               
-               assert(map.get(argLength).length == argLength) : "Array not built of correct length";
+
+               assert (map.get(argLength).length == argLength) : "Array not built of correct length";
                return map.get(argLength);
        }
-       
-       protected int[] getInitializedArray(int argLength){
+
+       protected int[] getInitializedArray (int argLength) {
                return new int[argLength];
        }
 }
index a847d79..1722f92 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  ******************************************************************************/
+
 package org.jbox2d.pooling.arrays;
 
 import java.util.HashMap;
 
 import org.jbox2d.common.Vec2;
 
-/**
- * not thread safe Vec2[] pool
- * @author dmurph
- *
- */
+/** not thread safe Vec2[] pool
+ * @author dmurph */
 public class Vec2Array {
 
        private final HashMap<Integer, Vec2[]> map = new HashMap<Integer, Vec2[]>();
-       
-       public Vec2[] get( int argLength){
-               assert(argLength > 0);
-               
-               if(!map.containsKey(argLength)){
+
+       public Vec2[] get (int argLength) {
+               assert (argLength > 0);
+
+               if (!map.containsKey(argLength)) {
                        map.put(argLength, getInitializedArray(argLength));
                }
-               
-               assert(map.get(argLength).length == argLength) : "Array not built of correct length";
+
+               assert (map.get(argLength).length == argLength) : "Array not built of correct length";
                return map.get(argLength);
        }
-       
-       protected Vec2[] getInitializedArray(int argLength){
+
+       protected Vec2[] getInitializedArray (int argLength) {
                final Vec2[] ray = new Vec2[argLength];
                for (int i = 0; i < ray.length; i++) {
                        ray[i] = new Vec2();
index 391c25d..cfcd244 100644 (file)
@@ -24,6 +24,7 @@
 /**
  * Created at 3:26:14 AM Jan 11, 2011
  */
+
 package org.jbox2d.pooling.normal;
 
 import java.util.HashMap;
@@ -49,267 +50,265 @@ import org.jbox2d.dynamics.contacts.PolygonContact;
 import org.jbox2d.pooling.IDynamicStack;
 import org.jbox2d.pooling.IWorldPool;
 
-/**
- * Provides object pooling for all objects used in the engine. Objects retrieved from here should
- * only be used temporarily, and then pushed back (with the exception of arrays).
+/** Provides object pooling for all objects used in the engine. Objects retrieved from here should only be used temporarily, and
+ * then pushed back (with the exception of arrays).
  * 
- * @author Daniel Murphy
- */
+ * @author Daniel Murphy */
 public class DefaultWorldPool implements IWorldPool {
 
-  private final OrderedStack<Vec2> vecs;
-  private final OrderedStack<Vec3> vec3s;
-  private final OrderedStack<Mat22> mats;
-  private final OrderedStack<Mat33> mat33s;
-  private final OrderedStack<AABB> aabbs;
-  private final OrderedStack<Rot> rots;
+       private final OrderedStack<Vec2> vecs;
+       private final OrderedStack<Vec3> vec3s;
+       private final OrderedStack<Mat22> mats;
+       private final OrderedStack<Mat33> mat33s;
+       private final OrderedStack<AABB> aabbs;
+       private final OrderedStack<Rot> rots;
 
-  private final HashMap<Integer, float[]> afloats = new HashMap<Integer, float[]>();
-  private final HashMap<Integer, int[]> aints = new HashMap<Integer, int[]>();
-  private final HashMap<Integer, Vec2[]> avecs = new HashMap<Integer, Vec2[]>();
+       private final HashMap<Integer, float[]> afloats = new HashMap<Integer, float[]>();
+       private final HashMap<Integer, int[]> aints = new HashMap<Integer, int[]>();
+       private final HashMap<Integer, Vec2[]> avecs = new HashMap<Integer, Vec2[]>();
 
-  private final Class<?>[] classes = new Class<?>[] {IWorldPool.class};
-  private final Object[] args = new Object[] {this};
+       private final Class<?>[] classes = new Class<?>[] {IWorldPool.class};
+       private final Object[] args = new Object[] {this};
 
-  private final MutableStack<Contact, PolygonContact> pcstack =
-      new MutableStack<Contact, PolygonContact>(new Generator<PolygonContact>() {
+       private final MutableStack<Contact, PolygonContact> pcstack = new MutableStack<Contact, PolygonContact>(
+               new Generator<PolygonContact>() {
                        @Override
                        public PolygonContact gen () {
                                return new PolygonContact(DefaultWorldPool.this);
                        }
-      }, Settings.CONTACT_STACK_INIT_SIZE);
+               }, Settings.CONTACT_STACK_INIT_SIZE);
 
-  private final MutableStack<Contact, CircleContact> ccstack =
-      new MutableStack<Contact, CircleContact>(new Generator<CircleContact>() {
+       private final MutableStack<Contact, CircleContact> ccstack = new MutableStack<Contact, CircleContact>(
+               new Generator<CircleContact>() {
                        @Override
                        public CircleContact gen () {
                                return new CircleContact(DefaultWorldPool.this);
                        }
-      }, Settings.CONTACT_STACK_INIT_SIZE);
+               }, Settings.CONTACT_STACK_INIT_SIZE);
 
-  private final MutableStack<Contact, PolygonAndCircleContact> cpstack =
-      new MutableStack<Contact, PolygonAndCircleContact>(new Generator<PolygonAndCircleContact>() {
+       private final MutableStack<Contact, PolygonAndCircleContact> cpstack = new MutableStack<Contact, PolygonAndCircleContact>(
+               new Generator<PolygonAndCircleContact>() {
                        @Override
                        public PolygonAndCircleContact gen () {
                                return new PolygonAndCircleContact(DefaultWorldPool.this);
                        }
-      }, Settings.CONTACT_STACK_INIT_SIZE);
+               }, Settings.CONTACT_STACK_INIT_SIZE);
 
-  private final MutableStack<Contact, EdgeAndCircleContact> ecstack =
-      new MutableStack<Contact, EdgeAndCircleContact>(new Generator<EdgeAndCircleContact>() {
+       private final MutableStack<Contact, EdgeAndCircleContact> ecstack = new MutableStack<Contact, EdgeAndCircleContact>(
+               new Generator<EdgeAndCircleContact>() {
                        @Override
                        public EdgeAndCircleContact gen () {
                                return new EdgeAndCircleContact(DefaultWorldPool.this);
                        }
-      }, Settings.CONTACT_STACK_INIT_SIZE);
+               }, Settings.CONTACT_STACK_INIT_SIZE);
 
-  private final MutableStack<Contact, EdgeAndPolygonContact> epstack =
-      new MutableStack<Contact, EdgeAndPolygonContact>(new Generator<EdgeAndPolygonContact>() {
+       private final MutableStack<Contact, EdgeAndPolygonContact> epstack = new MutableStack<Contact, EdgeAndPolygonContact>(
+               new Generator<EdgeAndPolygonContact>() {
                        @Override
                        public EdgeAndPolygonContact gen () {
                                return new EdgeAndPolygonContact(DefaultWorldPool.this);
                        }
-      }, Settings.CONTACT_STACK_INIT_SIZE);
+               }, Settings.CONTACT_STACK_INIT_SIZE);
 
-  private final MutableStack<Contact, ChainAndCircleContact> chcstack =
-      new MutableStack<Contact, ChainAndCircleContact>(new Generator<ChainAndCircleContact>() {
+       private final MutableStack<Contact, ChainAndCircleContact> chcstack = new MutableStack<Contact, ChainAndCircleContact>(
+               new Generator<ChainAndCircleContact>() {
                        @Override
                        public ChainAndCircleContact gen () {
                                return new ChainAndCircleContact(DefaultWorldPool.this);
                        }
-      }, Settings.CONTACT_STACK_INIT_SIZE);
+               }, Settings.CONTACT_STACK_INIT_SIZE);
 
-  private final MutableStack<Contact, ChainAndPolygonContact> chpstack =
-      new MutableStack<Contact, ChainAndPolygonContact>(new Generator<ChainAndPolygonContact>() {
+       private final MutableStack<Contact, ChainAndPolygonContact> chpstack = new MutableStack<Contact, ChainAndPolygonContact>(
+               new Generator<ChainAndPolygonContact>() {
                        @Override
                        public ChainAndPolygonContact gen () {
                                return new ChainAndPolygonContact(DefaultWorldPool.this);
                        }
-      }, Settings.CONTACT_STACK_INIT_SIZE);
+               }, Settings.CONTACT_STACK_INIT_SIZE);
 
-  private final Collision collision;
-  private final TimeOfImpact toi;
-  private final Distance dist;
+       private final Collision collision;
+       private final TimeOfImpact toi;
+       private final Distance dist;
 
-  public DefaultWorldPool(int argSize, int argContainerSize) {
-    vecs = new OrderedStack<Vec2>(new Generator<Vec2>(){
-               @Override
-               public Vec2 gen () {
-                       return new Vec2();
-               }
-    }, argSize, new Vec2[argContainerSize]);
-    vec3s = new OrderedStack<Vec3>(new Generator<Vec3>() {
-               @Override
-               public Vec3 gen () {
-                       return new Vec3();
-               }
-    }, argSize, new Vec3[argContainerSize]);
-    mats = new OrderedStack<Mat22>(new Generator<Mat22>() {
-               @Override
-               public Mat22 gen () {
-                       return new Mat22();
-               }
-    }, argSize, new Mat22[argContainerSize]);
-    aabbs = new OrderedStack<AABB>(new Generator<AABB>() {
-               @Override
-               public AABB gen () {
-                       return new AABB();
-               }
-    }, argSize, new AABB[argContainerSize]);
-    rots = new OrderedStack<Rot>(new Generator<Rot>() {
-               @Override
-               public Rot gen () {
-                       return new Rot();
+       public DefaultWorldPool (int argSize, int argContainerSize) {
+               vecs = new OrderedStack<Vec2>(new Generator<Vec2>() {
+                       @Override
+                       public Vec2 gen () {
+                               return new Vec2();
+                       }
+               }, argSize, new Vec2[argContainerSize]);
+               vec3s = new OrderedStack<Vec3>(new Generator<Vec3>() {
+                       @Override
+                       public Vec3 gen () {
+                               return new Vec3();
+                       }
+               }, argSize, new Vec3[argContainerSize]);
+               mats = new OrderedStack<Mat22>(new Generator<Mat22>() {
+                       @Override
+                       public Mat22 gen () {
+                               return new Mat22();
+                       }
+               }, argSize, new Mat22[argContainerSize]);
+               aabbs = new OrderedStack<AABB>(new Generator<AABB>() {
+                       @Override
+                       public AABB gen () {
+                               return new AABB();
+                       }
+               }, argSize, new AABB[argContainerSize]);
+               rots = new OrderedStack<Rot>(new Generator<Rot>() {
+                       @Override
+                       public Rot gen () {
+                               return new Rot();
+                       }
+               }, argSize, new Rot[argContainerSize]);
+               mat33s = new OrderedStack<Mat33>(new Generator<Mat33>() {
+                       @Override
+                       public Mat33 gen () {
+                               return new Mat33();
+                       }
+               }, argSize, new Mat33[argContainerSize]);
+
+               dist = new Distance();
+               collision = new Collision(this);
+               toi = new TimeOfImpact(this);
+       }
+
+       public final IDynamicStack<Contact> getPolyContactStack () {
+               return pcstack;
+       }
+
+       public final IDynamicStack<Contact> getCircleContactStack () {
+               return ccstack;
+       }
+
+       public final IDynamicStack<Contact> getPolyCircleContactStack () {
+               return cpstack;
+       }
+
+       @Override
+       public IDynamicStack<Contact> getEdgeCircleContactStack () {
+               return ecstack;
+       }
+
+       @Override
+       public IDynamicStack<Contact> getEdgePolyContactStack () {
+               return epstack;
+       }
+
+       @Override
+       public IDynamicStack<Contact> getChainCircleContactStack () {
+               return chcstack;
+       }
+
+       @Override
+       public IDynamicStack<Contact> getChainPolyContactStack () {
+               return chpstack;
+       }
+
+       public final Vec2 popVec2 () {
+               return vecs.pop();
+       }
+
+       public final Vec2[] popVec2 (int argNum) {
+               return vecs.pop(argNum);
+       }
+
+       public final void pushVec2 (int argNum) {
+               vecs.push(argNum);
+       }
+
+       public final Vec3 popVec3 () {
+               return vec3s.pop();
+       }
+
+       public final Vec3[] popVec3 (int argNum) {
+               return vec3s.pop(argNum);
+       }
+
+       public final void pushVec3 (int argNum) {
+               vec3s.push(argNum);
+       }
+
+       public final Mat22 popMat22 () {
+               return mats.pop();
+       }
+
+       public final Mat22[] popMat22 (int argNum) {
+               return mats.pop(argNum);
+       }
+
+       public final void pushMat22 (int argNum) {
+               mats.push(argNum);
+       }
+
+       public final Mat33 popMat33 () {
+               return mat33s.pop();
+       }
+
+       public final void pushMat33 (int argNum) {
+               mat33s.push(argNum);
+       }
+
+       public final AABB popAABB () {
+               return aabbs.pop();
+       }
+
+       public final AABB[] popAABB (int argNum) {
+               return aabbs.pop(argNum);
+       }
+
+       public final void pushAABB (int argNum) {
+               aabbs.push(argNum);
+       }
+
+       public final Rot popRot () {
+               return rots.pop();
+       }
+
+       public final void pushRot (int num) {
+               rots.push(num);
+       }
+
+       public final Collision getCollision () {
+               return collision;
+       }
+
+       public final TimeOfImpact getTimeOfImpact () {
+               return toi;
+       }
+
+       public final Distance getDistance () {
+               return dist;
+       }
+
+       public final float[] getFloatArray (int argLength) {
+               if (!afloats.containsKey(argLength)) {
+                       afloats.put(argLength, new float[argLength]);
                }
-    }, argSize, new Rot[argContainerSize]);
-    mat33s = new OrderedStack<Mat33>(new Generator<Mat33>() {
-               @Override
-               public Mat33 gen () {
-                       return new Mat33();
+
+               assert (afloats.get(argLength).length == argLength) : "Array not built with correct length";
+               return afloats.get(argLength);
+       }
+
+       public final int[] getIntArray (int argLength) {
+               if (!aints.containsKey(argLength)) {
+                       aints.put(argLength, new int[argLength]);
                }
-    }, argSize, new Mat33[argContainerSize]);
-
-    dist = new Distance();
-    collision = new Collision(this);
-    toi = new TimeOfImpact(this);
-  }
 
-  public final IDynamicStack<Contact> getPolyContactStack() {
-    return pcstack;
-  }
+               assert (aints.get(argLength).length == argLength) : "Array not built with correct length";
+               return aints.get(argLength);
+       }
 
-  public final IDynamicStack<Contact> getCircleContactStack() {
-    return ccstack;
-  }
+       public final Vec2[] getVec2Array (int argLength) {
+               if (!avecs.containsKey(argLength)) {
+                       Vec2[] ray = new Vec2[argLength];
+                       for (int i = 0; i < argLength; i++) {
+                               ray[i] = new Vec2();
+                       }
+                       avecs.put(argLength, ray);
+               }
 
-  public final IDynamicStack<Contact> getPolyCircleContactStack() {
-    return cpstack;
-  }
-
-  @Override
-  public IDynamicStack<Contact> getEdgeCircleContactStack() {
-    return ecstack;
-  }
-
-  @Override
-  public IDynamicStack<Contact> getEdgePolyContactStack() {
-    return epstack;
-  }
-
-  @Override
-  public IDynamicStack<Contact> getChainCircleContactStack() {
-    return chcstack;
-  }
-
-  @Override
-  public IDynamicStack<Contact> getChainPolyContactStack() {
-    return chpstack;
-  }
-
-  public final Vec2 popVec2() {
-    return vecs.pop();
-  }
-
-  public final Vec2[] popVec2(int argNum) {
-    return vecs.pop(argNum);
-  }
-
-  public final void pushVec2(int argNum) {
-    vecs.push(argNum);
-  }
-
-  public final Vec3 popVec3() {
-    return vec3s.pop();
-  }
-
-  public final Vec3[] popVec3(int argNum) {
-    return vec3s.pop(argNum);
-  }
-
-  public final void pushVec3(int argNum) {
-    vec3s.push(argNum);
-  }
-
-  public final Mat22 popMat22() {
-    return mats.pop();
-  }
-
-  public final Mat22[] popMat22(int argNum) {
-    return mats.pop(argNum);
-  }
-
-  public final void pushMat22(int argNum) {
-    mats.push(argNum);
-  }
-
-  public final Mat33 popMat33() {
-    return mat33s.pop();
-  }
-
-  public final void pushMat33(int argNum) {
-    mat33s.push(argNum);
-  }
-
-  public final AABB popAABB() {
-    return aabbs.pop();
-  }
-
-  public final AABB[] popAABB(int argNum) {
-    return aabbs.pop(argNum);
-  }
-
-  public final void pushAABB(int argNum) {
-    aabbs.push(argNum);
-  }
-
-  public final Rot popRot() {
-    return rots.pop();
-  }
-
-  public final void pushRot(int num) {
-    rots.push(num);
-  }
-
-  public final Collision getCollision() {
-    return collision;
-  }
-
-  public final TimeOfImpact getTimeOfImpact() {
-    return toi;
-  }
-
-  public final Distance getDistance() {
-    return dist;
-  }
-
-  public final float[] getFloatArray(int argLength) {
-    if (!afloats.containsKey(argLength)) {
-      afloats.put(argLength, new float[argLength]);
-    }
-
-    assert (afloats.get(argLength).length == argLength) : "Array not built with correct length";
-    return afloats.get(argLength);
-  }
-
-  public final int[] getIntArray(int argLength) {
-    if (!aints.containsKey(argLength)) {
-      aints.put(argLength, new int[argLength]);
-    }
-
-    assert (aints.get(argLength).length == argLength) : "Array not built with correct length";
-    return aints.get(argLength);
-  }
-
-  public final Vec2[] getVec2Array(int argLength) {
-    if (!avecs.containsKey(argLength)) {
-      Vec2[] ray = new Vec2[argLength];
-      for (int i = 0; i < argLength; i++) {
-        ray[i] = new Vec2();
-      }
-      avecs.put(argLength, ray);
-    }
-
-    assert (avecs.get(argLength).length == argLength) : "Array not built with correct length";
-    return avecs.get(argLength);
-  }
+               assert (avecs.get(argLength).length == argLength) : "Array not built with correct length";
+               return avecs.get(argLength);
+       }
 }
index 35b9a70..bfc94da 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package org.jbox2d.pooling.normal;\r
 \r
 public interface Generator<T> {\r
-       public T gen();\r
-}
\ No newline at end of file
+       public T gen ();\r
+}\r
index 5a0f7d2..28c2162 100644 (file)
@@ -24,9 +24,6 @@
 
 package org.jbox2d.pooling.normal;
 
-import java.lang.reflect.Array;
-import java.lang.reflect.InvocationTargetException;
-
 import org.jbox2d.pooling.IDynamicStack;
 
 public class MutableStack<E, T extends E> implements IDynamicStack<E> {
@@ -57,9 +54,11 @@ public class MutableStack<E, T extends E> implements IDynamicStack<E> {
                size = newStack.length;
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
         * 
-        * @see org.jbox2d.pooling.IDynamicStack#pop() */
+        * @see org.jbox2d.pooling.IDynamicStack#pop()
+        */
        public final E pop () {
                if (index >= size) {
                        extendStack(size * 2);
@@ -67,9 +66,11 @@ public class MutableStack<E, T extends E> implements IDynamicStack<E> {
                return (E)stack[index++];
        }
 
-       /* (non-Javadoc)
+       /*
+        * (non-Javadoc)
         * 
-        * @see org.jbox2d.pooling.IDynamicStack#push(E) */
+        * @see org.jbox2d.pooling.IDynamicStack#push(E)
+        */
        @SuppressWarnings("unchecked")
        public final void push (E argObject) {
                assert (index > 0);
index 1e1aa0a..64fc64e 100644 (file)
 /**
  * Created at 12:52:04 AM Jan 20, 2011
  */
-package org.jbox2d.pooling.normal;
 
+package org.jbox2d.pooling.normal;
 
-/**
- * @author Daniel Murphy
- */
+/** @author Daniel Murphy */
 public class OrderedStack<E> {
-  private final Object[] pool;
-  private int index;
-  private final int size;
-  private final E[] container;
+       private final Object[] pool;
+       private int index;
+       private final int size;
+       private final E[] container;
 
-  @SuppressWarnings("unchecked")
-  public OrderedStack(Generator<E> gen, int argStackSize, E[] container) {
-    size = argStackSize;
-    pool = new Object[argStackSize];
-    for (int i = 0; i < argStackSize; i++) {
-        pool[i] = gen.gen();
-    }
-    index = 0;
-    this.container = container;
-  }
+       @SuppressWarnings("unchecked")
+       public OrderedStack (Generator<E> gen, int argStackSize, E[] container) {
+               size = argStackSize;
+               pool = new Object[argStackSize];
+               for (int i = 0; i < argStackSize; i++) {
+                       pool[i] = gen.gen();
+               }
+               index = 0;
+               this.container = container;
+       }
 
-  public final E pop() {
-    assert (index < size) : "End of stack reached, there is probably a leak somewhere";
-    return (E)pool[index++];
-  }
+       public final E pop () {
+               assert (index < size) : "End of stack reached, there is probably a leak somewhere";
+               return (E)pool[index++];
+       }
 
-  public final E[] pop(int argNum) {
-    assert (index + argNum < size) : "End of stack reached, there is probably a leak somewhere";
-    assert (argNum <= container.length) : "Container array is too small";
-    System.arraycopy(pool, index, container, 0, argNum);
-    index += argNum;
-    return (E[])container;
-  }
+       public final E[] pop (int argNum) {
+               assert (index + argNum < size) : "End of stack reached, there is probably a leak somewhere";
+               assert (argNum <= container.length) : "Container array is too small";
+               System.arraycopy(pool, index, container, 0, argNum);
+               index += argNum;
+               return (E[])container;
+       }
 
-  public final void push(int argNum) {
-    index -= argNum;
-    assert (index >= 0) : "Beginning of stack reached, push/pops are unmatched";
-  }
+       public final void push (int argNum) {
+               index -= argNum;
+               assert (index >= 0) : "Beginning of stack reached, push/pops are unmatched";
+       }
 }
index d611086..471699f 100644 (file)
  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
  * POSSIBILITY OF SUCH DAMAGE.\r
  ******************************************************************************/\r
+\r
 package org.jbox2d.pooling.stacks;\r
 \r
 public class DynamicIntStack {\r
 \r
-  private int[] stack;\r
-  private int size;\r
-  private int position;\r
-\r
-  public DynamicIntStack(int initialSize) {\r
-    stack = new int[initialSize];\r
-    position = 0;\r
-    size = initialSize;\r
-  }\r
-\r
-  public void reset() {\r
-    position = 0;\r
-  }\r
-\r
-  public int pop() {\r
-    assert (position > 0);\r
-    return stack[--position];\r
-  }\r
-\r
-  public void push(int i) {\r
-    if (position == size) {\r
-      int[] old = stack;\r
-      stack = new int[size * 2];\r
-      size = stack.length;\r
-      System.arraycopy(old, 0, stack, 0, old.length);\r
-    }\r
-    stack[position++] = i;\r
-  }\r
-\r
-  public int getCount() {\r
-    return position;\r
-  }\r
+       private int[] stack;\r
+       private int size;\r
+       private int position;\r
+\r
+       public DynamicIntStack (int initialSize) {\r
+               stack = new int[initialSize];\r
+               position = 0;\r
+               size = initialSize;\r
+       }\r
+\r
+       public void reset () {\r
+               position = 0;\r
+       }\r
+\r
+       public int pop () {\r
+               assert (position > 0);\r
+               return stack[--position];\r
+       }\r
+\r
+       public void push (int i) {\r
+               if (position == size) {\r
+                       int[] old = stack;\r
+                       stack = new int[size * 2];\r
+                       size = stack.length;\r
+                       System.arraycopy(old, 0, stack, 0, old.length);\r
+               }\r
+               stack[position++] = i;\r
+       }\r
+\r
+       public int getCount () {\r
+               return position;\r
+       }\r
 }\r
index f554854..d9fae4d 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
-/**\r
- * Interface used by the PreloaderBundleGenerator to decide whether\r
- * an asset found in the gdx.assetpath should be included in the war/\r
- * folder or not. Also used to determine the type of an asset. Default\r
- * implementation can be found in DefaultAssetFilter, and is used if\r
- * user doesn't specify a custom filter in the module gwt.xml file.\r
- * @author mzechner\r
- *\r
- */\r
+/** Interface used by the PreloaderBundleGenerator to decide whether an asset found in the gdx.assetpath should be included in the\r
+ * war/ folder or not. Also used to determine the type of an asset. Default implementation can be found in DefaultAssetFilter, and\r
+ * is used if user doesn't specify a custom filter in the module gwt.xml file.\r
+ * @author mzechner */\r
 public interface AssetFilter {\r
        public enum AssetType {\r
-               Image("i"),\r
-               Audio("a"),\r
-               Text("t"),\r
-               Binary("b"),\r
-               Directory("d");\r
-               \r
+               Image("i"), Audio("a"), Text("t"), Binary("b"), Directory("d");\r
+\r
                public final String code;\r
-               private AssetType(String code) {\r
+\r
+               private AssetType (String code) {\r
                        this.code = code;\r
                }\r
        }\r
-       \r
-       /**\r
-        * @param file the file to filter\r
+\r
+       /** @param file the file to filter\r
         * @param isDirectory whether the file is a directory\r
-        * @return whether to include the file in the war/ folder or not.\r
-        */\r
-       public boolean accept(String file, boolean isDirectory);\r
-       \r
-       /**\r
-        * @param file the file to get the type for\r
-        * @return the type of the file, one of {@link AssetType}\r
-        */\r
-       public AssetType getType(String file);\r
-}
\ No newline at end of file
+        * @return whether to include the file in the war/ folder or not. */\r
+       public boolean accept (String file, boolean isDirectory);\r
+\r
+       /** @param file the file to get the type for\r
+        * @return the type of the file, one of {@link AssetType} */\r
+       public AssetType getType (String file);\r
+}\r
index c3df15f..2bb76a1 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
 public class AudioLoader {\r
-       public AudioLoader(String url, LoaderCallback<Void> callback) {\r
+       public AudioLoader (String url, LoaderCallback<Void> callback) {\r
                callback.success(null);\r
        }\r
-}
\ No newline at end of file
+}\r
index 7ba71b8..89a1558 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
 import java.io.IOException;\r
 import java.io.InputStream;\r
 \r
-import com.google.gwt.xhr.client.ReadyStateChangeHandler;\r
-import com.google.gwt.xhr.client.XMLHttpRequest;\r
-\r
 public class BinaryLoader {\r
        private final LoaderCallback<Blob> callback;\r
 \r
@@ -65,10 +63,10 @@ public class BinaryLoader {
                }\r
 \r
                private native byte get (String s, int i) /*-{\r
-                       var x = s.charCodeAt(i) & 0xff;\r
-                       if (x > 127) x -= 256;\r
-                       return x;\r
-               }-*/;\r
+                                                                                                                               var x = s.charCodeAt(i) & 0xff;\r
+                                                                                                                               if (x > 127) x -= 256;\r
+                                                                                                                               return x;\r
+                                                                                                                               }-*/;\r
 \r
                public InputStream read () {\r
                        return new BlobInputStream(this);\r
@@ -89,4 +87,4 @@ public class BinaryLoader {
                        return blob.get(pos++) & 0xff;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 25561b0..44ab151 100644 (file)
@@ -12,9 +12,9 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.gwt.preloader;\r
+ ******************************************************************************/\r
 \r
+package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
 public class DefaultAssetFilter implements AssetFilter {\r
        private String extension (String file) {\r
@@ -23,43 +23,32 @@ public class DefaultAssetFilter implements AssetFilter {
                if (dotIndex == -1) return "";\r
                return name.substring(dotIndex + 1);\r
        }\r
-       \r
+\r
        @Override\r
        public boolean accept (String file, boolean isDirectory) {\r
-               if(isDirectory && file.endsWith(".svn")) return false;\r
+               if (isDirectory && file.endsWith(".svn")) return false;\r
                return true;\r
        }\r
 \r
        @Override\r
        public AssetType getType (String file) {\r
                String extension = extension(file).toLowerCase();\r
-               if(isImage(extension)) return AssetType.Image;\r
-               if(isAudio(extension)) return AssetType.Audio;\r
-               if(isText(extension)) return AssetType.Text;\r
+               if (isImage(extension)) return AssetType.Image;\r
+               if (isAudio(extension)) return AssetType.Audio;\r
+               if (isText(extension)) return AssetType.Text;\r
                return AssetType.Binary;\r
        }\r
 \r
        private boolean isImage (String extension) {\r
-               return extension.equals("jpg") || \r
-                                extension.equals("png") ||\r
-                                extension.equals("bmp") ||\r
-                                extension.equals("gif");\r
+               return extension.equals("jpg") || extension.equals("png") || extension.equals("bmp") || extension.equals("gif");\r
        }\r
 \r
-\r
        private boolean isText (String extension) {\r
-               return extension.equals("json") ||\r
-                                extension.equals("xml") ||\r
-                                extension.equals("txt") ||\r
-                                extension.equals("glsl") ||\r
-                                extension.equals("fnt") ||\r
-                                extension.equals("pack") ||\r
-                                extension.equals("obj");\r
+               return extension.equals("json") || extension.equals("xml") || extension.equals("txt") || extension.equals("glsl")\r
+                       || extension.equals("fnt") || extension.equals("pack") || extension.equals("obj");\r
        }\r
 \r
        private boolean isAudio (String extension) {\r
-               return extension.equals("mp3") ||\r
-                                extension.equals("ogg") ||\r
-                                extension.equals("wav");\r
+               return extension.equals("mp3") || extension.equals("ogg") || extension.equals("wav");\r
        }\r
-}
\ No newline at end of file
+}\r
index 84ee02c..91f84b7 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
 import java.io.BufferedInputStream;\r
 import java.io.BufferedReader;\r
 import java.io.File;\r
 import java.io.FileInputStream;\r
-import java.io.FileNotFoundException;\r
 import java.io.FileOutputStream;\r
 import java.io.IOException;\r
 import java.io.InputStream;\r
@@ -35,8 +35,7 @@ import com.badlogic.gdx.Files.FileType;
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
-/** Used in PreloaderBundleGenerator to ease my pain. Since we emulate the original FileHandle, i have\r
- * to make a copy...\r
+/** Used in PreloaderBundleGenerator to ease my pain. Since we emulate the original FileHandle, i have to make a copy...\r
  * @author mzechner\r
  * @author Nathan Sweet */\r
 public class FileWrapper {\r
@@ -108,7 +107,8 @@ public class FileWrapper {
        /** Returns a stream for reading this file as bytes.\r
         * @throw GdxRuntimeException if the file handle represents a directory, doesn't exist, or could not be read. */\r
        public InputStream read () {\r
-               if (type == FileType.Classpath || (type == FileType.Internal && !file.exists()) || (type == FileType.Local && !file.exists())) {\r
+               if (type == FileType.Classpath || (type == FileType.Internal && !file.exists())\r
+                       || (type == FileType.Local && !file.exists())) {\r
                        InputStream input = FileWrapper.class.getResourceAsStream("/" + file.getPath().replace('\\', '/'));\r
                        if (input == null) throw new GdxRuntimeException("File not found: " + file + " (" + type + ")");\r
                        return input;\r
@@ -606,4 +606,4 @@ public class FileWrapper {
                                copyFile(srcFile, destFile);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 3a8dcc8..bc1e31c 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.gwt.preloader;\r
+ ******************************************************************************/\r
 \r
-import com.google.gwt.dom.client.ImageElement;\r
-import com.google.gwt.dom.client.NativeEvent;\r
+package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
-/**\r
- * Fugly but does the job.\r
- * @author mzechner\r
- *\r
- */\r
+/** Fugly but does the job.\r
+ * @author mzechner */\r
 public class ImageLoader {\r
        private final LoaderCallback<ImageElement> callback;\r
        private final ImageElement image;\r
-       \r
-       public ImageLoader(String url, LoaderCallback<ImageElement> callback) {\r
+\r
+       public ImageLoader (String url, LoaderCallback<ImageElement> callback) {\r
                this.callback = callback;\r
                this.image = createImage();\r
                this.image.setSrc(url);\r
                hookOnLoad(image, this);\r
        }\r
-       \r
-       private void onEvent(NativeEvent event) {\r
-               if(event.getType().equals("error")) callback.error();\r
-               else callback.success(image);\r
+\r
+       private void onEvent (NativeEvent event) {\r
+               if (event.getType().equals("error"))\r
+                       callback.error();\r
+               else\r
+                       callback.success(image);\r
        }\r
 \r
-       private static native ImageElement createImage() /*-{\r
-               return new Image();\r
-       }-*/;\r
+       private static native ImageElement createImage () /*-{\r
+                                                                                                                                               return new Image();\r
+                                                                                                                                               }-*/;\r
 \r
-       private static native void hookOnLoad(ImageElement img, ImageLoader h) /*-{\r
-               img.addEventListener('load',function(e) {h.@com.badlogic.gdx.backends.gwt.preloader.ImageLoader::onEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);}, false);\r
-               img.addEventListener('error',function(e) {h.@com.badlogic.gdx.backends.gwt.preloader.ImageLoader::onEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);}, false);\r
-       }-*/;\r
-}
\ No newline at end of file
+       private static native void hookOnLoad (ImageElement img, ImageLoader h) /*-{\r
+                                                                                                                                                                                                       img.addEventListener('load',function(e) {h.@com.badlogic.gdx.backends.gwt.preloader.ImageLoader::onEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);}, false);\r
+                                                                                                                                                                                                       img.addEventListener('error',function(e) {h.@com.badlogic.gdx.backends.gwt.preloader.ImageLoader::onEvent(Lcom/google/gwt/dom/client/NativeEvent;)(e);}, false);\r
+                                                                                                                                                                                                       }-*/;\r
+}\r
index ec2cde2..9bacad4 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
 public interface LoaderCallback<T> {\r
-       public void success(T result);\r
-       public void error();\r
-}
\ No newline at end of file
+       public void success (T result);\r
+\r
+       public void error ();\r
+}\r
index c1f4a63..c879fbe 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
 import java.io.ByteArrayInputStream;\r
@@ -25,16 +26,16 @@ import com.badlogic.gdx.files.FileHandle;
 import com.badlogic.gdx.utils.Array;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 import com.badlogic.gdx.utils.ObjectMap;\r
-import com.google.gwt.core.client.GWT;\r
-import com.google.gwt.dom.client.ImageElement;\r
 \r
 public class Preloader {\r
        public interface PreloaderCallback {\r
-               public void done();\r
-               public void loaded(String file, int loaded, int total);\r
-               public void error(String file);\r
+               public void done ();\r
+\r
+               public void loaded (String file, int loaded, int total);\r
+\r
+               public void error (String file);\r
        }\r
-       \r
+\r
        public ObjectMap<String, ImageElement> images = new ObjectMap<String, ImageElement>();\r
        public ObjectMap<String, Void> audio = new ObjectMap<String, Void>();\r
        public ObjectMap<String, String> texts = new ObjectMap<String, String>();\r
@@ -43,38 +44,38 @@ public class Preloader {
        private class Asset {\r
                String url;\r
                AssetType type;\r
-               \r
-               public Asset(String url, AssetType type) {\r
+\r
+               public Asset (String url, AssetType type) {\r
                        this.url = url;\r
                        this.type = type;\r
                }\r
        }\r
-       \r
+\r
        public final String baseUrl;\r
-       \r
-       public Preloader() {\r
+\r
+       public Preloader () {\r
                baseUrl = GWT.getModuleBaseURL().replace(GWT.getModuleName() + "/", "") + "assets/";\r
                // trigger copying of assets creation of assets.txt\r
                GWT.create(PreloaderBundle.class);\r
        }\r
-       \r
-       public void preload(final String assetFileUrl, final PreloaderCallback callback) {\r
+\r
+       public void preload (final String assetFileUrl, final PreloaderCallback callback) {\r
                new TextLoader(baseUrl + assetFileUrl, new LoaderCallback<String>() {\r
                        @Override\r
                        public void success (String result) {\r
                                String[] lines = result.split("\n");\r
                                Array<Asset> assets = new Array<Asset>();\r
-                               for(String line: lines) {\r
+                               for (String line : lines) {\r
                                        String[] tokens = line.split(":");\r
-                                       if(tokens.length != 2) continue; // FIXME :p\r
+                                       if (tokens.length != 2) continue; // FIXME :p\r
                                        AssetType type = AssetType.Text;\r
-                                       if(tokens[0].equals("i")) type = AssetType.Image;\r
-                                       if(tokens[0].equals("b")) type = AssetType.Binary;\r
-                                       if(tokens[0].equals("a")) type = AssetType.Audio;\r
-                                       if(tokens[0].equals("d")) type = AssetType.Directory;\r
+                                       if (tokens[0].equals("i")) type = AssetType.Image;\r
+                                       if (tokens[0].equals("b")) type = AssetType.Binary;\r
+                                       if (tokens[0].equals("a")) type = AssetType.Audio;\r
+                                       if (tokens[0].equals("d")) type = AssetType.Directory;\r
                                        assets.add(new Asset(tokens[1].trim(), type));\r
                                }\r
-                               \r
+\r
                                loadNextAsset(assets, 0, callback);\r
                        }\r
 \r
@@ -84,16 +85,16 @@ public class Preloader {
                        }\r
                });\r
        }\r
-       \r
-       private void loadNextAsset(final Array<Asset> assets, final int next, final PreloaderCallback callback) {\r
-               \r
-               if(next == assets.size) {\r
+\r
+       private void loadNextAsset (final Array<Asset> assets, final int next, final PreloaderCallback callback) {\r
+\r
+               if (next == assets.size) {\r
                        callback.done();\r
                        return;\r
                }\r
-               \r
+\r
                final Asset asset = assets.get(next);\r
-               if(asset.type == AssetType.Text) {\r
+               if (asset.type == AssetType.Text) {\r
                        new TextLoader(baseUrl + asset.url, new LoaderCallback<String>() {\r
                                @Override\r
                                public void success (String result) {\r
@@ -109,8 +110,8 @@ public class Preloader {
                                }\r
                        });\r
                }\r
-               \r
-               if(asset.type == AssetType.Image) {\r
+\r
+               if (asset.type == AssetType.Image) {\r
                        new ImageLoader(baseUrl + asset.url, new LoaderCallback<ImageElement>() {\r
                                @Override\r
                                public void success (ImageElement result) {\r
@@ -126,8 +127,8 @@ public class Preloader {
                                }\r
                        });\r
                }\r
-               \r
-               if(asset.type == AssetType.Binary) {\r
+\r
+               if (asset.type == AssetType.Binary) {\r
                        new BinaryLoader(baseUrl + asset.url, new LoaderCallback<Blob>() {\r
                                @Override\r
                                public void success (Blob result) {\r
@@ -143,8 +144,8 @@ public class Preloader {
                                }\r
                        });\r
                }\r
-               \r
-               if(asset.type == AssetType.Audio) {\r
+\r
+               if (asset.type == AssetType.Audio) {\r
                        new AudioLoader(baseUrl + asset.url, new LoaderCallback<Void>() {\r
                                @Override\r
                                public void success (Void result) {\r
@@ -160,50 +161,50 @@ public class Preloader {
                                }\r
                        });\r
                }\r
-               \r
-               if(asset.type == AssetType.Directory) {\r
+\r
+               if (asset.type == AssetType.Directory) {\r
                        loadNextAsset(assets, next + 1, callback);\r
                }\r
        }\r
-       \r
-       public InputStream read(String url) {\r
-               if(texts.containsKey(url)) {\r
+\r
+       public InputStream read (String url) {\r
+               if (texts.containsKey(url)) {\r
                        try {\r
                                return new ByteArrayInputStream(texts.get(url).getBytes("UTF-8"));\r
                        } catch (UnsupportedEncodingException e) {\r
                                return null;\r
                        }\r
                }\r
-               if(images.containsKey(url)) {\r
+               if (images.containsKey(url)) {\r
                        return new ByteArrayInputStream(new byte[1]); // FIXME, sensible?\r
                }\r
-               if(binaries.containsKey(url)) {\r
+               if (binaries.containsKey(url)) {\r
                        return binaries.get(url).read();\r
                }\r
-               if(audio.containsKey(url)) {\r
+               if (audio.containsKey(url)) {\r
                        return new ByteArrayInputStream(new byte[1]); // FIXME, sensible?\r
                }\r
                return null;\r
        }\r
-       \r
-       public boolean contains(String url) {\r
+\r
+       public boolean contains (String url) {\r
                // FIXME should also check if directory exists\r
                return texts.containsKey(url) || images.containsKey(url) || binaries.containsKey(url) || audio.containsKey(url);\r
        }\r
-       \r
-       public boolean isText(String url) {\r
+\r
+       public boolean isText (String url) {\r
                return texts.containsKey(url);\r
        }\r
-       \r
-       public boolean isImage(String url) {\r
+\r
+       public boolean isImage (String url) {\r
                return images.containsKey(url);\r
        }\r
-       \r
-       public boolean isBinary(String url) {\r
+\r
+       public boolean isBinary (String url) {\r
                return binaries.containsKey(url);\r
        }\r
-       \r
-       public boolean isAudio(String url) {\r
+\r
+       public boolean isAudio (String url) {\r
                return audio.containsKey(url);\r
        }\r
 \r
@@ -216,22 +217,22 @@ public class Preloader {
        }\r
 \r
        public long length (String url) {\r
-               if(texts.containsKey(url)) {\r
+               if (texts.containsKey(url)) {\r
                        try {\r
                                return texts.get(url).getBytes("UTF-8").length;\r
                        } catch (UnsupportedEncodingException e) {\r
                                return texts.get(url).getBytes().length;\r
                        }\r
                }\r
-               if(images.containsKey(url)) {\r
+               if (images.containsKey(url)) {\r
                        return 1; // FIXME, sensible?\r
                }\r
-               if(binaries.containsKey(url)) {\r
+               if (binaries.containsKey(url)) {\r
                        return binaries.get(url).length();\r
                }\r
-               if(audio.containsKey(url)) {\r
+               if (audio.containsKey(url)) {\r
                        return 1; // FIXME sensible?\r
                }\r
                return 0;\r
        }\r
-}
\ No newline at end of file
+}\r
index 6ceb22e..9989a15 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
-/**\r
- * Stub interface, just there to trigger the PreloaderGenerator so\r
- * we can automatically copy over assets from the Android project\r
+/** Stub interface, just there to trigger the PreloaderGenerator so we can automatically copy over assets from the Android project\r
  * and generate the assets.txt file.\r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public interface PreloaderBundle {\r
-}
\ No newline at end of file
+}\r
index ba9dac0..ad25081 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
-import java.io.File;\r
 import java.io.PrintWriter;\r
 \r
+import sun.nio.cs.Surrogate.Generator;\r
+\r
 import com.badlogic.gdx.backends.gwt.preloader.AssetFilter.AssetType;\r
 import com.badlogic.gdx.utils.Array;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
-import com.google.gwt.core.ext.BadPropertyValueException;\r
-import com.google.gwt.core.ext.ConfigurationProperty;\r
-import com.google.gwt.core.ext.Generator;\r
-import com.google.gwt.core.ext.GeneratorContext;\r
-import com.google.gwt.core.ext.TreeLogger;\r
-import com.google.gwt.core.ext.UnableToCompleteException;\r
-import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;\r
-import com.google.gwt.user.rebind.SourceWriter;\r
 \r
-/**\r
- * Copies assets from the path specified in the modules gdx.assetpath configuration property\r
- * to the war/ folder and generates the assets.txt file. The type of a file is determined by\r
- * an {@link AssetFilter}, which is either created by instantiating the class specified\r
- * in the gdx.assetfilterclass property, or falling back to the {@link DefaultAssetFilter}. \r
- * @author mzechner\r
- *\r
- */\r
+/** Copies assets from the path specified in the modules gdx.assetpath configuration property to the war/ folder and generates the\r
+ * assets.txt file. The type of a file is determined by an {@link AssetFilter}, which is either created by instantiating the class\r
+ * specified in the gdx.assetfilterclass property, or falling back to the {@link DefaultAssetFilter}.\r
+ * @author mzechner */\r
 public class PreloaderBundleGenerator extends Generator {\r
        private class Asset {\r
                FileWrapper file;\r
                AssetType type;\r
-               \r
-               public Asset(FileWrapper file, AssetType type) {\r
+\r
+               public Asset (FileWrapper file, AssetType type) {\r
                        this.file = file;\r
                        this.type = type;\r
                }\r
        }\r
-       \r
+\r
        @Override\r
        public String generate (TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {\r
                String assetPath = getAssetPath(context);\r
                AssetFilter assetFilter = getAssetFilter(context);\r
 \r
                FileWrapper source = new FileWrapper(assetPath);\r
-               if(!source.exists()) {\r
+               if (!source.exists()) {\r
                        source = new FileWrapper("../" + assetPath);\r
-                       if(!source.exists()) throw new RuntimeException("assets path '" + assetPath + "' does not exist. Check your gdx.assetpath property in your GWT project's module gwt.xml file");\r
+                       if (!source.exists())\r
+                               throw new RuntimeException("assets path '" + assetPath\r
+                                       + "' does not exist. Check your gdx.assetpath property in your GWT project's module gwt.xml file");\r
                }\r
-               if(!source.isDirectory()) throw new RuntimeException("assets path '" + assetPath + "' is not a directory. Check your gdx.assetpath property in your GWT project's module gwt.xml file");\r
+               if (!source.isDirectory())\r
+                       throw new RuntimeException("assets path '" + assetPath\r
+                               + "' is not a directory. Check your gdx.assetpath property in your GWT project's module gwt.xml file");\r
                System.out.println("Copying resources from " + assetPath + " to war/");\r
                System.out.println(source.file.getAbsolutePath());\r
                FileWrapper target = new FileWrapper("assets/"); // this should always be the war/ directory of the GWT project.\r
                System.out.println(target.file.getAbsolutePath());\r
-               if(!target.file.getAbsolutePath().replace("\\", "/").endsWith("war/assets")) {\r
+               if (!target.file.getAbsolutePath().replace("\\", "/").endsWith("war/assets")) {\r
                        target = new FileWrapper("war/assets/");\r
                }\r
-               if(target.exists()) {\r
-                       if(!target.deleteDirectory()) throw new RuntimeException("Couldn't clean target path '" + target + "'");\r
+               if (target.exists()) {\r
+                       if (!target.deleteDirectory()) throw new RuntimeException("Couldn't clean target path '" + target + "'");\r
                }\r
                Array<Asset> assets = new Array<Asset>();\r
                copyDirectory(source, target, assetFilter, assets);\r
-               \r
+\r
                StringBuffer buffer = new StringBuffer();\r
-               for(Asset asset: assets) {\r
+               for (Asset asset : assets) {\r
                        String path = asset.file.path().replace('\\', '/').replace("war/assets/", "").replaceFirst("assets", "");\r
-                       if(path.startsWith("/")) path = path.substring(1);\r
+                       if (path.startsWith("/")) path = path.substring(1);\r
                        buffer.append(asset.type.code);\r
                        buffer.append(":");\r
                        buffer.append(path);\r
@@ -86,9 +80,10 @@ public class PreloaderBundleGenerator extends Generator {
                System.out.println(buffer.toString());\r
                return createDummyClass(logger, context);\r
        }\r
-       \r
+\r
        private void copyFile (FileWrapper source, FileWrapper dest, AssetFilter filter, Array<Asset> assets) {\r
-               if(filter.accept(dest.path(), false));\r
+               if (filter.accept(dest.path(), false))\r
+               ;\r
                try {\r
                        assets.add(new Asset(dest, filter.getType(dest.path())));\r
                        dest.write(source.read(), false);\r
@@ -99,7 +94,7 @@ public class PreloaderBundleGenerator extends Generator {
        }\r
 \r
        private void copyDirectory (FileWrapper sourceDir, FileWrapper destDir, AssetFilter filter, Array<Asset> assets) {\r
-               if(!filter.accept(destDir.path(), true)) return;\r
+               if (!filter.accept(destDir.path(), true)) return;\r
                assets.add(new Asset(destDir, AssetType.Directory));\r
                destDir.mkdirs();\r
                FileWrapper[] files = sourceDir.list();\r
@@ -112,7 +107,7 @@ public class PreloaderBundleGenerator extends Generator {
                                copyFile(srcFile, destFile, filter, assets);\r
                }\r
        }\r
-       \r
+\r
        private AssetFilter getAssetFilter (GeneratorContext context) {\r
                ConfigurationProperty assetFilterClassProperty = null;\r
                try {\r
@@ -120,42 +115,45 @@ public class PreloaderBundleGenerator extends Generator {
                } catch (BadPropertyValueException e) {\r
                        return new DefaultAssetFilter();\r
                }\r
-               if(assetFilterClassProperty.getValues().size() == 0) {\r
+               if (assetFilterClassProperty.getValues().size() == 0) {\r
                        return new DefaultAssetFilter();\r
                }\r
                String assetFilterClass = assetFilterClassProperty.getValues().get(0);\r
-               if(assetFilterClass == null) return new DefaultAssetFilter();\r
+               if (assetFilterClass == null) return new DefaultAssetFilter();\r
                try {\r
                        return (AssetFilter)Class.forName(assetFilterClass).newInstance();\r
                } catch (Exception e) {\r
-                       throw new RuntimeException("Couldn't instantiate custom AssetFilter '" + assetFilterClass + "', make sure the class is public and has a public default constructor", e);\r
+                       throw new RuntimeException("Couldn't instantiate custom AssetFilter '" + assetFilterClass\r
+                               + "', make sure the class is public and has a public default constructor", e);\r
                }\r
        }\r
 \r
-       private String getAssetPath(GeneratorContext context) {\r
+       private String getAssetPath (GeneratorContext context) {\r
                ConfigurationProperty assetPathProperty = null;\r
                try {\r
                        assetPathProperty = context.getPropertyOracle().getConfigurationProperty("gdx.assetpath");\r
                } catch (BadPropertyValueException e) {\r
-                       throw new RuntimeException("No gdx.assetpath defined. Add <set-configuration-property name=\"gdx.assetpath\" value=\"relative/path/to/assets/\"/> to your GWT projects gwt.xml file");\r
+                       throw new RuntimeException(\r
+                               "No gdx.assetpath defined. Add <set-configuration-property name=\"gdx.assetpath\" value=\"relative/path/to/assets/\"/> to your GWT projects gwt.xml file");\r
                }\r
-               if(assetPathProperty.getValues().size() == 0) {\r
-                       throw new RuntimeException("No gdx.assetpath defined. Add <set-configuration-property name=\"gdx.assetpath\" value=\"relative/path/to/assets/\"/> to your GWT projects gwt.xml file");\r
+               if (assetPathProperty.getValues().size() == 0) {\r
+                       throw new RuntimeException(\r
+                               "No gdx.assetpath defined. Add <set-configuration-property name=\"gdx.assetpath\" value=\"relative/path/to/assets/\"/> to your GWT projects gwt.xml file");\r
                }\r
                return assetPathProperty.getValues().get(0);\r
        }\r
 \r
-       private String createDummyClass(TreeLogger logger, GeneratorContext context) {\r
+       private String createDummyClass (TreeLogger logger, GeneratorContext context) {\r
                String packageName = "com.badlogic.gdx.backends.gwt.preloader";\r
                String className = "PreloaderBundleImpl";\r
                ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(packageName, className);\r
                composer.addImplementedInterface(packageName + ".PreloaderBundle");\r
                PrintWriter printWriter = context.tryCreate(logger, packageName, className);\r
-               if(printWriter == null) {\r
+               if (printWriter == null) {\r
                        return packageName + "." + className;\r
                }\r
                SourceWriter sourceWriter = composer.createSourceWriter(context, printWriter);\r
                sourceWriter.commit(logger);\r
                return packageName + "." + className;\r
        }\r
-}
\ No newline at end of file
+}\r
index 630e0a4..d8b35c8 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.gwt.preloader;\r
 \r
-import com.google.gwt.http.client.Request;\r
-import com.google.gwt.http.client.RequestBuilder;\r
-import com.google.gwt.http.client.RequestCallback;\r
-import com.google.gwt.http.client.RequestException;\r
-import com.google.gwt.http.client.Response;\r
+import javax.xml.ws.Response;\r
 \r
 public class TextLoader {\r
        private final LoaderCallback<String> callback;\r
@@ -43,4 +40,4 @@ public class TextLoader {
                        callback.error();\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 55e7f58..edcb5be 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.gwt.soundmanager2;\r
+ ******************************************************************************/\r
 \r
-import com.google.gwt.core.client.JavaScriptObject;\r
+package com.badlogic.gdx.backends.gwt.soundmanager2;\r
 \r
 public class SMSound extends JavaScriptObject {\r
        protected SMSound () {\r
        }\r
-       \r
-       public native final void destruct() /*-{\r
-               this.destruct();\r
-       }-*/;\r
-       \r
-       public native final int getPosition() /*-{\r
-               return this.position;\r
-       }-*/;\r
-       \r
-       public native final void pause() /*-{\r
-               this.pause();\r
-       }-*/;\r
-       \r
-       public native final void play() /*-{\r
-               if(this.loops) {\r
-                       var sound = this;               \r
-                       function loopSound(soundID) { \r
-                               sound.play({onfinish:function(){ \r
-                               loopSound(soundID); \r
-                               }}); \r
-                       }\r
-                       loopSound(this);\r
-               } else {\r
-                       this.play();\r
-               }\r
-       }-*/;\r
-       \r
-       public native final void resume() /*-{\r
-               this.resume();\r
-       }-*/;\r
-       \r
-       public native final void stop() /*-{\r
-               this.stop();\r
-       }-*/;\r
-       \r
-       public native final void setVolume(int volume) /*-{\r
-               this.setVolume(volume);\r
-       }-*/;\r
-       \r
-       public native final int getVolume() /*-{\r
-               return this.volume;\r
-       }-*/;\r
-       \r
-       public native final void loops(int loops) /*-{\r
-               this.loops = loops;\r
-       }-*/;\r
-       \r
-       public native final int playState() /*-{\r
-               return this.playState;\r
-       }-*/;\r
-}
\ No newline at end of file
+\r
+       public native final void destruct () /*-{\r
+                                                                                                               this.destruct();\r
+                                                                                                               }-*/;\r
+\r
+       public native final int getPosition () /*-{\r
+                                                                                                               return this.position;\r
+                                                                                                               }-*/;\r
+\r
+       public native final void pause () /*-{\r
+                                                                                                       this.pause();\r
+                                                                                                       }-*/;\r
+\r
+       public native final void play () /*-{\r
+                                                                                               if(this.loops) {\r
+                                                                                               var sound = this;               \r
+                                                                                               function loopSound(soundID) { \r
+                                                                                               sound.play({onfinish:function(){ \r
+                                                                                               loopSound(soundID); \r
+                                                                                               }}); \r
+                                                                                               }\r
+                                                                                               loopSound(this);\r
+                                                                                               } else {\r
+                                                                                               this.play();\r
+                                                                                               }\r
+                                                                                               }-*/;\r
+\r
+       public native final void resume () /*-{\r
+                                                                                                       this.resume();\r
+                                                                                                       }-*/;\r
+\r
+       public native final void stop () /*-{\r
+                                                                                               this.stop();\r
+                                                                                               }-*/;\r
+\r
+       public native final void setVolume (int volume) /*-{\r
+                                                                                                                                       this.setVolume(volume);\r
+                                                                                                                                       }-*/;\r
+\r
+       public native final int getVolume () /*-{\r
+                                                                                                               return this.volume;\r
+                                                                                                               }-*/;\r
+\r
+       public native final void loops (int loops) /*-{\r
+                                                                                                                               this.loops = loops;\r
+                                                                                                                               }-*/;\r
+\r
+       public native final int playState () /*-{\r
+                                                                                                               return this.playState;\r
+                                                                                                               }-*/;\r
+}\r
index 566b7c0..22cba98 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.backends.gwt.soundmanager2;\r
+ ******************************************************************************/\r
 \r
+package com.badlogic.gdx.backends.gwt.soundmanager2;\r
 \r
 public class SoundManager {\r
        public interface SoundManagerCallback {\r
-               public void loaded();\r
-               public void error();\r
+               public void loaded ();\r
+\r
+               public void error ();\r
        }\r
-       \r
-       public static final native SoundManager getInstance() /*-{\r
-               return $wnd.soundManager;\r
-       }-*/;\r
-       \r
-       public static native String getVersion() /*-{\r
-               return $wnd.soundManager.version;\r
-       }-*/;\r
-       \r
-       public static native String getUrl() /*-{\r
-               return $wnd.soundManager.url;\r
-       }-*/;\r
-       \r
-       public static native void setUrl(String url) /*-{\r
-               $wnd.soundManager.url = url;\r
-       }-*/;\r
-       \r
-       public static native void setDebugMode(boolean debug) /*-{\r
-               $wnd.soundManager.debugMode = debug;\r
-       }-*/;\r
-       \r
-       public static native boolean getDebugMode() /*-{\r
-               return $wnd.soundManager.debugMode;\r
-       }-*/;\r
-       \r
-       public static native void setFlashVersion(int version) /*-{\r
-               $wnd.soundManager.flashVersion = version;\r
-       }-*/;\r
-       \r
-       public static native int getFlashVersion() /*-{\r
-               return $wnd.soundManager.flashVersion;\r
-       }-*/;\r
-       \r
-       public static native SMSound createSound(String id, String url) /*-{\r
-               return $wnd.soundManager.createSound(id, url);\r
-       }-*/;\r
-       \r
-       public static native void reboot() /*-{\r
-               $wnd.soundManager.reboot();\r
-       }-*/;\r
-       \r
-       public static native boolean swfLoaded() /*-{\r
-               return $wnd.soundManager.swfLoaded;\r
-       }-*/;\r
+\r
+       public static final native SoundManager getInstance () /*-{\r
+                                                                                                                                                               return $wnd.soundManager;\r
+                                                                                                                                                               }-*/;\r
+\r
+       public static native String getVersion () /*-{\r
+                                                                                                                       return $wnd.soundManager.version;\r
+                                                                                                                       }-*/;\r
+\r
+       public static native String getUrl () /*-{\r
+                                                                                                               return $wnd.soundManager.url;\r
+                                                                                                               }-*/;\r
+\r
+       public static native void setUrl (String url) /*-{\r
+                                                                                                                                       $wnd.soundManager.url = url;\r
+                                                                                                                                       }-*/;\r
+\r
+       public static native void setDebugMode (boolean debug) /*-{\r
+                                                                                                                                                               $wnd.soundManager.debugMode = debug;\r
+                                                                                                                                                               }-*/;\r
+\r
+       public static native boolean getDebugMode () /*-{\r
+                                                                                                                               return $wnd.soundManager.debugMode;\r
+                                                                                                                               }-*/;\r
+\r
+       public static native void setFlashVersion (int version) /*-{\r
+                                                                                                                                                               $wnd.soundManager.flashVersion = version;\r
+                                                                                                                                                               }-*/;\r
+\r
+       public static native int getFlashVersion () /*-{\r
+                                                                                                                               return $wnd.soundManager.flashVersion;\r
+                                                                                                                               }-*/;\r
+\r
+       public static native SMSound createSound (String id, String url) /*-{\r
+                                                                                                                                                                                       return $wnd.soundManager.createSound(id, url);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       public static native void reboot () /*-{\r
+                                                                                                       $wnd.soundManager.reboot();\r
+                                                                                                       }-*/;\r
+\r
+       public static native boolean swfLoaded () /*-{\r
+                                                                                                                       return $wnd.soundManager.swfLoaded;\r
+                                                                                                                       }-*/;\r
 \r
        public static native void init (String moduleBaseURL, int flashVersion) /*-{\r
-               $wnd.SM2_DEFER = true;\r
-               $wnd.soundManager = new $wnd.SoundManager();\r
-               $wnd.soundManager.url = moduleBaseURL;\r
-               $wnd.soundManager.flashVersion = flashVersion;\r
-               $wnd.soundManager.beginDelayedInit()\r
-       }-*/;\r
-}
\ No newline at end of file
+                                                                                                                                                                                                       $wnd.SM2_DEFER = true;\r
+                                                                                                                                                                                                       $wnd.soundManager = new $wnd.SoundManager();\r
+                                                                                                                                                                                                       $wnd.soundManager.url = moduleBaseURL;\r
+                                                                                                                                                                                                       $wnd.soundManager.flashVersion = flashVersion;\r
+                                                                                                                                                                                                       $wnd.soundManager.beginDelayedInit()\r
+                                                                                                                                                                                                       }-*/;\r
+}\r
index 969893f..8ab5e01 100644 (file)
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
  ******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.gwt.widgets;\r
 \r
-import com.google.gwt.user.client.ui.TextBox;\r
+package com.badlogic.gdx.backends.gwt.widgets;\r
 \r
 public class PlaceholderTextBox extends TextBox {\r
 \r
-  String placeholder = "";\r
+       String placeholder = "";\r
 \r
-  /**\r
-   * Creates an empty text box.\r
-   */\r
-  public PlaceholderTextBox() { }\r
+       /** Creates an empty text box. */\r
+       public PlaceholderTextBox () {\r
+       }\r
 \r
-  /**\r
-   * Gets the current placeholder text for the text box.\r
-   * \r
-   * @return the current placeholder text\r
-   */\r
-  public String getPlaceholder() {\r
-      return placeholder;\r
-  }\r
+       /** Gets the current placeholder text for the text box.\r
+        * \r
+        * @return the current placeholder text */\r
+       public String getPlaceholder () {\r
+               return placeholder;\r
+       }\r
 \r
-  /**\r
-   * Sets the placeholder text displayed in the text box.\r
-   * \r
-   * @param placeholder the placeholder text\r
-   */\r
-  public void setPlaceholder(String text) {\r
-      placeholder = (text != null ? text : "");\r
-      getElement().setPropertyString("placeholder", placeholder);\r
-  }\r
-}
\ No newline at end of file
+       /** Sets the placeholder text displayed in the text box.\r
+        * \r
+        * @param placeholder the placeholder text */\r
+       public void setPlaceholder (String text) {\r
+               placeholder = (text != null ? text : "");\r
+               getElement().setPropertyString("placeholder", placeholder);\r
+       }\r
+}\r
index 10c6262..08d58f0 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
+
 package com.badlogic.gdx.backends.gwt.widgets;
 
-import com.google.gwt.user.client.DOM;
-import com.google.gwt.user.client.Element;
-import com.google.gwt.user.client.ui.Widget;
+import com.badlogic.gdx.scenes.scene2d.ui.Widget;
+import com.sun.org.apache.xalan.internal.xsltc.DOM;
 
-/**
- * A widget that displays progress on an arbitrary scale.
+/** A widget that displays progress on an arbitrary scale.
  * 
  * <h3>CSS Style Rules</h3>
  * <ul class='css'>
- * <li>.gwt-ProgressBar-shell { primary style } </li>
- * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-bar { the actual progress bar }
- * </li>
- * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-text { text on the bar } </li>
- * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-text-firstHalf { applied to text
- * when progress is less than 50 percent } </li>
- * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-text-secondHalf { applied to
- * text when progress is greater than 50 percent } </li>
- * </ul>
- */
+ * <li>.gwt-ProgressBar-shell { primary style }</li>
+ * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-bar { the actual progress bar }</li>
+ * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-text { text on the bar }</li>
+ * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-text-firstHalf { applied to text when progress is less than 50 percent }</li>
+ * <li>.gwt-ProgressBar-shell .gwt-ProgressBar-text-secondHalf { applied to text when progress is greater than 50 percent }</li>
+ * </ul> */
 public class ProgressBar extends Widget implements ResizableWidget {
 
-  private static final String DEFAULT_TEXT_CLASS_NAME =
-      "gwt-ProgressBar-text";
-
-  private String textClassName = DEFAULT_TEXT_CLASS_NAME;
-  private String textFirstHalfClassName = DEFAULT_TEXT_CLASS_NAME + "-firstHalf";
-  private String textSecondHalfClassName = DEFAULT_TEXT_CLASS_NAME + "-secondHalf";
-
-  /**
-   * A formatter used to format the text displayed in the progress bar widget.
-   */
-  public abstract static class TextFormatter {
-    /**
-     * Generate the text to display in the ProgressBar based on the current
-     * value.
-     * 
-     * Override this method to change the text displayed within the ProgressBar.
-     * 
-     * @param bar the progress bar
-     * @param curProgress the current progress
-     * @return the text to display in the progress bar
-     */
-    protected abstract String getText(ProgressBar bar, double curProgress);
-  }
-
-  /**
-   * The bar element that displays the progress.
-   */
-  private Element barElement;
-
-  /**
-   * The current progress.
-   */
-  private double curProgress;
-
-  /**
-   * The maximum progress.
-   */
-  private double maxProgress;
-
-  /**
-   * The minimum progress.
-   */
-  private double minProgress;
-
-  /**
-   * A boolean that determines if the text is visible.
-   */
-  private boolean textVisible = true;
-
-  /**
-   * The element that displays text on the page.
-   */
-  private Element textElement;
-
-  /**
-   * The current text formatter.
-   */
-  private TextFormatter textFormatter;
-
-  /**
-   * Create a progress bar with default range of 0 to 100.
-   */
-  public ProgressBar() {
-    this(0.0, 100.0, 0.0);
-  }
-
-  /**
-   * Create a progress bar with an initial progress and a default range of 0 to
-   * 100.
-   * 
-   * @param curProgress the current progress
-   */
-  public ProgressBar(double curProgress) {
-    this(0.0, 100.0, curProgress);
-  }
-
-  /**
-   * Create a progress bar within the given range.
-   * 
-   * @param minProgress the minimum progress
-   * @param maxProgress the maximum progress
-   */
-  public ProgressBar(double minProgress, double maxProgress) {
-    this(minProgress, maxProgress, 0.0);
-  }
-
-  /**
-   * Create a progress bar within the given range starting at the specified
-   * progress amount.
-   * 
-   * @param minProgress the minimum progress
-   * @param maxProgress the maximum progress
-   * @param curProgress the current progress
-   */
-  public ProgressBar(double minProgress, double maxProgress, double curProgress) {
-    this(minProgress, maxProgress, curProgress, null);
-  }
-
-  /**
-   * Create a progress bar within the given range starting at the specified
-   * progress amount.
-   * 
-   * @param minProgress the minimum progress
-   * @param maxProgress the maximum progress
-   * @param curProgress the current progress
-   * @param textFormatter the text formatter
-   */
-  public ProgressBar(double minProgress, double maxProgress,
-      double curProgress, TextFormatter textFormatter) {
-    this.minProgress = minProgress;
-    this.maxProgress = maxProgress;
-    this.curProgress = curProgress;
-    setTextFormatter(textFormatter);
-
-    // Create the outer shell
-    setElement(DOM.createDiv());
-    DOM.setStyleAttribute(getElement(), "position", "relative");
-    setStyleName("gwt-ProgressBar-shell");
-
-    // Create the bar element
-    barElement = DOM.createDiv();
-    DOM.appendChild(getElement(), barElement);
-    DOM.setStyleAttribute(barElement, "height", "100%");
-    setBarStyleName("gwt-ProgressBar-bar");
-
-    // Create the text element
-    textElement = DOM.createDiv();
-    DOM.appendChild(getElement(), textElement);
-    DOM.setStyleAttribute(textElement, "position", "absolute");
-    DOM.setStyleAttribute(textElement, "top", "0px");
-
-    // Set the current progress
-    setProgress(curProgress);
-  }
-
-  /**
-   * Get the maximum progress.
-   *
-   * @return the maximum progress
-   */
-  public double getMaxProgress() {
-    return maxProgress;
-  }
-
-  /**
-   * Get the minimum progress.
-   *
-   * @return the minimum progress
-   */
-  public double getMinProgress() {
-    return minProgress;
-  }
-
-  /**
-   * Get the current percent complete, relative to the minimum and maximum
-   * values. The percent will always be between 0.0 - 1.0.
-   *
-   * @return the current percent complete
-   */
-  public double getPercent() {
-    // If we have no range
-    if (maxProgress <= minProgress) {
-      return 0.0;
-    }
-
-    // Calculate the relative progress
-    double percent = (curProgress - minProgress) / (maxProgress - minProgress);
-    return Math.max(0.0, Math.min(1.0, percent));
-  }
-
-  /**
-   * Get the current progress.
-   *
-   * @return the current progress
-   */
-  public double getProgress() {
-    return curProgress;
-  }
-
-  /**
-   * Get the text formatter.
-   *
-   * @return the text formatter
-   */
-  public TextFormatter getTextFormatter() {
-    return textFormatter;
-  }
-
-  /**
-   * Check whether the text is visible or not.
-   *
-   * @return true if the text is visible
-   */
-  public boolean isTextVisible() {
-    return textVisible;
-  }
-
-  /**
-   * This method is called when the dimensions of the parent element change.
-   * Subclasses should override this method as needed.
-   *
-   * Move the text to the center of the progress bar.
-   *
-   * @param width the new client width of the element
-   * @param height the new client height of the element
-   */
-  public void onResize(int width, int height) {
-    if (textVisible) {
-      int textWidth = DOM.getElementPropertyInt(textElement, "offsetWidth");
-      int left = (width / 2) - (textWidth / 2);
-      DOM.setStyleAttribute(textElement, "left", left + "px");
-    }
-  }
-
-  /**
-   * Redraw the progress bar when something changes the layout.
-   */
-  public void redraw() {
-    if (isAttached()) {
-      int width = DOM.getElementPropertyInt(getElement(), "clientWidth");
-      int height = DOM.getElementPropertyInt(getElement(), "clientHeight");
-      onResize(width, height);
-    }
-  }
-
-  public void setBarStyleName(String barClassName) {
-    DOM.setElementProperty(barElement, "className", barClassName);
-  }
-
-  /**
-   * Set the maximum progress. If the minimum progress is more than the current
-   * progress, the current progress is adjusted to be within the new range.
-   *
-   * @param maxProgress the maximum progress
-   */
-  public void setMaxProgress(double maxProgress) {
-    this.maxProgress = maxProgress;
-    curProgress = Math.min(curProgress, maxProgress);
-    resetProgress();
-  }
-
-  /**
-   * Set the minimum progress. If the minimum progress is more than the current
-   * progress, the current progress is adjusted to be within the new range.
-   *
-   * @param minProgress the minimum progress
-   */
-  public void setMinProgress(double minProgress) {
-    this.minProgress = minProgress;
-    curProgress = Math.max(curProgress, minProgress);
-    resetProgress();
-  }
-
-  /**
-   * Set the current progress.
-   *
-   * @param curProgress the current progress
-   */
-  public void setProgress(double curProgress) {
-    this.curProgress = Math.max(minProgress, Math.min(maxProgress, curProgress));
-
-    // Calculate percent complete
-    int percent = (int) (100 * getPercent());
-    DOM.setStyleAttribute(barElement, "width", percent + "%");
-    DOM.setElementProperty(textElement, "innerHTML", generateText(curProgress));
-    updateTextStyle(percent);
-
-    // Realign the text
-    redraw();
-  }
-
-  public void setTextFirstHalfStyleName(String textFirstHalfClassName) {
-    this.textFirstHalfClassName = textFirstHalfClassName;
-    onTextStyleChange();
-  }
-
-  /**
-   * Set the text formatter.
-   *
-   * @param textFormatter the text formatter
-   */
-  public void setTextFormatter(TextFormatter textFormatter) {
-    this.textFormatter = textFormatter;
-  }
-
-  public void setTextSecondHalfStyleName(String textSecondHalfClassName) {
-    this.textSecondHalfClassName = textSecondHalfClassName;
-    onTextStyleChange();
-  }
-
-  public void setTextStyleName(String textClassName) {
-    this.textClassName = textClassName;
-    onTextStyleChange();
-  }
-
-  /**
-   * Sets whether the text is visible over the bar.
-   *
-   * @param textVisible True to show text, false to hide it
-   */
-  public void setTextVisible(boolean textVisible) {
-    this.textVisible = textVisible;
-    if (this.textVisible) {
-      DOM.setStyleAttribute(textElement, "display", "");
-      redraw();
-    } else {
-      DOM.setStyleAttribute(textElement, "display", "none");
-    }
-  }
-
-  /**
-   * Generate the text to display within the progress bar. Override this
-   * function to change the default progress percent to a more informative
-   * message, such as the number of kilobytes downloaded.
-   *
-   * @param curProgress the current progress
-   * @return the text to display in the progress bar
-   */
-  protected String generateText(double curProgress) {
-    if (textFormatter != null) {
-      return textFormatter.getText(this, curProgress);
-    } else {
-      return (int) (100 * getPercent()) + "%";
-    }
-  }
-
-  /**
-   * Get the bar element.
-   *
-   * @return the bar element
-   */
-  protected Element getBarElement() {
-    return barElement;
-  }
-
-  /**
-   * Get the text element.
-   *
-   * @return the text element
-   */
-  protected Element getTextElement() {
-    return textElement;
-  }
-
-  /**
-   * This method is called immediately after a widget becomes attached to the
-   * browser's document.
-   */
-  @Override
-  protected void onLoad() {
-    // Reset the position attribute of the parent element
-    DOM.setStyleAttribute(getElement(), "position", "relative");
-    ResizableWidgetCollection.get().add(this);
-    redraw();
-  }
-
-  @Override
-  protected void onUnload() {
-    ResizableWidgetCollection.get().remove(this);
-  }
-
-  /**
-   * Reset the progress text based on the current min and max progress range.
-   */
-  protected void resetProgress() {
-    setProgress(getProgress());
-  }
-
-  private void onTextStyleChange() {
-    int percent = (int) (100 * getPercent());
-    updateTextStyle(percent);
-  }
-
-  private void updateTextStyle(int percent) {
-    // Set the style depending on the size of the bar
-    if (percent < 50) {
-      DOM.setElementProperty(textElement, "className",
-          textClassName + " " + textFirstHalfClassName);
-    } else {
-      DOM.setElementProperty(textElement, "className",
-          textClassName + " " + textSecondHalfClassName);
-    }
-  }
+       private static final String DEFAULT_TEXT_CLASS_NAME = "gwt-ProgressBar-text";
+
+       private String textClassName = DEFAULT_TEXT_CLASS_NAME;
+       private String textFirstHalfClassName = DEFAULT_TEXT_CLASS_NAME + "-firstHalf";
+       private String textSecondHalfClassName = DEFAULT_TEXT_CLASS_NAME + "-secondHalf";
+
+       /** A formatter used to format the text displayed in the progress bar widget. */
+       public abstract static class TextFormatter {
+               /** Generate the text to display in the ProgressBar based on the current value.
+                * 
+                * Override this method to change the text displayed within the ProgressBar.
+                * 
+                * @param bar the progress bar
+                * @param curProgress the current progress
+                * @return the text to display in the progress bar */
+               protected abstract String getText (ProgressBar bar, double curProgress);
+       }
+
+       /** The bar element that displays the progress. */
+       private Element barElement;
+
+       /** The current progress. */
+       private double curProgress;
+
+       /** The maximum progress. */
+       private double maxProgress;
+
+       /** The minimum progress. */
+       private double minProgress;
+
+       /** A boolean that determines if the text is visible. */
+       private boolean textVisible = true;
+
+       /** The element that displays text on the page. */
+       private Element textElement;
+
+       /** The current text formatter. */
+       private TextFormatter textFormatter;
+
+       /** Create a progress bar with default range of 0 to 100. */
+       public ProgressBar () {
+               this(0.0, 100.0, 0.0);
+       }
+
+       /** Create a progress bar with an initial progress and a default range of 0 to 100.
+        * 
+        * @param curProgress the current progress */
+       public ProgressBar (double curProgress) {
+               this(0.0, 100.0, curProgress);
+       }
+
+       /** Create a progress bar within the given range.
+        * 
+        * @param minProgress the minimum progress
+        * @param maxProgress the maximum progress */
+       public ProgressBar (double minProgress, double maxProgress) {
+               this(minProgress, maxProgress, 0.0);
+       }
+
+       /** Create a progress bar within the given range starting at the specified progress amount.
+        * 
+        * @param minProgress the minimum progress
+        * @param maxProgress the maximum progress
+        * @param curProgress the current progress */
+       public ProgressBar (double minProgress, double maxProgress, double curProgress) {
+               this(minProgress, maxProgress, curProgress, null);
+       }
+
+       /** Create a progress bar within the given range starting at the specified progress amount.
+        * 
+        * @param minProgress the minimum progress
+        * @param maxProgress the maximum progress
+        * @param curProgress the current progress
+        * @param textFormatter the text formatter */
+       public ProgressBar (double minProgress, double maxProgress, double curProgress, TextFormatter textFormatter) {
+               this.minProgress = minProgress;
+               this.maxProgress = maxProgress;
+               this.curProgress = curProgress;
+               setTextFormatter(textFormatter);
+
+               // Create the outer shell
+               setElement(DOM.createDiv());
+               DOM.setStyleAttribute(getElement(), "position", "relative");
+               setStyleName("gwt-ProgressBar-shell");
+
+               // Create the bar element
+               barElement = DOM.createDiv();
+               DOM.appendChild(getElement(), barElement);
+               DOM.setStyleAttribute(barElement, "height", "100%");
+               setBarStyleName("gwt-ProgressBar-bar");
+
+               // Create the text element
+               textElement = DOM.createDiv();
+               DOM.appendChild(getElement(), textElement);
+               DOM.setStyleAttribute(textElement, "position", "absolute");
+               DOM.setStyleAttribute(textElement, "top", "0px");
+
+               // Set the current progress
+               setProgress(curProgress);
+       }
+
+       /** Get the maximum progress.
+        * 
+        * @return the maximum progress */
+       public double getMaxProgress () {
+               return maxProgress;
+       }
+
+       /** Get the minimum progress.
+        * 
+        * @return the minimum progress */
+       public double getMinProgress () {
+               return minProgress;
+       }
+
+       /** Get the current percent complete, relative to the minimum and maximum values. The percent will always be between 0.0 - 1.0.
+        * 
+        * @return the current percent complete */
+       public double getPercent () {
+               // If we have no range
+               if (maxProgress <= minProgress) {
+                       return 0.0;
+               }
+
+               // Calculate the relative progress
+               double percent = (curProgress - minProgress) / (maxProgress - minProgress);
+               return Math.max(0.0, Math.min(1.0, percent));
+       }
+
+       /** Get the current progress.
+        * 
+        * @return the current progress */
+       public double getProgress () {
+               return curProgress;
+       }
+
+       /** Get the text formatter.
+        * 
+        * @return the text formatter */
+       public TextFormatter getTextFormatter () {
+               return textFormatter;
+       }
+
+       /** Check whether the text is visible or not.
+        * 
+        * @return true if the text is visible */
+       public boolean isTextVisible () {
+               return textVisible;
+       }
+
+       /** This method is called when the dimensions of the parent element change. Subclasses should override this method as needed.
+        * 
+        * Move the text to the center of the progress bar.
+        * 
+        * @param width the new client width of the element
+        * @param height the new client height of the element */
+       public void onResize (int width, int height) {
+               if (textVisible) {
+                       int textWidth = DOM.getElementPropertyInt(textElement, "offsetWidth");
+                       int left = (width / 2) - (textWidth / 2);
+                       DOM.setStyleAttribute(textElement, "left", left + "px");
+               }
+       }
+
+       /** Redraw the progress bar when something changes the layout. */
+       public void redraw () {
+               if (isAttached()) {
+                       int width = DOM.getElementPropertyInt(getElement(), "clientWidth");
+                       int height = DOM.getElementPropertyInt(getElement(), "clientHeight");
+                       onResize(width, height);
+               }
+       }
+
+       public void setBarStyleName (String barClassName) {
+               DOM.setElementProperty(barElement, "className", barClassName);
+       }
+
+       /** Set the maximum progress. If the minimum progress is more than the current progress, the current progress is adjusted to be
+        * within the new range.
+        * 
+        * @param maxProgress the maximum progress */
+       public void setMaxProgress (double maxProgress) {
+               this.maxProgress = maxProgress;
+               curProgress = Math.min(curProgress, maxProgress);
+               resetProgress();
+       }
+
+       /** Set the minimum progress. If the minimum progress is more than the current progress, the current progress is adjusted to be
+        * within the new range.
+        * 
+        * @param minProgress the minimum progress */
+       public void setMinProgress (double minProgress) {
+               this.minProgress = minProgress;
+               curProgress = Math.max(curProgress, minProgress);
+               resetProgress();
+       }
+
+       /** Set the current progress.
+        * 
+        * @param curProgress the current progress */
+       public void setProgress (double curProgress) {
+               this.curProgress = Math.max(minProgress, Math.min(maxProgress, curProgress));
+
+               // Calculate percent complete
+               int percent = (int)(100 * getPercent());
+               DOM.setStyleAttribute(barElement, "width", percent + "%");
+               DOM.setElementProperty(textElement, "innerHTML", generateText(curProgress));
+               updateTextStyle(percent);
+
+               // Realign the text
+               redraw();
+       }
+
+       public void setTextFirstHalfStyleName (String textFirstHalfClassName) {
+               this.textFirstHalfClassName = textFirstHalfClassName;
+               onTextStyleChange();
+       }
+
+       /** Set the text formatter.
+        * 
+        * @param textFormatter the text formatter */
+       public void setTextFormatter (TextFormatter textFormatter) {
+               this.textFormatter = textFormatter;
+       }
+
+       public void setTextSecondHalfStyleName (String textSecondHalfClassName) {
+               this.textSecondHalfClassName = textSecondHalfClassName;
+               onTextStyleChange();
+       }
+
+       public void setTextStyleName (String textClassName) {
+               this.textClassName = textClassName;
+               onTextStyleChange();
+       }
+
+       /** Sets whether the text is visible over the bar.
+        * 
+        * @param textVisible True to show text, false to hide it */
+       public void setTextVisible (boolean textVisible) {
+               this.textVisible = textVisible;
+               if (this.textVisible) {
+                       DOM.setStyleAttribute(textElement, "display", "");
+                       redraw();
+               } else {
+                       DOM.setStyleAttribute(textElement, "display", "none");
+               }
+       }
+
+       /** Generate the text to display within the progress bar. Override this function to change the default progress percent to a
+        * more informative message, such as the number of kilobytes downloaded.
+        * 
+        * @param curProgress the current progress
+        * @return the text to display in the progress bar */
+       protected String generateText (double curProgress) {
+               if (textFormatter != null) {
+                       return textFormatter.getText(this, curProgress);
+               } else {
+                       return (int)(100 * getPercent()) + "%";
+               }
+       }
+
+       /** Get the bar element.
+        * 
+        * @return the bar element */
+       protected Element getBarElement () {
+               return barElement;
+       }
+
+       /** Get the text element.
+        * 
+        * @return the text element */
+       protected Element getTextElement () {
+               return textElement;
+       }
+
+       /** This method is called immediately after a widget becomes attached to the browser's document. */
+       @Override
+       protected void onLoad () {
+               // Reset the position attribute of the parent element
+               DOM.setStyleAttribute(getElement(), "position", "relative");
+               ResizableWidgetCollection.get().add(this);
+               redraw();
+       }
+
+       @Override
+       protected void onUnload () {
+               ResizableWidgetCollection.get().remove(this);
+       }
+
+       /** Reset the progress text based on the current min and max progress range. */
+       protected void resetProgress () {
+               setProgress(getProgress());
+       }
+
+       private void onTextStyleChange () {
+               int percent = (int)(100 * getPercent());
+               updateTextStyle(percent);
+       }
+
+       private void updateTextStyle (int percent) {
+               // Set the style depending on the size of the bar
+               if (percent < 50) {
+                       DOM.setElementProperty(textElement, "className", textClassName + " " + textFirstHalfClassName);
+               } else {
+                       DOM.setElementProperty(textElement, "className", textClassName + " " + textSecondHalfClassName);
+               }
+       }
 }
index 8b3f3f8..f5c63da 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package com.badlogic.gdx.backends.gwt.widgets;
 
-import com.google.gwt.user.client.Element;
+package com.badlogic.gdx.backends.gwt.widgets;
 
-/**
- * An interface that defines the methods required to support automatic resizing
- * of the Widget element.
- */
+/** An interface that defines the methods required to support automatic resizing of the Widget element. */
 public interface ResizableWidget {
-  /**
-   * Get the widget's element.
-   */
-  Element getElement();
+       /** Get the widget's element. */
+       Element getElement ();
 
-  /**
-   * Check if this widget is attached to the page.
-   * 
-   * @return true if the widget is attached to the page
-   */
-  boolean isAttached();
+       /** Check if this widget is attached to the page.
+        * 
+        * @return true if the widget is attached to the page */
+       boolean isAttached ();
 
-  /**
-   * This method is called when the dimensions of the parent element change.
-   * Subclasses should override this method as needed.
-   * 
-   * @param width the new client width of the element
-   * @param height the new client height of the element
-   */
-  void onResize(int width, int height);
+       /** This method is called when the dimensions of the parent element change. Subclasses should override this method as needed.
+        * 
+        * @param width the new client width of the element
+        * @param height the new client height of the element */
+       void onResize (int width, int height);
 }
index 4e613e6..2febaa1 100644 (file)
  * License for the specific language governing permissions and limitations under
  * the License.
  */
-package com.badlogic.gdx.backends.gwt.widgets;
 
-import com.google.gwt.event.logical.shared.ResizeEvent;
-import com.google.gwt.event.logical.shared.ResizeHandler;
-import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.WindowResizeListener;
+package com.badlogic.gdx.backends.gwt.widgets;
 
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-/**
- * A collection of {@link ResizableWidget} that periodically checks the outer
- * dimensions of a widget and redraws it as necessary. Every
- * {@link ResizableWidgetCollection} uses a timer, so consider the cost when
- * adding one.
+/** A collection of {@link ResizableWidget} that periodically checks the outer dimensions of a widget and redraws it as necessary.
+ * Every {@link ResizableWidgetCollection} uses a timer, so consider the cost when adding one.
  * 
- * Typically, a {@link ResizableWidgetCollection} is only needed if you expect
- * your widgets to resize based on window resizing or other events. Fixed sized
- * Widgets do not need to be added to a {@link ResizableWidgetCollection} as
- * they cannot be resized.
- */
-public class ResizableWidgetCollection implements WindowResizeListener,
-    Iterable<ResizableWidget> {
-  /**
-   * Information about a widgets size.
-   */
-  static class ResizableWidgetInfo {
-
-    private ResizableWidget widget;
-    private int curOffsetHeight = 0;
-    private int curOffsetWidth = 0;
-    private int curClientHeight = 0;
-    private int curClientWidth = 0;
-
-    /**
-     * Constructor.
-     * 
-     * @param widget the widget that will be monitored
-     */
-    public ResizableWidgetInfo(ResizableWidget widget) {
-      this.widget = widget;
-      updateSizes();
-    }
-
-    public int getClientHeight() {
-      return curClientHeight;
-    }
-
-    public int getClientWidth() {
-      return curClientWidth;
-    }
-
-    public int getOffsetHeight() {
-      return curOffsetHeight;
-    }
-
-    public int getOffsetWidth() {
-      return curOffsetWidth;
-    }
-
-    /**
-     * Update the current sizes.
-     * 
-     * @return true if the sizes changed, false if not.
-     */
-    public boolean updateSizes() {
-      int offsetWidth = widget.getElement().getOffsetWidth();
-      int offsetHeight = widget.getElement().getOffsetHeight();
-      int clientWidth = widget.getElement().getClientWidth();
-      int clientHeight = widget.getElement().getClientHeight();
-      if (offsetWidth != curOffsetWidth || offsetHeight != curOffsetHeight
-          || clientWidth != curClientWidth || clientHeight != curClientHeight) {
-        this.curOffsetWidth = offsetWidth;
-        this.curOffsetHeight = offsetHeight;
-        this.curClientWidth = clientWidth;
-        this.curClientHeight = clientHeight;
-        return true;
-      }
-
-      return false;
-    }
-  }
-
-  /**
-   * The default delay between resize checks in milliseconds.
-   */
-  private static final int DEFAULT_RESIZE_CHECK_DELAY = 400;
-
-  /**
-   * A static {@link ResizableWidgetCollection} that can be used in most cases.
-   */
-  private static ResizableWidgetCollection staticCollection = null;
-
-  /**
-   * Get the globally accessible {@link ResizableWidgetCollection}. In most
-   * cases, the global collection can be used for all {@link ResizableWidget}s.
-   * 
-   * @return the global {@link ResizableWidgetCollection}
-   */
-  public static ResizableWidgetCollection get() {
-    if (staticCollection == null) {
-      staticCollection = new ResizableWidgetCollection();
-    }
-    return staticCollection;
-  }
-
-  /**
-   * The timer used to periodically compare the dimensions of elements to their
-   * old dimensions.
-   */
-  private Timer resizeCheckTimer = new Timer() {
-    @Override
-    public void run() {
-      // Ignore changes that result from window resize events
-      if (windowHeight != Window.getClientHeight()
-          || windowWidth != Window.getClientWidth()) {
-        windowHeight = Window.getClientHeight();
-        windowWidth = Window.getClientWidth();
-        schedule(resizeCheckDelay);
-        return;
-      }
-
-      // Look for elements that have new dimensions
-      checkWidgetSize();
-
-      // Start checking again
-      if (resizeCheckingEnabled) {
-        schedule(resizeCheckDelay);
-      }
-    }
-  };
-
-  /**
-   * A hash map of the resizable widgets this collection is checking.
-   */
-  private Map<ResizableWidget, ResizableWidgetInfo> widgets = new HashMap<ResizableWidget, ResizableWidgetInfo>();
-
-  /**
-   * The current window height.
-   */
-  private int windowHeight = 0;
-
-  /**
-   * The current window width.
-   */
-  private int windowWidth = 0;
-
-  /**
-   * The hook used to remove the window handler.
-   */
-  private HandlerRegistration windowHandler;
-
-  /**
-   * The delay between resize checks.
-   */
-  private int resizeCheckDelay = DEFAULT_RESIZE_CHECK_DELAY;
-
-  /**
-   * A boolean indicating that resize checking should run.
-   */
-  private boolean resizeCheckingEnabled;
-
-  /**
-   * Create a ResizableWidget.
-   */
-  public ResizableWidgetCollection() {
-    this(DEFAULT_RESIZE_CHECK_DELAY);
-  }
-
-  /**
-   * Constructor.
-   * 
-   * @param resizeCheckingEnabled false to disable resize checking
-   */
-  public ResizableWidgetCollection(boolean resizeCheckingEnabled) {
-    this(DEFAULT_RESIZE_CHECK_DELAY, resizeCheckingEnabled);
-  }
-
-  /**
-   * Constructor.
-   * 
-   * @param resizeCheckDelay the delay between checks in milliseconds
-   */
-  public ResizableWidgetCollection(int resizeCheckDelay) {
-    this(resizeCheckDelay, true);
-  }
-
-  /**
-   * Constructor.
-   */
-  protected ResizableWidgetCollection(int resizeCheckDelay,
-      boolean resizeCheckingEnabled) {
-    setResizeCheckDelay(resizeCheckDelay);
-    setResizeCheckingEnabled(resizeCheckingEnabled);
-  }
-
-  /**
-   * Add a resizable widget to the collection.
-   * 
-   * @param widget the resizable widget to add
-   */
-  public void add(ResizableWidget widget) {
-    widgets.put(widget, new ResizableWidgetInfo(widget));
-  }
-
-  /**
-   * Check to see if any Widgets have been resized and call their handlers
-   * appropriately.
-   */
-  public void checkWidgetSize() {
-    for (Map.Entry<ResizableWidget, ResizableWidgetInfo> entry : widgets.entrySet()) {
-      ResizableWidget widget = entry.getKey();
-      ResizableWidgetInfo info = entry.getValue();
-
-      // Call the onResize method only if the widget is attached
-      if (info.updateSizes()) {
-        // Check that the offset width and height are greater than 0.
-        if (info.getOffsetWidth() > 0 && info.getOffsetHeight() > 0
-            && widget.isAttached()) {
-          // Send the client dimensions, which is the space available for
-          // rendering.
-          widget.onResize(info.getOffsetWidth(), info.getOffsetHeight());
-        }
-      }
-    }
-  }
-
-  /**
-   * Get the delay between resize checks in milliseconds.
-   * 
-   * @return the resize check delay
-   */
-  public int getResizeCheckDelay() {
-    return resizeCheckDelay;
-  }
-
-  /**
-   * Check whether or not resize checking is enabled.
-   * 
-   * @return true is resize checking is enabled
-   */
-  public boolean isResizeCheckingEnabled() {
-    return resizeCheckingEnabled;
-  }
-
-  public Iterator<ResizableWidget> iterator() {
-    return widgets.keySet().iterator();
-  }
-
-  /**
-   * Called when the browser window is resized.
-   * 
-   * @param width the width of the window's client area.
-   * @param height the height of the window's client area.
-   */
-  @Deprecated
-  public void onWindowResized(int width, int height) {
-    checkWidgetSize();
-  }
-
-  /**
-   * Remove a {@link ResizableWidget} from the collection.
-   * 
-   * @param widget the widget to remove
-   */
-  public void remove(ResizableWidget widget) {
-    widgets.remove(widget);
-  }
-
-  /**
-   * Set the delay between resize checks in milliseconds.
-   * 
-   * @param resizeCheckDelay the new delay
-   */
-  public void setResizeCheckDelay(int resizeCheckDelay) {
-    this.resizeCheckDelay = resizeCheckDelay;
-  }
-
-  /**
-   * Set whether or not resize checking is enabled. If disabled, elements will
-   * still be resized on window events, but the timer will not check their
-   * dimensions periodically.
-   * 
-   * @param enabled true to enable the resize checking timer
-   */
-  public void setResizeCheckingEnabled(boolean enabled) {
-    if (enabled && !resizeCheckingEnabled) {
-      resizeCheckingEnabled = true;
-      if (windowHandler == null) {
-        windowHandler = Window.addResizeHandler(new ResizeHandler() {
-          public void onResize(ResizeEvent event) {
-            onWindowResized(event.getWidth(), event.getHeight());
-          }
-        });
-      }
-      resizeCheckTimer.schedule(resizeCheckDelay);
-    } else if (!enabled && resizeCheckingEnabled) {
-      resizeCheckingEnabled = false;
-      if (windowHandler != null) {
-        windowHandler.removeHandler();
-        windowHandler = null;
-      }
-      resizeCheckTimer.cancel();
-    }
-  }
-
-  /**
-   * Inform the {@link ResizableWidgetCollection} that the size of a widget has
-   * changed and already been redrawn. This will prevent the widget from being
-   * redrawn on the next loop.
-   * 
-   * @param widget the widget's size that changed
-   */
-  public void updateWidgetSize(ResizableWidget widget) {
-    if (!widget.isAttached()) {
-      return;
-    }
-
-    ResizableWidgetInfo info = widgets.get(widget);
-    if (info != null) {
-      info.updateSizes();
-    }
-  }
+ * Typically, a {@link ResizableWidgetCollection} is only needed if you expect your widgets to resize based on window resizing or
+ * other events. Fixed sized Widgets do not need to be added to a {@link ResizableWidgetCollection} as they cannot be resized. */
+public class ResizableWidgetCollection implements WindowResizeListener, Iterable<ResizableWidget> {
+       /** Information about a widgets size. */
+       static class ResizableWidgetInfo {
+
+               private ResizableWidget widget;
+               private int curOffsetHeight = 0;
+               private int curOffsetWidth = 0;
+               private int curClientHeight = 0;
+               private int curClientWidth = 0;
+
+               /** Constructor.
+                * 
+                * @param widget the widget that will be monitored */
+               public ResizableWidgetInfo (ResizableWidget widget) {
+                       this.widget = widget;
+                       updateSizes();
+               }
+
+               public int getClientHeight () {
+                       return curClientHeight;
+               }
+
+               public int getClientWidth () {
+                       return curClientWidth;
+               }
+
+               public int getOffsetHeight () {
+                       return curOffsetHeight;
+               }
+
+               public int getOffsetWidth () {
+                       return curOffsetWidth;
+               }
+
+               /** Update the current sizes.
+                * 
+                * @return true if the sizes changed, false if not. */
+               public boolean updateSizes () {
+                       int offsetWidth = widget.getElement().getOffsetWidth();
+                       int offsetHeight = widget.getElement().getOffsetHeight();
+                       int clientWidth = widget.getElement().getClientWidth();
+                       int clientHeight = widget.getElement().getClientHeight();
+                       if (offsetWidth != curOffsetWidth || offsetHeight != curOffsetHeight || clientWidth != curClientWidth
+                               || clientHeight != curClientHeight) {
+                               this.curOffsetWidth = offsetWidth;
+                               this.curOffsetHeight = offsetHeight;
+                               this.curClientWidth = clientWidth;
+                               this.curClientHeight = clientHeight;
+                               return true;
+                       }
+
+                       return false;
+               }
+       }
+
+       /** The default delay between resize checks in milliseconds. */
+       private static final int DEFAULT_RESIZE_CHECK_DELAY = 400;
+
+       /** A static {@link ResizableWidgetCollection} that can be used in most cases. */
+       private static ResizableWidgetCollection staticCollection = null;
+
+       /** Get the globally accessible {@link ResizableWidgetCollection}. In most cases, the global collection can be used for all
+        * {@link ResizableWidget}s.
+        * 
+        * @return the global {@link ResizableWidgetCollection} */
+       public static ResizableWidgetCollection get () {
+               if (staticCollection == null) {
+                       staticCollection = new ResizableWidgetCollection();
+               }
+               return staticCollection;
+       }
+
+       /** The timer used to periodically compare the dimensions of elements to their old dimensions. */
+       private Timer resizeCheckTimer = new Timer() {
+               @Override
+               public void run () {
+                       // Ignore changes that result from window resize events
+                       if (windowHeight != Window.getClientHeight() || windowWidth != Window.getClientWidth()) {
+                               windowHeight = Window.getClientHeight();
+                               windowWidth = Window.getClientWidth();
+                               schedule(resizeCheckDelay);
+                               return;
+                       }
+
+                       // Look for elements that have new dimensions
+                       checkWidgetSize();
+
+                       // Start checking again
+                       if (resizeCheckingEnabled) {
+                               schedule(resizeCheckDelay);
+                       }
+               }
+       };
+
+       /** A hash map of the resizable widgets this collection is checking. */
+       private Map<ResizableWidget, ResizableWidgetInfo> widgets = new HashMap<ResizableWidget, ResizableWidgetInfo>();
+
+       /** The current window height. */
+       private int windowHeight = 0;
+
+       /** The current window width. */
+       private int windowWidth = 0;
+
+       /** The hook used to remove the window handler. */
+       private HandlerRegistration windowHandler;
+
+       /** The delay between resize checks. */
+       private int resizeCheckDelay = DEFAULT_RESIZE_CHECK_DELAY;
+
+       /** A boolean indicating that resize checking should run. */
+       private boolean resizeCheckingEnabled;
+
+       /** Create a ResizableWidget. */
+       public ResizableWidgetCollection () {
+               this(DEFAULT_RESIZE_CHECK_DELAY);
+       }
+
+       /** Constructor.
+        * 
+        * @param resizeCheckingEnabled false to disable resize checking */
+       public ResizableWidgetCollection (boolean resizeCheckingEnabled) {
+               this(DEFAULT_RESIZE_CHECK_DELAY, resizeCheckingEnabled);
+       }
+
+       /** Constructor.
+        * 
+        * @param resizeCheckDelay the delay between checks in milliseconds */
+       public ResizableWidgetCollection (int resizeCheckDelay) {
+               this(resizeCheckDelay, true);
+       }
+
+       /** Constructor. */
+       protected ResizableWidgetCollection (int resizeCheckDelay, boolean resizeCheckingEnabled) {
+               setResizeCheckDelay(resizeCheckDelay);
+               setResizeCheckingEnabled(resizeCheckingEnabled);
+       }
+
+       /** Add a resizable widget to the collection.
+        * 
+        * @param widget the resizable widget to add */
+       public void add (ResizableWidget widget) {
+               widgets.put(widget, new ResizableWidgetInfo(widget));
+       }
+
+       /** Check to see if any Widgets have been resized and call their handlers appropriately. */
+       public void checkWidgetSize () {
+               for (Map.Entry<ResizableWidget, ResizableWidgetInfo> entry : widgets.entrySet()) {
+                       ResizableWidget widget = entry.getKey();
+                       ResizableWidgetInfo info = entry.getValue();
+
+                       // Call the onResize method only if the widget is attached
+                       if (info.updateSizes()) {
+                               // Check that the offset width and height are greater than 0.
+                               if (info.getOffsetWidth() > 0 && info.getOffsetHeight() > 0 && widget.isAttached()) {
+                                       // Send the client dimensions, which is the space available for
+                                       // rendering.
+                                       widget.onResize(info.getOffsetWidth(), info.getOffsetHeight());
+                               }
+                       }
+               }
+       }
+
+       /** Get the delay between resize checks in milliseconds.
+        * 
+        * @return the resize check delay */
+       public int getResizeCheckDelay () {
+               return resizeCheckDelay;
+       }
+
+       /** Check whether or not resize checking is enabled.
+        * 
+        * @return true is resize checking is enabled */
+       public boolean isResizeCheckingEnabled () {
+               return resizeCheckingEnabled;
+       }
+
+       public Iterator<ResizableWidget> iterator () {
+               return widgets.keySet().iterator();
+       }
+
+       /** Called when the browser window is resized.
+        * 
+        * @param width the width of the window's client area.
+        * @param height the height of the window's client area. */
+       @Deprecated
+       public void onWindowResized (int width, int height) {
+               checkWidgetSize();
+       }
+
+       /** Remove a {@link ResizableWidget} from the collection.
+        * 
+        * @param widget the widget to remove */
+       public void remove (ResizableWidget widget) {
+               widgets.remove(widget);
+       }
+
+       /** Set the delay between resize checks in milliseconds.
+        * 
+        * @param resizeCheckDelay the new delay */
+       public void setResizeCheckDelay (int resizeCheckDelay) {
+               this.resizeCheckDelay = resizeCheckDelay;
+       }
+
+       /** Set whether or not resize checking is enabled. If disabled, elements will still be resized on window events, but the timer
+        * will not check their dimensions periodically.
+        * 
+        * @param enabled true to enable the resize checking timer */
+       public void setResizeCheckingEnabled (boolean enabled) {
+               if (enabled && !resizeCheckingEnabled) {
+                       resizeCheckingEnabled = true;
+                       if (windowHandler == null) {
+                               windowHandler = Window.addResizeHandler(new ResizeHandler() {
+                                       public void onResize (ResizeEvent event) {
+                                               onWindowResized(event.getWidth(), event.getHeight());
+                                       }
+                               });
+                       }
+                       resizeCheckTimer.schedule(resizeCheckDelay);
+               } else if (!enabled && resizeCheckingEnabled) {
+                       resizeCheckingEnabled = false;
+                       if (windowHandler != null) {
+                               windowHandler.removeHandler();
+                               windowHandler = null;
+                       }
+                       resizeCheckTimer.cancel();
+               }
+       }
+
+       /** Inform the {@link ResizableWidgetCollection} that the size of a widget has changed and already been redrawn. This will
+        * prevent the widget from being redrawn on the next loop.
+        * 
+        * @param widget the widget's size that changed */
+       public void updateWidgetSize (ResizableWidget widget) {
+               if (!widget.isAttached()) {
+                       return;
+               }
+
+               ResizableWidgetInfo info = widgets.get(widget);
+               if (info != null) {
+                       info.updateSizes();
+               }
+       }
 
 }
index 529c7ff..873248b 100644 (file)
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
  ******************************************************************************/\r
\r
-package com.badlogic.gdx.backends.gwt.widgets;\r
 \r
-import com.google.gwt.event.dom.client.ClickEvent;\r
-import com.google.gwt.event.dom.client.ClickHandler;\r
-import com.google.gwt.user.client.ui.Button;\r
-import com.google.gwt.user.client.ui.DialogBox;\r
-import com.google.gwt.user.client.ui.HasHorizontalAlignment;\r
-import com.google.gwt.user.client.ui.HorizontalPanel;\r
-import com.google.gwt.user.client.ui.VerticalPanel;\r
+package com.badlogic.gdx.backends.gwt.widgets;\r
 \r
 public class TextInputDialogBox extends DialogBox {\r
        private PlaceholderTextBox textBox;\r
-       \r
-    public TextInputDialogBox(String title, String text, String placeholder) {\r
-        // Set the dialog box's caption.\r
-      setText(title);\r
-\r
-      VerticalPanel vPanel = new VerticalPanel();\r
-      HorizontalPanel hPanel = new HorizontalPanel();\r
-      \r
-      // Enable animation.\r
-      setAnimationEnabled(true);\r
-\r
-      // Enable glass background.\r
-      setGlassEnabled(true);\r
-      \r
-      // Center this bad boy.\r
-      center();\r
-      \r
-      vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);\r
-\r
-      Button ok = new Button("OK");\r
-      ok.addClickHandler(new ClickHandler() {\r
-        public void onClick(ClickEvent event) {\r
-         TextInputDialogBox.this.onPositive();\r
-        }\r
-      });\r
-      \r
-      Button cancel = new Button("Cancel");\r
-      cancel.addClickHandler(new ClickHandler() {\r
-        public void onClick(ClickEvent event) {\r
-         TextInputDialogBox.this.onNegative();\r
-        }\r
-      });\r
-      \r
-      hPanel.add(ok);\r
-      hPanel.add(cancel);\r
-      \r
-      \r
-      textBox = new PlaceholderTextBox();\r
-      textBox.setPlaceholder(placeholder);\r
-      textBox.setWidth("97%");\r
-      textBox.setText(text);      \r
-      vPanel.add(textBox);\r
-      vPanel.add(hPanel);\r
-      \r
-      setWidget(vPanel);\r
-    }\r
-       \r
-       private void onPositive() {\r
+\r
+       public TextInputDialogBox (String title, String text, String placeholder) {\r
+               // Set the dialog box's caption.\r
+               setText(title);\r
+\r
+               VerticalPanel vPanel = new VerticalPanel();\r
+               HorizontalPanel hPanel = new HorizontalPanel();\r
+\r
+               // Enable animation.\r
+               setAnimationEnabled(true);\r
+\r
+               // Enable glass background.\r
+               setGlassEnabled(true);\r
+\r
+               // Center this bad boy.\r
+               center();\r
+\r
+               vPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_RIGHT);\r
+\r
+               Button ok = new Button("OK");\r
+               ok.addClickHandler(new ClickHandler() {\r
+                       public void onClick (ClickEvent event) {\r
+                               TextInputDialogBox.this.onPositive();\r
+                       }\r
+               });\r
+\r
+               Button cancel = new Button("Cancel");\r
+               cancel.addClickHandler(new ClickHandler() {\r
+                       public void onClick (ClickEvent event) {\r
+                               TextInputDialogBox.this.onNegative();\r
+                       }\r
+               });\r
+\r
+               hPanel.add(ok);\r
+               hPanel.add(cancel);\r
+\r
+               textBox = new PlaceholderTextBox();\r
+               textBox.setPlaceholder(placeholder);\r
+               textBox.setWidth("97%");\r
+               textBox.setText(text);\r
+               vPanel.add(textBox);\r
+               vPanel.add(hPanel);\r
+\r
+               setWidget(vPanel);\r
+       }\r
+\r
+       private void onPositive () {\r
                if (listener != null) {\r
                        listener.onPositive(textBox.getText());\r
                }\r
                this.hide();\r
        }\r
-       private void onNegative() {\r
+\r
+       private void onNegative () {\r
                if (listener != null) {\r
                        listener.onNegative();\r
                }\r
                this.hide();\r
        }\r
-       \r
+\r
        TextInputDialogListener listener;\r
-       public void setListener(TextInputDialogListener listener) {\r
+\r
+       public void setListener (TextInputDialogListener listener) {\r
                this.listener = listener;\r
        }\r
+\r
        public interface TextInputDialogListener {\r
-               void onPositive(String text);\r
-               void onNegative();\r
+               void onPositive (String text);\r
+\r
+               void onNegative ();\r
        }\r
-}
\ No newline at end of file
+}\r
index 25cf7c8..3c53a40 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.client;\r
 \r
-/**\r
- * The default constructor for the enclosing type.\r
- * @author mzechner\r
- *\r
- */\r
+/** The default constructor for the enclosing type.\r
+ * @author mzechner */\r
 public class Constructor {\r
        final Class enclosingType;\r
        boolean isAccessible = false;\r
-       \r
-       Constructor(Class enclosingType) {\r
+\r
+       Constructor (Class enclosingType) {\r
                this.enclosingType = enclosingType;\r
        }\r
-       \r
-       /**\r
-        * @return a new instance of the enclosing type of this constructor.\r
-        */\r
-       public Object newInstance() {\r
+\r
+       /** @return a new instance of the enclosing type of this constructor. */\r
+       public Object newInstance () {\r
                return ReflectionCache.instance.newInstance(ReflectionCache.instance.forName(enclosingType.getName()));\r
        }\r
-       \r
-       /**\r
-        * @return the enclosing type this constructor belongs to.\r
-        */\r
-       public Type getEnclosingType() {\r
+\r
+       /** @return the enclosing type this constructor belongs to. */\r
+       public Type getEnclosingType () {\r
                return ReflectionCache.instance.forName(enclosingType.getName());\r
        }\r
-       \r
-       public boolean isAccessible() {\r
+\r
+       public boolean isAccessible () {\r
                return isAccessible;\r
        }\r
-       \r
-       public void setAccessible(boolean accessible) throws SecurityException {\r
+\r
+       public void setAccessible (boolean accessible) throws SecurityException {\r
                isAccessible = accessible;\r
        }\r
-}
\ No newline at end of file
+}\r
index 258ae53..22dd42d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.client;\r
 \r
 import java.security.AccessControlException;\r
@@ -32,8 +33,10 @@ public class Field {
        boolean accessible;\r
        final String getter;\r
        final String setter;\r
-       \r
-       Field(String name, Class enclosingType, Class type, boolean isFinal, boolean isDefaultAccess, boolean isPrivate, boolean isProtected, boolean isPublic, boolean isStatic, boolean isTransient, boolean isVolatile, String getter, String setter) {\r
+\r
+       Field (String name, Class enclosingType, Class type, boolean isFinal, boolean isDefaultAccess, boolean isPrivate,\r
+               boolean isProtected, boolean isPublic, boolean isStatic, boolean isTransient, boolean isVolatile, String getter,\r
+               String setter) {\r
                this.name = name;\r
                this.enclosingType = enclosingType;\r
                this.type = type;\r
@@ -49,36 +52,36 @@ public class Field {
                this.setter = setter;\r
                accessible = isPublic;\r
        }\r
-       \r
-       public Object get(Object obj) throws IllegalAccessException {\r
+\r
+       public Object get (Object obj) throws IllegalAccessException {\r
                return ReflectionCache.instance.get(this, obj);\r
        }\r
-       \r
-       public void set(Object obj, Object value) throws IllegalAccessException {\r
+\r
+       public void set (Object obj, Object value) throws IllegalAccessException {\r
                ReflectionCache.instance.set(this, obj, value);\r
        }\r
-       \r
-       public String getName() {\r
+\r
+       public String getName () {\r
                return name;\r
        }\r
-       \r
-       public Type getEnclosingType() {\r
+\r
+       public Type getEnclosingType () {\r
                return ReflectionCache.instance.forName(enclosingType.getName());\r
        }\r
-       \r
-       public Type getType() {\r
+\r
+       public Type getType () {\r
                return ReflectionCache.instance.forName(type.getName());\r
        }\r
-       \r
-       public boolean isSynthetic() {\r
+\r
+       public boolean isSynthetic () {\r
                return false;\r
        }\r
-       \r
-       public boolean isAccessible() {\r
+\r
+       public boolean isAccessible () {\r
                return accessible;\r
        }\r
-       \r
-       public void setAccessible(boolean accessible) throws AccessControlException {\r
+\r
+       public void setAccessible (boolean accessible) throws AccessControlException {\r
                this.accessible = accessible;\r
        }\r
 \r
@@ -121,4 +124,4 @@ public class Field {
                        + isPublic + ", isStatic=" + isStatic + ", isTransient=" + isTransient + ", isVolatile=" + isVolatile + ", accessible="\r
                        + accessible + ", getter=" + getter + ", setter=" + setter + "]";\r
        }\r
-}
\ No newline at end of file
+}\r
index 6354ef7..3398762 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.client;\r
 \r
 import java.util.Collection;\r
 \r
-\r
 public interface IReflectionCache {\r
        // Class level methods\r
-       public Collection<Type> getKnownTypes();\r
-       public Type forName(String name); \r
+       public Collection<Type> getKnownTypes ();\r
+\r
+       public Type forName (String name);\r
+\r
        public Object newArray (Class componentType, int size);\r
-       \r
+\r
        // Type methods\r
        public Object newInstance (Type type);\r
-       public int getArrayLength(Type type, Object obj);\r
-       public Object getArrayElement(Type type, Object obj, int i);\r
-       public void setArrayElement(Type type, Object obj, int i, Object value);\r
-       \r
+\r
+       public int getArrayLength (Type type, Object obj);\r
+\r
+       public Object getArrayElement (Type type, Object obj, int i);\r
+\r
+       public void setArrayElement (Type type, Object obj, int i, Object value);\r
+\r
        // Field Methods\r
-       public Object get(Field field, Object obj) throws IllegalAccessException;\r
-       public void set(Field field, Object obj, Object value) throws IllegalAccessException;\r
-       \r
+       public Object get (Field field, Object obj) throws IllegalAccessException;\r
+\r
+       public void set (Field field, Object obj, Object value) throws IllegalAccessException;\r
+\r
        // Method Methods :p\r
        public Object invoke (Method m, Object obj, Object[] params);\r
-}
\ No newline at end of file
+}\r
index 8a94747..8718ae2 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.client;\r
 \r
 import java.util.Arrays;\r
 \r
-/**\r
- * Describes a method of a {@link Type}.\r
- * @author mzechner\r
- *\r
- */\r
+/** Describes a method of a {@link Type}.\r
+ * @author mzechner */\r
 public class Method {\r
        final String name;\r
        final Class enclosingType;\r
@@ -40,11 +38,10 @@ public class Method {
        final Parameter[] parameters;\r
        final String methodId;\r
        boolean accessible;\r
-       \r
-       \r
-       public Method(String name, Class enclosingType, Class returnType, Parameter[] parameters, boolean isAbstract, boolean isFinal, boolean isStatic,\r
-                                         boolean isDefaultAccess, boolean isPrivate, boolean isProtected, boolean isPublic, boolean isNative,\r
-                                         boolean isVarArgs, boolean isMethod, boolean isConstructor, String methodId) {\r
+\r
+       public Method (String name, Class enclosingType, Class returnType, Parameter[] parameters, boolean isAbstract,\r
+               boolean isFinal, boolean isStatic, boolean isDefaultAccess, boolean isPrivate, boolean isProtected, boolean isPublic,\r
+               boolean isNative, boolean isVarArgs, boolean isMethod, boolean isConstructor, String methodId) {\r
                this.name = name;\r
                this.enclosingType = enclosingType;\r
                this.parameters = parameters;\r
@@ -62,114 +59,104 @@ public class Method {
                this.isConstructor = isConstructor;\r
                this.methodId = methodId;\r
        }\r
-       \r
+\r
        public boolean isAccessible () {\r
                return accessible;\r
        }\r
+\r
        public void setAccessible (boolean accessible) {\r
                this.accessible = accessible;\r
        }\r
-       \r
-       /**\r
-        * @return the {@link Class} of the enclosing type.\r
-        */\r
+\r
+       /** @return the {@link Class} of the enclosing type. */\r
        public Class getEnclosingType () {\r
                return enclosingType;\r
        }\r
-       \r
-       /**\r
-        * @return the {@link Class} of the return type or null.\r
-        */\r
+\r
+       /** @return the {@link Class} of the return type or null. */\r
        public Class getReturnType () {\r
                return returnType;\r
        }\r
-       \r
-       /**\r
-        * @return the list of parameters, can be a zero size array. \r
-        */\r
-       public Parameter[] getParameters() {\r
+\r
+       /** @return the list of parameters, can be a zero size array. */\r
+       public Parameter[] getParameters () {\r
                return parameters;\r
        }\r
-       \r
-       /**\r
-        * @return the name of the method.\r
-        */\r
+\r
+       /** @return the name of the method. */\r
        public String getName () {\r
                return name;\r
        }\r
-       \r
+\r
        public boolean isAbstract () {\r
                return isAbstract;\r
        }\r
-       \r
+\r
        public boolean isFinal () {\r
                return isFinal;\r
        }\r
-       \r
+\r
        public boolean isDefaultAccess () {\r
                return isDefaultAccess;\r
        }\r
-       \r
+\r
        public boolean isPrivate () {\r
                return isPrivate;\r
        }\r
-       \r
+\r
        public boolean isProtected () {\r
                return isProtected;\r
        }\r
-       \r
+\r
        public boolean isPublic () {\r
                return isPublic;\r
        }\r
-       \r
+\r
        public boolean isNative () {\r
                return isNative;\r
        }\r
-       \r
+\r
        public boolean isVarArgs () {\r
                return isVarArgs;\r
        }\r
-       \r
+\r
        public boolean isStatic () {\r
                return isStatic;\r
        }\r
-       \r
+\r
        public boolean isMethod () {\r
                return isMethod;\r
        }\r
-       \r
+\r
        public boolean isConstructor () {\r
                return isConstructor;\r
        }\r
 \r
-       /**\r
-        * Invokes the method on the given object. Ignores the object if this is\r
-        * a static method. Throws an IllegalArgumentException if the parameters\r
-        * do not match.\r
-        * @param obj the object to invoke the method on or null. \r
+       /** Invokes the method on the given object. Ignores the object if this is a static method. Throws an IllegalArgumentException if\r
+        * the parameters do not match.\r
+        * @param obj the object to invoke the method on or null.\r
         * @param params the parameters to pass to the method or null.\r
-        * @return the return value or null if the method does not return anything.\r
-        */\r
-       public Object invoke(Object obj, Object ... params) {\r
-               if(parameters != null && (params == null || params.length != parameters.length))\r
+        * @return the return value or null if the method does not return anything. */\r
+       public Object invoke (Object obj, Object... params) {\r
+               if (parameters != null && (params == null || params.length != parameters.length))\r
                        throw new IllegalArgumentException("Parameter mismatch");\r
-               if(parameters == null && params != null && params.length > 0) {\r
+               if (parameters == null && params != null && params.length > 0) {\r
                        throw new IllegalArgumentException("Parameter mismatch");\r
                }\r
                return ReflectionCache.instance.invoke(this, obj, params);\r
        }\r
-       \r
-       boolean match(String name, Class ... types) {\r
-               if(!name.equals(name)) return false;\r
-               if(types.length != parameters.length) return false;\r
-               for(int i = 0; i < types.length; i++) {\r
+\r
+       boolean match (String name, Class... types) {\r
+               if (!name.equals(name)) return false;\r
+               if (types.length != parameters.length) return false;\r
+               for (int i = 0; i < types.length; i++) {\r
                        Type t1 = ReflectionCache.instance.forName(parameters[i].getType().getName());\r
                        Type t2 = ReflectionCache.instance.forName(types[i].getName());\r
-                       if(t1 != t2 && !t1.isAssignableFrom(t2)) return false;\r
+                       if (t1 != t2 && !t1.isAssignableFrom(t2)) return false;\r
                }\r
                return true;\r
        }\r
-       \r
+\r
        @Override\r
        public String toString () {\r
                return "Method [name=" + name + ", enclosingType=" + enclosingType + ", returnType=" + returnType + ", isAbstract="\r
@@ -178,4 +165,4 @@ public class Method {
                        + ", isVarArgs=" + isVarArgs + ", isMethod=" + isMethod + ", isConstructor=" + isConstructor + ", parameters="\r
                        + Arrays.toString(parameters) + ", accessible=" + accessible + "]";\r
        }\r
-}
\ No newline at end of file
+}\r
index 94ec59a..6e26a4a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.client;\r
 \r
 public class Parameter {\r
        final String name;\r
        final Class type;\r
        final String jnsi;\r
-       \r
-       Parameter(String name, Class type, String jnsi) {\r
+\r
+       Parameter (String name, Class type, String jnsi) {\r
                this.name = name;\r
                this.type = type;\r
                this.jnsi = jnsi;\r
@@ -33,8 +34,8 @@ public class Parameter {
        public Class getType () {\r
                return type;\r
        }\r
-       \r
-       public String getJnsi() {\r
+\r
+       public String getJnsi () {\r
                return jnsi;\r
        }\r
 \r
@@ -42,4 +43,4 @@ public class Parameter {
        public String toString () {\r
                return "Parameter [name=" + name + ", type=" + type + ", jnsi=" + jnsi + "]";\r
        }\r
-}
\ No newline at end of file
+}\r
index 6ac891c..8843ece 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.client;\r
 \r
 import java.util.Collection;\r
 \r
-import com.google.gwt.core.client.GWT;\r
-\r
 public class ReflectionCache {\r
        public static IReflectionCache instance = GWT.create(IReflectionCache.class);\r
-       \r
-       public static Type forName(String name) throws ClassNotFoundException {\r
+\r
+       public static Type forName (String name) throws ClassNotFoundException {\r
                Type type = instance.forName(convert(name));\r
-               if(type == null) {\r
+               if (type == null) {\r
                        throw new RuntimeException("Couldn't find Type for class '" + name + "'");\r
                }\r
                return type;\r
        }\r
-       \r
+\r
        public static Type getType (Class clazz) {\r
-               if(clazz == null) return null;\r
+               if (clazz == null) return null;\r
                Type type = instance.forName(convert(clazz.getName()));\r
-               if(type == null) {\r
+               if (type == null) {\r
                        throw new RuntimeException("Couldn't find Type for class '" + clazz.getName() + "'");\r
                }\r
                return type;\r
        }\r
-       \r
-       private static String convert(String className) {\r
-               if(className.startsWith("[")) {\r
+\r
+       private static String convert (String className) {\r
+               if (className.startsWith("[")) {\r
                        int dimensions = 0;\r
                        char c = className.charAt(0);\r
                        String suffix = "";\r
-                       while(c == '[') {\r
+                       while (c == '[') {\r
                                dimensions++;\r
                                suffix += "[]";\r
                                c = className.charAt(dimensions);\r
                        }\r
                        char t = className.charAt(dimensions);\r
-                       switch(t) {\r
-                       case 'Z': return "boolean" + suffix;\r
-                       case 'B': return "byte" + suffix;\r
-                       case 'C': return "char" + suffix;\r
-                       case 'L': return className.substring(dimensions + 1, className.length() - 1).replace('$', '.') + suffix;\r
-                       case 'D': return "double" + suffix;\r
-                       case 'F': return "float" + suffix;\r
-                       case 'I': return "int" + suffix;\r
-                       case 'J': return "long" + suffix;\r
-                       case 'S': return "short" + suffix;\r
-                       default: throw new IllegalArgumentException("Couldn't transform '" + className + "' to qualified source name");\r
+                       switch (t) {\r
+                       case 'Z':\r
+                               return "boolean" + suffix;\r
+                       case 'B':\r
+                               return "byte" + suffix;\r
+                       case 'C':\r
+                               return "char" + suffix;\r
+                       case 'L':\r
+                               return className.substring(dimensions + 1, className.length() - 1).replace('$', '.') + suffix;\r
+                       case 'D':\r
+                               return "double" + suffix;\r
+                       case 'F':\r
+                               return "float" + suffix;\r
+                       case 'I':\r
+                               return "int" + suffix;\r
+                       case 'J':\r
+                               return "long" + suffix;\r
+                       case 'S':\r
+                               return "short" + suffix;\r
+                       default:\r
+                               throw new IllegalArgumentException("Couldn't transform '" + className + "' to qualified source name");\r
                        }\r
                } else {\r
                        return className.replace('$', '.');\r
                }\r
        }\r
-       \r
+\r
        public static Object newArray (Class componentType, int size) {\r
                return instance.newArray(componentType, size);\r
        }\r
@@ -74,4 +83,4 @@ public class ReflectionCache {
        public static Collection<Type> getKnownTypes () {\r
                return instance.getKnownTypes();\r
        }\r
-}
\ No newline at end of file
+}\r
index baa2c72..519f446 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gwtref.client;\r
+ ******************************************************************************/\r
 \r
-import com.google.gwt.core.client.EntryPoint;\r
+package com.badlogic.gwtref.client;\r
 \r
 public class Test implements EntryPoint {\r
        public static enum Enu {\r
-               Winter,\r
-               Summer,\r
-               Bleh;\r
+               Winter, Summer, Bleh;\r
        }\r
-       \r
-       \r
+\r
        public static class A {\r
                String text;\r
                float numberf;\r
                int numberi;\r
-               \r
+\r
                public String getText () {\r
                        return text;\r
                }\r
+\r
                public void setText (String text) {\r
                        this.text = text;\r
                }\r
+\r
                public float getNumberf () {\r
                        return numberf;\r
                }\r
+\r
                public void setNumberf (float numberf) {\r
                        this.numberf = numberf;\r
                }\r
+\r
                public int getNumberi () {\r
                        return numberi;\r
                }\r
+\r
                public void setNumberi (int numberi) {\r
                        this.numberi = numberi;\r
                }\r
-               \r
-               public float getSum(float a, float b) {\r
+\r
+               public float getSum (float a, float b) {\r
                        return a + b;\r
                }\r
        }\r
-       \r
+\r
        public static class B extends A {\r
                String text = "This is a string";\r
-               \r
-               public void testWithPackagePrivate(C c, int a) { }\r
-               public void testWidthPrivate(A c) { }\r
-               public void testVoid() { }\r
-               \r
-               public native void test(A c) /*-{\r
-//                     this.@com.badlogic.gwtref.client.Test.B::testWidthPrivate(LC;)(c);\r
-               }-*/;\r
+\r
+               public void testWithPackagePrivate (C c, int a) {\r
+               }\r
+\r
+               public void testWidthPrivate (A c) {\r
+               }\r
+\r
+               public void testVoid () {\r
+               }\r
+\r
+               public native void test (A c) /*-{\r
+                                                                                               //                      this.@com.badlogic.gwtref.client.Test.B::testWidthPrivate(LC;)(c);\r
+                                                                                               }-*/;\r
        }\r
 \r
        public static class C {\r
@@ -74,9 +80,11 @@ public class Test implements EntryPoint {
                Type ta = ReflectionCache.getType(A.class);\r
                Type tb = ReflectionCache.getType(B.class);\r
                B b = (B)tb.newInstance();\r
-               for(Field f: tb.getFields()) System.out.println(f);\r
-               for(Method m: tb.getMethods()) System.out.println(m);\r
-               \r
+               for (Field f : tb.getFields())\r
+                       System.out.println(f);\r
+               for (Method m : tb.getMethods())\r
+                       System.out.println(m);\r
+\r
                try {\r
                        tb.getDeclaredFields()[0].set(b, "Field of B");\r
                        ta.getDeclaredFields()[0].set(b, "Field of A");\r
@@ -88,4 +96,4 @@ public class Test implements EntryPoint {
                        e.printStackTrace();\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 1523fc4..a5060bb 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.client;\r
 \r
 import java.util.ArrayList;\r
@@ -20,13 +21,9 @@ import java.util.Arrays;
 import java.util.HashSet;\r
 import java.util.Set;\r
 \r
-/**\r
- * Describes a type (equivalent to {@link Class}), providing methods to retrieve\r
- * fields, constructors, methods and super interfaces of the type. Only types\r
- * that are visible (public) can be described by this class.\r
- * @author mzechner\r
- *\r
- */\r
+/** Describes a type (equivalent to {@link Class}), providing methods to retrieve fields, constructors, methods and super\r
+ * interfaces of the type. Only types that are visible (public) can be described by this class.\r
+ * @author mzechner */\r
 public class Type {\r
        String name;\r
        Class clazz;\r
@@ -45,104 +42,88 @@ public class Type {
        Constructor constructor;\r
        Class componentType;\r
        Object[] enumConstants;\r
-       \r
-       /**\r
-        * @return a new instance of this type created via the default constructor which must be public.\r
-        */\r
+\r
+       /** @return a new instance of this type created via the default constructor which must be public. */\r
        public Object newInstance () {\r
                return ReflectionCache.instance.newInstance(this);\r
        }\r
 \r
-       /**\r
-        * @return the fully qualified name of this type.\r
-        */\r
-       public String getName() {\r
+       /** @return the fully qualified name of this type. */\r
+       public String getName () {\r
                return name;\r
        }\r
-       \r
-       /**\r
-        * @return the {@link Class} of this type.\r
-        */\r
+\r
+       /** @return the {@link Class} of this type. */\r
        public Class getClassOfType () {\r
                return clazz;\r
        }\r
-       \r
-       /**\r
-        * @return the super class of this type or null\r
-        */\r
-       public Type getSuperclass() {\r
+\r
+       /** @return the super class of this type or null */\r
+       public Type getSuperclass () {\r
                try {\r
                        return ReflectionCache.forName(superClass.getName());\r
                } catch (ClassNotFoundException e) {\r
                        return null;\r
                }\r
        }\r
-       \r
-       /**\r
-        * @param otherType the other type\r
-        * @return whether this type is assignable to the other type.\r
-        */\r
+\r
+       /** @param otherType the other type\r
+        * @return whether this type is assignable to the other type. */\r
        public boolean isAssignableFrom (Type otherType) {\r
                return assignables.contains(otherType.getClassOfType());\r
        }\r
-       \r
-       /**\r
-        * @param name the name of the field\r
-        * @return the public field of this type or one of its super interfaces with the given name or null. See {@link Class#getField(String)}.\r
-        */\r
-       public Field getField(String name) {\r
+\r
+       /** @param name the name of the field\r
+        * @return the public field of this type or one of its super interfaces with the given name or null. See\r
+        *         {@link Class#getField(String)}. */\r
+       public Field getField (String name) {\r
                Type t = this;\r
-               while(t != null) {\r
+               while (t != null) {\r
                        Field[] declFields = t.getDeclaredFields();\r
-                       if(declFields != null) {\r
-                               for(Field f: declFields) {\r
-                                       if(f.isPublic && f.name.equals(name)) return f;\r
+                       if (declFields != null) {\r
+                               for (Field f : declFields) {\r
+                                       if (f.isPublic && f.name.equals(name)) return f;\r
                                }\r
                        }\r
                        t = t.getSuperclass();\r
                }\r
                return null;\r
        }\r
-       \r
-       /**\r
-        * @return an array containing all the public fields of this class and its super classes. See {@link Class#getFields()}.\r
-        */\r
-       public Field[] getFields() {\r
+\r
+       /** @return an array containing all the public fields of this class and its super classes. See {@link Class#getFields()}. */\r
+       public Field[] getFields () {\r
                ArrayList<Field> allFields = new ArrayList<Field>();\r
                Type t = this;\r
-               while(t != null) {\r
+               while (t != null) {\r
                        Field[] declFields = t.getDeclaredFields();\r
-                       if(declFields != null) {\r
-                               for(Field f: declFields) {\r
-                                       if(f.isPublic) allFields.add(f);\r
+                       if (declFields != null) {\r
+                               for (Field f : declFields) {\r
+                                       if (f.isPublic) allFields.add(f);\r
                                }\r
                        }\r
                        t = t.getSuperclass();\r
                }\r
                return allFields.toArray(new Field[allFields.size()]);\r
        }\r
-       \r
-       /**\r
-        * @return an array containing all the fields of this class, including private and protected fields. See {@link Class#getDeclaredFields()}.\r
-        */\r
-       public Field[] getDeclaredFields() {\r
+\r
+       /** @return an array containing all the fields of this class, including private and protected fields. See\r
+        *         {@link Class#getDeclaredFields()}. */\r
+       public Field[] getDeclaredFields () {\r
                return fields;\r
        }\r
 \r
-       /**\r
-        * @param name the name of the method\r
+       /** @param name the name of the method\r
         * @param parameterTypes the types of the parameters of the method\r
         * @return the public method that matches the name and parameter types of this type or one of its super interfaces.\r
-        * @throws NoSuchMethodException \r
-        */\r
-       public Method getMethod(String name, Class ... parameterTypes) throws NoSuchMethodException {\r
+        * @throws NoSuchMethodException */\r
+       public Method getMethod (String name, Class... parameterTypes) throws NoSuchMethodException {\r
                ArrayList<Method> allMethods = new ArrayList<Method>();\r
                Type t = this;\r
-               while(t != null) {\r
+               while (t != null) {\r
                        Method[] declMethods = t.getDeclaredMethods();\r
-                       if(declMethods != null) {\r
-                               for(Method m: declMethods) {\r
-                                       if(m.isPublic() && m.match(name, parameterTypes)) return m;\r
+                       if (declMethods != null) {\r
+                               for (Method m : declMethods) {\r
+                                       if (m.isPublic() && m.match(name, parameterTypes)) return m;\r
                                }\r
                        }\r
                        t = t.getSuperclass();\r
@@ -150,100 +131,87 @@ public class Type {
                throw new NoSuchMethodException();\r
        }\r
 \r
-       /**\r
-s       * @return an array containing all public methods of this class and its super classes. See {@link Class#getMethods()}.\r
-        */\r
-       public Method[] getMethods() {\r
+       /** s * @return an array containing all public methods of this class and its super classes. See {@link Class#getMethods()}. */\r
+       public Method[] getMethods () {\r
                ArrayList<Method> allMethods = new ArrayList<Method>();\r
                Type t = this;\r
-               while(t != null) {\r
+               while (t != null) {\r
                        Method[] declMethods = t.getDeclaredMethods();\r
-                       if(declMethods != null) {\r
-                               for(Method m: declMethods) {\r
-                                       if(m.isPublic()) allMethods.add(m);\r
+                       if (declMethods != null) {\r
+                               for (Method m : declMethods) {\r
+                                       if (m.isPublic()) allMethods.add(m);\r
                                }\r
                        }\r
                        t = t.getSuperclass();\r
                }\r
                return allMethods.toArray(new Method[allMethods.size()]);\r
        }\r
-       \r
-       /**\r
-        * @return an array containing all methods of this class, including abstract, private and protected methods. See {@link Class#getDeclaredMethods()}.\r
-        */\r
-       public Method[] getDeclaredMethods() {\r
+\r
+       /** @return an array containing all methods of this class, including abstract, private and protected methods. See\r
+        *         {@link Class#getDeclaredMethods()}. */\r
+       public Method[] getDeclaredMethods () {\r
                return methods;\r
        }\r
-       \r
-       public Constructor getDeclaredConstructor() throws NoSuchMethodException {\r
+\r
+       public Constructor getDeclaredConstructor () throws NoSuchMethodException {\r
                return constructor;\r
        }\r
-       \r
-       public boolean isAbstract() {\r
+\r
+       public boolean isAbstract () {\r
                return isAbstract;\r
        }\r
-       \r
-       public boolean isInterface() {\r
+\r
+       public boolean isInterface () {\r
                return isInterface;\r
        }\r
-       \r
-       public boolean isPrimitive() {\r
+\r
+       public boolean isPrimitive () {\r
                return isPrimitive;\r
        }\r
-       \r
+\r
        public boolean isEnum () {\r
                return isEnum;\r
        }\r
-       \r
-       public boolean isArray() {\r
+\r
+       public boolean isArray () {\r
                return isArray;\r
        }\r
-       \r
-       public boolean isMemberClass() {\r
+\r
+       public boolean isMemberClass () {\r
                return isMemberClass;\r
        }\r
-       \r
-       public boolean isStatic() {\r
+\r
+       public boolean isStatic () {\r
                return isStatic;\r
        }\r
-       \r
-       /**\r
-        * @return the class of the components if this is an array type or null.\r
-        */\r
+\r
+       /** @return the class of the components if this is an array type or null. */\r
        public Class getComponentType () {\r
                return componentType;\r
        }\r
-       \r
-       /**\r
-        * @param obj an array object of this type.\r
-        * @return the length of the given array object.\r
-        */\r
-       public int getArrayLength(Object obj) {\r
+\r
+       /** @param obj an array object of this type.\r
+        * @return the length of the given array object. */\r
+       public int getArrayLength (Object obj) {\r
                return ReflectionCache.instance.getArrayLength(this, obj);\r
        }\r
-       \r
-       /**\r
-        * @param obj an array object of this type.\r
+\r
+       /** @param obj an array object of this type.\r
         * @param i the index of the element to retrieve.\r
-        * @return the element at position i in the array.\r
-        */\r
-       public Object getArrayElement(Object obj, int i) {\r
+        * @return the element at position i in the array. */\r
+       public Object getArrayElement (Object obj, int i) {\r
                return ReflectionCache.instance.getArrayElement(this, obj, i);\r
        }\r
-       \r
-       /**\r
-        * Sets the element i in the array object to value.\r
+\r
+       /** Sets the element i in the array object to value.\r
         * @param obj an array object of this type.\r
         * @param i the index of the element to set.\r
-        * @param value the element value.\r
-        */\r
-       public void setArrayElement(Object obj, int i, Object value) {\r
+        * @param value the element value. */\r
+       public void setArrayElement (Object obj, int i, Object value) {\r
                ReflectionCache.instance.setArrayElement(this, obj, i, value);\r
        }\r
-       \r
-       /**\r
-        * @return the enumeration constants if this type is an enumeration or null.\r
-        */\r
+\r
+       /** @return the enumeration constants if this type is an enumeration or null. */\r
        public Object[] getEnumConstants () {\r
                return enumConstants;\r
        }\r
@@ -251,9 +219,9 @@ s    * @return an array containing all public methods of this class and its super
        @Override\r
        public String toString () {\r
                return "Type [name=" + name + ",\n clazz=" + clazz + ",\n superClass=" + superClass + ",\n assignables=" + assignables\r
-                       + ",\n isAbstract=" + isAbstract + ",\n isInterface=" + isInterface + ",\n isPrimitive=" + isPrimitive + ",\n isEnum=" + isEnum\r
-                       + ",\n isArray=" + isArray + ",\n isMemberClass=" + isMemberClass + ",\n isStatic=" + isStatic + ",\n fields="\r
+                       + ",\n isAbstract=" + isAbstract + ",\n isInterface=" + isInterface + ",\n isPrimitive=" + isPrimitive + ",\n isEnum="\r
+                       + isEnum + ",\n isArray=" + isArray + ",\n isMemberClass=" + isMemberClass + ",\n isStatic=" + isStatic + ",\n fields="\r
                        + Arrays.toString(fields) + ",\n methods=" + Arrays.toString(methods) + ",\n constructor=" + constructor\r
                        + ",\n componentType=" + componentType + ",\n enumConstants=" + Arrays.toString(enumConstants) + "]";\r
        }\r
-}
\ No newline at end of file
+}\r
index d20d333..ffafbb5 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.gen;\r
 \r
-import com.google.gwt.core.ext.Generator;\r
-import com.google.gwt.core.ext.GeneratorContext;\r
-import com.google.gwt.core.ext.TreeLogger;\r
-import com.google.gwt.core.ext.UnableToCompleteException;\r
-import com.google.gwt.core.ext.typeinfo.JClassType;\r
-import com.google.gwt.core.ext.typeinfo.TypeOracle;\r
-import static com.google.gwt.core.ext.TreeLogger.*;\r
+import sun.nio.cs.Surrogate.Generator;\r
 \r
 public class ReflectionCacheGenerator extends Generator {\r
        @Override\r
        public String generate (TreeLogger logger, GeneratorContext context, String typeName) throws UnableToCompleteException {\r
                TypeOracle oracle = context.getTypeOracle();\r
-               assert(oracle != null);\r
+               assert (oracle != null);\r
                JClassType type = oracle.findType(typeName);\r
-               if(type == null) {\r
+               if (type == null) {\r
                        logger.log(ERROR, "Couldn't find type '" + typeName + "'");\r
                        throw new UnableToCompleteException();\r
                }\r
-               \r
-               if(type.isInterface() == null) {\r
+\r
+               if (type.isInterface() == null) {\r
                        logger.log(ERROR, "Type '" + typeName + "' must be an interface");\r
                        throw new UnableToCompleteException();\r
                }\r
-               \r
+\r
                ReflectionCacheSourceCreator source = new ReflectionCacheSourceCreator(logger, context, type);\r
                return source.create();\r
        }\r
-}
\ No newline at end of file
+}\r
index 26e8757..77a4979 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gwtref.gen;\r
 \r
 import java.io.PrintWriter;\r
@@ -21,23 +22,6 @@ import java.util.HashSet;
 import java.util.List;\r
 import java.util.Set;\r
 \r
-import com.google.gwt.core.ext.GeneratorContext;\r
-import com.google.gwt.core.ext.TreeLogger;\r
-import com.google.gwt.core.ext.TreeLogger.Type;\r
-import com.google.gwt.core.ext.typeinfo.JArrayType;\r
-import com.google.gwt.core.ext.typeinfo.JClassType;\r
-import com.google.gwt.core.ext.typeinfo.JEnumConstant;\r
-import com.google.gwt.core.ext.typeinfo.JEnumType;\r
-import com.google.gwt.core.ext.typeinfo.JField;\r
-import com.google.gwt.core.ext.typeinfo.JMethod;\r
-import com.google.gwt.core.ext.typeinfo.JPackage;\r
-import com.google.gwt.core.ext.typeinfo.JParameter;\r
-import com.google.gwt.core.ext.typeinfo.JPrimitiveType;\r
-import com.google.gwt.core.ext.typeinfo.JType;\r
-import com.google.gwt.core.ext.typeinfo.TypeOracle;\r
-import com.google.gwt.user.rebind.ClassSourceFileComposerFactory;\r
-import com.google.gwt.user.rebind.SourceWriter;\r
-\r
 public class ReflectionCacheSourceCreator {\r
        final TreeLogger logger;\r
        final GeneratorContext context;\r
@@ -50,7 +34,7 @@ public class ReflectionCacheSourceCreator {
        List<SetterGetterStub> setterGetterStubs = new ArrayList<SetterGetterStub>();\r
        List<MethodStub> methodStubs = new ArrayList<MethodStub>();\r
        int nextStub = 0;\r
-       \r
+\r
        class SetterGetterStub {\r
                String getter;\r
                String setter;\r
@@ -61,7 +45,7 @@ public class ReflectionCacheSourceCreator {
                boolean isFinal;\r
                boolean unused;\r
        }\r
-       \r
+\r
        class MethodStub {\r
                String enclosingType;\r
                String returnType;\r
@@ -73,8 +57,8 @@ public class ReflectionCacheSourceCreator {
                String name;\r
                boolean unused;\r
        }\r
-       \r
-       public ReflectionCacheSourceCreator(TreeLogger logger, GeneratorContext context, JClassType type) {\r
+\r
+       public ReflectionCacheSourceCreator (TreeLogger logger, GeneratorContext context, JClassType type) {\r
                this.logger = logger;\r
                this.context = context;\r
                this.type = type;\r
@@ -82,61 +66,62 @@ public class ReflectionCacheSourceCreator {
                this.simpleName = type.getSimpleSourceName() + "Generated";\r
                logger.log(Type.INFO, type.getQualifiedSourceName());\r
        }\r
-       \r
-       public String create() {\r
+\r
+       public String create () {\r
                ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(packageName, simpleName);\r
                composer.addImplementedInterface("com.badlogic.gwtref.client.IReflectionCache");\r
                imports(composer);\r
                PrintWriter printWriter = context.tryCreate(logger, packageName, simpleName);\r
-               if(printWriter == null) {\r
+               if (printWriter == null) {\r
                        return packageName + "." + simpleName;\r
                }\r
                sw = composer.createSourceWriter(context, printWriter);\r
-               \r
+\r
                generateLookups();\r
-               \r
+\r
                getKnownTypesC();\r
                forNameC();\r
                newArrayC();\r
-               \r
+\r
                newInstanceT();\r
                getArrayLengthT();\r
                getArrayElementT();\r
                setArrayElementT();\r
-               \r
+\r
                getF();\r
                setF();\r
-               \r
+\r
                invokeM();\r
-               \r
+\r
                sw.commit(logger);\r
                createProxy(type);\r
                return packageName + "." + simpleName;\r
        }\r
 \r
-       private void createProxy(JClassType type) {\r
-               ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(type.getPackage().getName(), type.getSimpleSourceName() + "Proxy");\r
+       private void createProxy (JClassType type) {\r
+               ClassSourceFileComposerFactory composer = new ClassSourceFileComposerFactory(type.getPackage().getName(),\r
+                       type.getSimpleSourceName() + "Proxy");\r
                PrintWriter printWriter = context.tryCreate(logger, packageName, simpleName);\r
-               if(printWriter == null) {\r
+               if (printWriter == null) {\r
                        return;\r
                }\r
                SourceWriter writer = composer.createSourceWriter(context, printWriter);\r
                writer.commit(logger);\r
        }\r
-       \r
+\r
        private void generateLookups () {\r
                p("Map<String, Type> types = new HashMap<String, Type>();");\r
-               \r
+\r
                TypeOracle typeOracle = context.getTypeOracle();\r
                JPackage[] packages = typeOracle.getPackages();\r
-               \r
+\r
                // gather all types from wanted packages\r
-               for(JPackage p: packages) {\r
-                       for(JClassType t: p.getTypes()) {\r
+               for (JPackage p : packages) {\r
+                       for (JClassType t : p.getTypes()) {\r
                                gatherTypes(t.getErasedType(), types);\r
                        }\r
                }\r
-               \r
+\r
                gatherTypes(typeOracle.findType("java.util.ArrayList").getErasedType(), types);\r
                gatherTypes(typeOracle.findType("java.util.HashMap").getErasedType(), types);\r
                gatherTypes(typeOracle.findType("java.util.Map").getErasedType(), types);\r
@@ -150,103 +135,92 @@ public class ReflectionCacheSourceCreator {
                gatherTypes(typeOracle.findType("java.lang.CharSequence").getErasedType(), types);\r
                gatherTypes(typeOracle.findType("java.lang.Double").getErasedType(), types);\r
                gatherTypes(typeOracle.findType("java.lang.Object").getErasedType(), types);\r
-               \r
+\r
                // generate Type lookup generator methods.\r
                int id = 0;\r
-               for(JType t: types) {\r
+               for (JType t : types) {\r
                        String typeGen = createTypeGenerator(t);\r
                        p("public void c" + (id++) + "() {");\r
                        p(typeGen);\r
                        p("}\n");\r
                }\r
-               \r
+\r
                // generate constructor that calls all the type generators\r
                // that populate the map.\r
                p("public " + simpleName + "() {");\r
-               for(int i = 0; i < id; i++) {\r
+               for (int i = 0; i < id; i++) {\r
                        p("c" + i + "();");\r
                }\r
                p("}");\r
-               \r
+\r
                // generate field setters/getters\r
-               for(SetterGetterStub stub: setterGetterStubs) {\r
+               for (SetterGetterStub stub : setterGetterStubs) {\r
                        String stubSource = generateSetterGetterStub(stub);\r
-                       if(stubSource.equals("")) stub.unused = true;\r
+                       if (stubSource.equals("")) stub.unused = true;\r
                        p(stubSource);\r
                }\r
-               \r
+\r
                // generate methods\r
-               for(MethodStub stub: methodStubs) {\r
+               for (MethodStub stub : methodStubs) {\r
                        String stubSource = generateMethodStub(stub);\r
-                       if(stubSource.equals("")) stub.unused = true;\r
+                       if (stubSource.equals("")) stub.unused = true;\r
                        p(stubSource);\r
                }\r
                logger.log(Type.INFO, types.size() + " types reflected");\r
        }\r
-       \r
-       private void out(String message, int nesting) {\r
-               for(int i = 0; i < nesting; i++) System.out.print("  ");\r
+\r
+       private void out (String message, int nesting) {\r
+               for (int i = 0; i < nesting; i++)\r
+                       System.out.print("  ");\r
                System.out.println(message);\r
        }\r
-       \r
+\r
        int nesting = 0;\r
-       private void gatherTypes(JType type, Set<JType> types) {\r
+\r
+       private void gatherTypes (JType type, Set<JType> types) {\r
                nesting++;\r
                // came here from a type that has no super class\r
-               if(type == null) {\r
+               if (type == null) {\r
                        nesting--;\r
                        return;\r
                }\r
                // package info\r
-               if(type.getQualifiedSourceName().contains("-")) {\r
+               if (type.getQualifiedSourceName().contains("-")) {\r
                        nesting--;\r
                        return;\r
                }\r
-               \r
+\r
                // not visible\r
-               if(!isVisible(type)) {\r
+               if (!isVisible(type)) {\r
                        nesting--;\r
                        return;\r
                }\r
-               \r
+\r
                // java base class\r
                String name = type.getQualifiedSourceName();\r
-               if(!(name.contains("com.badlogic.gdx.scenes.scene2d") ||\r
-                         name.contains("com.badlogic.gdx.graphics.g2d.TextureRegion") ||\r
-                         name.contains("com.badlogic.gdx.graphics.g2d.BitmapFont") ||\r
-                         name.contains("com.badlogic.gdx.graphics.g2d.NinePatch") ||\r
-                         name.contains("com.badlogic.gdx.graphics.Color") ||\r
-                         name.contains("com.badlogic.gdx.utils.Array") ||\r
-                         name.contains("com.badlogic.gdx.utils.ObjectMap") ||\r
-                         name.contains("com.badlogic.gdx.utils.OrderedMap") ||\r
-                         name.contains("com.badlogic.gdx.utils.Disposable") ||\r
-                         name.contains("java.util.ArrayList") ||\r
-                         name.contains("java.util.Map") ||\r
-                         name.contains("java.util.HashMap") ||\r
-                         name.contains("java.lang.String") ||\r
-                         name.contains("java.lang.Boolean") ||\r
-                         name.contains("java.lang.Byte") ||\r
-                         name.contains("java.lang.Short") ||\r
-                         name.contains("java.lang.Character") ||\r
-                         name.contains("java.lang.Integer") ||\r
-                         name.contains("java.lang.Float") ||\r
-                         name.contains("java.lang.Double") ||\r
-                         name.contains("java.lang.CharSequence") ||\r
-                         name.contains("java.lang.Object") ||\r
-                         !name.contains("."))) {\r
+               if (!(name.contains("com.badlogic.gdx.scenes.scene2d") || name.contains("com.badlogic.gdx.graphics.g2d.TextureRegion")\r
+                       || name.contains("com.badlogic.gdx.graphics.g2d.BitmapFont") || name.contains("com.badlogic.gdx.graphics.g2d.NinePatch")\r
+                       || name.contains("com.badlogic.gdx.graphics.Color") || name.contains("com.badlogic.gdx.utils.Array")\r
+                       || name.contains("com.badlogic.gdx.utils.ObjectMap") || name.contains("com.badlogic.gdx.utils.OrderedMap")\r
+                       || name.contains("com.badlogic.gdx.utils.Disposable") || name.contains("java.util.ArrayList")\r
+                       || name.contains("java.util.Map") || name.contains("java.util.HashMap") || name.contains("java.lang.String")\r
+                       || name.contains("java.lang.Boolean") || name.contains("java.lang.Byte") || name.contains("java.lang.Short")\r
+                       || name.contains("java.lang.Character") || name.contains("java.lang.Integer") || name.contains("java.lang.Float")\r
+                       || name.contains("java.lang.Double") || name.contains("java.lang.CharSequence") || name.contains("java.lang.Object") || !name\r
+                               .contains("."))) {\r
                        nesting--;\r
                        return;\r
                }\r
-               \r
+\r
                // already visited this type\r
-               if(types.contains(type.getErasedType())) {\r
+               if (types.contains(type.getErasedType())) {\r
                        nesting--;\r
                        return;\r
                }\r
                types.add(type.getErasedType());\r
                out(type.getErasedType().getQualifiedSourceName(), nesting);\r
-                       \r
-               if(type instanceof JPrimitiveType) {\r
+\r
+               if (type instanceof JPrimitiveType) {\r
                        // nothing to do for a primitive type\r
                        nesting--;\r
                        return;\r
@@ -254,154 +228,169 @@ public class ReflectionCacheSourceCreator {
                        // gather fields\r
                        JClassType c = (JClassType)type;\r
                        JField[] fields = c.getFields();\r
-                       if(fields != null) {\r
-                               for(JField field: fields) {\r
+                       if (fields != null) {\r
+                               for (JField field : fields) {\r
                                        gatherTypes(field.getType().getErasedType(), types);\r
                                }\r
                        }\r
-                       \r
+\r
                        // gather super types & interfaces\r
                        gatherTypes(c.getSuperclass(), types);\r
                        JClassType[] interfaces = c.getImplementedInterfaces();\r
-                       if(interfaces != null) {\r
-                               for(JClassType i: interfaces) {\r
+                       if (interfaces != null) {\r
+                               for (JClassType i : interfaces) {\r
                                        gatherTypes(i.getErasedType(), types);\r
                                }\r
                        }\r
-                       \r
+\r
                        // gather method parameter & return types\r
                        JMethod[] methods = c.getMethods();\r
-                       if(methods != null) {\r
-                               for(JMethod m: methods) {\r
+                       if (methods != null) {\r
+                               for (JMethod m : methods) {\r
                                        gatherTypes(m.getReturnType().getErasedType(), types);\r
-                                       if(m.getParameterTypes() != null) {\r
-                                               for(JType p: m.getParameterTypes()) {\r
+                                       if (m.getParameterTypes() != null) {\r
+                                               for (JType p : m.getParameterTypes()) {\r
                                                        gatherTypes(p.getErasedType(), types);\r
                                                }\r
                                        }\r
                                }\r
                        }\r
-                       \r
+\r
                        // gather inner classes\r
                        JClassType[] inner = c.getNestedTypes();\r
-                       if(inner != null) {\r
-                               for(JClassType i: inner) {\r
+                       if (inner != null) {\r
+                               for (JClassType i : inner) {\r
                                        gatherTypes(i.getErasedType(), types);\r
                                }\r
                        }\r
                }\r
                nesting--;\r
        }\r
-       \r
+\r
        private String generateMethodStub (MethodStub stub) {\r
                buffer.setLength(0);\r
-               \r
-               if(stub.enclosingType == null) {\r
+\r
+               if (stub.enclosingType == null) {\r
                        logger.log(Type.INFO, "method '" + stub.name + "' of invisible class is not invokable");\r
                        return "";\r
                }\r
-               \r
-               if(stub.enclosingType.startsWith("java") || stub.enclosingType.contains("google")) {\r
-                       logger.log(Type.INFO, "not emitting code for accessing method " + stub.name + " in class '" + stub.enclosingType + ", either in java.* or GWT related class");\r
+\r
+               if (stub.enclosingType.startsWith("java") || stub.enclosingType.contains("google")) {\r
+                       logger.log(Type.INFO, "not emitting code for accessing method " + stub.name + " in class '" + stub.enclosingType\r
+                               + ", either in java.* or GWT related class");\r
                        return "";\r
                }\r
-               \r
-               if(stub.enclosingType.contains("[]")) {\r
-                       logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType + "' is not invokable because the class is an array type");\r
+\r
+               if (stub.enclosingType.contains("[]")) {\r
+                       logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType\r
+                               + "' is not invokable because the class is an array type");\r
                        return "";\r
                }\r
-               \r
-               for(int i = 0; i < stub.parameterTypes.size(); i++) {\r
+\r
+               for (int i = 0; i < stub.parameterTypes.size(); i++) {\r
                        String paramType = stub.parameterTypes.get(i);\r
-                       if(paramType == null) {\r
-                               logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType + "' is not invokable because one of its argument types is not visible");\r
+                       if (paramType == null) {\r
+                               logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType\r
+                                       + "' is not invokable because one of its argument types is not visible");\r
                                return "";\r
-                       } else if(paramType.startsWith("long") || paramType.contains("java.lang.Long")) {\r
-                               logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType + " has long parameter, prohibited in JSNI");\r
+                       } else if (paramType.startsWith("long") || paramType.contains("java.lang.Long")) {\r
+                               logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType\r
+                                       + " has long parameter, prohibited in JSNI");\r
                                return "";\r
                        } else {\r
                                stub.parameterTypes.set(i, paramType.replace(".class", ""));\r
                        }\r
                }\r
-               if(stub.returnType == null) {\r
-                       logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType + "' is not invokable because its return type is not visible");\r
+               if (stub.returnType == null) {\r
+                       logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType\r
+                               + "' is not invokable because its return type is not visible");\r
                        return "";\r
                }\r
-               if(stub.returnType.startsWith("long") || stub.returnType.contains("java.lang.Long")) {\r
-                       logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType + " has long return type, prohibited in JSNI");\r
+               if (stub.returnType.startsWith("long") || stub.returnType.contains("java.lang.Long")) {\r
+                       logger.log(Type.INFO, "method '" + stub.name + "' of class '" + stub.enclosingType\r
+                               + " has long return type, prohibited in JSNI");\r
                        return "";\r
                }\r
-               \r
+\r
                stub.enclosingType = stub.enclosingType.replace(".class", "");\r
                stub.returnType = stub.returnType.replace(".class", "");\r
-               \r
+\r
                pbn("public native " + stub.returnType + " " + stub.methodId + "(");\r
-               pbn(stub.enclosingType + " obj" + (stub.parameterTypes.size() > 0?", ":""));\r
+               pbn(stub.enclosingType + " obj" + (stub.parameterTypes.size() > 0 ? ", " : ""));\r
                int i = 0;\r
-               for(String paramType: stub.parameterTypes) {\r
-                       pbn(paramType + " p" + i + (i < stub.parameterTypes.size() - 1?",":""));\r
+               for (String paramType : stub.parameterTypes) {\r
+                       pbn(paramType + " p" + i + (i < stub.parameterTypes.size() - 1 ? "," : ""));\r
                        i++;\r
                }\r
                pb(") /*-{");\r
-               \r
-               if(!stub.returnType.equals("void")) pbn("return ");\r
-               if(stub.isStatic) pbn("@" + stub.enclosingType + "::" + stub.name + "(" + stub.jnsi + ")(");\r
-               else pbn("obj.@" + stub.enclosingType + "::" + stub.name + "(" + stub.jnsi + ")(");\r
 \r
-               for(i = 0; i < stub.parameterTypes.size(); i++) {\r
-                       pbn("p" + i + (i < stub.parameterTypes.size() - 1?", ":""));\r
+               if (!stub.returnType.equals("void")) pbn("return ");\r
+               if (stub.isStatic)\r
+                       pbn("@" + stub.enclosingType + "::" + stub.name + "(" + stub.jnsi + ")(");\r
+               else\r
+                       pbn("obj.@" + stub.enclosingType + "::" + stub.name + "(" + stub.jnsi + ")(");\r
+\r
+               for (i = 0; i < stub.parameterTypes.size(); i++) {\r
+                       pbn("p" + i + (i < stub.parameterTypes.size() - 1 ? ", " : ""));\r
                }\r
                pb(");");\r
                pb("}-*/;");\r
-               \r
+\r
                return buffer.toString();\r
        }\r
 \r
        private String generateSetterGetterStub (SetterGetterStub stub) {\r
                buffer.setLength(0);\r
-               if(stub.enclosingType == null || stub.type == null) {\r
-                       logger.log(Type.INFO, "field '" + stub.name + "' in class '" + stub.enclosingType + "' is not accessible as its type '" + stub.type + "' is not public");\r
+               if (stub.enclosingType == null || stub.type == null) {\r
+                       logger.log(Type.INFO, "field '" + stub.name + "' in class '" + stub.enclosingType + "' is not accessible as its type '"\r
+                               + stub.type + "' is not public");\r
                        return "";\r
                }\r
-               if(stub.enclosingType.startsWith("java") || stub.enclosingType.contains("google")) {\r
-                       logger.log(Type.INFO, "not emitting code for accessing field " + stub.name + " in class '" + stub.enclosingType + ", either in java.* or GWT related class");\r
+               if (stub.enclosingType.startsWith("java") || stub.enclosingType.contains("google")) {\r
+                       logger.log(Type.INFO, "not emitting code for accessing field " + stub.name + " in class '" + stub.enclosingType\r
+                               + ", either in java.* or GWT related class");\r
                        return "";\r
                }\r
-               \r
-               if(stub.type.startsWith("long") || stub.type.contains("java.lang.Long")) {\r
-                       logger.log(Type.INFO, "not emitting code for accessing field " + stub.name + " in class '" + stub.enclosingType + " as its of type long which can't be used with JSNI");\r
+\r
+               if (stub.type.startsWith("long") || stub.type.contains("java.lang.Long")) {\r
+                       logger.log(Type.INFO, "not emitting code for accessing field " + stub.name + " in class '" + stub.enclosingType\r
+                               + " as its of type long which can't be used with JSNI");\r
                        return "";\r
                }\r
-               \r
+\r
                stub.enclosingType = stub.enclosingType.replace(".class", "");\r
                stub.type = stub.type.replace(".class", "");\r
-               \r
+\r
                pb("public native Object " + stub.getter + "(" + stub.enclosingType + " obj) /*-{");\r
-               if(stub.isStatic) pb("   return @" + stub.enclosingType + "::" + stub.name + ";");\r
-               else pb("   return obj.@" + stub.enclosingType + "::" + stub.name + ";");\r
+               if (stub.isStatic)\r
+                       pb("   return @" + stub.enclosingType + "::" + stub.name + ";");\r
+               else\r
+                       pb("   return obj.@" + stub.enclosingType + "::" + stub.name + ";");\r
                pb("}-*/;");\r
-               \r
-               if(!stub.isFinal) {\r
+\r
+               if (!stub.isFinal) {\r
                        pb("public native void " + stub.setter + "(" + stub.enclosingType + " obj, Object value)  /*-{");\r
-                       if(stub.isStatic) pb("    @" + stub.enclosingType + "::" + stub.name + " = value");\r
-                       else pb("    obj.@" + stub.enclosingType + "::" + stub.name + " = value;");\r
+                       if (stub.isStatic)\r
+                               pb("    @" + stub.enclosingType + "::" + stub.name + " = value");\r
+                       else\r
+                               pb("    obj.@" + stub.enclosingType + "::" + stub.name + " = value;");\r
                        pb("}-*/;");\r
                }\r
-               \r
+\r
                return buffer.toString();\r
        }\r
-       \r
-       private boolean isVisible(JType type) {\r
-               if(type == null) return false;\r
-               \r
-               if(type instanceof JClassType) {\r
-                       if(type instanceof JArrayType) {\r
+\r
+       private boolean isVisible (JType type) {\r
+               if (type == null) return false;\r
+\r
+               if (type instanceof JClassType) {\r
+                       if (type instanceof JArrayType) {\r
                                JType componentType = ((JArrayType)type).getComponentType();\r
-                               while(componentType instanceof JArrayType) {\r
+                               while (componentType instanceof JArrayType) {\r
                                        componentType = ((JArrayType)componentType).getComponentType();\r
                                }\r
-                               if(componentType instanceof JClassType) {\r
-                                       return((JClassType)componentType).isPublic();\r
+                               if (componentType instanceof JClassType) {\r
+                                       return ((JClassType)componentType).isPublic();\r
                                }\r
                        } else {\r
                                return ((JClassType)type).isPublic();\r
@@ -409,63 +398,54 @@ public class ReflectionCacheSourceCreator {
                }\r
                return true;\r
        }\r
-       \r
-       private String createTypeGenerator(JType t) {\r
+\r
+       private String createTypeGenerator (JType t) {\r
                buffer.setLength(0);\r
                String varName = "t";\r
-               if(t instanceof JPrimitiveType) varName = "p";\r
-               \r
+               if (t instanceof JPrimitiveType) varName = "p";\r
+\r
                pb("Type " + varName + " = new Type();");\r
                pb(varName + ".name = \"" + t.getErasedType().getQualifiedSourceName() + "\";");\r
                pb(varName + ".clazz = " + t.getErasedType().getQualifiedSourceName() + ".class;");\r
-               if(t instanceof JClassType) {\r
+               if (t instanceof JClassType) {\r
                        JClassType c = (JClassType)t;\r
-                       if(isVisible(c.getSuperclass())) pb(varName + ".superClass = " + c.getSuperclass().getErasedType().getQualifiedSourceName() + ".class;");\r
-                       if(c.getFlattenedSupertypeHierarchy() != null) {\r
+                       if (isVisible(c.getSuperclass()))\r
+                               pb(varName + ".superClass = " + c.getSuperclass().getErasedType().getQualifiedSourceName() + ".class;");\r
+                       if (c.getFlattenedSupertypeHierarchy() != null) {\r
                                pb("Set<Class> " + varName + "Assignables = new HashSet<Class>();");\r
-                               for(JType i: c.getFlattenedSupertypeHierarchy()) {\r
-                                       if(!isVisible(i)) continue;\r
+                               for (JType i : c.getFlattenedSupertypeHierarchy()) {\r
+                                       if (!isVisible(i)) continue;\r
                                        pb(varName + "Assignables.add(" + i.getErasedType().getQualifiedSourceName() + ".class);");\r
                                }\r
                                pb(varName + ".assignables = " + varName + "Assignables;");\r
                        }\r
-                       if(c.isInterface() != null) pb(varName + ".isInterface = true;");\r
-                       if(c.isEnum() != null) pb(varName + ".isEnum = true;");\r
-                       if(c.isArray() != null) pb(varName + ".isArray = true;");\r
-                       if(c.isMemberType()) pb(varName + ".isMemberClass = true;");\r
+                       if (c.isInterface() != null) pb(varName + ".isInterface = true;");\r
+                       if (c.isEnum() != null) pb(varName + ".isEnum = true;");\r
+                       if (c.isArray() != null) pb(varName + ".isArray = true;");\r
+                       if (c.isMemberType()) pb(varName + ".isMemberClass = true;");\r
                        pb(varName + ".isStatic = " + c.isStatic() + ";");\r
                        pb(varName + ".isAbstract = " + c.isAbstract() + ";");\r
-                       \r
-                       if(c.getFields() != null) {\r
+\r
+                       if (c.getFields() != null) {\r
                                pb(varName + ".fields = new Field[] {");\r
-                               for(JField f: c.getFields()) {\r
+                               for (JField f : c.getFields()) {\r
                                        String enclosingType = getType(c);\r
                                        String fieldType = getType(f.getType());\r
                                        String setter = "s" + (nextStub++);\r
                                        String getter = "g" + (nextStub++);\r
-                                       \r
-                                       pb("new Field(\"" + f.getName() + "\", " + \r
-                                                                                         enclosingType + ", " +\r
-                                                                                         fieldType + ", " +\r
-                                                                                         f.isFinal() + ", " + \r
-                                                                                         f.isDefaultAccess() + ", " +\r
-                                                                                         f.isPrivate() + ", " + \r
-                                                                                         f.isProtected() + ", " +\r
-                                                                                         f.isPublic() + ", " +\r
-                                                                                         f.isStatic() + ", " +\r
-                                                                                         f.isTransient() + ", " + \r
-                                                                                         f.isVolatile() + ", " + \r
-                                                                                         "\"" + getter + "\", " + \r
-                                                                                         "\"" + setter + "\" " +\r
-                                                                                         "), ");\r
-                                       \r
+\r
+                                       pb("new Field(\"" + f.getName() + "\", " + enclosingType + ", " + fieldType + ", " + f.isFinal() + ", "\r
+                                               + f.isDefaultAccess() + ", " + f.isPrivate() + ", " + f.isProtected() + ", " + f.isPublic() + ", "\r
+                                               + f.isStatic() + ", " + f.isTransient() + ", " + f.isVolatile() + ", " + "\"" + getter + "\", " + "\"" + setter\r
+                                               + "\" " + "), ");\r
+\r
                                        SetterGetterStub stub = new SetterGetterStub();\r
                                        stub.name = f.getName();\r
                                        stub.enclosingType = enclosingType;\r
                                        stub.type = fieldType;\r
                                        stub.isStatic = f.isStatic();\r
                                        stub.isFinal = f.isFinal();\r
-                                       if(enclosingType != null && fieldType != null) {\r
+                                       if (enclosingType != null && fieldType != null) {\r
                                                stub.getter = getter;\r
                                                stub.setter = setter;\r
                                        }\r
@@ -473,14 +453,14 @@ public class ReflectionCacheSourceCreator {
                                }\r
                                pb("};");\r
                        }\r
-                       \r
-                       if(c.getMethods() != null) {\r
+\r
+                       if (c.getMethods() != null) {\r
                                pb(varName + ".methods = new Method[] {");\r
-                               for(JMethod m: c.getMethods()) {\r
+                               for (JMethod m : c.getMethods()) {\r
                                        String enclosingType = getType(c);\r
-                                       String returnType = getType(m.getReturnType()); \r
+                                       String returnType = getType(m.getReturnType());\r
                                        String methodId = "m" + (nextStub++);\r
-                                       \r
+\r
                                        MethodStub stub = new MethodStub();\r
                                        stub.enclosingType = enclosingType;\r
                                        stub.returnType = returnType;\r
@@ -490,14 +470,14 @@ public class ReflectionCacheSourceCreator {
                                        stub.methodId = methodId;\r
                                        stub.name = m.getName();\r
                                        methodStubs.add(stub);\r
-                                       \r
+\r
                                        pb("new Method(\"" + m.getName() + "\", ");\r
                                        pb(enclosingType + ", ");\r
                                        pb(returnType + ", ");\r
-                                       \r
-                                       if(m.getParameters() != null) {\r
+\r
+                                       if (m.getParameters() != null) {\r
                                                pb("new Parameter[] {");\r
-                                               for(JParameter p: m.getParameters()) {\r
+                                               for (JParameter p : m.getParameters()) {\r
                                                        String paramType = getType(p.getType());\r
                                                        stub.parameterTypes.add(paramType);\r
                                                        stub.jnsi += p.getType().getErasedType().getJNISignature();\r
@@ -507,45 +487,36 @@ public class ReflectionCacheSourceCreator {
                                        } else {\r
                                                pb("new Parameter[0], ");\r
                                        }\r
-                                       pb(m.isAbstract() + ", " +\r
-                                               m.isFinal() + ", " +\r
-                                               m.isStatic() + ", " +\r
-                                               m.isDefaultAccess() + ", " +\r
-                                               m.isPrivate() + ", " +\r
-                                               m.isProtected() + ", " +\r
-                                               m.isPublic() + ", " + \r
-                                               m.isNative() + ", " + \r
-                                               m.isVarArgs() + ", " +\r
-                                               (m.isMethod() != null) + ", " +\r
-                                               (m.isConstructor() != null) + ", " +\r
-                                               "\"" + methodId + "\"" +\r
-                                               "),");\r
+                                       pb(m.isAbstract() + ", " + m.isFinal() + ", " + m.isStatic() + ", " + m.isDefaultAccess() + ", " + m.isPrivate()\r
+                                               + ", " + m.isProtected() + ", " + m.isPublic() + ", " + m.isNative() + ", " + m.isVarArgs() + ", "\r
+                                               + (m.isMethod() != null) + ", " + (m.isConstructor() != null) + ", " + "\"" + methodId + "\"" + "),");\r
                                }\r
                                pb("};");\r
                        }\r
-                       \r
-                       if(c.isArray() != null) {\r
+\r
+                       if (c.isArray() != null) {\r
                                pb(varName + ".componentType = " + getType(c.isArray().getComponentType()) + ";");\r
                        }\r
-                       if(c.isEnum() != null) {\r
+                       if (c.isEnum() != null) {\r
                                JEnumConstant[] enumConstants = c.isEnum().getEnumConstants();\r
-                               if(enumConstants != null) {\r
+                               if (enumConstants != null) {\r
                                        pb(varName + ".enumConstants = new Object[" + enumConstants.length + "];");\r
-                                       for(int i = 0; i < enumConstants.length; i++) {\r
-                                               pb(varName + ".enumConstants[" + i + "] = " + c.getErasedType().getQualifiedSourceName() + "." + enumConstants[i].getName() + ";");\r
+                                       for (int i = 0; i < enumConstants.length; i++) {\r
+                                               pb(varName + ".enumConstants[" + i + "] = " + c.getErasedType().getQualifiedSourceName() + "."\r
+                                                       + enumConstants[i].getName() + ";");\r
                                        }\r
                                }\r
                        }\r
                } else {\r
                        pb(varName + ".isPrimitive = true;");\r
                }\r
-               \r
+\r
                pb("types.put(\"" + t.getErasedType().getQualifiedSourceName() + "\", " + varName + ");");\r
                return buffer.toString();\r
        }\r
-       \r
-       private String getType(JType type) {\r
-               if(!isVisible(type)) return null;\r
+\r
+       private String getType (JType type) {\r
+               if (!isVisible(type)) return null;\r
                return type.getErasedType().getQualifiedSourceName() + ".class";\r
        }\r
 \r
@@ -554,24 +525,24 @@ public class ReflectionCacheSourceCreator {
                composer.addImport("java.util.*");\r
                composer.addImport("com.badlogic.gwtref.client.*");\r
        }\r
-       \r
+\r
        private void invokeM () {\r
                p("public Object invoke(Method m, Object obj, Object[] params) {");\r
-               for(MethodStub stub: methodStubs) {\r
-                       if(stub.enclosingType == null) continue;\r
-                       if(stub.enclosingType.contains("[]")) continue;\r
-                       if(stub.returnType == null) continue;\r
-                       if(stub.unused) continue;\r
+               for (MethodStub stub : methodStubs) {\r
+                       if (stub.enclosingType == null) continue;\r
+                       if (stub.enclosingType.contains("[]")) continue;\r
+                       if (stub.returnType == null) continue;\r
+                       if (stub.unused) continue;\r
                        boolean paramsOk = true;\r
-                       for(String paramType: stub.parameterTypes) {\r
-                               if(paramType == null) {\r
+                       for (String paramType : stub.parameterTypes) {\r
+                               if (paramType == null) {\r
                                        paramsOk = false;\r
                                        break;\r
                                }\r
                        }\r
-                       if(!paramsOk) continue;\r
+                       if (!paramsOk) continue;\r
                        p("   if(m.methodId.equals(\"" + stub.methodId + "\")) {");\r
-                       if(stub.returnType.equals("void")) {\r
+                       if (stub.returnType.equals("void")) {\r
                                pn("      " + stub.methodId + "(");\r
                                addParameters(stub);\r
                                p(");");\r
@@ -583,56 +554,45 @@ public class ReflectionCacheSourceCreator {
                        }\r
                        p("   }");\r
                }\r
-               \r
+\r
                p("   return null;");\r
                p("}");\r
        }\r
 \r
        private void addParameters (MethodStub stub) {\r
-               pn("(" + stub.enclosingType + ")obj" +  (stub.parameterTypes.size() > 0?",":""));\r
-               for(int i = 0; i < stub.parameterTypes.size(); i++) {\r
+               pn("(" + stub.enclosingType + ")obj" + (stub.parameterTypes.size() > 0 ? "," : ""));\r
+               for (int i = 0; i < stub.parameterTypes.size(); i++) {\r
                        String paramType = stub.parameterTypes.get(i);\r
-                       if(isPrimitive(paramType)) {\r
-                               pn(castPrimitive(paramType, "params[" + i + "]") + (i < stub.parameterTypes.size() - 1?", ":""));\r
+                       if (isPrimitive(paramType)) {\r
+                               pn(castPrimitive(paramType, "params[" + i + "]") + (i < stub.parameterTypes.size() - 1 ? ", " : ""));\r
                        } else {\r
-                               pn("(" + stub.parameterTypes.get(i) + ")params[" + i + "]" + (i < stub.parameterTypes.size() - 1?", ":""));\r
+                               pn("(" + stub.parameterTypes.get(i) + ")params[" + i + "]" + (i < stub.parameterTypes.size() - 1 ? ", " : ""));\r
                        }\r
                }\r
        }\r
 \r
        private boolean isPrimitive (String paramType) {\r
-               return paramType.equals("boolean") || \r
-                           paramType.equals("byte") ||\r
-                           paramType.equals("char") ||\r
-                                paramType.equals("short") ||\r
-                                paramType.equals("int") ||\r
-                                paramType.equals("long") ||\r
-                                paramType.equals("float") ||\r
-                                paramType.equals("double");\r
+               return paramType.equals("boolean") || paramType.equals("byte") || paramType.equals("char") || paramType.equals("short")\r
+                       || paramType.equals("int") || paramType.equals("long") || paramType.equals("float") || paramType.equals("double");\r
        }\r
-       \r
-       private String castPrimitive(String paramType, String arg) {\r
-                if(paramType.equals("byte") || \r
-                        paramType.equals("short") ||\r
-                        paramType.equals("int") ||\r
-                        paramType.equals("long") ||\r
-                        paramType.equals("float") ||\r
-                        paramType.equals("double")) {\r
-                        return "((Number)" + arg + ")." + paramType + "Value()";\r
-                } else {\r
-                        if(paramType.equals("boolean")) {\r
-                                return "((Boolean)" + arg + ")." + paramType + "Value()";\r
-                        }\r
-                        else {\r
-                                return "((Character)" + arg + ")." + paramType + "Value()";\r
-                        }\r
-                }\r
+\r
+       private String castPrimitive (String paramType, String arg) {\r
+               if (paramType.equals("byte") || paramType.equals("short") || paramType.equals("int") || paramType.equals("long")\r
+                       || paramType.equals("float") || paramType.equals("double")) {\r
+                       return "((Number)" + arg + ")." + paramType + "Value()";\r
+               } else {\r
+                       if (paramType.equals("boolean")) {\r
+                               return "((Boolean)" + arg + ")." + paramType + "Value()";\r
+                       } else {\r
+                               return "((Character)" + arg + ")." + paramType + "Value()";\r
+                       }\r
+               }\r
        }\r
 \r
        private void setF () {\r
                p("public void set(Field field, Object obj, Object value) throws IllegalAccessException {");\r
-               for(SetterGetterStub stub: setterGetterStubs) {\r
-                       if(stub.enclosingType == null || stub.type == null || stub.isFinal || stub.unused) continue;\r
+               for (SetterGetterStub stub : setterGetterStubs) {\r
+                       if (stub.enclosingType == null || stub.type == null || stub.isFinal || stub.unused) continue;\r
                        p("   if(field.setter.equals(\"" + stub.setter + "\")) " + stub.setter + "((" + stub.enclosingType + ")obj, value);");\r
                }\r
                p("}");\r
@@ -640,8 +600,8 @@ public class ReflectionCacheSourceCreator {
 \r
        private void getF () {\r
                p("public Object get(Field field, Object obj) throws IllegalAccessException {");\r
-               for(SetterGetterStub stub: setterGetterStubs) {\r
-                       if(stub.enclosingType == null || stub.type == null || stub.unused) continue;\r
+               for (SetterGetterStub stub : setterGetterStubs) {\r
+                       if (stub.enclosingType == null || stub.type == null || stub.unused) continue;\r
                        p("   if(field.getter.equals(\"" + stub.getter + "\")) return " + stub.getter + "((" + stub.enclosingType + ")obj);");\r
                }\r
                p("   return null;");\r
@@ -650,15 +610,15 @@ public class ReflectionCacheSourceCreator {
 \r
        private void newInstanceT () {\r
                p("public Object newInstance (Type type) {");\r
-               for(JType type: types) {\r
-                       if(type instanceof JClassType) {\r
+               for (JType type : types) {\r
+                       if (type instanceof JClassType) {\r
                                JClassType clazzType = (JClassType)type;\r
-                               if(clazzType.isDefaultInstantiable() && \r
-                                       !(clazzType instanceof JArrayType) &&\r
-                                       !(clazzType instanceof JEnumType)) {\r
-                                       p("if(type.getName().equals(\"" + type.getErasedType().getQualifiedSourceName() + "\")) return new " + type.getErasedType().getQualifiedSourceName() + "();");\r
+                               if (clazzType.isDefaultInstantiable() && !(clazzType instanceof JArrayType) && !(clazzType instanceof JEnumType)) {\r
+                                       p("if(type.getName().equals(\"" + type.getErasedType().getQualifiedSourceName() + "\")) return new "\r
+                                               + type.getErasedType().getQualifiedSourceName() + "();");\r
                                } else {\r
-                                       logger.log(Type.INFO, "No public default constructor for '" + type.getQualifiedSourceName() + "', or type is an array, enum, abstract class or interface type");\r
+                                       logger.log(Type.INFO, "No public default constructor for '" + type.getQualifiedSourceName()\r
+                                               + "', or type is an array, enum, abstract class or interface type");\r
                                }\r
                        } else {\r
                                logger.log(Type.INFO, "No public default constructor for primitive type '" + type.getQualifiedSourceName() + "'");\r
@@ -667,27 +627,29 @@ public class ReflectionCacheSourceCreator {
                p("return null;");\r
                p("}");\r
        }\r
-       \r
+\r
        private void setArrayElementT () {\r
                p("public void setArrayElement(Type type, Object obj, int i, Object value) {");\r
-               for(JType type: types) {\r
-                       if(!(type instanceof JArrayType)) continue;\r
+               for (JType type : types) {\r
+                       if (!(type instanceof JArrayType)) continue;\r
                        String value = ((JArrayType)type).getComponentType().getErasedType().getQualifiedSourceName();\r
-                       if(isPrimitive(value)) {\r
+                       if (isPrimitive(value)) {\r
                                value = castPrimitive(value, "value");\r
                        } else {\r
                                value = "(" + value + ")value";\r
                        }\r
-                       p("   if(type.getName().equals(\"" + type.getQualifiedSourceName() + "\")) ((" + type.getQualifiedSourceName() + ")obj)[i] = " + value + ";");\r
+                       p("   if(type.getName().equals(\"" + type.getQualifiedSourceName() + "\")) ((" + type.getQualifiedSourceName()\r
+                               + ")obj)[i] = " + value + ";");\r
                }\r
                p("}");\r
        }\r
 \r
        private void getArrayElementT () {\r
                p("public Object getArrayElement(Type type, Object obj, int i) {");\r
-               for(JType type: types) {\r
-                       if(!(type instanceof JArrayType)) continue;\r
-                       p("   if(type.getName().equals(\"" + type.getQualifiedSourceName() + "\")) return ((" + type.getQualifiedSourceName() + ")obj)[i];");\r
+               for (JType type : types) {\r
+                       if (!(type instanceof JArrayType)) continue;\r
+                       p("   if(type.getName().equals(\"" + type.getQualifiedSourceName() + "\")) return ((" + type.getQualifiedSourceName()\r
+                               + ")obj)[i];");\r
                }\r
                p("     return null;");\r
                p("}");\r
@@ -695,9 +657,10 @@ public class ReflectionCacheSourceCreator {
 \r
        private void getArrayLengthT () {\r
                p("public int getArrayLength(Type type, Object obj) {");\r
-               for(JType type: types) {\r
-                       if(!(type instanceof JArrayType)) continue;\r
-                       p("   if(type.getName().equals(\"" + type.getQualifiedSourceName() + "\")) return ((" + type.getQualifiedSourceName() + ")obj).length;");\r
+               for (JType type : types) {\r
+                       if (!(type instanceof JArrayType)) continue;\r
+                       p("   if(type.getName().equals(\"" + type.getQualifiedSourceName() + "\")) return ((" + type.getQualifiedSourceName()\r
+                               + ")obj).length;");\r
                }\r
                p("     return 0;");\r
                p("}");\r
@@ -706,11 +669,11 @@ public class ReflectionCacheSourceCreator {
        private void newArrayC () {\r
                p("public Object newArray (Class componentType, int size) {");\r
                p("    String typeName = componentType.getName().replace('$', '.');");\r
-               for(JType type: types) {\r
-                       if(type.getQualifiedSourceName().equals("void")) continue;\r
-                       if(type.getQualifiedSourceName().endsWith("Void")) continue;\r
+               for (JType type : types) {\r
+                       if (type.getQualifiedSourceName().equals("void")) continue;\r
+                       if (type.getQualifiedSourceName().endsWith("Void")) continue;\r
                        String arrayType = type.getErasedType().getQualifiedSourceName() + "[size]";\r
-                       if(arrayType.contains("[]")) {\r
+                       if (arrayType.contains("[]")) {\r
                                arrayType = type.getErasedType().getQualifiedSourceName();\r
                                arrayType = arrayType.replaceFirst("\\[\\]", "[size]") + "[]";\r
                        }\r
@@ -731,25 +694,26 @@ public class ReflectionCacheSourceCreator {
                p("     return types.values();");\r
                p("}");\r
        }\r
-       \r
-       private void p(String line) {\r
+\r
+       private void p (String line) {\r
                sw.println(line);\r
                source.append(line);\r
                source.append("\n");\r
        }\r
-       private void pn(String line) {\r
+\r
+       private void pn (String line) {\r
                sw.print(line);\r
                source.append(line);\r
        }\r
-       \r
+\r
        StringBuffer buffer = new StringBuffer();\r
 \r
-       private void pb(String line) {\r
+       private void pb (String line) {\r
                buffer.append(line);\r
                buffer.append("\n");\r
        }\r
-       \r
-       private void pbn(String line) {\r
+\r
+       private void pbn (String line) {\r
                buffer.append(line);\r
        }\r
-}
\ No newline at end of file
+}\r
index 87f0cc3..164e163 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JavaScriptObject;\r
+package com.google.gwt.typedarrays.client;\r
 \r
-/**\r
- * The ArrayBuffer type describes a buffer used to store data for the TypedArray\r
- * interface and its subclasses.\r
- *\r
- * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010.\r
- */\r
+/** The ArrayBuffer type describes a buffer used to store data for the TypedArray interface and its subclasses.\r
+ * \r
+ * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010. */\r
 public class ArrayBuffer extends JavaScriptObject {\r
 \r
-  /**\r
-   * Creates a new ArrayBuffer of the given length in bytes. The contents of the\r
-   * ArrayBuffer are initialized to 0.\r
-   */\r
-  public static final native ArrayBuffer create(int length) /*-{\r
-    return new ArrayBuffer(length);\r
-  }-*/;\r
+       /** Creates a new ArrayBuffer of the given length in bytes. The contents of the ArrayBuffer are initialized to 0. */\r
+       public static final native ArrayBuffer create (int length) /*-{\r
+                                                                                                                                                                       return new ArrayBuffer(length);\r
+                                                                                                                                                                       }-*/;\r
 \r
-  protected ArrayBuffer() {\r
-  }\r
+       protected ArrayBuffer () {\r
+       }\r
 \r
-  /**\r
-   * The length of the ArrayBuffer in bytes, as fixed at construction time.\r
-   */\r
-  public final native int getByteLength() /*-{\r
-    return this.length;\r
-  }-*/;\r
+       /** The length of the ArrayBuffer in bytes, as fixed at construction time. */\r
+       public final native int getByteLength () /*-{\r
+                                                                                                                       return this.length;\r
+                                                                                                                       }-*/;\r
 }\r
index ea576de..f3a4d4c 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JavaScriptObject;\r
+package com.google.gwt.typedarrays.client;\r
 \r
-/**\r
- * The ArrayBufferView type holds information shared among all of the types of\r
- * views of ArrayBuffers.\r
- *\r
- * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010.\r
- */\r
+/** The ArrayBufferView type holds information shared among all of the types of views of ArrayBuffers.\r
+ * \r
+ * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010. */\r
 public class ArrayBufferView extends JavaScriptObject {\r
 \r
-  protected ArrayBufferView() {\r
-  }\r
+       protected ArrayBufferView () {\r
+       }\r
 \r
-  /**\r
-   * The ArrayBuffer that this ArrayBufferView references.\r
-   */\r
-  public final native ArrayBuffer getBuffer() /*-{\r
-    return this.buffer;\r
-  }-*/;\r
+       /** The ArrayBuffer that this ArrayBufferView references. */\r
+       public final native ArrayBuffer getBuffer () /*-{\r
+                                                                                                                               return this.buffer;\r
+                                                                                                                               }-*/;\r
 \r
-  /**\r
-   * The offset of this ArrayBufferView from the start of its ArrayBuffer, in\r
-   * bytes, as fixed at construction time.\r
-   */\r
-  public final native int getByteLength() /*-{\r
-    return this.byteLength;\r
-  }-*/;\r
+       /** The offset of this ArrayBufferView from the start of its ArrayBuffer, in bytes, as fixed at construction time. */\r
+       public final native int getByteLength () /*-{\r
+                                                                                                                       return this.byteLength;\r
+                                                                                                                       }-*/;\r
 \r
-  /**\r
-   * The length of the ArrayBufferView in bytes, as fixed at construction time.\r
-   */\r
-  public final native int getByteOffset() /*-{\r
-    return this.byteOffset;\r
-  }-*/;\r
+       /** The length of the ArrayBufferView in bytes, as fixed at construction time. */\r
+       public final native int getByteOffset () /*-{\r
+                                                                                                                       return this.byteOffset;\r
+                                                                                                                       }-*/;\r
 }\r
index 3b93a91..0ac1745 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JsArrayInteger;\r
-import com.google.gwt.core.client.JsArrayNumber;\r
+package com.google.gwt.typedarrays.client;\r
 \r
 public class ArrayUtils {\r
 \r
-  // TODO(jgw): Get rid of these conversions in web mode.\r
-  public static JsArrayInteger toJsArray(byte[] data) {\r
-    JsArrayInteger jsan = (JsArrayInteger) JsArrayInteger.createArray();\r
-    int len = data.length;\r
-    for (int i = len - 1; i >= 0; i--) {\r
-      jsan.set(i, data[i]);\r
-    }\r
-    return jsan;\r
-  }\r
+       // TODO(jgw): Get rid of these conversions in web mode.\r
+       public static JsArrayInteger toJsArray (byte[] data) {\r
+               JsArrayInteger jsan = (JsArrayInteger)JsArrayInteger.createArray();\r
+               int len = data.length;\r
+               for (int i = len - 1; i >= 0; i--) {\r
+                       jsan.set(i, data[i]);\r
+               }\r
+               return jsan;\r
+       }\r
+\r
+       public static JsArrayNumber toJsArray (double[] data) {\r
+               JsArrayNumber jsan = (JsArrayNumber)JsArrayNumber.createArray();\r
+               int len = data.length;\r
+               for (int i = len - 1; i >= 0; i--) {\r
+                       jsan.set(i, data[i]);\r
+               }\r
+               return jsan;\r
+       }\r
+\r
+       public static JsArrayNumber toJsArray (float[] data) {\r
+               JsArrayNumber jsan = (JsArrayNumber)JsArrayNumber.createArray();\r
+               jsan.setLength(data.length);\r
+               int len = data.length;\r
+               for (int i = len - 1; i >= 0; i--) {\r
+                       jsan.set(i, data[i]);\r
+               }\r
+               return jsan;\r
+       }\r
 \r
-  public static JsArrayNumber toJsArray(double[] data) {\r
-    JsArrayNumber jsan = (JsArrayNumber) JsArrayNumber.createArray();\r
-    int len = data.length;\r
-    for (int i = len - 1; i >= 0; i--) {\r
-      jsan.set(i, data[i]);\r
-    }\r
-    return jsan;\r
-  }\r
+       public static JsArrayNumber toJsArray (float[] data, int offset, int len) {\r
+               JsArrayNumber jsan = (JsArrayNumber)JsArrayNumber.createArray();\r
+               jsan.setLength(len);\r
+               for (int i = 0; i < len; i++) {\r
+                       jsan.set(i, data[i + offset]);\r
+               }\r
+               return jsan;\r
+       }\r
 \r
-  public static JsArrayNumber toJsArray(float[] data) {\r
-    JsArrayNumber jsan = (JsArrayNumber) JsArrayNumber.createArray();\r
-    jsan.setLength(data.length);\r
-    int len = data.length;\r
-    for (int i = len - 1; i >= 0; i--) {\r
-      jsan.set(i, data[i]);\r
-    }\r
-    return jsan;\r
-  }\r
-  \r
-  public static JsArrayNumber toJsArray(float[] data, int offset, int len) {\r
-           JsArrayNumber jsan = (JsArrayNumber) JsArrayNumber.createArray();\r
-           jsan.setLength(len);\r
-           for (int i = 0; i < len; i++) {\r
-             jsan.set(i, data[i + offset]);\r
-           }\r
-           return jsan;\r
-         }\r
+       public static JsArrayInteger toJsArray (int[] data) {\r
+               JsArrayInteger jsan = (JsArrayInteger)JsArrayNumber.createArray();\r
+               int len = data.length;\r
+               for (int i = len - 1; i >= 0; i--) {\r
+                       jsan.set(i, data[i]);\r
+               }\r
+               return jsan;\r
+       }\r
 \r
-  public static JsArrayInteger toJsArray(int[] data) {\r
-    JsArrayInteger jsan = (JsArrayInteger) JsArrayNumber.createArray();\r
-    int len = data.length;\r
-    for (int i = len - 1; i >= 0; i--) {\r
-      jsan.set(i, data[i]);\r
-    }\r
-    return jsan;\r
-  }\r
+       public static JsArrayInteger toJsArray (short[] data) {\r
+               JsArrayInteger jsan = (JsArrayInteger)JsArrayInteger.createArray();\r
+               int len = data.length;\r
+               for (int i = len - 1; i >= 0; i--) {\r
+                       jsan.set(i, data[i]);\r
+               }\r
+               return jsan;\r
+       }\r
 \r
-  public static JsArrayInteger toJsArray(short[] data) {\r
-    JsArrayInteger jsan = (JsArrayInteger) JsArrayInteger.createArray();\r
-    int len = data.length;\r
-    for (int i = len - 1; i >= 0; i--) {\r
-      jsan.set(i, data[i]);\r
-    }\r
-    return jsan;\r
-  }\r
-  \r
-  public static JsArrayInteger toJsArray(short[] data, int offset, int len) {\r
-           JsArrayInteger jsan = (JsArrayInteger) JsArrayInteger.createArray();\r
-           for (int i = 0; i < len; i++) {\r
-             jsan.set(i, data[offset + i]);\r
-           }\r
-           return jsan;\r
-         }\r
+       public static JsArrayInteger toJsArray (short[] data, int offset, int len) {\r
+               JsArrayInteger jsan = (JsArrayInteger)JsArrayInteger.createArray();\r
+               for (int i = 0; i < len; i++) {\r
+                       jsan.set(i, data[offset + i]);\r
+               }\r
+               return jsan;\r
+       }\r
 \r
-  public static JsArrayInteger toJsArrayUnsigned(byte[] data) {\r
-    JsArrayInteger jsan = (JsArrayInteger) JsArrayInteger.createArray();\r
-    int len = data.length;\r
-    for (int i = len - 1; i >= 0; i--) {\r
-      jsan.set(i, data[i] & 255);\r
-    }\r
-    return jsan;\r
-  }\r
+       public static JsArrayInteger toJsArrayUnsigned (byte[] data) {\r
+               JsArrayInteger jsan = (JsArrayInteger)JsArrayInteger.createArray();\r
+               int len = data.length;\r
+               for (int i = len - 1; i >= 0; i--) {\r
+                       jsan.set(i, data[i] & 255);\r
+               }\r
+               return jsan;\r
+       }\r
 \r
-  public static JsArrayInteger toJsArrayUnsigned(short[] data) {\r
-    JsArrayInteger jsan = (JsArrayInteger) JsArrayInteger.createArray();\r
-    int len = data.length;\r
-    for (int i = len - 1; i >= 0; i--) {\r
-      jsan.set(i, data[i] & 65535);\r
-    }\r
-    return jsan;\r
-  }\r
+       public static JsArrayInteger toJsArrayUnsigned (short[] data) {\r
+               JsArrayInteger jsan = (JsArrayInteger)JsArrayInteger.createArray();\r
+               int len = data.length;\r
+               for (int i = len - 1; i >= 0; i--) {\r
+                       jsan.set(i, data[i] & 65535);\r
+               }\r
+               return jsan;\r
+       }\r
 \r
-  private ArrayUtils() {\r
-  }\r
+       private ArrayUtils () {\r
+       }\r
 }\r
index 7a4fb0b..3dbc9c4 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.typedarrays.client;\r
 \r
-/**\r
- * An ArrayBuffer is a useful object for representing an arbitrary chunk of\r
- * data. In many cases, such data will be read from disk or from the network,\r
- * and will not follow the alignment restrictions that are imposed on the typed\r
- * array views described earlier. In addition, the data will often be\r
- * heterogeneous in nature and have a defined byte order. The DataView view\r
- * provides a low-level interface for reading such data from and writing it to\r
- * an ArrayBuffer.\r
- *\r
- * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010.\r
- */\r
+/** An ArrayBuffer is a useful object for representing an arbitrary chunk of data. In many cases, such data will be read from disk\r
+ * or from the network, and will not follow the alignment restrictions that are imposed on the typed array views described\r
+ * earlier. In addition, the data will often be heterogeneous in nature and have a defined byte order. The DataView view provides\r
+ * a low-level interface for reading such data from and writing it to an ArrayBuffer.\r
+ * \r
+ * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010. */\r
 public class DataView extends ArrayBufferView {\r
 \r
-  protected DataView() {\r
-  }\r
-\r
-  /**\r
-   * @see #getInt8(int)\r
-   */\r
-  public final native double getDouble(int byteOffset, boolean littleEndian) /*-{\r
-    return this.getDouble(byteOffset, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #getInt8(int)\r
-   */\r
-  public final native float getFloat(int byteOffset, boolean littleEndian) /*-{\r
-    return this.getFloat(byteOffset, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #getInt8(int)\r
-   */\r
-  public final native short getInt16(int byteOffset, boolean littleEndian) /*-{\r
-    return this.getInt16(byteOffset, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #getInt8(int)\r
-   */\r
-  public final native int getInt32(int byteOffset, boolean littleEndian) /*-{\r
-    return this.getInt32(byteOffset, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * Gets the value of the given type at the specified byte offset from the\r
-   * start of the view. There is no alignment constraint; multi-byte values may\r
-   * be fetched from any offset.\r
-   *\r
-   * For multi-byte values, the optional littleEndian argument indicates whether\r
-   * a big-endian or little-endian value should be read. If false or undefined,\r
-   * a big-endian value is read.\r
-   *\r
-   * These methods raise an INDEX_SIZE_ERR exception if they would read beyond\r
-   * the end of the view.\r
-   */\r
-  public final native byte getInt8(int byteOffset) /*-{\r
-    return this.getInt8(byteOffset);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #getInt8(int)\r
-   */\r
-  public final native short getUInt16(int byteOffset, boolean littleEndian) /*-{\r
-    return this.getUInt16(byteOffset, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #getInt8(int)\r
-   */\r
-  public final native int getUInt32(int byteOffset, boolean littleEndian) /*-{\r
-    return this.getUInt32(byteOffset, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #getInt8(int)\r
-   */\r
-  public final native byte getUInt8(int byteOffset) /*-{\r
-    return this.getUInt8(byteOffset);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #setInt8(int, byte, boolean)\r
-   */\r
-  public final native void setDouble(int byteOffset, double value,\r
-      boolean littleEndian) /*-{\r
-    this.setDouble(byteOffset, value, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #setInt8(int, byte, boolean)\r
-   */\r
-  public final native void setFloat(int byteOffset, float value,\r
-      boolean littleEndian) /*-{\r
-    this.setFloat(byteOffset, value, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #setInt8(int, byte, boolean)\r
-   */\r
-  public final native void setInt16(int byteOffset, short value,\r
-      boolean littleEndian) /*-{\r
-    this.setInt16(byteOffset, value, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #setInt8(int, byte, boolean)\r
-   */\r
-  public final native void setInt32(int byteOffset, int value,\r
-      boolean littleEndian) /*-{\r
-    this.setInt32(byteOffset, value, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * Stores a value of the given type at the specified byte offset from the\r
-   * start of the view. There is no alignment constraint; multi-byte values may\r
-   * be stored at any offset.\r
-   *\r
-   * For multi-byte values, the littleEndian argument indicates whether the\r
-   * value should be stored in big-endian or little-endian byte order. If false\r
-   * or undefined, the value is stored in big-endian byte order.\r
-   *\r
-   * These methods throw exceptions if they would write beyond the end of the\r
-   * view.\r
-   */\r
-  public final native void setInt8(int byteOffset, byte value,\r
-      boolean littleEndian) /*-{\r
-    this.setInt8(byteOffset, value, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #setInt8(int, byte, boolean)\r
-   */\r
-  public final native void setUint16(int byteOffset, short value,\r
-      boolean littleEndian) /*-{\r
-    this.setUint16(byteOffset, value, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #setInt8(int, byte, boolean)\r
-   */\r
-  public final native void setUint32(int byteOffset, int value,\r
-      boolean littleEndian) /*-{\r
-    this.setUint32(byteOffset, value, littleEndian);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #setInt8(int, byte, boolean)\r
-   */\r
-  public final native void setUint8(int byteOffset, byte value,\r
-      boolean littleEndian) /*-{\r
-    this.setUint8(byteOffset, value, littleEndian);\r
-  }-*/;\r
+       protected DataView () {\r
+       }\r
+\r
+       /** @see #getInt8(int) */\r
+       public final native double getDouble (int byteOffset, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                       return this.getDouble(byteOffset, littleEndian);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** @see #getInt8(int) */\r
+       public final native float getFloat (int byteOffset, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                               return this.getFloat(byteOffset, littleEndian);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #getInt8(int) */\r
+       public final native short getInt16 (int byteOffset, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                               return this.getInt16(byteOffset, littleEndian);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #getInt8(int) */\r
+       public final native int getInt32 (int byteOffset, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                       return this.getInt32(byteOffset, littleEndian);\r
+                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Gets the value of the given type at the specified byte offset from the start of the view. There is no alignment constraint;\r
+        * multi-byte values may be fetched from any offset.\r
+        * \r
+        * For multi-byte values, the optional littleEndian argument indicates whether a big-endian or little-endian value should be\r
+        * read. If false or undefined, a big-endian value is read.\r
+        * \r
+        * These methods raise an INDEX_SIZE_ERR exception if they would read beyond the end of the view. */\r
+       public final native byte getInt8 (int byteOffset) /*-{\r
+                                                                                                                                               return this.getInt8(byteOffset);\r
+                                                                                                                                               }-*/;\r
+\r
+       /** @see #getInt8(int) */\r
+       public final native short getUInt16 (int byteOffset, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                               return this.getUInt16(byteOffset, littleEndian);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #getInt8(int) */\r
+       public final native int getUInt32 (int byteOffset, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                               return this.getUInt32(byteOffset, littleEndian);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #getInt8(int) */\r
+       public final native byte getUInt8 (int byteOffset) /*-{\r
+                                                                                                                                               return this.getUInt8(byteOffset);\r
+                                                                                                                                               }-*/;\r
+\r
+       /** @see #setInt8(int, byte, boolean) */\r
+       public final native void setDouble (int byteOffset, double value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                                       this.setDouble(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** @see #setInt8(int, byte, boolean) */\r
+       public final native void setFloat (int byteOffset, float value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                               this.setFloat(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #setInt8(int, byte, boolean) */\r
+       public final native void setInt16 (int byteOffset, short value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                               this.setInt16(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #setInt8(int, byte, boolean) */\r
+       public final native void setInt32 (int byteOffset, int value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                       this.setInt32(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Stores a value of the given type at the specified byte offset from the start of the view. There is no alignment constraint;\r
+        * multi-byte values may be stored at any offset.\r
+        * \r
+        * For multi-byte values, the littleEndian argument indicates whether the value should be stored in big-endian or little-endian\r
+        * byte order. If false or undefined, the value is stored in big-endian byte order.\r
+        * \r
+        * These methods throw exceptions if they would write beyond the end of the view. */\r
+       public final native void setInt8 (int byteOffset, byte value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                       this.setInt8(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** @see #setInt8(int, byte, boolean) */\r
+       public final native void setUint16 (int byteOffset, short value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                               this.setUint16(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #setInt8(int, byte, boolean) */\r
+       public final native void setUint32 (int byteOffset, int value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                               this.setUint32(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #setInt8(int, byte, boolean) */\r
+       public final native void setUint8 (int byteOffset, byte value, boolean littleEndian) /*-{\r
+                                                                                                                                                                                                                                               this.setUint8(byteOffset, value, littleEndian);\r
+                                                                                                                                                                                                                                               }-*/;\r
 }\r
index 09191f5..908f155 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JsArrayNumber;\r
+package com.google.gwt.typedarrays.client;\r
 \r
-/**\r
- * The typed array view types represent a view of an ArrayBuffer that allows for\r
- * indexing and manipulation. The length of each of these is fixed.\r
- *\r
- * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010.\r
- */\r
+/** The typed array view types represent a view of an ArrayBuffer that allows for indexing and manipulation. The length of each of\r
+ * these is fixed.\r
+ * \r
+ * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010. */\r
 public class Float32Array extends ArrayBufferView {\r
 \r
-  public static final int BYTES_PER_ELEMENT = 4;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Float32Array create(ArrayBuffer buffer) /*-{\r
-    return new Float32Array(buffer);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Float32Array create(ArrayBuffer buffer,\r
-      int byteOffset) /*-{\r
-    return new Float32Array(buffer, byteOffset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new TypedArray object using the passed ArrayBuffer for its\r
-   * storage. Optional byteOffset and length can be used to limit the section of\r
-   * the buffer referenced. The byteOffset indicates the offset in bytes from\r
-   * the start of the ArrayBuffer, and the length is the count of elements from\r
-   * the offset that this TypedArray will reference. If both byteOffset and\r
-   * length are omitted, the TypedArray spans the entire ArrayBuffer range. If\r
-   * the length is omitted, the TypedArray extends from the given byteOffset\r
-   * until the end of the ArrayBuffer.\r
-   *\r
-   * The given byteOffset must be a multiple of the element size of the specific\r
-   * type, otherwise an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If a given byteOffset and length references an area beyond the end of the\r
-   * ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If length is not explicitly specified, the length of the ArrayBuffer minus\r
-   * the byteOffset must be a multiple of the element size of the specific type,\r
-   * or an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public static final native Float32Array create(ArrayBuffer buffer,\r
-      int byteOffset, int length) /*-{\r
-    return new Float32Array(buffer, byteOffset, length);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final Float32Array create(float[] data) {\r
-    return create(ArrayUtils.toJsArray(data));\r
-  }\r
-  \r
-  public static final Float32Array create(float[] data, int offset, int len) {\r
-           return create(ArrayUtils.toJsArray(data, offset, len));\r
-         }\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Float32Array create(Float32Array array) /*-{\r
-    return new Float32Array(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold length elements of this\r
-   * typed array, then creates a typed array view referring to the full buffer.\r
-   */\r
-  public static final native Float32Array create(int size) /*-{\r
-    return new Float32Array(size);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Float32Array create(JsArrayNumber data) /*-{\r
-    return new Float32Array(data);\r
-  }-*/;\r
-\r
-  protected Float32Array() {\r
-  }\r
-\r
-  /**\r
-   * Returns the element at the given numeric index.\r
-   */\r
-  public native final float get(int index) /*-{\r
-    return this[index];\r
-  }-*/;\r
-\r
-  /**\r
-   * The length of the TypedArray in elements, as fixed at construction time.\r
-   */\r
-  public final native int getLength() /*-{\r
-    return this.length;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(float[], int)\r
-   */\r
-  public final void set(float[] array) {\r
-    set(array, 0);\r
-  }\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public final void set(float[] array, int offset) {\r
-    set(ArrayUtils.toJsArray(array), offset);\r
-  }\r
-\r
-  /**\r
-   * @see #set(Float32Array, int)\r
-   * @param array\r
-   */\r
-  public native final void set(Float32Array array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * The two arrays may use the same underlying ArrayBuffer. In this situation,\r
-   * setting the values takes place as if all the data is first copied into a\r
-   * temporary buffer that does not overlap either of the arrays, and then the\r
-   * data from the temporary buffer is copied into the current array.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public native final void set(Float32Array array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Sets the element at the given numeric index to the given value.\r
-   */\r
-  public native final void set(int index, float value) /*-{\r
-    this[index] = value;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(float[], int)\r
-   */\r
-  public native final void set(JsArrayNumber array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(float[], int)\r
-   */\r
-  public native final void set(JsArrayNumber array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Returns a new TypedArray view of the ArrayBuffer store for this TypedArray,\r
-   * referencing the elements at begin, inclusive, up to end, exclusive. If\r
-   * either begin or end is negative, it refers to an index from the end of the\r
-   * array, as opposed to from the beginning.\r
-   *\r
-   * If end is unspecified, the subarray contains all elements from begin to the\r
-   * end of the TypedArray.\r
-   *\r
-   * The range specified by the begin and end values is clamped to the valid\r
-   * index range for the current array. If the computed length of the new\r
-   * TypedArray would be negative, it is clamped to zero.\r
-   *\r
-   * The returned TypedArray will be of the same type as the array on which this\r
-   * method is invoked.\r
-   */\r
-  public final native Float32Array subarray(int offset, int length) /*-{\r
-    return this.subarray(offset, length);\r
-  }-*/;\r
+       public static final int BYTES_PER_ELEMENT = 4;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Float32Array create (ArrayBuffer buffer) /*-{\r
+                                                                                                                                                                                               return new Float32Array(buffer);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Float32Array create (ArrayBuffer buffer, int byteOffset) /*-{\r
+                                                                                                                                                                                                                                       return new Float32Array(buffer, byteOffset);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new TypedArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to\r
+        * limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer,\r
+        * and the length is the count of elements from the offset that this TypedArray will reference. If both byteOffset and length\r
+        * are omitted, the TypedArray spans the entire ArrayBuffer range. If the length is omitted, the TypedArray extends from the\r
+        * given byteOffset until the end of the ArrayBuffer.\r
+        * \r
+        * The given byteOffset must be a multiple of the element size of the specific type, otherwise an INDEX_SIZE_ERR exception is\r
+        * raised.\r
+        * \r
+        * If a given byteOffset and length references an area beyond the end of the ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
+        * \r
+        * If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element\r
+        * size of the specific type, or an INDEX_SIZE_ERR exception is raised. */\r
+       public static final native Float32Array create (ArrayBuffer buffer, int byteOffset, int length) /*-{\r
+                                                                                                                                                                                                                                                                       return new Float32Array(buffer, byteOffset, length);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final Float32Array create (float[] data) {\r
+               return create(ArrayUtils.toJsArray(data));\r
+       }\r
+\r
+       public static final Float32Array create (float[] data, int offset, int len) {\r
+               return create(ArrayUtils.toJsArray(data, offset, len));\r
+       }\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Float32Array create (Float32Array array) /*-{\r
+                                                                                                                                                                                               return new Float32Array(array);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold length elements of this typed array, then creates a typed array view\r
+        * referring to the full buffer. */\r
+       public static final native Float32Array create (int size) /*-{\r
+                                                                                                                                                                       return new Float32Array(size);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Float32Array create (JsArrayNumber data) /*-{\r
+                                                                                                                                                                                               return new Float32Array(data);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       protected Float32Array () {\r
+       }\r
+\r
+       /** Returns the element at the given numeric index. */\r
+       public native final float get (int index) /*-{\r
+                                                                                                                       return this[index];\r
+                                                                                                                       }-*/;\r
+\r
+       /** The length of the TypedArray in elements, as fixed at construction time. */\r
+       public final native int getLength () /*-{\r
+                                                                                                               return this.length;\r
+                                                                                                               }-*/;\r
+\r
+       /** @see #set(float[], int) */\r
+       public final void set (float[] array) {\r
+               set(array, 0);\r
+       }\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public final void set (float[] array, int offset) {\r
+               set(ArrayUtils.toJsArray(array), offset);\r
+       }\r
+\r
+       /** @see #set(Float32Array, int)\r
+        * @param array */\r
+       public native final void set (Float32Array array) /*-{\r
+                                                                                                                                               this.set(array);\r
+                                                                                                                                               }-*/;\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * The two arrays may use the same underlying ArrayBuffer. In this situation, setting the values takes place as if all the data\r
+        * is first copied into a temporary buffer that does not overlap either of the arrays, and then the data from the temporary\r
+        * buffer is copied into the current array.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public native final void set (Float32Array array, int offset) /*-{\r
+                                                                                                                                                                               this.set(array, offset);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       /** Sets the element at the given numeric index to the given value. */\r
+       public native final void set (int index, float value) /*-{\r
+                                                                                                                                                       this[index] = value;\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** @see #set(float[], int) */\r
+       public native final void set (JsArrayNumber array) /*-{\r
+                                                                                                                                               this.set(array);\r
+                                                                                                                                               }-*/;\r
+\r
+       /** @see #set(float[], int) */\r
+       public native final void set (JsArrayNumber array, int offset) /*-{\r
+                                                                                                                                                                               this.set(array, offset);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       /** Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, referencing the elements at begin, inclusive, up\r
+        * to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from\r
+        * the beginning.\r
+        * \r
+        * If end is unspecified, the subarray contains all elements from begin to the end of the TypedArray.\r
+        * \r
+        * The range specified by the begin and end values is clamped to the valid index range for the current array. If the computed\r
+        * length of the new TypedArray would be negative, it is clamped to zero.\r
+        * \r
+        * The returned TypedArray will be of the same type as the array on which this method is invoked. */\r
+       public final native Float32Array subarray (int offset, int length) /*-{\r
+                                                                                                                                                                                               return this.subarray(offset, length);\r
+                                                                                                                                                                                               }-*/;\r
 }\r
index c7e17ab..e6f43af 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JsArrayInteger;\r
-\r
 /** The typed array view types represent a view of an ArrayBuffer that allows for indexing and manipulation. The length of each of\r
  * these is fixed.\r
  * \r
@@ -28,13 +26,13 @@ public class Int16Array extends ArrayBufferView {
 \r
        /** @see #create(ArrayBuffer, int, int) */\r
        public static final native Int16Array create (ArrayBuffer buffer) /*-{\r
-               return new Int16Array(buffer);\r
-       }-*/;\r
+                                                                                                                                                                                       return new Int16Array(buffer);\r
+                                                                                                                                                                                       }-*/;\r
 \r
        /** @see #create(ArrayBuffer, int, int) */\r
        public static final native Int16Array create (ArrayBuffer buffer, int byteOffset) /*-{\r
-               return new Int16Array(buffer, byteOffset);\r
-       }-*/;\r
+                                                                                                                                                                                                                                       return new Int16Array(buffer, byteOffset);\r
+                                                                                                                                                                                                                                       }-*/;\r
 \r
        /** Create a new TypedArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to\r
         * limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer,\r
@@ -50,8 +48,8 @@ public class Int16Array extends ArrayBufferView {
         * If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element\r
         * size of the specific type, or an INDEX_SIZE_ERR exception is raised. */\r
        public static final native Int16Array create (ArrayBuffer buffer, int byteOffset, int length) /*-{\r
-               return new Int16Array(buffer, byteOffset, length);\r
-       }-*/;\r
+                                                                                                                                                                                                                                                                       return new Int16Array(buffer, byteOffset, length);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
 \r
        /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
         * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
@@ -68,34 +66,34 @@ public class Int16Array extends ArrayBufferView {
         * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
         * sequence, with each element converted to the appropriate typed array type. */\r
        public static final native Int16Array create (Int16Array array) /*-{\r
-               return new Int16Array(array);\r
-       }-*/;\r
+                                                                                                                                                                                       return new Int16Array(array);\r
+                                                                                                                                                                                       }-*/;\r
 \r
        /** Create a new ArrayBuffer with enough bytes to hold length elements of this typed array, then creates a typed array view\r
         * referring to the full buffer. */\r
        public static final native Int16Array create (int size) /*-{\r
-               return new Int16Array(size);\r
-       }-*/;\r
+                                                                                                                                                               return new Int16Array(size);\r
+                                                                                                                                                               }-*/;\r
 \r
        /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
         * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
         * sequence, with each element converted to the appropriate typed array type. */\r
        public static final native Int16Array create (JsArrayInteger data) /*-{\r
-               return new Int16Array(data);\r
-       }-*/;\r
+                                                                                                                                                                                               return new Int16Array(data);\r
+                                                                                                                                                                                               }-*/;\r
 \r
        protected Int16Array () {\r
        }\r
 \r
        /** Returns the element at the given numeric index. */\r
        public native final int get (int index) /*-{\r
-               return this[index];\r
-       }-*/;\r
+                                                                                                                       return this[index];\r
+                                                                                                                       }-*/;\r
 \r
        /** The length of the TypedArray in elements, as fixed at construction time. */\r
        public final native int getLength () /*-{\r
-               return this.length;\r
-       }-*/;\r
+                                                                                                               return this.length;\r
+                                                                                                               }-*/;\r
 \r
        /** @see #set(int[], int) */\r
        public final void set (int[] array) {\r
@@ -114,8 +112,8 @@ public class Int16Array extends ArrayBufferView {
        /** @see #set(Int16Array, int)\r
         * @param array */\r
        public native final void set (Int16Array array) /*-{\r
-               this.set(array);\r
-       }-*/;\r
+                                                                                                                                       this.set(array);\r
+                                                                                                                                       }-*/;\r
 \r
        /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
         * where values are written. If omitted, it is assumed to be 0.\r
@@ -127,23 +125,23 @@ public class Int16Array extends ArrayBufferView {
         * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
         * raised. */\r
        public native final void set (Int16Array array, int offset) /*-{\r
-               this.set(array, offset);\r
-       }-*/;\r
+                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                       }-*/;\r
 \r
        /** Sets the element at the given numeric index to the given value. */\r
        public native final void set (int index, int value) /*-{\r
-               this[index] = value;\r
-       }-*/;\r
+                                                                                                                                                       this[index] = value;\r
+                                                                                                                                                       }-*/;\r
 \r
        /** @see #set(int[], int) */\r
        public native final void set (JsArrayInteger array) /*-{\r
-               this.set(array);\r
-       }-*/;\r
+                                                                                                                                                       this.set(array);\r
+                                                                                                                                                       }-*/;\r
 \r
        /** @see #set(int[], int) */\r
        public native final void set (JsArrayInteger array, int offset) /*-{\r
-               this.set(array, offset);\r
-       }-*/;\r
+                                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                                       }-*/;\r
 \r
        /** Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, referencing the elements at begin, inclusive, up\r
         * to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from\r
@@ -156,6 +154,6 @@ public class Int16Array extends ArrayBufferView {
         * \r
         * The returned TypedArray will be of the same type as the array on which this method is invoked. */\r
        public final native Int16Array subarray (int offset, int length) /*-{\r
-               return this.subarray(offset, length);\r
-       }-*/;\r
+                                                                                                                                                                                       return this.subarray(offset, length);\r
+                                                                                                                                                                                       }-*/;\r
 }\r
index 354bfb7..bac2244 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JsArrayInteger;\r
+package com.google.gwt.typedarrays.client;\r
 \r
-/**\r
- * The typed array view types represent a view of an ArrayBuffer that allows for\r
- * indexing and manipulation. The length of each of these is fixed.\r
- *\r
- * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010.\r
- */\r
+/** The typed array view types represent a view of an ArrayBuffer that allows for indexing and manipulation. The length of each of\r
+ * these is fixed.\r
+ * \r
+ * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010. */\r
 public class Int32Array extends ArrayBufferView {\r
 \r
-  public static final int BYTES_PER_ELEMENT = 4;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Int32Array create(ArrayBuffer buffer) /*-{\r
-    return new Int32Array(buffer);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Int32Array create(ArrayBuffer buffer,\r
-      int byteOffset) /*-{\r
-    return new Int32Array(buffer, byteOffset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new TypedArray object using the passed ArrayBuffer for its\r
-   * storage. Optional byteOffset and length can be used to limit the section of\r
-   * the buffer referenced. The byteOffset indicates the offset in bytes from\r
-   * the start of the ArrayBuffer, and the length is the count of elements from\r
-   * the offset that this TypedArray will reference. If both byteOffset and\r
-   * length are omitted, the TypedArray spans the entire ArrayBuffer range. If\r
-   * the length is omitted, the TypedArray extends from the given byteOffset\r
-   * until the end of the ArrayBuffer.\r
-   *\r
-   * The given byteOffset must be a multiple of the element size of the specific\r
-   * type, otherwise an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If a given byteOffset and length references an area beyond the end of the\r
-   * ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If length is not explicitly specified, the length of the ArrayBuffer minus\r
-   * the byteOffset must be a multiple of the element size of the specific type,\r
-   * or an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public static final native Int32Array create(ArrayBuffer buffer,\r
-      int byteOffset, int length) /*-{\r
-    return new Int32Array(buffer, byteOffset, length);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final Int32Array create(int[] data) {\r
-    return create(ArrayUtils.toJsArray(data));\r
-  }\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Int32Array create(Int32Array array) /*-{\r
-    return new Int32Array(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold length elements of this\r
-   * typed array, then creates a typed array view referring to the full buffer.\r
-   */\r
-  public static final native Int32Array create(int size) /*-{\r
-    return new Int32Array(size);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Int32Array create(JsArrayInteger data) /*-{\r
-    return new Int32Array(data);\r
-  }-*/;\r
-\r
-  protected Int32Array() {\r
-  }\r
-\r
-  /**\r
-   * Returns the element at the given numeric index.\r
-   */\r
-  public native final int get(int index) /*-{\r
-    return this[index];\r
-  }-*/;\r
-\r
-  /**\r
-   * The length of the TypedArray in elements, as fixed at construction time.\r
-   */\r
-  public final native int getLength() /*-{\r
-    return this.length;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public final void set(int[] array) {\r
-    set(array, 0);\r
-  }\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public final void set(int[] array, int offset) {\r
-    set(ArrayUtils.toJsArray(array), offset);\r
-  }\r
-\r
-  /**\r
-   * @see #set(Int32Array, int)\r
-   * @param array\r
-   */\r
-  public native final void set(Int32Array array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * The two arrays may use the same underlying ArrayBuffer. In this situation,\r
-   * setting the values takes place as if all the data is first copied into a\r
-   * temporary buffer that does not overlap either of the arrays, and then the\r
-   * data from the temporary buffer is copied into the current array.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public native final void set(Int32Array array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Sets the element at the given numeric index to the given value.\r
-   */\r
-  public native final void set(int index, int value) /*-{\r
-    this[index] = value;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public native final void set(JsArrayInteger array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public native final void set(JsArrayInteger array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Returns a new TypedArray view of the ArrayBuffer store for this TypedArray,\r
-   * referencing the elements at begin, inclusive, up to end, exclusive. If\r
-   * either begin or end is negative, it refers to an index from the end of the\r
-   * array, as opposed to from the beginning.\r
-   *\r
-   * If end is unspecified, the subarray contains all elements from begin to the\r
-   * end of the TypedArray.\r
-   *\r
-   * The range specified by the begin and end values is clamped to the valid\r
-   * index range for the current array. If the computed length of the new\r
-   * TypedArray would be negative, it is clamped to zero.\r
-   *\r
-   * The returned TypedArray will be of the same type as the array on which this\r
-   * method is invoked.\r
-   */\r
-  public final native Int32Array subarray(int offset, int length) /*-{\r
-    return this.subarray(offset, length);\r
-  }-*/;\r
+       public static final int BYTES_PER_ELEMENT = 4;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Int32Array create (ArrayBuffer buffer) /*-{\r
+                                                                                                                                                                                       return new Int32Array(buffer);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Int32Array create (ArrayBuffer buffer, int byteOffset) /*-{\r
+                                                                                                                                                                                                                                       return new Int32Array(buffer, byteOffset);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new TypedArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to\r
+        * limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer,\r
+        * and the length is the count of elements from the offset that this TypedArray will reference. If both byteOffset and length\r
+        * are omitted, the TypedArray spans the entire ArrayBuffer range. If the length is omitted, the TypedArray extends from the\r
+        * given byteOffset until the end of the ArrayBuffer.\r
+        * \r
+        * The given byteOffset must be a multiple of the element size of the specific type, otherwise an INDEX_SIZE_ERR exception is\r
+        * raised.\r
+        * \r
+        * If a given byteOffset and length references an area beyond the end of the ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
+        * \r
+        * If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element\r
+        * size of the specific type, or an INDEX_SIZE_ERR exception is raised. */\r
+       public static final native Int32Array create (ArrayBuffer buffer, int byteOffset, int length) /*-{\r
+                                                                                                                                                                                                                                                                       return new Int32Array(buffer, byteOffset, length);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final Int32Array create (int[] data) {\r
+               return create(ArrayUtils.toJsArray(data));\r
+       }\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Int32Array create (Int32Array array) /*-{\r
+                                                                                                                                                                                       return new Int32Array(array);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold length elements of this typed array, then creates a typed array view\r
+        * referring to the full buffer. */\r
+       public static final native Int32Array create (int size) /*-{\r
+                                                                                                                                                               return new Int32Array(size);\r
+                                                                                                                                                               }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Int32Array create (JsArrayInteger data) /*-{\r
+                                                                                                                                                                                               return new Int32Array(data);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       protected Int32Array () {\r
+       }\r
+\r
+       /** Returns the element at the given numeric index. */\r
+       public native final int get (int index) /*-{\r
+                                                                                                                       return this[index];\r
+                                                                                                                       }-*/;\r
+\r
+       /** The length of the TypedArray in elements, as fixed at construction time. */\r
+       public final native int getLength () /*-{\r
+                                                                                                               return this.length;\r
+                                                                                                               }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public final void set (int[] array) {\r
+               set(array, 0);\r
+       }\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public final void set (int[] array, int offset) {\r
+               set(ArrayUtils.toJsArray(array), offset);\r
+       }\r
+\r
+       /** @see #set(Int32Array, int)\r
+        * @param array */\r
+       public native final void set (Int32Array array) /*-{\r
+                                                                                                                                       this.set(array);\r
+                                                                                                                                       }-*/;\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * The two arrays may use the same underlying ArrayBuffer. In this situation, setting the values takes place as if all the data\r
+        * is first copied into a temporary buffer that does not overlap either of the arrays, and then the data from the temporary\r
+        * buffer is copied into the current array.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public native final void set (Int32Array array, int offset) /*-{\r
+                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       /** Sets the element at the given numeric index to the given value. */\r
+       public native final void set (int index, int value) /*-{\r
+                                                                                                                                                       this[index] = value;\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public native final void set (JsArrayInteger array) /*-{\r
+                                                                                                                                                       this.set(array);\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public native final void set (JsArrayInteger array, int offset) /*-{\r
+                                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, referencing the elements at begin, inclusive, up\r
+        * to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from\r
+        * the beginning.\r
+        * \r
+        * If end is unspecified, the subarray contains all elements from begin to the end of the TypedArray.\r
+        * \r
+        * The range specified by the begin and end values is clamped to the valid index range for the current array. If the computed\r
+        * length of the new TypedArray would be negative, it is clamped to zero.\r
+        * \r
+        * The returned TypedArray will be of the same type as the array on which this method is invoked. */\r
+       public final native Int32Array subarray (int offset, int length) /*-{\r
+                                                                                                                                                                                       return this.subarray(offset, length);\r
+                                                                                                                                                                                       }-*/;\r
 }\r
index e4f8cb9..f40f0ec 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JsArrayInteger;\r
+package com.google.gwt.typedarrays.client;\r
 \r
-/**\r
- * The typed array view types represent a view of an ArrayBuffer that allows for\r
- * indexing and manipulation. The length of each of these is fixed.\r
- *\r
- * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010.\r
- */\r
+/** The typed array view types represent a view of an ArrayBuffer that allows for indexing and manipulation. The length of each of\r
+ * these is fixed.\r
+ * \r
+ * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010. */\r
 public class Int8Array extends ArrayBufferView {\r
 \r
-  public static final int BYTES_PER_ELEMENT = 2;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Int8Array create(ArrayBuffer buffer) /*-{\r
-    return new Int8Array(buffer);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Int8Array create(ArrayBuffer buffer,\r
-      int byteOffset) /*-{\r
-    return new Int8Array(buffer, byteOffset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new TypedArray object using the passed ArrayBuffer for its\r
-   * storage. Optional byteOffset and length can be used to limit the section of\r
-   * the buffer referenced. The byteOffset indicates the offset in bytes from\r
-   * the start of the ArrayBuffer, and the length is the count of elements from\r
-   * the offset that this TypedArray will reference. If both byteOffset and\r
-   * length are omitted, the TypedArray spans the entire ArrayBuffer range. If\r
-   * the length is omitted, the TypedArray extends from the given byteOffset\r
-   * until the end of the ArrayBuffer.\r
-   *\r
-   * The given byteOffset must be a multiple of the element size of the specific\r
-   * type, otherwise an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If a given byteOffset and length references an area beyond the end of the\r
-   * ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If length is not explicitly specified, the length of the ArrayBuffer minus\r
-   * the byteOffset must be a multiple of the element size of the specific type,\r
-   * or an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public static final native Int8Array create(ArrayBuffer buffer,\r
-      int byteOffset, int length) /*-{\r
-    return new Int8Array(buffer, byteOffset, length);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final Int8Array create(int[] data) {\r
-    return create(ArrayUtils.toJsArray(data));\r
-  }\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Int8Array create(Int8Array array) /*-{\r
-    return new Int8Array(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold length elements of this\r
-   * typed array, then creates a typed array view referring to the full buffer.\r
-   */\r
-  public static final native Int8Array create(int size) /*-{\r
-    return new Int8Array(size);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Int8Array create(JsArrayInteger data) /*-{\r
-    return new Int8Array(data);\r
-  }-*/;\r
-\r
-  protected Int8Array() {\r
-  }\r
-\r
-  /**\r
-   * Returns the element at the given numeric index.\r
-   */\r
-  public native final int get(int index) /*-{\r
-    return this[index];\r
-  }-*/;\r
-\r
-  /**\r
-   * The length of the TypedArray in elements, as fixed at construction time.\r
-   */\r
-  public final native int getLength() /*-{\r
-    return this.length;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public final void set(int[] array) {\r
-    set(array, 0);\r
-  }\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public final void set(int[] array, int offset) {\r
-    set(ArrayUtils.toJsArray(array), offset);\r
-  }\r
-\r
-  /**\r
-   * @see #set(Int8Array, int)\r
-   * @param array\r
-   */\r
-  public native final void set(Int8Array array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * The two arrays may use the same underlying ArrayBuffer. In this situation,\r
-   * setting the values takes place as if all the data is first copied into a\r
-   * temporary buffer that does not overlap either of the arrays, and then the\r
-   * data from the temporary buffer is copied into the current array.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public native final void set(Int8Array array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Sets the element at the given numeric index to the given value.\r
-   */\r
-  public native final void set(int index, int value) /*-{\r
-    this[index] = value;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public native final void set(JsArrayInteger array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public native final void set(JsArrayInteger array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Returns a new TypedArray view of the ArrayBuffer store for this TypedArray,\r
-   * referencing the elements at begin, inclusive, up to end, exclusive. If\r
-   * either begin or end is negative, it refers to an index from the end of the\r
-   * array, as opposed to from the beginning.\r
-   *\r
-   * If end is unspecified, the subarray contains all elements from begin to the\r
-   * end of the TypedArray.\r
-   *\r
-   * The range specified by the begin and end values is clamped to the valid\r
-   * index range for the current array. If the computed length of the new\r
-   * TypedArray would be negative, it is clamped to zero.\r
-   *\r
-   * The returned TypedArray will be of the same type as the array on which this\r
-   * method is invoked.\r
-   */\r
-  public final native Int8Array subarray(int offset, int length) /*-{\r
-    return this.subarray(offset, length);\r
-  }-*/;\r
+       public static final int BYTES_PER_ELEMENT = 2;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Int8Array create (ArrayBuffer buffer) /*-{\r
+                                                                                                                                                                                       return new Int8Array(buffer);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Int8Array create (ArrayBuffer buffer, int byteOffset) /*-{\r
+                                                                                                                                                                                                                               return new Int8Array(buffer, byteOffset);\r
+                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Create a new TypedArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to\r
+        * limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer,\r
+        * and the length is the count of elements from the offset that this TypedArray will reference. If both byteOffset and length\r
+        * are omitted, the TypedArray spans the entire ArrayBuffer range. If the length is omitted, the TypedArray extends from the\r
+        * given byteOffset until the end of the ArrayBuffer.\r
+        * \r
+        * The given byteOffset must be a multiple of the element size of the specific type, otherwise an INDEX_SIZE_ERR exception is\r
+        * raised.\r
+        * \r
+        * If a given byteOffset and length references an area beyond the end of the ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
+        * \r
+        * If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element\r
+        * size of the specific type, or an INDEX_SIZE_ERR exception is raised. */\r
+       public static final native Int8Array create (ArrayBuffer buffer, int byteOffset, int length) /*-{\r
+                                                                                                                                                                                                                                                               return new Int8Array(buffer, byteOffset, length);\r
+                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final Int8Array create (int[] data) {\r
+               return create(ArrayUtils.toJsArray(data));\r
+       }\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Int8Array create (Int8Array array) /*-{\r
+                                                                                                                                                                               return new Int8Array(array);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold length elements of this typed array, then creates a typed array view\r
+        * referring to the full buffer. */\r
+       public static final native Int8Array create (int size) /*-{\r
+                                                                                                                                                               return new Int8Array(size);\r
+                                                                                                                                                               }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Int8Array create (JsArrayInteger data) /*-{\r
+                                                                                                                                                                                       return new Int8Array(data);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       protected Int8Array () {\r
+       }\r
+\r
+       /** Returns the element at the given numeric index. */\r
+       public native final int get (int index) /*-{\r
+                                                                                                                       return this[index];\r
+                                                                                                                       }-*/;\r
+\r
+       /** The length of the TypedArray in elements, as fixed at construction time. */\r
+       public final native int getLength () /*-{\r
+                                                                                                               return this.length;\r
+                                                                                                               }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public final void set (int[] array) {\r
+               set(array, 0);\r
+       }\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public final void set (int[] array, int offset) {\r
+               set(ArrayUtils.toJsArray(array), offset);\r
+       }\r
+\r
+       /** @see #set(Int8Array, int)\r
+        * @param array */\r
+       public native final void set (Int8Array array) /*-{\r
+                                                                                                                                       this.set(array);\r
+                                                                                                                                       }-*/;\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * The two arrays may use the same underlying ArrayBuffer. In this situation, setting the values takes place as if all the data\r
+        * is first copied into a temporary buffer that does not overlap either of the arrays, and then the data from the temporary\r
+        * buffer is copied into the current array.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public native final void set (Int8Array array, int offset) /*-{\r
+                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       /** Sets the element at the given numeric index to the given value. */\r
+       public native final void set (int index, int value) /*-{\r
+                                                                                                                                                       this[index] = value;\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public native final void set (JsArrayInteger array) /*-{\r
+                                                                                                                                                       this.set(array);\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public native final void set (JsArrayInteger array, int offset) /*-{\r
+                                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, referencing the elements at begin, inclusive, up\r
+        * to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from\r
+        * the beginning.\r
+        * \r
+        * If end is unspecified, the subarray contains all elements from begin to the end of the TypedArray.\r
+        * \r
+        * The range specified by the begin and end values is clamped to the valid index range for the current array. If the computed\r
+        * length of the new TypedArray would be negative, it is clamped to zero.\r
+        * \r
+        * The returned TypedArray will be of the same type as the array on which this method is invoked. */\r
+       public final native Int8Array subarray (int offset, int length) /*-{\r
+                                                                                                                                                                                       return this.subarray(offset, length);\r
+                                                                                                                                                                                       }-*/;\r
 }\r
index a6cfce9..cf040c2 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JsArrayInteger;\r
-\r
 /** The typed array view types represent a view of an ArrayBuffer that allows for indexing and manipulation. The length of each of\r
  * these is fixed.\r
  * \r
@@ -28,13 +26,13 @@ public class Uint16Array extends ArrayBufferView {
 \r
        /** @see #create(ArrayBuffer, int, int) */\r
        public static final native Uint16Array create (ArrayBuffer buffer) /*-{\r
-               return new Uint16Array(buffer);\r
-       }-*/;\r
+                                                                                                                                                                                               return new Uint16Array(buffer);\r
+                                                                                                                                                                                               }-*/;\r
 \r
        /** @see #create(ArrayBuffer, int, int) */\r
        public static final native Uint16Array create (ArrayBuffer buffer, int byteOffset) /*-{\r
-               return new Uint16Array(buffer, byteOffset);\r
-       }-*/;\r
+                                                                                                                                                                                                                                       return new Uint16Array(buffer, byteOffset);\r
+                                                                                                                                                                                                                                       }-*/;\r
 \r
        /** Create a new TypedArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to\r
         * limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer,\r
@@ -50,8 +48,8 @@ public class Uint16Array extends ArrayBufferView {
         * If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element\r
         * size of the specific type, or an INDEX_SIZE_ERR exception is raised. */\r
        public static final native Uint16Array create (ArrayBuffer buffer, int byteOffset, int length) /*-{\r
-               return new Uint16Array(buffer, byteOffset, length);\r
-       }-*/;\r
+                                                                                                                                                                                                                                                                       return new Uint16Array(buffer, byteOffset, length);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
 \r
        /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
         * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
@@ -68,34 +66,34 @@ public class Uint16Array extends ArrayBufferView {
         * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
         * sequence, with each element converted to the appropriate typed array type. */\r
        public static final native Uint16Array create (Uint16Array array) /*-{\r
-               return new Uint16Array(array);\r
-       }-*/;\r
+                                                                                                                                                                                       return new Uint16Array(array);\r
+                                                                                                                                                                                       }-*/;\r
 \r
        /** Create a new ArrayBuffer with enough bytes to hold length elements of this typed array, then creates a typed array view\r
         * referring to the full buffer. */\r
        public static final native Uint16Array create (int size) /*-{\r
-               return new Uint16Array(size);\r
-       }-*/;\r
+                                                                                                                                                               return new Uint16Array(size);\r
+                                                                                                                                                               }-*/;\r
 \r
        /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
         * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
         * sequence, with each element converted to the appropriate typed array type. */\r
        public static final native Uint16Array create (JsArrayInteger data) /*-{\r
-               return new Uint16Array(data);\r
-       }-*/;\r
+                                                                                                                                                                                               return new Uint16Array(data);\r
+                                                                                                                                                                                               }-*/;\r
 \r
        protected Uint16Array () {\r
        }\r
 \r
        /** Returns the element at the given numeric index. */\r
        public native final int get (int index) /*-{\r
-               return this[index];\r
-       }-*/;\r
+                                                                                                                       return this[index];\r
+                                                                                                                       }-*/;\r
 \r
        /** The length of the TypedArray in elements, as fixed at construction time. */\r
        public final native int getLength () /*-{\r
-               return this.length;\r
-       }-*/;\r
+                                                                                                               return this.length;\r
+                                                                                                               }-*/;\r
 \r
        /** @see #set(int[], int) */\r
        public final void set (int[] array) {\r
@@ -114,8 +112,8 @@ public class Uint16Array extends ArrayBufferView {
        /** @see #set(Uint16Array, int)\r
         * @param array */\r
        public native final void set (Uint16Array array) /*-{\r
-               this.set(array);\r
-       }-*/;\r
+                                                                                                                                               this.set(array);\r
+                                                                                                                                               }-*/;\r
 \r
        /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
         * where values are written. If omitted, it is assumed to be 0.\r
@@ -127,23 +125,23 @@ public class Uint16Array extends ArrayBufferView {
         * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
         * raised. */\r
        public native final void set (Uint16Array array, int offset) /*-{\r
-               this.set(array, offset);\r
-       }-*/;\r
+                                                                                                                                                                               this.set(array, offset);\r
+                                                                                                                                                                               }-*/;\r
 \r
        /** Sets the element at the given numeric index to the given value. */\r
        public native final void set (int index, int value) /*-{\r
-               this[index] = value;\r
-       }-*/;\r
+                                                                                                                                                       this[index] = value;\r
+                                                                                                                                                       }-*/;\r
 \r
        /** @see #set(int[], int) */\r
        public native final void set (JsArrayInteger array) /*-{\r
-               this.set(array);\r
-       }-*/;\r
+                                                                                                                                                       this.set(array);\r
+                                                                                                                                                       }-*/;\r
 \r
        /** @see #set(int[], int) */\r
        public native final void set (JsArrayInteger array, int offset) /*-{\r
-               this.set(array, offset);\r
-       }-*/;\r
+                                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                                       }-*/;\r
 \r
        /** Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, referencing the elements at begin, inclusive, up\r
         * to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from\r
@@ -156,6 +154,6 @@ public class Uint16Array extends ArrayBufferView {
         * \r
         * The returned TypedArray will be of the same type as the array on which this method is invoked. */\r
        public final native Uint16Array subarray (int offset, int length) /*-{\r
-               return this.subarray(offset, length);\r
-       }-*/;\r
+                                                                                                                                                                                       return this.subarray(offset, length);\r
+                                                                                                                                                                                       }-*/;\r
 }\r
index 18b1479..7d5cb94 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.typedarrays.client;\r
 \r
-import com.google.gwt.core.client.JsArrayInteger;\r
+package com.google.gwt.typedarrays.client;\r
 \r
-/**\r
- * The typed array view types represent a view of an ArrayBuffer that allows for\r
- * indexing and manipulation. The length of each of these is fixed.\r
- *\r
- * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010.\r
- */\r
+/** The typed array view types represent a view of an ArrayBuffer that allows for indexing and manipulation. The length of each of\r
+ * these is fixed.\r
+ * \r
+ * Taken from the Khronos TypedArrays Draft Spec as of Aug 30, 2010. */\r
 public class Uint8Array extends ArrayBufferView {\r
 \r
-  public static final int BYTES_PER_ELEMENT = 2;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Uint8Array create(ArrayBuffer buffer) /*-{\r
-    return new Uint8Array(buffer);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #create(ArrayBuffer, int, int)\r
-   */\r
-  public static final native Uint8Array create(ArrayBuffer buffer,\r
-      int byteOffset) /*-{\r
-    return new Uint8Array(buffer, byteOffset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new TypedArray object using the passed ArrayBuffer for its\r
-   * storage. Optional byteOffset and length can be used to limit the section of\r
-   * the buffer referenced. The byteOffset indicates the offset in bytes from\r
-   * the start of the ArrayBuffer, and the length is the count of elements from\r
-   * the offset that this TypedArray will reference. If both byteOffset and\r
-   * length are omitted, the TypedArray spans the entire ArrayBuffer range. If\r
-   * the length is omitted, the TypedArray extends from the given byteOffset\r
-   * until the end of the ArrayBuffer.\r
-   *\r
-   * The given byteOffset must be a multiple of the element size of the specific\r
-   * type, otherwise an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If a given byteOffset and length references an area beyond the end of the\r
-   * ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
-   *\r
-   * If length is not explicitly specified, the length of the ArrayBuffer minus\r
-   * the byteOffset must be a multiple of the element size of the specific type,\r
-   * or an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public static final native Uint8Array create(ArrayBuffer buffer,\r
-      int byteOffset, int length) /*-{\r
-    return new Uint8Array(buffer, byteOffset, length);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final Uint8Array create(int[] data) {\r
-    return create(ArrayUtils.toJsArray(data));\r
-  }\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Uint8Array create(Uint8Array array) /*-{\r
-    return new Uint8Array(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold length elements of this\r
-   * typed array, then creates a typed array view referring to the full buffer.\r
-   */\r
-  public static final native Uint8Array create(int size) /*-{\r
-    return new Uint8Array(size);\r
-  }-*/;\r
-\r
-  /**\r
-   * Create a new ArrayBuffer with enough bytes to hold array.length elements of\r
-   * this typed array, then create a typed array view referring to the full\r
-   * buffer. The contents of the new view are initialized to the contents of the\r
-   * given typed array or sequence, with each element converted to the\r
-   * appropriate typed array type.\r
-   */\r
-  public static final native Uint8Array create(JsArrayInteger data) /*-{\r
-    return new Uint8Array(data);\r
-  }-*/;\r
-\r
-  protected Uint8Array() {\r
-  }\r
-\r
-  /**\r
-   * Returns the element at the given numeric index.\r
-   */\r
-  public native final int get(int index) /*-{\r
-    return this[index];\r
-  }-*/;\r
-\r
-  /**\r
-   * The length of the TypedArray in elements, as fixed at construction time.\r
-   */\r
-  public final native int getLength() /*-{\r
-    return this.length;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public final void set(int[] array) {\r
-    set(array, 0);\r
-  }\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public final void set(int[] array, int offset) {\r
-    set(ArrayUtils.toJsArray(array), offset);\r
-  }\r
-\r
-  /**\r
-   * @see #set(Uint8Array, int)\r
-   * @param array\r
-   */\r
-  public native final void set(Uint8Array array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * Set multiple values, reading input values from the array. The optional\r
-   * offset value indicates the index in the current array where values are\r
-   * written. If omitted, it is assumed to be 0.\r
-   *\r
-   * The two arrays may use the same underlying ArrayBuffer. In this situation,\r
-   * setting the values takes place as if all the data is first copied into a\r
-   * temporary buffer that does not overlap either of the arrays, and then the\r
-   * data from the temporary buffer is copied into the current array.\r
-   *\r
-   * If the offset plus the length of the given array is out of range for the\r
-   * current TypedArray, an INDEX_SIZE_ERR exception is raised.\r
-   */\r
-  public native final void set(Uint8Array array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Sets the element at the given numeric index to the given value.\r
-   */\r
-  public native final void set(int index, int value) /*-{\r
-    this[index] = value;\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public native final void set(JsArrayInteger array) /*-{\r
-    this.set(array);\r
-  }-*/;\r
-\r
-  /**\r
-   * @see #set(int[], int)\r
-   */\r
-  public native final void set(JsArrayInteger array, int offset) /*-{\r
-    this.set(array, offset);\r
-  }-*/;\r
-\r
-  /**\r
-   * Returns a new TypedArray view of the ArrayBuffer store for this TypedArray,\r
-   * referencing the elements at begin, inclusive, up to end, exclusive. If\r
-   * either begin or end is negative, it refers to an index from the end of the\r
-   * array, as opposed to from the beginning.\r
-   *\r
-   * If end is unspecified, the subarray contains all elements from begin to the\r
-   * end of the TypedArray.\r
-   *\r
-   * The range specified by the begin and end values is clamped to the valid\r
-   * index range for the current array. If the computed length of the new\r
-   * TypedArray would be negative, it is clamped to zero.\r
-   *\r
-   * The returned TypedArray will be of the same type as the array on which this\r
-   * method is invoked.\r
-   */\r
-  public final native Uint8Array subarray(int offset, int length) /*-{\r
-    return this.subarray(offset, length);\r
-  }-*/;\r
+       public static final int BYTES_PER_ELEMENT = 2;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Uint8Array create (ArrayBuffer buffer) /*-{\r
+                                                                                                                                                                                       return new Uint8Array(buffer);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** @see #create(ArrayBuffer, int, int) */\r
+       public static final native Uint8Array create (ArrayBuffer buffer, int byteOffset) /*-{\r
+                                                                                                                                                                                                                                       return new Uint8Array(buffer, byteOffset);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new TypedArray object using the passed ArrayBuffer for its storage. Optional byteOffset and length can be used to\r
+        * limit the section of the buffer referenced. The byteOffset indicates the offset in bytes from the start of the ArrayBuffer,\r
+        * and the length is the count of elements from the offset that this TypedArray will reference. If both byteOffset and length\r
+        * are omitted, the TypedArray spans the entire ArrayBuffer range. If the length is omitted, the TypedArray extends from the\r
+        * given byteOffset until the end of the ArrayBuffer.\r
+        * \r
+        * The given byteOffset must be a multiple of the element size of the specific type, otherwise an INDEX_SIZE_ERR exception is\r
+        * raised.\r
+        * \r
+        * If a given byteOffset and length references an area beyond the end of the ArrayBuffer an INDEX_SIZE_ERR exception is raised.\r
+        * \r
+        * If length is not explicitly specified, the length of the ArrayBuffer minus the byteOffset must be a multiple of the element\r
+        * size of the specific type, or an INDEX_SIZE_ERR exception is raised. */\r
+       public static final native Uint8Array create (ArrayBuffer buffer, int byteOffset, int length) /*-{\r
+                                                                                                                                                                                                                                                                       return new Uint8Array(buffer, byteOffset, length);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final Uint8Array create (int[] data) {\r
+               return create(ArrayUtils.toJsArray(data));\r
+       }\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Uint8Array create (Uint8Array array) /*-{\r
+                                                                                                                                                                                       return new Uint8Array(array);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold length elements of this typed array, then creates a typed array view\r
+        * referring to the full buffer. */\r
+       public static final native Uint8Array create (int size) /*-{\r
+                                                                                                                                                               return new Uint8Array(size);\r
+                                                                                                                                                               }-*/;\r
+\r
+       /** Create a new ArrayBuffer with enough bytes to hold array.length elements of this typed array, then create a typed array view\r
+        * referring to the full buffer. The contents of the new view are initialized to the contents of the given typed array or\r
+        * sequence, with each element converted to the appropriate typed array type. */\r
+       public static final native Uint8Array create (JsArrayInteger data) /*-{\r
+                                                                                                                                                                                               return new Uint8Array(data);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       protected Uint8Array () {\r
+       }\r
+\r
+       /** Returns the element at the given numeric index. */\r
+       public native final int get (int index) /*-{\r
+                                                                                                                       return this[index];\r
+                                                                                                                       }-*/;\r
+\r
+       /** The length of the TypedArray in elements, as fixed at construction time. */\r
+       public final native int getLength () /*-{\r
+                                                                                                               return this.length;\r
+                                                                                                               }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public final void set (int[] array) {\r
+               set(array, 0);\r
+       }\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public final void set (int[] array, int offset) {\r
+               set(ArrayUtils.toJsArray(array), offset);\r
+       }\r
+\r
+       /** @see #set(Uint8Array, int)\r
+        * @param array */\r
+       public native final void set (Uint8Array array) /*-{\r
+                                                                                                                                       this.set(array);\r
+                                                                                                                                       }-*/;\r
+\r
+       /** Set multiple values, reading input values from the array. The optional offset value indicates the index in the current array\r
+        * where values are written. If omitted, it is assumed to be 0.\r
+        * \r
+        * The two arrays may use the same underlying ArrayBuffer. In this situation, setting the values takes place as if all the data\r
+        * is first copied into a temporary buffer that does not overlap either of the arrays, and then the data from the temporary\r
+        * buffer is copied into the current array.\r
+        * \r
+        * If the offset plus the length of the given array is out of range for the current TypedArray, an INDEX_SIZE_ERR exception is\r
+        * raised. */\r
+       public native final void set (Uint8Array array, int offset) /*-{\r
+                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       /** Sets the element at the given numeric index to the given value. */\r
+       public native final void set (int index, int value) /*-{\r
+                                                                                                                                                       this[index] = value;\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public native final void set (JsArrayInteger array) /*-{\r
+                                                                                                                                                       this.set(array);\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** @see #set(int[], int) */\r
+       public native final void set (JsArrayInteger array, int offset) /*-{\r
+                                                                                                                                                                                       this.set(array, offset);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** Returns a new TypedArray view of the ArrayBuffer store for this TypedArray, referencing the elements at begin, inclusive, up\r
+        * to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from\r
+        * the beginning.\r
+        * \r
+        * If end is unspecified, the subarray contains all elements from begin to the end of the TypedArray.\r
+        * \r
+        * The range specified by the begin and end values is clamped to the valid index range for the current array. If the computed\r
+        * length of the new TypedArray would be negative, it is clamped to zero.\r
+        * \r
+        * The returned TypedArray will be of the same type as the array on which this method is invoked. */\r
+       public final native Uint8Array subarray (int offset, int length) /*-{\r
+                                                                                                                                                                                       return this.subarray(offset, length);\r
+                                                                                                                                                                                       }-*/;\r
 }\r
index 8797ebb..550f611 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
-/**\r
- * The WebGLActiveInfo interface represents the information returned from the\r
- * getActiveAttrib and getActiveUniform calls.\r
- */\r
+/** The WebGLActiveInfo interface represents the information returned from the getActiveAttrib and getActiveUniform calls. */\r
 public class WebGLActiveInfo extends WebGLObject {\r
 \r
-  protected WebGLActiveInfo() {\r
-  }\r
+       protected WebGLActiveInfo () {\r
+       }\r
+\r
+       /** Gets the size of the requested variable. */\r
+       public final native int getSize () /*-{\r
+                                                                                                       return this.size;\r
+                                                                                                       }-*/;\r
+\r
+       /** Gets the name of the requested variable. */\r
+       public final native String getName () /*-{\r
+                                                                                                               return this.name;\r
+                                                                                                               }-*/;\r
 \r
-  /**\r
-   * Gets the size of the requested variable.\r
-   */\r
-  public final native int getSize() /*-{\r
-          return this.size;\r
-  }-*/;\r
-  \r
-  \r
-  /**\r
-   * Gets the name of the requested variable.\r
-   */\r
-  public final native String getName() /*-{\r
-          return this.name;\r
-  }-*/;\r
-  \r
-  public final native int getType() /*-{\r
-          return this.type;\r
-  }-*/;\r
+       public final native int getType () /*-{\r
+                                                                                                       return this.type;\r
+                                                                                                       }-*/;\r
 }\r
index 3c0c3a4..384d5ad 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.webgl.client;\r
 \r
-import com.google.gwt.core.client.JavaScriptObject;\r
+package com.google.gwt.webgl.client;\r
 \r
 public class WebGLBuffer extends JavaScriptObject {\r
 \r
-  protected WebGLBuffer() {\r
-  }\r
+       protected WebGLBuffer () {\r
+       }\r
 }\r
index da297cf..a67b7ab 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.webgl.client;\r
 \r
-import com.google.gwt.core.client.JavaScriptObject;\r
+package com.google.gwt.webgl.client;\r
 \r
-/**\r
- * The WebGLContextAttributes interface contains drawing surface attributes and\r
- * is passed as the second parameter to getContext. A native object may be\r
- * supplied as this parameter; the specified attributes will be queried from\r
- * this object.\r
- */\r
+/** The WebGLContextAttributes interface contains drawing surface attributes and is passed as the second parameter to getContext. A\r
+ * native object may be supplied as this parameter; the specified attributes will be queried from this object. */\r
 public class WebGLContextAttributes extends JavaScriptObject {\r
 \r
-  public static native WebGLContextAttributes create() /*-{\r
-    return { premultipliedAlpha:false };\r
-  }-*/;\r
+       public static native WebGLContextAttributes create () /*-{\r
+                                                                                                                                                       return { premultipliedAlpha:false };\r
+                                                                                                                                                       }-*/;\r
 \r
-  protected WebGLContextAttributes() {\r
-  }\r
+       protected WebGLContextAttributes () {\r
+       }\r
 \r
-  /**\r
-   * Default: true. If the value is true, the drawing buffer has an alpha\r
-   * channel for the purposes of performing OpenGL destination alpha operations\r
-   * and compositing with the page. If the value is false, no alpha buffer is\r
-   * available.\r
-   */\r
-  public final native void setAlpha(boolean alpha) /*-{\r
-    this.alpha = alpha;\r
-  }-*/;\r
+       /** Default: true. If the value is true, the drawing buffer has an alpha channel for the purposes of performing OpenGL\r
+        * destination alpha operations and compositing with the page. If the value is false, no alpha buffer is available. */\r
+       public final native void setAlpha (boolean alpha) /*-{\r
+                                                                                                                                               this.alpha = alpha;\r
+                                                                                                                                               }-*/;\r
 \r
-  public final native void clearAlpha() /*-{\r
-    delete this.alpha;\r
-  }-*/;\r
+       public final native void clearAlpha () /*-{\r
+                                                                                                               delete this.alpha;\r
+                                                                                                               }-*/;\r
 \r
-  /**\r
-   * Default: true. If the value is true, the drawing buffer has a depth buffer\r
-   * of at least 16 bits. If the value is false, no depth buffer is available.\r
-   */\r
-  public final native void setDepth(boolean depth) /*-{\r
-    this.depth = depth;\r
-  }-*/;\r
+       /** Default: true. If the value is true, the drawing buffer has a depth buffer of at least 16 bits. If the value is false, no\r
+        * depth buffer is available. */\r
+       public final native void setDepth (boolean depth) /*-{\r
+                                                                                                                                               this.depth = depth;\r
+                                                                                                                                               }-*/;\r
 \r
-  public final native void clearDepth() /*-{\r
-    delete this.depth;\r
-  }-*/;\r
+       public final native void clearDepth () /*-{\r
+                                                                                                               delete this.depth;\r
+                                                                                                               }-*/;\r
 \r
-  /**\r
-   * Default: false. If the value is true, the drawing buffer has a stencil\r
-   * buffer of at least 8 bits. If the value is false, no stencil buffer is\r
-   * available.\r
-   */\r
-  public final native void setStencil(boolean stencil) /*-{\r
-    this.stencil = stencil;\r
-  }-*/;\r
+       /** Default: false. If the value is true, the drawing buffer has a stencil buffer of at least 8 bits. If the value is false, no\r
+        * stencil buffer is available. */\r
+       public final native void setStencil (boolean stencil) /*-{\r
+                                                                                                                                                       this.stencil = stencil;\r
+                                                                                                                                                       }-*/;\r
 \r
-  public final native void clearStencil() /*-{\r
-    delete this.stencil;\r
-  }-*/;\r
+       public final native void clearStencil () /*-{\r
+                                                                                                                       delete this.stencil;\r
+                                                                                                                       }-*/;\r
 \r
-  /**\r
-   * Default: true. If the value is true and the implementation supports\r
-   * antialiasing the drawing buffer will perform antialiasing using its choice\r
-   * of technique (multisample/supersample) and quality. If the value is false\r
-   * or the implementation does not support antialiasing, no antialiasing is\r
-   * performed.\r
-   */\r
-  public final native void setAntialias(boolean antialias) /*-{\r
-    this.antialias = antialias;\r
-  }-*/;\r
+       /** Default: true. If the value is true and the implementation supports antialiasing the drawing buffer will perform\r
+        * antialiasing using its choice of technique (multisample/supersample) and quality. If the value is false or the\r
+        * implementation does not support antialiasing, no antialiasing is performed. */\r
+       public final native void setAntialias (boolean antialias) /*-{\r
+                                                                                                                                                                       this.antialias = antialias;\r
+                                                                                                                                                                       }-*/;\r
 \r
-  public final native void clearAntialias() /*-{\r
-    delete this.antialias;\r
-  }-*/;\r
+       public final native void clearAntialias () /*-{\r
+                                                                                                                               delete this.antialias;\r
+                                                                                                                               }-*/;\r
 \r
-  /**\r
-   * Default: true. If the value is true the page compositor will assume the\r
-   * drawing buffer contains colors with premultiplied alpha. If the value is\r
-   * false the page compositor will assume that colors in the drawing buffer are\r
-   * not premultiplied. This flag is ignored if the alpha flag is false. See\r
-   * Premultiplied Alpha for more information on the effects of the\r
-   * premultipliedAlpha flag.\r
-   */\r
-  public final native void setPremultipliedAlpha(boolean premultipliedAlpha) /*-{\r
-    this.premultipliedAlpha = premultipliedAlpha;\r
-  }-*/;\r
+       /** Default: true. If the value is true the page compositor will assume the drawing buffer contains colors with premultiplied\r
+        * alpha. If the value is false the page compositor will assume that colors in the drawing buffer are not premultiplied. This\r
+        * flag is ignored if the alpha flag is false. See Premultiplied Alpha for more information on the effects of the\r
+        * premultipliedAlpha flag. */\r
+       public final native void setPremultipliedAlpha (boolean premultipliedAlpha) /*-{\r
+                                                                                                                                                                                                                       this.premultipliedAlpha = premultipliedAlpha;\r
+                                                                                                                                                                                                                       }-*/;\r
 \r
-  public final native void clearPremultipliedAlpha() /*-{\r
-    delete this.premultipliedAlpha;\r
-  }-*/;\r
+       public final native void clearPremultipliedAlpha () /*-{\r
+                                                                                                                                                       delete this.premultipliedAlpha;\r
+                                                                                                                                                       }-*/;\r
 }\r
index a4ef4c8..c477aa7 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
 public class WebGLFramebuffer extends WebGLObject {\r
 \r
-  protected WebGLFramebuffer() {\r
-  }\r
-}
\ No newline at end of file
+       protected WebGLFramebuffer () {\r
+       }\r
+}\r
index e76badc..975d115 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
-package com.google.gwt.webgl.client;\r
 \r
-import com.google.gwt.core.client.JavaScriptObject;\r
+package com.google.gwt.webgl.client;\r
 \r
 public class WebGLObject extends JavaScriptObject {\r
 \r
-  protected WebGLObject() {\r
-  }\r
+       protected WebGLObject () {\r
+       }\r
 }\r
index ffb22e0..27b3ac4 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
 public class WebGLProgram extends WebGLObject {\r
 \r
-  protected WebGLProgram() {\r
-  }\r
+       protected WebGLProgram () {\r
+       }\r
 }\r
index eb29d51..17f4bad 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
 public class WebGLRenderbuffer extends WebGLObject {\r
 \r
-  protected WebGLRenderbuffer() {\r
-  }\r
+       protected WebGLRenderbuffer () {\r
+       }\r
 }\r
index 492078e..cb7e62f 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
-import com.google.gwt.canvas.dom.client.ImageData;\r
-import com.google.gwt.core.client.JavaScriptObject;\r
-import com.google.gwt.core.client.JsArray;\r
-import com.google.gwt.core.client.JsArrayString;\r
-import com.google.gwt.dom.client.CanvasElement;\r
-import com.google.gwt.dom.client.ImageElement;\r
-import com.google.gwt.dom.client.VideoElement;\r
 import com.google.gwt.typedarrays.client.ArrayBuffer;\r
 import com.google.gwt.typedarrays.client.ArrayBufferView;\r
 import com.google.gwt.typedarrays.client.ArrayUtils;\r
 import com.google.gwt.typedarrays.client.Float32Array;\r
 import com.google.gwt.typedarrays.client.Int32Array;\r
 \r
-/**\r
- * TODO: Lots more documentation needed here.\r
- *\r
+/** TODO: Lots more documentation needed here.\r
+ * \r
  * Taken from the WebGL Draft Spec as of Aug 30, 2010:\r
- * https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html\r
- * TODO: Update this to the Feb 11 version.\r
- */\r
+ * https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html TODO: Update this to the Feb 11 version. */\r
 public class WebGLRenderingContext extends JavaScriptObject {\r
 \r
-  /* ClearBufferMask */\r
-  public static final int DEPTH_BUFFER_BIT = 0x00000100;\r
-  public static final int STENCIL_BUFFER_BIT = 0x00000400;\r
-  public static final int COLOR_BUFFER_BIT = 0x00004000;\r
-\r
-  /* BeginMode */\r
-  public static final int POINTS = 0x0000;\r
-  public static final int LINES = 0x0001;\r
-  public static final int LINE_LOOP = 0x0002;\r
-  public static final int LINE_STRIP = 0x0003;\r
-  public static final int TRIANGLES = 0x0004;\r
-  public static final int TRIANGLE_STRIP = 0x0005;\r
-  public static final int TRIANGLE_FAN = 0x0006;\r
-\r
-  /* AlphaFunction (not supported in ES20) */\r
-  /* NEVER */\r
-  /* LESS */\r
-  /* EQUAL */\r
-  /* LEQUAL */\r
-  /* GREATER */\r
-  /* NOTEQUAL */\r
-  /* GEQUAL */\r
-  /* ALWAYS */\r
-\r
-  /* BlendingFactorDest */\r
-  public static final int ZERO = 0;\r
-  public static final int ONE = 1;\r
-  public static final int SRC_COLOR = 0x0300;\r
-  public static final int ONE_MINUS_SRC_COLOR = 0x0301;\r
-  public static final int SRC_ALPHA = 0x0302;\r
-  public static final int ONE_MINUS_SRC_ALPHA = 0x0303;\r
-  public static final int DST_ALPHA = 0x0304;\r
-  public static final int ONE_MINUS_DST_ALPHA = 0x0305;\r
-\r
-  /* BlendingFactorSrc */\r
-  /* ZERO */\r
-  /* ONE */\r
-  public static final int DST_COLOR = 0x0306;\r
-  public static final int ONE_MINUS_DST_COLOR = 0x0307;\r
-  public static final int SRC_ALPHA_SATURATE = 0x0308;\r
-  /* SRC_ALPHA */\r
-  /* ONE_MINUS_SRC_ALPHA */\r
-  /* DST_ALPHA */\r
-  /* ONE_MINUS_DST_ALPHA */\r
-\r
-  /* BlendEquationSeparate */\r
-  public static final int FUNC_ADD = 0x8006;\r
-  public static final int BLEND_EQUATION = 0x8009;\r
-  public static final int BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */\r
-  public static final int BLEND_EQUATION_ALPHA = 0x883D;\r
-\r
-  /* BlendSubtract */\r
-  public static final int FUNC_SUBTRACT = 0x800A;\r
-  public static final int FUNC_REVERSE_SUBTRACT = 0x800B;\r
-\r
-  /* Separate Blend Functions */\r
-  public static final int BLEND_DST_RGB = 0x80C8;\r
-  public static final int BLEND_SRC_RGB = 0x80C9;\r
-  public static final int BLEND_DST_ALPHA = 0x80CA;\r
-  public static final int BLEND_SRC_ALPHA = 0x80CB;\r
-  public static final int CONSTANT_COLOR = 0x8001;\r
-  public static final int ONE_MINUS_CONSTANT_COLOR = 0x8002;\r
-  public static final int CONSTANT_ALPHA = 0x8003;\r
-  public static final int ONE_MINUS_CONSTANT_ALPHA = 0x8004;\r
-  public static final int BLEND_COLOR = 0x8005;\r
-\r
-  /* Buffer Objects */\r
-  public static final int ARRAY_BUFFER = 0x8892;\r
-  public static final int ELEMENT_ARRAY_BUFFER = 0x8893;\r
-  public static final int ARRAY_BUFFER_BINDING = 0x8894;\r
-  public static final int ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;\r
-\r
-  public static final int STREAM_DRAW = 0x88E0;\r
-  public static final int STATIC_DRAW = 0x88E4;\r
-  public static final int DYNAMIC_DRAW = 0x88E8;\r
-\r
-  public static final int BUFFER_SIZE = 0x8764;\r
-  public static final int BUFFER_USAGE = 0x8765;\r
-\r
-  public static final int CURRENT_VERTEX_ATTRIB = 0x8626;\r
-\r
-  /* CullFaceMode */\r
-  public static final int FRONT = 0x0404;\r
-  public static final int BACK = 0x0405;\r
-  public static final int FRONT_AND_BACK = 0x0408;\r
-\r
-  /* DepthFunction */\r
-  /* NEVER */\r
-  /* LESS */\r
-  /* EQUAL */\r
-  /* LEQUAL */\r
-  /* GREATER */\r
-  /* NOTEQUAL */\r
-  /* GEQUAL */\r
-  /* ALWAYS */\r
-\r
-  /* EnableCap */\r
-  public static final int TEXTURE_2D = 0x0DE1;\r
-  public static final int CULL_FACE = 0x0B44;\r
-  public static final int BLEND = 0x0BE2;\r
-  public static final int DITHER = 0x0BD0;\r
-  public static final int STENCIL_TEST = 0x0B90;\r
-  public static final int DEPTH_TEST = 0x0B71;\r
-  public static final int SCISSOR_TEST = 0x0C11;\r
-  public static final int POLYGON_OFFSET_FILL = 0x8037;\r
-  public static final int SAMPLE_ALPHA_TO_COVERAGE = 0x809E;\r
-  public static final int SAMPLE_COVERAGE = 0x80A0;\r
-\r
-  /* ErrorCode */\r
-  public static final int NO_ERROR = 0;\r
-  public static final int INVALID_ENUM = 0x0500;\r
-  public static final int INVALID_VALUE = 0x0501;\r
-  public static final int INVALID_OPERATION = 0x0502;\r
-  public static final int OUT_OF_MEMORY = 0x0505;\r
-\r
-  /* FrontFaceDirection */\r
-  public static final int CW = 0x0900;\r
-  public static final int CCW = 0x0901;\r
-\r
-  /* GetPName */\r
-  public static final int LINE_WIDTH = 0x0B21;\r
-  public static final int ALIASED_POINT_SIZE_RANGE = 0x846D;\r
-  public static final int ALIASED_LINE_WIDTH_RANGE = 0x846E;\r
-  public static final int CULL_FACE_MODE = 0x0B45;\r
-  public static final int FRONT_FACE = 0x0B46;\r
-  public static final int DEPTH_RANGE = 0x0B70;\r
-  public static final int DEPTH_WRITEMASK = 0x0B72;\r
-  public static final int DEPTH_CLEAR_VALUE = 0x0B73;\r
-  public static final int DEPTH_FUNC = 0x0B74;\r
-  public static final int STENCIL_CLEAR_VALUE = 0x0B91;\r
-  public static final int STENCIL_FUNC = 0x0B92;\r
-  public static final int STENCIL_FAIL = 0x0B94;\r
-  public static final int STENCIL_PASS_DEPTH_FAIL = 0x0B95;\r
-  public static final int STENCIL_PASS_DEPTH_PASS = 0x0B96;\r
-  public static final int STENCIL_REF = 0x0B97;\r
-  public static final int STENCIL_VALUE_MASK = 0x0B93;\r
-  public static final int STENCIL_WRITEMASK = 0x0B98;\r
-  public static final int STENCIL_BACK_FUNC = 0x8800;\r
-  public static final int STENCIL_BACK_FAIL = 0x8801;\r
-  public static final int STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;\r
-  public static final int STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;\r
-  public static final int STENCIL_BACK_REF = 0x8CA3;\r
-  public static final int STENCIL_BACK_VALUE_MASK = 0x8CA4;\r
-  public static final int STENCIL_BACK_WRITEMASK = 0x8CA5;\r
-  public static final int VIEWPORT = 0x0BA2;\r
-  public static final int SCISSOR_BOX = 0x0C10;\r
-  /* SCISSOR_TEST */\r
-  public static final int COLOR_CLEAR_VALUE = 0x0C22;\r
-  public static final int COLOR_WRITEMASK = 0x0C23;\r
-  public static final int UNPACK_ALIGNMENT = 0x0CF5;\r
-  public static final int PACK_ALIGNMENT = 0x0D05;\r
-  public static final int MAX_TEXTURE_SIZE = 0x0D33;\r
-  public static final int MAX_VIEWPORT_DIMS = 0x0D3A;\r
-  public static final int SUBPIXEL_BITS = 0x0D50;\r
-  public static final int RED_BITS = 0x0D52;\r
-  public static final int GREEN_BITS = 0x0D53;\r
-  public static final int BLUE_BITS = 0x0D54;\r
-  public static final int ALPHA_BITS = 0x0D55;\r
-  public static final int DEPTH_BITS = 0x0D56;\r
-  public static final int STENCIL_BITS = 0x0D57;\r
-  public static final int POLYGON_OFFSET_UNITS = 0x2A00;\r
-  /* POLYGON_OFFSET_FILL */\r
-  public static final int POLYGON_OFFSET_FACTOR = 0x8038;\r
-  public static final int TEXTURE_BINDING_2D = 0x8069;\r
-  public static final int SAMPLE_BUFFERS = 0x80A8;\r
-  public static final int SAMPLES = 0x80A9;\r
-  public static final int SAMPLE_COVERAGE_VALUE = 0x80AA;\r
-  public static final int SAMPLE_COVERAGE_INVERT = 0x80AB;\r
-\r
-  /* GetTextureParameter */\r
-  /* TEXTURE_MAG_FILTER */\r
-  /* TEXTURE_MIN_FILTER */\r
-  /* TEXTURE_WRAP_S */\r
-  /* TEXTURE_WRAP_T */\r
-\r
-  public static final int NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;\r
-  public static final int COMPRESSED_TEXTURE_FORMATS = 0x86A3;\r
-\r
-  /* HintMode */\r
-  public static final int DONT_CARE = 0x1100;\r
-  public static final int FASTEST = 0x1101;\r
-  public static final int NICEST = 0x1102;\r
-\r
-  /* HintTarget */\r
-  public static final int GENERATE_MIPMAP_HINT = 0x8192;\r
-\r
-  /* DataType */\r
-  public static final int BYTE = 0x1400;\r
-  public static final int UNSIGNED_BYTE = 0x1401;\r
-  public static final int SHORT = 0x1402;\r
-  public static final int UNSIGNED_SHORT = 0x1403;\r
-  public static final int INT = 0x1404;\r
-  public static final int UNSIGNED_INT = 0x1405;\r
-  public static final int FLOAT = 0x1406;\r
-\r
-  /* PixelFormat */\r
-  public static final int DEPTH_COMPONENT = 0x1902;\r
-  public static final int ALPHA = 0x1906;\r
-  public static final int RGB = 0x1907;\r
-  public static final int RGBA = 0x1908;\r
-  public static final int LUMINANCE = 0x1909;\r
-  public static final int LUMINANCE_ALPHA = 0x190A;\r
-\r
-  /* PixelType */\r
-  /* UNSIGNED_BYTE */\r
-  public static final int UNSIGNED_SHORT_4_4_4_4 = 0x8033;\r
-  public static final int UNSIGNED_SHORT_5_5_5_1 = 0x8034;\r
-  public static final int UNSIGNED_SHORT_5_6_5 = 0x8363;\r
-\r
-  /* Shaders */\r
-  public static final int FRAGMENT_SHADER = 0x8B30;\r
-  public static final int VERTEX_SHADER = 0x8B31;\r
-  public static final int MAX_VERTEX_ATTRIBS = 0x8869;\r
-  public static final int MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;\r
-  public static final int MAX_VARYING_VECTORS = 0x8DFC;\r
-  public static final int MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;\r
-  public static final int MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;\r
-  public static final int MAX_TEXTURE_IMAGE_UNITS = 0x8872;\r
-  public static final int MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;\r
-  public static final int SHADER_TYPE = 0x8B4F;\r
-  public static final int DELETE_STATUS = 0x8B80;\r
-  public static final int LINK_STATUS = 0x8B82;\r
-  public static final int VALIDATE_STATUS = 0x8B83;\r
-  public static final int ATTACHED_SHADERS = 0x8B85;\r
-  public static final int ACTIVE_UNIFORMS = 0x8B86;\r
-  public static final int ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;\r
-  public static final int ACTIVE_ATTRIBUTES = 0x8B89;\r
-  public static final int ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;\r
-  public static final int SHADING_LANGUAGE_VERSION = 0x8B8C;\r
-  public static final int CURRENT_PROGRAM = 0x8B8D;\r
-\r
-  /* StencilFunction */\r
-  public static final int NEVER = 0x0200;\r
-  public static final int LESS = 0x0201;\r
-  public static final int EQUAL = 0x0202;\r
-  public static final int LEQUAL = 0x0203;\r
-  public static final int GREATER = 0x0204;\r
-  public static final int NOTEQUAL = 0x0205;\r
-  public static final int GEQUAL = 0x0206;\r
-  public static final int ALWAYS = 0x0207;\r
-\r
-  /* StencilOp */\r
-  /* ZERO */\r
-  public static final int KEEP = 0x1E00;\r
-  public static final int REPLACE = 0x1E01;\r
-  public static final int INCR = 0x1E02;\r
-  public static final int DECR = 0x1E03;\r
-  public static final int INVERT = 0x150A;\r
-  public static final int INCR_WRAP = 0x8507;\r
-  public static final int DECR_WRAP = 0x8508;\r
-\r
-  /* StringName */\r
-  public static final int VENDOR = 0x1F00;\r
-  public static final int RENDERER = 0x1F01;\r
-  public static final int VERSION = 0x1F02;\r
-\r
-  /* TextureMagFilter */\r
-  public static final int NEAREST = 0x2600;\r
-  public static final int LINEAR = 0x2601;\r
-\r
-  /* TextureMinFilter */\r
-  /* NEAREST */\r
-  /* LINEAR */\r
-  public static final int NEAREST_MIPMAP_NEAREST = 0x2700;\r
-  public static final int LINEAR_MIPMAP_NEAREST = 0x2701;\r
-  public static final int NEAREST_MIPMAP_LINEAR = 0x2702;\r
-  public static final int LINEAR_MIPMAP_LINEAR = 0x2703;\r
-\r
-  /* TextureParameterName */\r
-  public static final int TEXTURE_MAG_FILTER = 0x2800;\r
-  public static final int TEXTURE_MIN_FILTER = 0x2801;\r
-  public static final int TEXTURE_WRAP_S = 0x2802;\r
-  public static final int TEXTURE_WRAP_T = 0x2803;\r
-\r
-  /* TextureTarget */\r
-  /* TEXTURE_2D */\r
-  public static final int TEXTURE = 0x1702;\r
-\r
-  public static final int TEXTURE_CUBE_MAP = 0x8513;\r
-  public static final int TEXTURE_BINDING_CUBE_MAP = 0x8514;\r
-  public static final int TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;\r
-  public static final int TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;\r
-  public static final int TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;\r
-  public static final int TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;\r
-  public static final int TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;\r
-  public static final int TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;\r
-  public static final int MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;\r
-\r
-  /* TextureUnit */\r
-  public static final int TEXTURE0 = 0x84C0;\r
-  public static final int TEXTURE1 = 0x84C1;\r
-  public static final int TEXTURE2 = 0x84C2;\r
-  public static final int TEXTURE3 = 0x84C3;\r
-  public static final int TEXTURE4 = 0x84C4;\r
-  public static final int TEXTURE5 = 0x84C5;\r
-  public static final int TEXTURE6 = 0x84C6;\r
-  public static final int TEXTURE7 = 0x84C7;\r
-  public static final int TEXTURE8 = 0x84C8;\r
-  public static final int TEXTURE9 = 0x84C9;\r
-  public static final int TEXTURE10 = 0x84CA;\r
-  public static final int TEXTURE11 = 0x84CB;\r
-  public static final int TEXTURE12 = 0x84CC;\r
-  public static final int TEXTURE13 = 0x84CD;\r
-  public static final int TEXTURE14 = 0x84CE;\r
-  public static final int TEXTURE15 = 0x84CF;\r
-  public static final int TEXTURE16 = 0x84D0;\r
-  public static final int TEXTURE17 = 0x84D1;\r
-  public static final int TEXTURE18 = 0x84D2;\r
-  public static final int TEXTURE19 = 0x84D3;\r
-  public static final int TEXTURE20 = 0x84D4;\r
-  public static final int TEXTURE21 = 0x84D5;\r
-  public static final int TEXTURE22 = 0x84D6;\r
-  public static final int TEXTURE23 = 0x84D7;\r
-  public static final int TEXTURE24 = 0x84D8;\r
-  public static final int TEXTURE25 = 0x84D9;\r
-  public static final int TEXTURE26 = 0x84DA;\r
-  public static final int TEXTURE27 = 0x84DB;\r
-  public static final int TEXTURE28 = 0x84DC;\r
-  public static final int TEXTURE29 = 0x84DD;\r
-  public static final int TEXTURE30 = 0x84DE;\r
-  public static final int TEXTURE31 = 0x84DF;\r
-  public static final int ACTIVE_TEXTURE = 0x84E0;\r
-\r
-  /* TextureWrapMode */\r
-  public static final int REPEAT = 0x2901;\r
-  public static final int CLAMP_TO_EDGE = 0x812F;\r
-  public static final int MIRRORED_REPEAT = 0x8370;\r
-\r
-  /* Uniform Types */\r
-  public static final int FLOAT_VEC2 = 0x8B50;\r
-  public static final int FLOAT_VEC3 = 0x8B51;\r
-  public static final int FLOAT_VEC4 = 0x8B52;\r
-  public static final int INT_VEC2 = 0x8B53;\r
-  public static final int INT_VEC3 = 0x8B54;\r
-  public static final int INT_VEC4 = 0x8B55;\r
-  public static final int BOOL = 0x8B56;\r
-  public static final int BOOL_VEC2 = 0x8B57;\r
-  public static final int BOOL_VEC3 = 0x8B58;\r
-  public static final int BOOL_VEC4 = 0x8B59;\r
-  public static final int FLOAT_MAT2 = 0x8B5A;\r
-  public static final int FLOAT_MAT3 = 0x8B5B;\r
-  public static final int FLOAT_MAT4 = 0x8B5C;\r
-  public static final int SAMPLER_2D = 0x8B5E;\r
-  public static final int SAMPLER_CUBE = 0x8B60;\r
-\r
-  /* Vertex Arrays */\r
-  public static final int VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;\r
-  public static final int VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;\r
-  public static final int VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;\r
-  public static final int VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;\r
-  public static final int VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;\r
-  public static final int VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;\r
-  public static final int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;\r
-\r
-  /* Read Format */\r
-  public static final int IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;\r
-  public static final int IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;\r
-\r
-  /* Shader Source */\r
-  public static final int COMPILE_STATUS = 0x8B81;\r
-  public static final int INFO_LOG_LENGTH = 0x8B84;\r
-  public static final int SHADER_SOURCE_LENGTH = 0x8B88;\r
-\r
-  /* Shader Precision-Specified Types */\r
-  public static final int LOW_FLOAT = 0x8DF0;\r
-  public static final int MEDIUM_FLOAT = 0x8DF1;\r
-  public static final int HIGH_FLOAT = 0x8DF2;\r
-  public static final int LOW_INT = 0x8DF3;\r
-  public static final int MEDIUM_INT = 0x8DF4;\r
-  public static final int HIGH_INT = 0x8DF5;\r
-\r
-  /* Framebuffer Object. */\r
-  public static final int FRAMEBUFFER = 0x8D40;\r
-  public static final int RENDERBUFFER = 0x8D41;\r
-\r
-  public static final int RGBA4 = 0x8056;\r
-  public static final int RGB5_A1 = 0x8057;\r
-  public static final int RGB565 = 0x8D62;\r
-  public static final int DEPTH_COMPONENT16 = 0x81A5;\r
-  public static final int STENCIL_INDEX = 0x1901;\r
-  public static final int STENCIL_INDEX8 = 0x8D48;\r
-  public static final int DEPTH_STENCIL = 0x84F9;\r
-\r
-  public static final int RENDERBUFFER_WIDTH = 0x8D42;\r
-  public static final int RENDERBUFFER_HEIGHT = 0x8D43;\r
-  public static final int RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;\r
-  public static final int RENDERBUFFER_RED_SIZE = 0x8D50;\r
-  public static final int RENDERBUFFER_GREEN_SIZE = 0x8D51;\r
-  public static final int RENDERBUFFER_BLUE_SIZE = 0x8D52;\r
-  public static final int RENDERBUFFER_ALPHA_SIZE = 0x8D53;\r
-  public static final int RENDERBUFFER_DEPTH_SIZE = 0x8D54;\r
-  public static final int RENDERBUFFER_STENCIL_SIZE = 0x8D55;\r
-\r
-  public static final int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;\r
-  public static final int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;\r
-  public static final int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;\r
-  public static final int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;\r
-\r
-  public static final int COLOR_ATTACHMENT0 = 0x8CE0;\r
-  public static final int DEPTH_ATTACHMENT = 0x8D00;\r
-  public static final int STENCIL_ATTACHMENT = 0x8D20;\r
-  public static final int DEPTH_STENCIL_ATTACHMENT = 0x821A;\r
-\r
-  public static final int NONE = 0;\r
-\r
-  public static final int FRAMEBUFFER_COMPLETE = 0x8CD5;\r
-  public static final int FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;\r
-  public static final int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;\r
-  public static final int FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;\r
-  public static final int FRAMEBUFFER_UNSUPPORTED = 0x8CDD;\r
-\r
-  public static final int FRAMEBUFFER_BINDING = 0x8CA6;\r
-  public static final int RENDERBUFFER_BINDING = 0x8CA7;\r
-  public static final int MAX_RENDERBUFFER_SIZE = 0x84E8;\r
-\r
-  public static final int INVALID_FRAMEBUFFER_OPERATION = 0x0506;\r
-\r
-  /* WebGL-specific enums */\r
-  public static final int UNPACK_FLIP_Y_WEBGL = 0x9240;\r
-  public static final int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;\r
-  public static final int CONTEXT_LOST_WEBGL = 0x9242;\r
-\r
-  /**\r
-   * Returns a WebGL context for the given canvas element. Returns null if no 3d\r
-   * context is available.\r
-   */\r
-  public static WebGLRenderingContext getContext(CanvasElement canvas) {\r
-    return getContext(canvas, WebGLContextAttributes.create());\r
-  }\r
-\r
-  /**\r
-   * Returns a WebGL context for the given canvas element. Returns null if no 3d\r
-   * context is available.\r
-   */\r
-  public static native WebGLRenderingContext getContext(CanvasElement canvas, WebGLContextAttributes attributes) /*-{\r
-    var names = ["experimental-webgl", "webgl", "moz-webgl", "webkit-webgl", "webkit-3d"];\r
-    for (var i = 0; i < names.length; i++) {\r
-      try {\r
-        var ctx = canvas.getContext(names[i], attributes);\r
-        if (ctx != null) {\r
-          // Hook for the semi-standard WebGLDebugUtils script.\r
-          if ($wnd.WebGLDebugUtils) {\r
-            if ($wnd.console && $wnd.console.log) console.log('WebGL debugging enabled');\r
-            return $wnd.WebGLDebugUtils.makeDebugContext(ctx);\r
-          }\r
-          return ctx;\r
-        }\r
-      } catch(e) {\r
-      }\r
-    }\r
-    return null;\r
-  }-*/;\r
-\r
-  protected WebGLRenderingContext() {\r
-  }\r
-\r
-  public final native CanvasElement getCanvas() /*-{\r
-    return this.canvas;\r
-  }-*/;\r
-\r
-  public final native WebGLContextAttributes getContextAttributes() /*-{\r
-    return this.getContextAttributes();\r
-  }-*/;\r
-\r
-  public final native boolean isContextLost() /*-{\r
-    return this.isContextLost();\r
-  }-*/;\r
-\r
-  public final native JsArrayString getSupportedExtensions() /*-{\r
-    return this.getSupportedExtensions();\r
-  }-*/;\r
-\r
-  public final native JavaScriptObject getExtension(String name) /*-{\r
-    return this.getExtension(name);\r
-  }-*/;\r
-\r
-  public final native void activeTexture(int texture) /*-{\r
-    this.activeTexture(texture);\r
-  }-*/;\r
-\r
-  public final native void attachShader(WebGLProgram program, WebGLShader shader) /*-{\r
-    this.attachShader(program, shader);\r
-  }-*/;\r
-\r
-  public final native void bindAttribLocation(WebGLProgram program, int index, String name) /*-{\r
-    this.bindAttribLocation(program, index, name);\r
-  }-*/;\r
-\r
-  public final native void bindBuffer(int target, WebGLBuffer buffer) /*-{\r
-    this.bindBuffer(target, buffer);\r
-  }-*/;\r
-\r
-  public final native void bindFramebuffer(int target, WebGLFramebuffer framebuffer) /*-{\r
-    this.bindFramebuffer(target, framebuffer);\r
-  }-*/;\r
-\r
-  public final native void bindRenderbuffer(int target, WebGLRenderbuffer renderbuffer) /*-{\r
-    this.bindRenderbuffer(target, renderbuffer);\r
-  }-*/;\r
-\r
-  public final native void bindTexture(int target, WebGLTexture texture) /*-{\r
-    this.bindTexture(target, texture);\r
-  }-*/;\r
-\r
-  public final native void blendColor(float red, float green, float blue, float alpha) /*-{\r
-    this.blendColor(red, green, blue, alpha);\r
-  }-*/;\r
-\r
-  public final native void blendEquation(int mode) /*-{\r
-    this.blendEquation(mode);\r
-  }-*/;\r
-\r
-  public final native void blendEquationSeparate(int modeRGB, int modeAlpha) /*-{\r
-    this.blendEquationSeparate(modeRGB, modeAlpha);\r
-  }-*/;\r
-\r
-  public final native void blendFunc(int sfactor, int dfactor) /*-{\r
-    this.blendFunc(sfactor, dfactor);\r
-  }-*/;\r
-\r
-  public final native void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) /*-{\r
-    this.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);\r
-  }-*/;\r
-\r
-  public final native void bufferData(int target, int size, int usage) /*-{\r
-    this.bufferData(target, size, usage);\r
-  }-*/;\r
-\r
-  public final native void bufferData(int target, ArrayBufferView data, int usage) /*-{\r
-    this.bufferData(target, data, usage);\r
-  }-*/;\r
-\r
-  public final native void bufferData(int target, ArrayBuffer data, int usage) /*-{\r
-    this.bufferData(target, data, usage);\r
-  }-*/;\r
-\r
-  public final native void bufferSubData(int target, int offset, ArrayBufferView data) /*-{\r
-    this.bufferSubData(target, offset, data);\r
-  }-*/;\r
-\r
-  public final native void bufferSubData(int target, int offset, ArrayBuffer data) /*-{\r
-    this.bufferSubData(target, offset, data);\r
-  }-*/;\r
-\r
-  public final native int checkFramebufferStatus(int target) /*-{\r
-    return this.checkFramebufferStatus(target);\r
-  }-*/;\r
-\r
-  public final native void clear(int mask) /*-{\r
-    this.clear(mask);\r
-  }-*/;\r
-\r
-  public final native void clearColor(float red, float green, float blue, float alpha) /*-{\r
-    this.clearColor(red, green, blue, alpha);\r
-  }-*/;\r
-\r
-  public final native void clearDepth(float depth) /*-{\r
-    this.clearDepth(depth);\r
-  }-*/;\r
-\r
-  public final native void clearStencil(int s) /*-{\r
-    this.clearStencil(s);\r
-  }-*/;\r
-\r
-  public final native void colorMask(boolean red, boolean green, boolean blue, boolean alpha) /*-{\r
-    this.colorMask(red, green, blue, alpha);\r
-  }-*/;\r
-\r
-  public final native void compileShader(WebGLShader shader) /*-{\r
-    this.compileShader(shader);\r
-  }-*/;\r
-\r
-  public final native void copyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) /*-{\r
-    this.copyTexImage2D(target, level, internalformat, x, y, width, height, border);\r
-  }-*/;\r
-\r
-  public final native void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) /*-{\r
-    this.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);\r
-  }-*/;\r
-\r
-  public final native WebGLBuffer createBuffer() /*-{\r
-    return this.createBuffer();\r
-  }-*/;\r
-\r
-  public final native WebGLFramebuffer createFramebuffer() /*-{\r
-    return this.createFramebuffer();\r
-  }-*/;\r
-\r
-  public final native WebGLProgram createProgram() /*-{\r
-    return this.createProgram();\r
-  }-*/;\r
-\r
-  public final native WebGLRenderbuffer createRenderbuffer() /*-{\r
-    return this.createRenderbuffer();\r
-  }-*/;\r
-\r
-  public final native WebGLShader createShader(int type) /*-{\r
-    return this.createShader(type);\r
-  }-*/;\r
-\r
-  public final native WebGLTexture createTexture() /*-{\r
-    return this.createTexture();\r
-  }-*/;\r
-\r
-  public final native void cullFace(int mode) /*-{\r
-    this.cullFace(mode);\r
-  }-*/;\r
-\r
-  public final native void deleteBuffer(WebGLBuffer buffer) /*-{\r
-    this.deleteBuffer(buffer);\r
-  }-*/;\r
-\r
-  public final native void deleteFramebuffer(WebGLFramebuffer framebuffer) /*-{\r
-    this.deleteFramebuffer(framebuffer);\r
-  }-*/;\r
-\r
-  public final native void deleteProgram(WebGLProgram program) /*-{\r
-    this.deleteProgram(program);\r
-  }-*/;\r
-\r
-  public final native void deleteRenderbuffer(WebGLRenderbuffer renderbuffer) /*-{\r
-    this.deleteRenderbuffer(renderbuffer);\r
-  }-*/;\r
-\r
-  public final native void deleteShader(WebGLShader shader) /*-{\r
-    this.deleteShader(shader);\r
-  }-*/;\r
-\r
-  public final native void deleteTexture(WebGLTexture texture) /*-{\r
-    this.deleteTexture(texture);\r
-  }-*/;\r
-\r
-  public final native void depthFunc(int func) /*-{\r
-    this.depthFunc(func);\r
-  }-*/;\r
-\r
-  public final native void depthMask(boolean flag) /*-{\r
-    this.depthMask(flag);\r
-  }-*/;\r
-\r
-  public final native void depthRange(float zNear, float zFar) /*-{\r
-    this.depthRange(zNear, zFar);\r
-  }-*/;\r
-\r
-  public final native void detachShader(WebGLProgram program, WebGLShader shader) /*-{\r
-    this.detachShader(program, shader);\r
-  }-*/;\r
-\r
-  public final native void disable(int cap) /*-{\r
-    this.disable(cap);\r
-  }-*/;\r
-\r
-  public final native void disableVertexAttribArray(int index) /*-{\r
-    this.disableVertexAttribArray(index);\r
-  }-*/;\r
-\r
-  public final native void drawArrays(int mode, int first, int count) /*-{\r
-    this.drawArrays(mode, first, count);\r
-  }-*/;\r
-\r
-  public final native void drawElements(int mode, int count, int type, int offset) /*-{\r
-    this.drawElements(mode, count, type, offset);\r
-  }-*/;\r
-\r
-  public final native void enable(int cap) /*-{\r
-    this.enable(cap);\r
-  }-*/;\r
-\r
-  public final native void enableVertexAttribArray(int index) /*-{\r
-    this.enableVertexAttribArray(index);\r
-  }-*/;\r
-\r
-  public final native void finish() /*-{\r
-    this.finish();\r
-  }-*/;\r
-\r
-  public final native void flush() /*-{\r
-    this.flush();\r
-  }-*/;\r
-\r
-  public final native void framebufferRenderbuffer(int target, int attachment, int renderbuffertarget, WebGLRenderbuffer renderbuffer) /*-{\r
-    this.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);\r
-  }-*/;\r
-\r
-  public final native void framebufferTexture2D(int target, int attachment, int textarget, WebGLTexture texture, int level) /*-{\r
-    this.framebufferTexture2D(target, attachment, textarget, texture, level);\r
-  }-*/;\r
-\r
-  public final native void frontFace(int mode) /*-{\r
-    this.frontFace(mode);\r
-  }-*/;\r
-\r
-  public final native void generateMipmap(int target) /*-{\r
-    this.generateMipmap(target);\r
-  }-*/;\r
-\r
-  public final native WebGLActiveInfo getActiveAttrib(WebGLProgram program, int index) /*-{\r
-    return this.getActiveAttrib(program, index);\r
-  }-*/;\r
-\r
-  public final native WebGLActiveInfo getActiveUniform(WebGLProgram program, int index) /*-{\r
-    return this.getActiveUniform(program, index);\r
-  }-*/;\r
-\r
-  public final native JsArray<WebGLShader> getAttachedShaders(WebGLProgram program) /*-{\r
-    return this.getAttachedShaders(program);\r
-  }-*/;\r
-\r
-  public final native int getAttribLocation(WebGLProgram program, String name) /*-{\r
-    return this.getAttribLocation(program, name);\r
-  }-*/;\r
-\r
-  public final native int getError() /*-{\r
-    return this.getError();\r
-  }-*/;\r
-\r
-  public final native String getProgramInfoLog(WebGLProgram program) /*-{\r
-    return this.getProgramInfoLog(program);\r
-  }-*/;\r
-\r
-  public final native String getShaderInfoLog(WebGLShader shader) /*-{\r
-    return this.getShaderInfoLog(shader);\r
-  }-*/;\r
-\r
-  public final native String getShaderSource(WebGLShader shader) /*-{\r
-    return this.getShaderSource(shader);\r
-  }-*/;\r
-\r
-  public final native WebGLUniformLocation getUniformLocation(WebGLProgram program, String name) /*-{\r
-    return this.getUniformLocation(program, name);\r
-  }-*/;\r
-\r
-  public final native int getVertexAttribOffset(int index, int pname) /*-{\r
-    return this.getVertexAttribOffset(index, pname);\r
-  }-*/;\r
-\r
-  public final native void hint(int target, int mode) /*-{\r
-    this.hint(target, mode);\r
-  }-*/;\r
-\r
-  public final native boolean isBuffer(WebGLBuffer buffer) /*-{\r
-    return this.isBuffer(buffer);\r
-  }-*/;\r
-\r
-  public final native boolean isEnabled(int cap) /*-{\r
-    return this.isEnabled(cap);\r
-  }-*/;\r
-\r
-  public final native boolean isFramebuffer(WebGLFramebuffer framebuffer) /*-{\r
-    return this.isFramebuffer(framebuffer);\r
-  }-*/;\r
-\r
-  public final native boolean isProgram(WebGLProgram program) /*-{\r
-    return this.isProgram(program);\r
-  }-*/;\r
-\r
-  public final native boolean isRenderbuffer(WebGLRenderbuffer renderbuffer) /*-{\r
-    return this.isRenderbuffer(renderbuffer);\r
-  }-*/;\r
-\r
-  public final native boolean isShader(WebGLShader shader) /*-{\r
-    return this.isShader(shader);\r
-  }-*/;\r
-\r
-  public final native boolean isTexture(WebGLTexture texture) /*-{\r
-    return this.isTexture(texture);\r
-  }-*/;\r
-\r
-  public final native void lineWidth(float width) /*-{\r
-    this.lineWidth(width);\r
-  }-*/;\r
-\r
-  public final native void linkProgram(WebGLProgram program) /*-{\r
-    this.linkProgram(program);\r
-  }-*/;\r
-\r
-  public final native void pixelStorei(int pname, int param) /*-{\r
-    this.pixelStorei(pname, param);\r
-  }-*/;\r
-\r
-  public final native void polygonOffset(float factor, float units) /*-{\r
-    this.polygonOffset(factor, units);\r
-  }-*/;\r
-\r
-  public final native void readPixels(int x, int y, int width, int height, int format, int type, ArrayBufferView pixels) /*-{\r
-    this.readPixels(x, y, width, height, format, type, pixels);\r
-  }-*/;\r
-\r
-  public final native void renderbufferStorage(int target, int internalformat, int width, int height) /*-{\r
-    this.renderbufferStorage(target, internalformat, width, height);\r
-  }-*/;\r
-\r
-  public final native void sampleCoverage(float value, boolean invert) /*-{\r
-    this.sampleCoverage(value, invert);\r
-  }-*/;\r
-\r
-  public final native void scissor(int x, int y, int width, int height) /*-{\r
-    this.scissor(x, y, width, height);\r
-  }-*/;\r
-\r
-  public final native void shaderSource(WebGLShader shader, String source) /*-{\r
-    this.shaderSource(shader, source);\r
-  }-*/;\r
-\r
-  public final native void stencilFunc(int func, int ref, int mask) /*-{\r
-    this.stencilFunc(func, ref, mask);\r
-  }-*/;\r
-\r
-  public final native void stencilFuncSeparate(int face, int func, int ref, int mask) /*-{\r
-    this.stencilFuncSeparate(face, func, ref, mask);\r
-  }-*/;\r
-\r
-  public final native void stencilMask(int mask) /*-{\r
-    this.stencilMask(mask);\r
-  }-*/;\r
-\r
-  public final native void stencilMaskSeparate(int face, int mask) /*-{\r
-    this.stencilMaskSeparate(face, mask);\r
-  }-*/;\r
-\r
-  public final native void stencilOp(int fail, int zfail, int zpass) /*-{\r
-    this.stencilOp(fail, zfail, zpass);\r
-  }-*/;\r
-\r
-  public final native void stencilOpSeparate(int face, int fail, int zfail, int zpass) /*-{\r
-    this.stencilOpSeparate(face, fail, zfail, zpass);\r
-  }-*/;\r
-\r
-  public final native void texImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ArrayBufferView pixels) /*-{\r
-    this.texImage2D(target, level, internalformat, width, height, border, format, type, pixels);\r
-  }-*/;\r
-\r
-  public final native void texImage2D(int target, int level, int internalformat, int format, int type, ImageData pixels) /*-{\r
-    this.texImage2D(target, level, internalformat, format, type, pixels);\r
-  }-*/;\r
-\r
-  public final native void texImage2D(int target, int level, int internalformat, int format, int type, ImageElement image) /*-{\r
-    this.texImage2D(target, level, internalformat, format, type, image);\r
-  }-*/;\r
-\r
-  public final native void texImage2D(int target, int level, int internalformat, int format, int type, CanvasElement canvas) /*-{\r
-    this.texImage2D(target, level, internalformat, format, type, canvas);\r
-  }-*/;\r
+       /* ClearBufferMask */\r
+       public static final int DEPTH_BUFFER_BIT = 0x00000100;\r
+       public static final int STENCIL_BUFFER_BIT = 0x00000400;\r
+       public static final int COLOR_BUFFER_BIT = 0x00004000;\r
+\r
+       /* BeginMode */\r
+       public static final int POINTS = 0x0000;\r
+       public static final int LINES = 0x0001;\r
+       public static final int LINE_LOOP = 0x0002;\r
+       public static final int LINE_STRIP = 0x0003;\r
+       public static final int TRIANGLES = 0x0004;\r
+       public static final int TRIANGLE_STRIP = 0x0005;\r
+       public static final int TRIANGLE_FAN = 0x0006;\r
+\r
+       /* AlphaFunction (not supported in ES20) */\r
+       /* NEVER */\r
+       /* LESS */\r
+       /* EQUAL */\r
+       /* LEQUAL */\r
+       /* GREATER */\r
+       /* NOTEQUAL */\r
+       /* GEQUAL */\r
+       /* ALWAYS */\r
+\r
+       /* BlendingFactorDest */\r
+       public static final int ZERO = 0;\r
+       public static final int ONE = 1;\r
+       public static final int SRC_COLOR = 0x0300;\r
+       public static final int ONE_MINUS_SRC_COLOR = 0x0301;\r
+       public static final int SRC_ALPHA = 0x0302;\r
+       public static final int ONE_MINUS_SRC_ALPHA = 0x0303;\r
+       public static final int DST_ALPHA = 0x0304;\r
+       public static final int ONE_MINUS_DST_ALPHA = 0x0305;\r
+\r
+       /* BlendingFactorSrc */\r
+       /* ZERO */\r
+       /* ONE */\r
+       public static final int DST_COLOR = 0x0306;\r
+       public static final int ONE_MINUS_DST_COLOR = 0x0307;\r
+       public static final int SRC_ALPHA_SATURATE = 0x0308;\r
+       /* SRC_ALPHA */\r
+       /* ONE_MINUS_SRC_ALPHA */\r
+       /* DST_ALPHA */\r
+       /* ONE_MINUS_DST_ALPHA */\r
+\r
+       /* BlendEquationSeparate */\r
+       public static final int FUNC_ADD = 0x8006;\r
+       public static final int BLEND_EQUATION = 0x8009;\r
+       public static final int BLEND_EQUATION_RGB = 0x8009; /* same as BLEND_EQUATION */\r
+       public static final int BLEND_EQUATION_ALPHA = 0x883D;\r
+\r
+       /* BlendSubtract */\r
+       public static final int FUNC_SUBTRACT = 0x800A;\r
+       public static final int FUNC_REVERSE_SUBTRACT = 0x800B;\r
+\r
+       /* Separate Blend Functions */\r
+       public static final int BLEND_DST_RGB = 0x80C8;\r
+       public static final int BLEND_SRC_RGB = 0x80C9;\r
+       public static final int BLEND_DST_ALPHA = 0x80CA;\r
+       public static final int BLEND_SRC_ALPHA = 0x80CB;\r
+       public static final int CONSTANT_COLOR = 0x8001;\r
+       public static final int ONE_MINUS_CONSTANT_COLOR = 0x8002;\r
+       public static final int CONSTANT_ALPHA = 0x8003;\r
+       public static final int ONE_MINUS_CONSTANT_ALPHA = 0x8004;\r
+       public static final int BLEND_COLOR = 0x8005;\r
+\r
+       /* Buffer Objects */\r
+       public static final int ARRAY_BUFFER = 0x8892;\r
+       public static final int ELEMENT_ARRAY_BUFFER = 0x8893;\r
+       public static final int ARRAY_BUFFER_BINDING = 0x8894;\r
+       public static final int ELEMENT_ARRAY_BUFFER_BINDING = 0x8895;\r
+\r
+       public static final int STREAM_DRAW = 0x88E0;\r
+       public static final int STATIC_DRAW = 0x88E4;\r
+       public static final int DYNAMIC_DRAW = 0x88E8;\r
+\r
+       public static final int BUFFER_SIZE = 0x8764;\r
+       public static final int BUFFER_USAGE = 0x8765;\r
+\r
+       public static final int CURRENT_VERTEX_ATTRIB = 0x8626;\r
+\r
+       /* CullFaceMode */\r
+       public static final int FRONT = 0x0404;\r
+       public static final int BACK = 0x0405;\r
+       public static final int FRONT_AND_BACK = 0x0408;\r
+\r
+       /* DepthFunction */\r
+       /* NEVER */\r
+       /* LESS */\r
+       /* EQUAL */\r
+       /* LEQUAL */\r
+       /* GREATER */\r
+       /* NOTEQUAL */\r
+       /* GEQUAL */\r
+       /* ALWAYS */\r
+\r
+       /* EnableCap */\r
+       public static final int TEXTURE_2D = 0x0DE1;\r
+       public static final int CULL_FACE = 0x0B44;\r
+       public static final int BLEND = 0x0BE2;\r
+       public static final int DITHER = 0x0BD0;\r
+       public static final int STENCIL_TEST = 0x0B90;\r
+       public static final int DEPTH_TEST = 0x0B71;\r
+       public static final int SCISSOR_TEST = 0x0C11;\r
+       public static final int POLYGON_OFFSET_FILL = 0x8037;\r
+       public static final int SAMPLE_ALPHA_TO_COVERAGE = 0x809E;\r
+       public static final int SAMPLE_COVERAGE = 0x80A0;\r
+\r
+       /* ErrorCode */\r
+       public static final int NO_ERROR = 0;\r
+       public static final int INVALID_ENUM = 0x0500;\r
+       public static final int INVALID_VALUE = 0x0501;\r
+       public static final int INVALID_OPERATION = 0x0502;\r
+       public static final int OUT_OF_MEMORY = 0x0505;\r
+\r
+       /* FrontFaceDirection */\r
+       public static final int CW = 0x0900;\r
+       public static final int CCW = 0x0901;\r
+\r
+       /* GetPName */\r
+       public static final int LINE_WIDTH = 0x0B21;\r
+       public static final int ALIASED_POINT_SIZE_RANGE = 0x846D;\r
+       public static final int ALIASED_LINE_WIDTH_RANGE = 0x846E;\r
+       public static final int CULL_FACE_MODE = 0x0B45;\r
+       public static final int FRONT_FACE = 0x0B46;\r
+       public static final int DEPTH_RANGE = 0x0B70;\r
+       public static final int DEPTH_WRITEMASK = 0x0B72;\r
+       public static final int DEPTH_CLEAR_VALUE = 0x0B73;\r
+       public static final int DEPTH_FUNC = 0x0B74;\r
+       public static final int STENCIL_CLEAR_VALUE = 0x0B91;\r
+       public static final int STENCIL_FUNC = 0x0B92;\r
+       public static final int STENCIL_FAIL = 0x0B94;\r
+       public static final int STENCIL_PASS_DEPTH_FAIL = 0x0B95;\r
+       public static final int STENCIL_PASS_DEPTH_PASS = 0x0B96;\r
+       public static final int STENCIL_REF = 0x0B97;\r
+       public static final int STENCIL_VALUE_MASK = 0x0B93;\r
+       public static final int STENCIL_WRITEMASK = 0x0B98;\r
+       public static final int STENCIL_BACK_FUNC = 0x8800;\r
+       public static final int STENCIL_BACK_FAIL = 0x8801;\r
+       public static final int STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802;\r
+       public static final int STENCIL_BACK_PASS_DEPTH_PASS = 0x8803;\r
+       public static final int STENCIL_BACK_REF = 0x8CA3;\r
+       public static final int STENCIL_BACK_VALUE_MASK = 0x8CA4;\r
+       public static final int STENCIL_BACK_WRITEMASK = 0x8CA5;\r
+       public static final int VIEWPORT = 0x0BA2;\r
+       public static final int SCISSOR_BOX = 0x0C10;\r
+       /* SCISSOR_TEST */\r
+       public static final int COLOR_CLEAR_VALUE = 0x0C22;\r
+       public static final int COLOR_WRITEMASK = 0x0C23;\r
+       public static final int UNPACK_ALIGNMENT = 0x0CF5;\r
+       public static final int PACK_ALIGNMENT = 0x0D05;\r
+       public static final int MAX_TEXTURE_SIZE = 0x0D33;\r
+       public static final int MAX_VIEWPORT_DIMS = 0x0D3A;\r
+       public static final int SUBPIXEL_BITS = 0x0D50;\r
+       public static final int RED_BITS = 0x0D52;\r
+       public static final int GREEN_BITS = 0x0D53;\r
+       public static final int BLUE_BITS = 0x0D54;\r
+       public static final int ALPHA_BITS = 0x0D55;\r
+       public static final int DEPTH_BITS = 0x0D56;\r
+       public static final int STENCIL_BITS = 0x0D57;\r
+       public static final int POLYGON_OFFSET_UNITS = 0x2A00;\r
+       /* POLYGON_OFFSET_FILL */\r
+       public static final int POLYGON_OFFSET_FACTOR = 0x8038;\r
+       public static final int TEXTURE_BINDING_2D = 0x8069;\r
+       public static final int SAMPLE_BUFFERS = 0x80A8;\r
+       public static final int SAMPLES = 0x80A9;\r
+       public static final int SAMPLE_COVERAGE_VALUE = 0x80AA;\r
+       public static final int SAMPLE_COVERAGE_INVERT = 0x80AB;\r
+\r
+       /* GetTextureParameter */\r
+       /* TEXTURE_MAG_FILTER */\r
+       /* TEXTURE_MIN_FILTER */\r
+       /* TEXTURE_WRAP_S */\r
+       /* TEXTURE_WRAP_T */\r
+\r
+       public static final int NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2;\r
+       public static final int COMPRESSED_TEXTURE_FORMATS = 0x86A3;\r
+\r
+       /* HintMode */\r
+       public static final int DONT_CARE = 0x1100;\r
+       public static final int FASTEST = 0x1101;\r
+       public static final int NICEST = 0x1102;\r
+\r
+       /* HintTarget */\r
+       public static final int GENERATE_MIPMAP_HINT = 0x8192;\r
+\r
+       /* DataType */\r
+       public static final int BYTE = 0x1400;\r
+       public static final int UNSIGNED_BYTE = 0x1401;\r
+       public static final int SHORT = 0x1402;\r
+       public static final int UNSIGNED_SHORT = 0x1403;\r
+       public static final int INT = 0x1404;\r
+       public static final int UNSIGNED_INT = 0x1405;\r
+       public static final int FLOAT = 0x1406;\r
+\r
+       /* PixelFormat */\r
+       public static final int DEPTH_COMPONENT = 0x1902;\r
+       public static final int ALPHA = 0x1906;\r
+       public static final int RGB = 0x1907;\r
+       public static final int RGBA = 0x1908;\r
+       public static final int LUMINANCE = 0x1909;\r
+       public static final int LUMINANCE_ALPHA = 0x190A;\r
+\r
+       /* PixelType */\r
+       /* UNSIGNED_BYTE */\r
+       public static final int UNSIGNED_SHORT_4_4_4_4 = 0x8033;\r
+       public static final int UNSIGNED_SHORT_5_5_5_1 = 0x8034;\r
+       public static final int UNSIGNED_SHORT_5_6_5 = 0x8363;\r
+\r
+       /* Shaders */\r
+       public static final int FRAGMENT_SHADER = 0x8B30;\r
+       public static final int VERTEX_SHADER = 0x8B31;\r
+       public static final int MAX_VERTEX_ATTRIBS = 0x8869;\r
+       public static final int MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB;\r
+       public static final int MAX_VARYING_VECTORS = 0x8DFC;\r
+       public static final int MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D;\r
+       public static final int MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C;\r
+       public static final int MAX_TEXTURE_IMAGE_UNITS = 0x8872;\r
+       public static final int MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD;\r
+       public static final int SHADER_TYPE = 0x8B4F;\r
+       public static final int DELETE_STATUS = 0x8B80;\r
+       public static final int LINK_STATUS = 0x8B82;\r
+       public static final int VALIDATE_STATUS = 0x8B83;\r
+       public static final int ATTACHED_SHADERS = 0x8B85;\r
+       public static final int ACTIVE_UNIFORMS = 0x8B86;\r
+       public static final int ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87;\r
+       public static final int ACTIVE_ATTRIBUTES = 0x8B89;\r
+       public static final int ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A;\r
+       public static final int SHADING_LANGUAGE_VERSION = 0x8B8C;\r
+       public static final int CURRENT_PROGRAM = 0x8B8D;\r
+\r
+       /* StencilFunction */\r
+       public static final int NEVER = 0x0200;\r
+       public static final int LESS = 0x0201;\r
+       public static final int EQUAL = 0x0202;\r
+       public static final int LEQUAL = 0x0203;\r
+       public static final int GREATER = 0x0204;\r
+       public static final int NOTEQUAL = 0x0205;\r
+       public static final int GEQUAL = 0x0206;\r
+       public static final int ALWAYS = 0x0207;\r
+\r
+       /* StencilOp */\r
+       /* ZERO */\r
+       public static final int KEEP = 0x1E00;\r
+       public static final int REPLACE = 0x1E01;\r
+       public static final int INCR = 0x1E02;\r
+       public static final int DECR = 0x1E03;\r
+       public static final int INVERT = 0x150A;\r
+       public static final int INCR_WRAP = 0x8507;\r
+       public static final int DECR_WRAP = 0x8508;\r
+\r
+       /* StringName */\r
+       public static final int VENDOR = 0x1F00;\r
+       public static final int RENDERER = 0x1F01;\r
+       public static final int VERSION = 0x1F02;\r
+\r
+       /* TextureMagFilter */\r
+       public static final int NEAREST = 0x2600;\r
+       public static final int LINEAR = 0x2601;\r
+\r
+       /* TextureMinFilter */\r
+       /* NEAREST */\r
+       /* LINEAR */\r
+       public static final int NEAREST_MIPMAP_NEAREST = 0x2700;\r
+       public static final int LINEAR_MIPMAP_NEAREST = 0x2701;\r
+       public static final int NEAREST_MIPMAP_LINEAR = 0x2702;\r
+       public static final int LINEAR_MIPMAP_LINEAR = 0x2703;\r
+\r
+       /* TextureParameterName */\r
+       public static final int TEXTURE_MAG_FILTER = 0x2800;\r
+       public static final int TEXTURE_MIN_FILTER = 0x2801;\r
+       public static final int TEXTURE_WRAP_S = 0x2802;\r
+       public static final int TEXTURE_WRAP_T = 0x2803;\r
+\r
+       /* TextureTarget */\r
+       /* TEXTURE_2D */\r
+       public static final int TEXTURE = 0x1702;\r
+\r
+       public static final int TEXTURE_CUBE_MAP = 0x8513;\r
+       public static final int TEXTURE_BINDING_CUBE_MAP = 0x8514;\r
+       public static final int TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515;\r
+       public static final int TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516;\r
+       public static final int TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517;\r
+       public static final int TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518;\r
+       public static final int TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519;\r
+       public static final int TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A;\r
+       public static final int MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C;\r
+\r
+       /* TextureUnit */\r
+       public static final int TEXTURE0 = 0x84C0;\r
+       public static final int TEXTURE1 = 0x84C1;\r
+       public static final int TEXTURE2 = 0x84C2;\r
+       public static final int TEXTURE3 = 0x84C3;\r
+       public static final int TEXTURE4 = 0x84C4;\r
+       public static final int TEXTURE5 = 0x84C5;\r
+       public static final int TEXTURE6 = 0x84C6;\r
+       public static final int TEXTURE7 = 0x84C7;\r
+       public static final int TEXTURE8 = 0x84C8;\r
+       public static final int TEXTURE9 = 0x84C9;\r
+       public static final int TEXTURE10 = 0x84CA;\r
+       public static final int TEXTURE11 = 0x84CB;\r
+       public static final int TEXTURE12 = 0x84CC;\r
+       public static final int TEXTURE13 = 0x84CD;\r
+       public static final int TEXTURE14 = 0x84CE;\r
+       public static final int TEXTURE15 = 0x84CF;\r
+       public static final int TEXTURE16 = 0x84D0;\r
+       public static final int TEXTURE17 = 0x84D1;\r
+       public static final int TEXTURE18 = 0x84D2;\r
+       public static final int TEXTURE19 = 0x84D3;\r
+       public static final int TEXTURE20 = 0x84D4;\r
+       public static final int TEXTURE21 = 0x84D5;\r
+       public static final int TEXTURE22 = 0x84D6;\r
+       public static final int TEXTURE23 = 0x84D7;\r
+       public static final int TEXTURE24 = 0x84D8;\r
+       public static final int TEXTURE25 = 0x84D9;\r
+       public static final int TEXTURE26 = 0x84DA;\r
+       public static final int TEXTURE27 = 0x84DB;\r
+       public static final int TEXTURE28 = 0x84DC;\r
+       public static final int TEXTURE29 = 0x84DD;\r
+       public static final int TEXTURE30 = 0x84DE;\r
+       public static final int TEXTURE31 = 0x84DF;\r
+       public static final int ACTIVE_TEXTURE = 0x84E0;\r
+\r
+       /* TextureWrapMode */\r
+       public static final int REPEAT = 0x2901;\r
+       public static final int CLAMP_TO_EDGE = 0x812F;\r
+       public static final int MIRRORED_REPEAT = 0x8370;\r
+\r
+       /* Uniform Types */\r
+       public static final int FLOAT_VEC2 = 0x8B50;\r
+       public static final int FLOAT_VEC3 = 0x8B51;\r
+       public static final int FLOAT_VEC4 = 0x8B52;\r
+       public static final int INT_VEC2 = 0x8B53;\r
+       public static final int INT_VEC3 = 0x8B54;\r
+       public static final int INT_VEC4 = 0x8B55;\r
+       public static final int BOOL = 0x8B56;\r
+       public static final int BOOL_VEC2 = 0x8B57;\r
+       public static final int BOOL_VEC3 = 0x8B58;\r
+       public static final int BOOL_VEC4 = 0x8B59;\r
+       public static final int FLOAT_MAT2 = 0x8B5A;\r
+       public static final int FLOAT_MAT3 = 0x8B5B;\r
+       public static final int FLOAT_MAT4 = 0x8B5C;\r
+       public static final int SAMPLER_2D = 0x8B5E;\r
+       public static final int SAMPLER_CUBE = 0x8B60;\r
+\r
+       /* Vertex Arrays */\r
+       public static final int VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622;\r
+       public static final int VERTEX_ATTRIB_ARRAY_SIZE = 0x8623;\r
+       public static final int VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624;\r
+       public static final int VERTEX_ATTRIB_ARRAY_TYPE = 0x8625;\r
+       public static final int VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A;\r
+       public static final int VERTEX_ATTRIB_ARRAY_POINTER = 0x8645;\r
+       public static final int VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F;\r
+\r
+       /* Read Format */\r
+       public static final int IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A;\r
+       public static final int IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B;\r
+\r
+       /* Shader Source */\r
+       public static final int COMPILE_STATUS = 0x8B81;\r
+       public static final int INFO_LOG_LENGTH = 0x8B84;\r
+       public static final int SHADER_SOURCE_LENGTH = 0x8B88;\r
+\r
+       /* Shader Precision-Specified Types */\r
+       public static final int LOW_FLOAT = 0x8DF0;\r
+       public static final int MEDIUM_FLOAT = 0x8DF1;\r
+       public static final int HIGH_FLOAT = 0x8DF2;\r
+       public static final int LOW_INT = 0x8DF3;\r
+       public static final int MEDIUM_INT = 0x8DF4;\r
+       public static final int HIGH_INT = 0x8DF5;\r
+\r
+       /* Framebuffer Object. */\r
+       public static final int FRAMEBUFFER = 0x8D40;\r
+       public static final int RENDERBUFFER = 0x8D41;\r
+\r
+       public static final int RGBA4 = 0x8056;\r
+       public static final int RGB5_A1 = 0x8057;\r
+       public static final int RGB565 = 0x8D62;\r
+       public static final int DEPTH_COMPONENT16 = 0x81A5;\r
+       public static final int STENCIL_INDEX = 0x1901;\r
+       public static final int STENCIL_INDEX8 = 0x8D48;\r
+       public static final int DEPTH_STENCIL = 0x84F9;\r
+\r
+       public static final int RENDERBUFFER_WIDTH = 0x8D42;\r
+       public static final int RENDERBUFFER_HEIGHT = 0x8D43;\r
+       public static final int RENDERBUFFER_INTERNAL_FORMAT = 0x8D44;\r
+       public static final int RENDERBUFFER_RED_SIZE = 0x8D50;\r
+       public static final int RENDERBUFFER_GREEN_SIZE = 0x8D51;\r
+       public static final int RENDERBUFFER_BLUE_SIZE = 0x8D52;\r
+       public static final int RENDERBUFFER_ALPHA_SIZE = 0x8D53;\r
+       public static final int RENDERBUFFER_DEPTH_SIZE = 0x8D54;\r
+       public static final int RENDERBUFFER_STENCIL_SIZE = 0x8D55;\r
+\r
+       public static final int FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0;\r
+       public static final int FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1;\r
+       public static final int FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2;\r
+       public static final int FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3;\r
+\r
+       public static final int COLOR_ATTACHMENT0 = 0x8CE0;\r
+       public static final int DEPTH_ATTACHMENT = 0x8D00;\r
+       public static final int STENCIL_ATTACHMENT = 0x8D20;\r
+       public static final int DEPTH_STENCIL_ATTACHMENT = 0x821A;\r
+\r
+       public static final int NONE = 0;\r
+\r
+       public static final int FRAMEBUFFER_COMPLETE = 0x8CD5;\r
+       public static final int FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6;\r
+       public static final int FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7;\r
+       public static final int FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9;\r
+       public static final int FRAMEBUFFER_UNSUPPORTED = 0x8CDD;\r
+\r
+       public static final int FRAMEBUFFER_BINDING = 0x8CA6;\r
+       public static final int RENDERBUFFER_BINDING = 0x8CA7;\r
+       public static final int MAX_RENDERBUFFER_SIZE = 0x84E8;\r
+\r
+       public static final int INVALID_FRAMEBUFFER_OPERATION = 0x0506;\r
+\r
+       /* WebGL-specific enums */\r
+       public static final int UNPACK_FLIP_Y_WEBGL = 0x9240;\r
+       public static final int UNPACK_PREMULTIPLY_ALPHA_WEBGL = 0x9241;\r
+       public static final int CONTEXT_LOST_WEBGL = 0x9242;\r
+\r
+       /** Returns a WebGL context for the given canvas element. Returns null if no 3d context is available. */\r
+       public static WebGLRenderingContext getContext (CanvasElement canvas) {\r
+               return getContext(canvas, WebGLContextAttributes.create());\r
+       }\r
+\r
+       /** Returns a WebGL context for the given canvas element. Returns null if no 3d context is available. */\r
+       public static native WebGLRenderingContext getContext (CanvasElement canvas, WebGLContextAttributes attributes) /*-{\r
+                                                                                                                                                                                                                                                                                                                       var names = ["experimental-webgl", "webgl", "moz-webgl", "webkit-webgl", "webkit-3d"];\r
+                                                                                                                                                                                                                                                                                                                       for (var i = 0; i < names.length; i++) {\r
+                                                                                                                                                                                                                                                                                                                       try {\r
+                                                                                                                                                                                                                                                                                                                       var ctx = canvas.getContext(names[i], attributes);\r
+                                                                                                                                                                                                                                                                                                                       if (ctx != null) {\r
+                                                                                                                                                                                                                                                                                                                       // Hook for the semi-standard WebGLDebugUtils script.\r
+                                                                                                                                                                                                                                                                                                                       if ($wnd.WebGLDebugUtils) {\r
+                                                                                                                                                                                                                                                                                                                       if ($wnd.console && $wnd.console.log) console.log('WebGL debugging enabled');\r
+                                                                                                                                                                                                                                                                                                                       return $wnd.WebGLDebugUtils.makeDebugContext(ctx);\r
+                                                                                                                                                                                                                                                                                                                       }\r
+                                                                                                                                                                                                                                                                                                                       return ctx;\r
+                                                                                                                                                                                                                                                                                                                       }\r
+                                                                                                                                                                                                                                                                                                                       } catch(e) {\r
+                                                                                                                                                                                                                                                                                                                       }\r
+                                                                                                                                                                                                                                                                                                                       }\r
+                                                                                                                                                                                                                                                                                                                       return null;\r
+                                                                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       protected WebGLRenderingContext () {\r
+       }\r
+\r
+       public final native CanvasElement getCanvas () /*-{\r
+                                                                                                                                       return this.canvas;\r
+                                                                                                                                       }-*/;\r
+\r
+       public final native WebGLContextAttributes getContextAttributes () /*-{\r
+                                                                                                                                                                                               return this.getContextAttributes();\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final native boolean isContextLost () /*-{\r
+                                                                                                                               return this.isContextLost();\r
+                                                                                                                               }-*/;\r
+\r
+       public final native JsArrayString getSupportedExtensions () /*-{\r
+                                                                                                                                                                       return this.getSupportedExtensions();\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native JavaScriptObject getExtension (String name) /*-{\r
+                                                                                                                                                                                       return this.getExtension(name);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void activeTexture (int texture) /*-{\r
+                                                                                                                                                       this.activeTexture(texture);\r
+                                                                                                                                                       }-*/;\r
+\r
+       public final native void attachShader (WebGLProgram program, WebGLShader shader) /*-{\r
+                                                                                                                                                                                                                               this.attachShader(program, shader);\r
+                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void bindAttribLocation (WebGLProgram program, int index, String name) /*-{\r
+                                                                                                                                                                                                                                                               this.bindAttribLocation(program, index, name);\r
+                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void bindBuffer (int target, WebGLBuffer buffer) /*-{\r
+                                                                                                                                                                                               this.bindBuffer(target, buffer);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void bindFramebuffer (int target, WebGLFramebuffer framebuffer) /*-{\r
+                                                                                                                                                                                                                                       this.bindFramebuffer(target, framebuffer);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void bindRenderbuffer (int target, WebGLRenderbuffer renderbuffer) /*-{\r
+                                                                                                                                                                                                                                               this.bindRenderbuffer(target, renderbuffer);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void bindTexture (int target, WebGLTexture texture) /*-{\r
+                                                                                                                                                                                                       this.bindTexture(target, texture);\r
+                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void blendColor (float red, float green, float blue, float alpha) /*-{\r
+                                                                                                                                                                                                                                               this.blendColor(red, green, blue, alpha);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void blendEquation (int mode) /*-{\r
+                                                                                                                                               this.blendEquation(mode);\r
+                                                                                                                                               }-*/;\r
+\r
+       public final native void blendEquationSeparate (int modeRGB, int modeAlpha) /*-{\r
+                                                                                                                                                                                                                       this.blendEquationSeparate(modeRGB, modeAlpha);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void blendFunc (int sfactor, int dfactor) /*-{\r
+                                                                                                                                                                               this.blendFunc(sfactor, dfactor);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native void blendFuncSeparate (int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) /*-{\r
+                                                                                                                                                                                                                                                                       this.blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void bufferData (int target, int size, int usage) /*-{\r
+                                                                                                                                                                                                       this.bufferData(target, size, usage);\r
+                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void bufferData (int target, ArrayBufferView data, int usage) /*-{\r
+                                                                                                                                                                                                                                       this.bufferData(target, data, usage);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void bufferData (int target, ArrayBuffer data, int usage) /*-{\r
+                                                                                                                                                                                                                       this.bufferData(target, data, usage);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void bufferSubData (int target, int offset, ArrayBufferView data) /*-{\r
+                                                                                                                                                                                                                                               this.bufferSubData(target, offset, data);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void bufferSubData (int target, int offset, ArrayBuffer data) /*-{\r
+                                                                                                                                                                                                                                       this.bufferSubData(target, offset, data);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native int checkFramebufferStatus (int target) /*-{\r
+                                                                                                                                                                       return this.checkFramebufferStatus(target);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native void clear (int mask) /*-{\r
+                                                                                                                       this.clear(mask);\r
+                                                                                                                       }-*/;\r
 \r
-  public final native void texImage2D(int target, int level, int internalformat, int format, int type, VideoElement video) /*-{\r
-    this.texImage2D(target, level, internalformat, format, type, video);\r
-  }-*/;\r
+       public final native void clearColor (float red, float green, float blue, float alpha) /*-{\r
+                                                                                                                                                                                                                                               this.clearColor(red, green, blue, alpha);\r
+                                                                                                                                                                                                                                               }-*/;\r
 \r
-  public final native void texParameterf(int target, int pname, float param) /*-{\r
-    this.texParameterf(target, pname, param);\r
-  }-*/;\r
+       public final native void clearDepth (float depth) /*-{\r
+                                                                                                                                               this.clearDepth(depth);\r
+                                                                                                                                               }-*/;\r
 \r
-  public final native void texParameteri(int target, int pname, int param) /*-{\r
-    this.texParameteri(target, pname, param);\r
-  }-*/;\r
+       public final native void clearStencil (int s) /*-{\r
+                                                                                                                                       this.clearStencil(s);\r
+                                                                                                                                       }-*/;\r
 \r
-  public final native void texSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ArrayBufferView pixels) /*-{\r
-    this.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);\r
-  }-*/;\r
+       public final native void colorMask (boolean red, boolean green, boolean blue, boolean alpha) /*-{\r
+                                                                                                                                                                                                                                                               this.colorMask(red, green, blue, alpha);\r
+                                                                                                                                                                                                                                                               }-*/;\r
 \r
-  public final native void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, ImageData pixels) /*-{\r
-    this.texSubImage2D(target, level, xoffset, yoffset, format, type, pixels);\r
-  }-*/;\r
+       public final native void compileShader (WebGLShader shader) /*-{\r
+                                                                                                                                                                       this.compileShader(shader);\r
+                                                                                                                                                                       }-*/;\r
 \r
-  public final native void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, ImageElement image) /*-{\r
-    this.texSubImage2D(target, level, xoffset, yoffset, format, type, image);\r
-  }-*/;\r
+       public final native void copyTexImage2D (int target, int level, int internalformat, int x, int y, int width, int height,\r
+               int border) /*-{\r
+                                               this.copyTexImage2D(target, level, internalformat, x, y, width, height, border);\r
+                                               }-*/;\r
+\r
+       public final native void copyTexSubImage2D (int target, int level, int xoffset, int yoffset, int x, int y, int width,\r
+               int height) /*-{\r
+                                               this.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);\r
+                                               }-*/;\r
 \r
-  public final native void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, CanvasElement canvas) /*-{\r
-    this.texSubImage2D(target, level, xoffset, yoffset, format, type, canvas);\r
-  }-*/;\r
+       public final native WebGLBuffer createBuffer () /*-{\r
+                                                                                                                                       return this.createBuffer();\r
+                                                                                                                                       }-*/;\r
+\r
+       public final native WebGLFramebuffer createFramebuffer () /*-{\r
+                                                                                                                                                                       return this.createFramebuffer();\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native WebGLProgram createProgram () /*-{\r
+                                                                                                                                               return this.createProgram();\r
+                                                                                                                                               }-*/;\r
+\r
+       public final native WebGLRenderbuffer createRenderbuffer () /*-{\r
+                                                                                                                                                                       return this.createRenderbuffer();\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native WebGLShader createShader (int type) /*-{\r
+                                                                                                                                                               return this.createShader(type);\r
+                                                                                                                                                               }-*/;\r
+\r
+       public final native WebGLTexture createTexture () /*-{\r
+                                                                                                                                               return this.createTexture();\r
+                                                                                                                                               }-*/;\r
+\r
+       public final native void cullFace (int mode) /*-{\r
+                                                                                                                               this.cullFace(mode);\r
+                                                                                                                               }-*/;\r
+\r
+       public final native void deleteBuffer (WebGLBuffer buffer) /*-{\r
+                                                                                                                                                                       this.deleteBuffer(buffer);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native void deleteFramebuffer (WebGLFramebuffer framebuffer) /*-{\r
+                                                                                                                                                                                                               this.deleteFramebuffer(framebuffer);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void deleteProgram (WebGLProgram program) /*-{\r
+                                                                                                                                                                               this.deleteProgram(program);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native void deleteRenderbuffer (WebGLRenderbuffer renderbuffer) /*-{\r
+                                                                                                                                                                                                                       this.deleteRenderbuffer(renderbuffer);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void deleteShader (WebGLShader shader) /*-{\r
+                                                                                                                                                                       this.deleteShader(shader);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native void deleteTexture (WebGLTexture texture) /*-{\r
+                                                                                                                                                                               this.deleteTexture(texture);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native void depthFunc (int func) /*-{\r
+                                                                                                                                       this.depthFunc(func);\r
+                                                                                                                                       }-*/;\r
+\r
+       public final native void depthMask (boolean flag) /*-{\r
+                                                                                                                                               this.depthMask(flag);\r
+                                                                                                                                               }-*/;\r
+\r
+       public final native void depthRange (float zNear, float zFar) /*-{\r
+                                                                                                                                                                               this.depthRange(zNear, zFar);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native void detachShader (WebGLProgram program, WebGLShader shader) /*-{\r
+                                                                                                                                                                                                                               this.detachShader(program, shader);\r
+                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void disable (int cap) /*-{\r
+                                                                                                                               this.disable(cap);\r
+                                                                                                                               }-*/;\r
+\r
+       public final native void disableVertexAttribArray (int index) /*-{\r
+                                                                                                                                                                               this.disableVertexAttribArray(index);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native void drawArrays (int mode, int first, int count) /*-{\r
+                                                                                                                                                                                               this.drawArrays(mode, first, count);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void drawElements (int mode, int count, int type, int offset) /*-{\r
+                                                                                                                                                                                                                                       this.drawElements(mode, count, type, offset);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void enable (int cap) /*-{\r
+                                                                                                                       this.enable(cap);\r
+                                                                                                                       }-*/;\r
+\r
+       public final native void enableVertexAttribArray (int index) /*-{\r
+                                                                                                                                                                               this.enableVertexAttribArray(index);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native void finish () /*-{\r
+                                                                                                       this.finish();\r
+                                                                                                       }-*/;\r
+\r
+       public final native void flush () /*-{\r
+                                                                                                       this.flush();\r
+                                                                                                       }-*/;\r
 \r
-  public final native void texSubImage2D(int target, int level, int xoffset, int yoffset, int format, int type, VideoElement video) /*-{\r
-    this.texSubImage2D(target, level, xoffset, yoffset, format, type, video);\r
-  }-*/;\r
+       public final native void framebufferRenderbuffer (int target, int attachment, int renderbuffertarget,\r
+               WebGLRenderbuffer renderbuffer) /*-{\r
+                                                                                                       this.framebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);\r
+                                                                                                       }-*/;\r
 \r
-  public final native void uniform1f(WebGLUniformLocation location, float x) /*-{\r
-    this.uniform1f(location, x);\r
-  }-*/;\r
+       public final native void framebufferTexture2D (int target, int attachment, int textarget, WebGLTexture texture, int level) /*-{\r
+                                                                                                                                                                                                                                                                                                                                               this.framebufferTexture2D(target, attachment, textarget, texture, level);\r
+                                                                                                                                                                                                                                                                                                                                               }-*/;\r
 \r
-  public final void uniform1fv(WebGLUniformLocation location, Float32Array v) {\r
-    this.uniform1fv(location, (JavaScriptObject)v);\r
-  }\r
+       public final native void frontFace (int mode) /*-{\r
+                                                                                                                                       this.frontFace(mode);\r
+                                                                                                                                       }-*/;\r
 \r
-  public final void uniform1fv(WebGLUniformLocation location, float[] v) {\r
-    this.uniform1fv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       public final native void generateMipmap (int target) /*-{\r
+                                                                                                                                                       this.generateMipmap(target);\r
+                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform1fv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform1fv(location, v);\r
-  }-*/;\r
+       public final native WebGLActiveInfo getActiveAttrib (WebGLProgram program, int index) /*-{\r
+                                                                                                                                                                                                                                               return this.getActiveAttrib(program, index);\r
+                                                                                                                                                                                                                                               }-*/;\r
 \r
-  public final native void uniform1i(WebGLUniformLocation location, int x) /*-{\r
-    this.uniform1i(location, x);\r
-  }-*/;\r
+       public final native WebGLActiveInfo getActiveUniform (WebGLProgram program, int index) /*-{\r
+                                                                                                                                                                                                                                               return this.getActiveUniform(program, index);\r
+                                                                                                                                                                                                                                               }-*/;\r
 \r
-  public final void uniform1iv(WebGLUniformLocation location, Int32Array v) {\r
-    this.uniform1iv(location, (JavaScriptObject)v);\r
-  }\r
+       public final native JsArray<WebGLShader> getAttachedShaders (WebGLProgram program) /*-{\r
+                                                                                                                                                                                                                                       return this.getAttachedShaders(program);\r
+                                                                                                                                                                                                                                       }-*/;\r
 \r
-  public final void uniform1iv(WebGLUniformLocation location, int[] v) {\r
-    this.uniform1iv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       public final native int getAttribLocation (WebGLProgram program, String name) /*-{\r
+                                                                                                                                                                                                                       return this.getAttribLocation(program, name);\r
+                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform1iv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform1iv(location, v);\r
-  }-*/;\r
+       public final native int getError () /*-{\r
+                                                                                                       return this.getError();\r
+                                                                                                       }-*/;\r
 \r
-  public final native void uniform2f(WebGLUniformLocation location, float x, float y) /*-{\r
-    this.uniform2f(location, x, y);\r
-  }-*/;\r
+       public final native String getProgramInfoLog (WebGLProgram program) /*-{\r
+                                                                                                                                                                                               return this.getProgramInfoLog(program);\r
+                                                                                                                                                                                               }-*/;\r
 \r
-  public final void uniform2fv(WebGLUniformLocation location, Float32Array v) {\r
-    this.uniform2fv(location, (JavaScriptObject)v);\r
-  }\r
+       public final native String getShaderInfoLog (WebGLShader shader) /*-{\r
+                                                                                                                                                                                       return this.getShaderInfoLog(shader);\r
+                                                                                                                                                                                       }-*/;\r
 \r
-  public final void uniform2fv(WebGLUniformLocation location, float[] v) {\r
-    this.uniform2fv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       public final native String getShaderSource (WebGLShader shader) /*-{\r
+                                                                                                                                                                                       return this.getShaderSource(shader);\r
+                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform2fv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform2fv(location, v);\r
-  }-*/;\r
+       public final native WebGLUniformLocation getUniformLocation (WebGLProgram program, String name) /*-{\r
+                                                                                                                                                                                                                                                                       return this.getUniformLocation(program, name);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native int getVertexAttribOffset (int index, int pname) /*-{\r
+                                                                                                                                                                                               return this.getVertexAttribOffset(index, pname);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void hint (int target, int mode) /*-{\r
+                                                                                                                                                       this.hint(target, mode);\r
+                                                                                                                                                       }-*/;\r
+\r
+       public final native boolean isBuffer (WebGLBuffer buffer) /*-{\r
+                                                                                                                                                                       return this.isBuffer(buffer);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native boolean isEnabled (int cap) /*-{\r
+                                                                                                                                       return this.isEnabled(cap);\r
+                                                                                                                                       }-*/;\r
+\r
+       public final native boolean isFramebuffer (WebGLFramebuffer framebuffer) /*-{\r
+                                                                                                                                                                                                               return this.isFramebuffer(framebuffer);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native boolean isProgram (WebGLProgram program) /*-{\r
+                                                                                                                                                                               return this.isProgram(program);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native boolean isRenderbuffer (WebGLRenderbuffer renderbuffer) /*-{\r
+                                                                                                                                                                                                                       return this.isRenderbuffer(renderbuffer);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native boolean isShader (WebGLShader shader) /*-{\r
+                                                                                                                                                                       return this.isShader(shader);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native boolean isTexture (WebGLTexture texture) /*-{\r
+                                                                                                                                                                               return this.isTexture(texture);\r
+                                                                                                                                                                               }-*/;\r
+\r
+       public final native void lineWidth (float width) /*-{\r
+                                                                                                                                               this.lineWidth(width);\r
+                                                                                                                                               }-*/;\r
+\r
+       public final native void linkProgram (WebGLProgram program) /*-{\r
+                                                                                                                                                                       this.linkProgram(program);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native void pixelStorei (int pname, int param) /*-{\r
+                                                                                                                                                                       this.pixelStorei(pname, param);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native void polygonOffset (float factor, float units) /*-{\r
+                                                                                                                                                                                               this.polygonOffset(factor, units);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void readPixels (int x, int y, int width, int height, int format, int type, ArrayBufferView pixels) /*-{\r
+                                                                                                                                                                                                                                                                                                                                       this.readPixels(x, y, width, height, format, type, pixels);\r
+                                                                                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void renderbufferStorage (int target, int internalformat, int width, int height) /*-{\r
+                                                                                                                                                                                                                                                                                       this.renderbufferStorage(target, internalformat, width, height);\r
+                                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void sampleCoverage (float value, boolean invert) /*-{\r
+                                                                                                                                                                                                       this.sampleCoverage(value, invert);\r
+                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void scissor (int x, int y, int width, int height) /*-{\r
+                                                                                                                                                                                                       this.scissor(x, y, width, height);\r
+                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void shaderSource (WebGLShader shader, String source) /*-{\r
+                                                                                                                                                                                                               this.shaderSource(shader, source);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void stencilFunc (int func, int ref, int mask) /*-{\r
+                                                                                                                                                                                               this.stencilFunc(func, ref, mask);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void stencilFuncSeparate (int face, int func, int ref, int mask) /*-{\r
+                                                                                                                                                                                                                                               this.stencilFuncSeparate(face, func, ref, mask);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void stencilMask (int mask) /*-{\r
+                                                                                                                                       this.stencilMask(mask);\r
+                                                                                                                                       }-*/;\r
+\r
+       public final native void stencilMaskSeparate (int face, int mask) /*-{\r
+                                                                                                                                                                                       this.stencilMaskSeparate(face, mask);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void stencilOp (int fail, int zfail, int zpass) /*-{\r
+                                                                                                                                                                                               this.stencilOp(fail, zfail, zpass);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void stencilOpSeparate (int face, int fail, int zfail, int zpass) /*-{\r
+                                                                                                                                                                                                                                               this.stencilOpSeparate(face, fail, zfail, zpass);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void texImage2D (int target, int level, int internalformat, int width, int height, int border, int format,\r
+               int type, ArrayBufferView pixels) /*-{\r
+                                                                                                               this.texImage2D(target, level, internalformat, width, height, border, format, type, pixels);\r
+                                                                                                               }-*/;\r
+\r
+       public final native void texImage2D (int target, int level, int internalformat, int format, int type, ImageData pixels) /*-{\r
+                                                                                                                                                                                                                                                                                                                                       this.texImage2D(target, level, internalformat, format, type, pixels);\r
+                                                                                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void texImage2D (int target, int level, int internalformat, int format, int type, ImageElement image) /*-{\r
+                                                                                                                                                                                                                                                                                                                                               this.texImage2D(target, level, internalformat, format, type, image);\r
+                                                                                                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void texImage2D (int target, int level, int internalformat, int format, int type, CanvasElement canvas) /*-{\r
+                                                                                                                                                                                                                                                                                                                                                       this.texImage2D(target, level, internalformat, format, type, canvas);\r
+                                                                                                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void texImage2D (int target, int level, int internalformat, int format, int type, VideoElement video) /*-{\r
+                                                                                                                                                                                                                                                                                                                                               this.texImage2D(target, level, internalformat, format, type, video);\r
+                                                                                                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void texParameterf (int target, int pname, float param) /*-{\r
+                                                                                                                                                                                                                       this.texParameterf(target, pname, param);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void texParameteri (int target, int pname, int param) /*-{\r
+                                                                                                                                                                                                               this.texParameteri(target, pname, param);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void texSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height, int format,\r
+               int type, ArrayBufferView pixels) /*-{\r
+                                                                                                               this.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);\r
+                                                                                                               }-*/;\r
+\r
+       public final native void texSubImage2D (int target, int level, int xoffset, int yoffset, int format, int type, ImageData pixels) /*-{\r
+                                                                                                                                                                                                                                                                                                                                                               this.texSubImage2D(target, level, xoffset, yoffset, format, type, pixels);\r
+                                                                                                                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final native void texSubImage2D (int target, int level, int xoffset, int yoffset, int format, int type,\r
+               ImageElement image) /*-{\r
+                                                                       this.texSubImage2D(target, level, xoffset, yoffset, format, type, image);\r
+                                                                       }-*/;\r
+\r
+       public final native void texSubImage2D (int target, int level, int xoffset, int yoffset, int format, int type,\r
+               CanvasElement canvas) /*-{\r
+                                                                               this.texSubImage2D(target, level, xoffset, yoffset, format, type, canvas);\r
+                                                                               }-*/;\r
+\r
+       public final native void texSubImage2D (int target, int level, int xoffset, int yoffset, int format, int type,\r
+               VideoElement video) /*-{\r
+                                                                       this.texSubImage2D(target, level, xoffset, yoffset, format, type, video);\r
+                                                                       }-*/;\r
+\r
+       public final native void uniform1f (WebGLUniformLocation location, float x) /*-{\r
+                                                                                                                                                                                                                       this.uniform1f(location, x);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final void uniform1fv (WebGLUniformLocation location, Float32Array v) {\r
+               this.uniform1fv(location, (JavaScriptObject)v);\r
+       }\r
+\r
+       public final void uniform1fv (WebGLUniformLocation location, float[] v) {\r
+               this.uniform1fv(location, ArrayUtils.toJsArray(v));\r
+       }\r
+\r
+       private final native void uniform1fv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform1fv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void uniform1i (WebGLUniformLocation location, int x) /*-{\r
+                                                                                                                                                                                                               this.uniform1i(location, x);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       public final void uniform1iv (WebGLUniformLocation location, Int32Array v) {\r
+               this.uniform1iv(location, (JavaScriptObject)v);\r
+       }\r
+\r
+       public final void uniform1iv (WebGLUniformLocation location, int[] v) {\r
+               this.uniform1iv(location, ArrayUtils.toJsArray(v));\r
+       }\r
+\r
+       private final native void uniform1iv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform1iv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void uniform2f (WebGLUniformLocation location, float x, float y) /*-{\r
+                                                                                                                                                                                                                                               this.uniform2f(location, x, y);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final void uniform2fv (WebGLUniformLocation location, Float32Array v) {\r
+               this.uniform2fv(location, (JavaScriptObject)v);\r
+       }\r
+\r
+       public final void uniform2fv (WebGLUniformLocation location, float[] v) {\r
+               this.uniform2fv(location, ArrayUtils.toJsArray(v));\r
+       }\r
+\r
+       private final native void uniform2fv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform2fv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void uniform2i (WebGLUniformLocation location, int x, int y) /*-{\r
+                                                                                                                                                                                                                               this.uniform2i(location, x, y);\r
+                                                                                                                                                                                                                               }-*/;\r
 \r
-  public final native void uniform2i(WebGLUniformLocation location, int x, int y) /*-{\r
-    this.uniform2i(location, x, y);\r
-  }-*/;\r
+       public final void uniform2iv (WebGLUniformLocation location, Int32Array v) {\r
+               this.uniform2iv(location, (JavaScriptObject)v);\r
+       }\r
 \r
-  public final void uniform2iv(WebGLUniformLocation location, Int32Array v) {\r
-    this.uniform2iv(location, (JavaScriptObject)v);\r
-  }\r
+       public final void uniform2iv (WebGLUniformLocation location, int[] v) {\r
+               this.uniform2iv(location, ArrayUtils.toJsArray(v));\r
+       }\r
 \r
-  public final void uniform2iv(WebGLUniformLocation location, int[] v) {\r
-    this.uniform2iv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       private final native void uniform2iv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform2iv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform2iv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform2iv(location, v);\r
-  }-*/;\r
+       public final native void uniform3f (WebGLUniformLocation location, float x, float y, float z) /*-{\r
+                                                                                                                                                                                                                                                                       this.uniform3f(location, x, y, z);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  public final native void uniform3f(WebGLUniformLocation location, float x, float y, float z) /*-{\r
-    this.uniform3f(location, x, y, z);\r
-  }-*/;\r
+       public final void uniform3fv (WebGLUniformLocation location, Float32Array v) {\r
+               this.uniform3fv(location, (JavaScriptObject)v);\r
+       }\r
 \r
-  public final void uniform3fv(WebGLUniformLocation location, Float32Array v) {\r
-    this.uniform3fv(location, (JavaScriptObject)v);\r
-  }\r
+       public final void uniform3fv (WebGLUniformLocation location, float[] v) {\r
+               this.uniform3fv(location, ArrayUtils.toJsArray(v));\r
+       }\r
 \r
-  public final void uniform3fv(WebGLUniformLocation location, float[] v) {\r
-    this.uniform3fv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       private final native void uniform3fv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform3fv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform3fv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform3fv(location, v);\r
-  }-*/;\r
+       public final native void uniform3i (WebGLUniformLocation location, int x, int y, int z) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform3i(location, x, y, z);\r
+                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  public final native void uniform3i(WebGLUniformLocation location, int x, int y, int z) /*-{\r
-    this.uniform3i(location, x, y, z);\r
-  }-*/;\r
+       public final void uniform3iv (WebGLUniformLocation location, Int32Array v) {\r
+               this.uniform3iv(location, (JavaScriptObject)v);\r
+       }\r
 \r
-  public final void uniform3iv(WebGLUniformLocation location, Int32Array v) {\r
-    this.uniform3iv(location, (JavaScriptObject)v);\r
-  }\r
+       public final void uniform3iv (WebGLUniformLocation location, int[] v) {\r
+               this.uniform3iv(location, ArrayUtils.toJsArray(v));\r
+       }\r
 \r
-  public final void uniform3iv(WebGLUniformLocation location, int[] v) {\r
-    this.uniform3iv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       private final native void uniform3iv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform3iv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform3iv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform3iv(location, v);\r
-  }-*/;\r
+       public final native void uniform4f (WebGLUniformLocation location, float x, float y, float z, float w) /*-{\r
+                                                                                                                                                                                                                                                                                               this.uniform4f(location, x, y, z, w);\r
+                                                                                                                                                                                                                                                                                               }-*/;\r
 \r
-  public final native void uniform4f(WebGLUniformLocation location, float x, float y, float z, float w) /*-{\r
-    this.uniform4f(location, x, y, z, w);\r
-  }-*/;\r
+       public final void uniform4fv (WebGLUniformLocation location, Float32Array v) {\r
+               this.uniform4fv(location, (JavaScriptObject)v);\r
+       }\r
 \r
-  public final void uniform4fv(WebGLUniformLocation location, Float32Array v) {\r
-    this.uniform4fv(location, (JavaScriptObject)v);\r
-  }\r
+       public final void uniform4fv (WebGLUniformLocation location, float[] v) {\r
+               this.uniform4fv(location, ArrayUtils.toJsArray(v));\r
+       }\r
 \r
-  public final void uniform4fv(WebGLUniformLocation location, float[] v) {\r
-    this.uniform4fv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       private final native void uniform4fv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform4fv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform4fv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform4fv(location, v);\r
-  }-*/;\r
+       public final native void uniform4i (WebGLUniformLocation location, int x, int y, int z, int w) /*-{\r
+                                                                                                                                                                                                                                                                       this.uniform4i(location, x, y, z, w);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  public final native void uniform4i(WebGLUniformLocation location, int x, int y, int z, int w) /*-{\r
-    this.uniform4i(location, x, y, z, w);\r
-  }-*/;\r
+       public final void uniform4iv (WebGLUniformLocation location, Int32Array v) {\r
+               this.uniform4iv(location, (JavaScriptObject)v);\r
+       }\r
 \r
-  public final void uniform4iv(WebGLUniformLocation location, Int32Array v) {\r
-    this.uniform4iv(location, (JavaScriptObject)v);\r
-  }\r
+       public final void uniform4iv (WebGLUniformLocation location, int[] v) {\r
+               this.uniform4iv(location, ArrayUtils.toJsArray(v));\r
+       }\r
 \r
-  public final void uniform4iv(WebGLUniformLocation location, int[] v) {\r
-    this.uniform4iv(location, ArrayUtils.toJsArray(v));\r
-  }\r
+       private final native void uniform4iv (WebGLUniformLocation location, JavaScriptObject v) /*-{\r
+                                                                                                                                                                                                                                                       this.uniform4iv(location, v);\r
+                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniform4iv(WebGLUniformLocation location, JavaScriptObject v) /*-{\r
-    this.uniform4iv(location, v);\r
-  }-*/;\r
+       public final void uniformMatrix2fv (WebGLUniformLocation location, boolean transpose, Float32Array value) {\r
+               this.uniformMatrix2fv(location, transpose, (JavaScriptObject)value);\r
+       }\r
 \r
-  public final void uniformMatrix2fv(WebGLUniformLocation location, boolean transpose, Float32Array value) {\r
-    this.uniformMatrix2fv(location, transpose, (JavaScriptObject)value);\r
-  }\r
+       public final void uniformMatrix2fv (WebGLUniformLocation location, boolean transpose, float[] value) {\r
+               this.uniformMatrix2fv(location, transpose, ArrayUtils.toJsArray(value));\r
+       }\r
 \r
-  public final void uniformMatrix2fv(WebGLUniformLocation location, boolean transpose, float[] value) {\r
-    this.uniformMatrix2fv(location, transpose, ArrayUtils.toJsArray(value));\r
-  }\r
+       private final native void uniformMatrix2fv (WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{\r
+                                                                                                                                                                                                                                                                                                                                       this.uniformMatrix2fv(location, transpose, value);\r
+                                                                                                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniformMatrix2fv(WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{\r
-    this.uniformMatrix2fv(location, transpose, value);\r
-  }-*/;\r
+       public final void uniformMatrix3fv (WebGLUniformLocation location, boolean transpose, Float32Array value) {\r
+               this.uniformMatrix3fv(location, transpose, (JavaScriptObject)value);\r
+       }\r
 \r
-  public final void uniformMatrix3fv(WebGLUniformLocation location, boolean transpose, Float32Array value) {\r
-    this.uniformMatrix3fv(location, transpose, (JavaScriptObject)value);\r
-  }\r
+       public final void uniformMatrix3fv (WebGLUniformLocation location, boolean transpose, float[] value) {\r
+               this.uniformMatrix3fv(location, transpose, ArrayUtils.toJsArray(value));\r
+       }\r
 \r
-  public final void uniformMatrix3fv(WebGLUniformLocation location, boolean transpose, float[] value) {\r
-    this.uniformMatrix3fv(location, transpose, ArrayUtils.toJsArray(value));\r
-  }\r
+       private final native void uniformMatrix3fv (WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{\r
+                                                                                                                                                                                                                                                                                                                                       this.uniformMatrix3fv(location, transpose, value);\r
+                                                                                                                                                                                                                                                                                                                                       }-*/;\r
 \r
-  private final native void uniformMatrix3fv(WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{\r
-    this.uniformMatrix3fv(location, transpose, value);\r
-  }-*/;\r
-\r
-  public final void uniformMatrix4fv(WebGLUniformLocation location, boolean transpose, Float32Array value) {\r
-    this.uniformMatrix4fv(location, transpose, (JavaScriptObject)value);\r
-  }\r
-\r
-  public final void uniformMatrix4fv(WebGLUniformLocation location, boolean transpose, float[] value) {\r
-    uniformMatrix4fv(location, transpose, ArrayUtils.toJsArray(value));\r
-  }\r
-\r
-  private final native void uniformMatrix4fv(WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{\r
-    this.uniformMatrix4fv(location, transpose, value);\r
-  }-*/;\r
-\r
-  public final native void useProgram(WebGLProgram program) /*-{\r
-    this.useProgram(program);\r
-  }-*/;\r
-\r
-  public final native void validateProgram(WebGLProgram program) /*-{\r
-    this.validateProgram(program);\r
-  }-*/;\r
-\r
-  public final native void vertexAttrib1f(int indx, float x) /*-{\r
-    this.vertexAttrib1f(indx, x);\r
-  }-*/;\r
-\r
-  public final void vertexAttrib1fv(int indx, Float32Array values) {\r
-    this.vertexAttrib1fv(indx, (JavaScriptObject)values);\r
-  }\r
-\r
-  public final void vertexAttrib1fv(int indx, float[] values) {\r
-    this.vertexAttrib1fv(indx, ArrayUtils.toJsArray(values));\r
-  }\r
-\r
-  private final native void vertexAttrib1fv(int indx, JavaScriptObject values) /*-{\r
-    this.vertexAttrib1fv(indx, values);\r
-  }-*/;\r
-\r
-  public final native void vertexAttrib2f(int indx, float x, float y) /*-{\r
-    this.vertexAttrib2f(indx, x, y);\r
-  }-*/;\r
-\r
-  public final void vertexAttrib2fv(int indx, Float32Array values) {\r
-    this.vertexAttrib2fv(indx, (JavaScriptObject)values);\r
-  }\r
-\r
-  public final void vertexAttrib2fv(int indx, float[] values) {\r
-    this.vertexAttrib2fv(indx, ArrayUtils.toJsArray(values));\r
-  }\r
-\r
-  private final native void vertexAttrib2fv(int indx, JavaScriptObject values) /*-{\r
-    this.vertexAttrib2fv(indx, values);\r
-  }-*/;\r
-\r
-  public final native void vertexAttrib3f(int indx, float x, float y, float z) /*-{\r
-    this.vertexAttrib3f(indx, x, y, z);\r
-  }-*/;\r
-\r
-  public final void vertexAttrib3fv(int indx, Float32Array values) {\r
-    this.vertexAttrib3fv(indx, (JavaScriptObject)values);\r
-  }\r
-\r
-  public final void vertexAttrib3fv(int indx, float[] values) {\r
-    this.vertexAttrib3fv(indx, ArrayUtils.toJsArray(values));\r
-  }\r
-\r
-  private final native void vertexAttrib3fv(int indx, JavaScriptObject values) /*-{\r
-    this.vertexAttrib3fv(indx, values);\r
-  }-*/;\r
-\r
-  public final native void vertexAttrib4f(int indx, float x, float y, float z, float w) /*-{\r
-    this.vertexAttrib4f(indx, x, y, z, w);\r
-  }-*/;\r
-\r
-  public final void vertexAttrib4fv(int indx, Float32Array values) {\r
-    this.vertexAttrib4fv(indx, (JavaScriptObject)values);\r
-  }\r
-\r
-  public final void vertexAttrib4fv(int indx, float[] values) {\r
-    this.vertexAttrib4fv(indx, ArrayUtils.toJsArray(values));\r
-  }\r
-\r
-  private final native void vertexAttrib4fv(int indx, JavaScriptObject values) /*-{\r
-    this.vertexAttrib4fv(indx, values);\r
-  }-*/;\r
-\r
-  public final native void vertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, int offset) /*-{\r
-    this.vertexAttribPointer(indx, size, type, normalized, stride, offset);\r
-  }-*/;\r
-\r
-  public final native void viewport(int x, int y, int width, int height) /*-{\r
-    this.viewport(x, y, width, height);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname.\r
-   *\r
-   * @param pname one of RENDERER, SHADING_LANGUAGE_VERSION, VENDOR, VERSION\r
-   */\r
-  public final native String getParameterString(int pname) /*-{\r
-    return this.getParameter(pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname.\r
-   *\r
-   * @param pname one of ACTIVE_TEXTURE, ALPHA_BITS, BLEND_DST_ALPHA, BLEND_DST_RGB, BLEND_EQUATION_ALPHA, BLEND_EQUATION_RGB, BLEND_SRC_ALPHA, BLEND_SRC_RGB, BLUE_BITS, CULL_FACE_MODE, DEPTH_BITS, DEPTH_FUNC, FRONT_FACE, GENERATE_MIPMAP_HINT, GREEN_BITS, IMPLEMENTATION_COLOR_READ_FORMAT, IMPLEMENTATION_COLOR_READ_TYPE, MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_CUBE_MAP_TEXTURE_SIZE, MAX_FRAGMENT_UNIFORM_VECTORS, MAX_RENDERBUFFER_SIZE, MAX_TEXTURE_IMAGE_UNITS, MAX_TEXTURE_SIZE, MAX_VARYING_VECTORS, MAX_VERTEX_ATTRIBS, MAX_VERTEX_TEXTURE_IMAGE_UNITS, MAX_VERTEX_UNIFORM_VECTORS, NUM_COMPRESSED_TEXTURE_FORMATS, PACK_ALIGNMENT, RED_BITS, SAMPLE_BUFFERS, SAMPLES, STENCIL_BACK_FAIL, STENCIL_BACK_FUNC, STENCIL_BACK_PASS_DEPTH_FAIL, STENCIL_BACK_PASS_DEPTH_PASS, STENCIL_BACK_REF, STENCIL_BACK_VALUE_MASK, STENCIL_BACK_WRITEMASK, STENCIL_BITS, STENCIL_CLEAR_VALUE, STENCIL_FAIL, STENCIL_FUNC, STENCIL_PASS_DEPTH_FAIL, STENCIL_PASS_DEPTH_PASS, STENCIL_REF, STENCIL_VALUE_MASK, STENCIL_WRITEMASK, SUBPIXEL_BITS, UNPACK_ALIGNMENT\r
-   */\r
-  public final native int getParameteri(int pname) /*-{\r
-    return this.getParameter(pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname.\r
-   *\r
-   * @param pname one of BLEND, CULL_FACE, DEPTH_TEST, DEPTH_WRITEMASK, DITHER, POLYGON_OFFSET_FILL, SAMPLE_COVERAGE_INVERT, SCISSOR_TEST, STENCIL_TEST, UNPACK_FLIP_Y_WEBGL, UNPACK_PREMULTIPLY_ALPHA_WEBGL\r
-   */\r
-  public final native boolean getParameterb(int pname) /*-{\r
-    return this.getParameter(pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname.\r
-   *\r
-   * @param pname one of DEPTH_CLEAR_VALUE, LINE_WIDTH, POLYGON_OFFSET_FACTOR, POLYGON_OFFSET_UNITS, SAMPLE_COVERAGE_VALUE\r
-   */\r
-  public final native float getParameterf(int pname) /*-{\r
-    return this.getParameter(pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname.\r
-   *\r
-   * @param pname one of ARRAY_BUFFER_BINDING, COMPRESSED_TEXTURE_FORMATS, CURRENT_PROGRAM, ELEMENT_ARRAY_BUFFER_BINDING, FRAMEBUFFER_BINDING, RENDERBUFFER_BINDING, TEXTURE_BINDING_2D, TEXTURE_BINDING_CUBE_MAP\r
-   */\r
-  public final native <T extends WebGLObject> T getParametero(int pname) /*-{\r
-    return this.getParameter(pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname.\r
-   *\r
-   * @param pname one of ALIASED_LINE_WIDTH_RANGE, ALIASED_POINT_SIZE_RANGE, BLEND_COLOR, COLOR_CLEAR_VALUE, COLOR_WRITEMASK, DEPTH_RANGE, MAX_VIEWPORT_DIMS, SCISSOR_BOX, VIEWPORT\r
-   */\r
-  public final native <T extends ArrayBufferView> T getParameterv(int pname) /*-{\r
-    return this.getParameter(pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the uniform value at the passed location in the passed program.\r
-   */\r
-  public final native boolean getUniformb(WebGLProgram program, WebGLUniformLocation location) /*-{\r
-    return this.getUniform(program, location);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the uniform value at the passed location in the passed program.\r
-   */\r
-  public final native int getUniformi(WebGLProgram program, WebGLUniformLocation location) /*-{\r
-    return this.getUniform(program, location);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the uniform value at the passed location in the passed program.\r
-   */\r
-  public final native float getUniformf(WebGLProgram program, WebGLUniformLocation location) /*-{\r
-    return this.getUniform(program, location);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the uniform value at the passed location in the passed program.\r
-   */\r
-  public final native <T extends ArrayBufferView> T getUniformv(WebGLProgram program, WebGLUniformLocation location) /*-{\r
-    return this.getUniform(program, location);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the information requested in pname about the vertex attribute at the passed index.\r
-   *\r
-   * @param pname one of VERTEX_ATTRIB_ARRAY_SIZE, VERTEX_ATTRIB_ARRAY_STRIDE, VERTEX_ATTRIB_ARRAY_TYPE\r
-   */\r
-  public final native int getVertexAttribi(int index, int pname) /*-{\r
-    return this.getVertexAttrib(index, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the information requested in pname about the vertex attribute at the passed index.\r
-   *\r
-   * @param pname one of VERTEX_ATTRIB_ARRAY_ENABLED, VERTEX_ATTRIB_ARRAY_NORMALIZED\r
-   */\r
-  public final native boolean getVertexAttribb(int index, int pname) /*-{\r
-    return this.getVertexAttrib(index, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the information requested in pname about the vertex attribute at the passed index.\r
-   *\r
-   * @param pname VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\r
-   * @return {@link WebGLBuffer}\r
-   */\r
-  public final native <T extends WebGLObject> T getVertexAttribo(int index, int pname) /*-{\r
-    return this.getVertexAttrib(index, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the information requested in pname about the vertex attribute at the passed index.\r
-   *\r
-   * @param pname CURRENT_VERTEX_ATTRIB\r
-   * @return a {@link Float32Array} with 4 elements\r
-   */\r
-  public final native Float32Array getVertexAttribv(int index, int pname) /*-{\r
-    return this.getVertexAttrib(index, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed target. The type returned is the natural type for the requested pname, as given in the following table: If an attempt is made to call this function with no WebGLTexture bound (see above), an INVALID_OPERATION error is generated.\r
-   *\r
-   * @param pname one of TEXTURE_MAG_FILTER, TEXTURE_MIN_FILTER, TEXTURE_WRAP_S, TEXTURE_WRAP_T\r
-   */\r
-  public final native int getTexParameter(int target, int pname) /*-{\r
-    return this.getTexParameter(target, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed shader.\r
-   *\r
-   * @param pname one of DELETE_STATUS, COMPILE_STATUS\r
-   */\r
-  public final native boolean getShaderParameterb(WebGLShader shader, int pname) /*-{\r
-    return this.getShaderParameter(shader, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed shader.\r
-   *\r
-   * @param pname one of SHADER_TYPE, INFO_LOG_LENGTH, SHADER_SOURCE_LENGTH\r
-   */\r
-  public final native int getShaderParameteri(WebGLShader shader, int pname) /*-{\r
-    return this.getShaderParameter(shader, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed target.\r
-   *\r
-   * @param pname one of RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, RENDERBUFFER_INTERNAL_FORMAT, RENDERBUFFER_RED_SIZE, RENDERBUFFER_GREEN_SIZE, RENDERBUFFER_BLUE_SIZE, RENDERBUFFER_ALPHA_SIZE, RENDERBUFFER_DEPTH_SIZE, RENDERBUFFER_STENCIL_SIZE\r
-   */\r
-  public final native int getRenderbufferParameter(int target, int pname) /*-{\r
-    return this.getRenderbufferParameter(target, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed program.\r
-   *\r
-   * @param pname one of DELETE_STATUS, LINK_STATUS, VALIDATE_STATUS\r
-   */\r
-  public final native boolean getProgramParameterb(WebGLProgram program, int pname) /*-{\r
-    return this.getProgramParameter(program, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed program.\r
-   *\r
-   * @param pname one of INFO_LOG_LENGTH, ATTACHED_SHADERS, ACTIVE_ATTRIBUTES, ACTIVE_ATTRIBUTE_MAX_LENGTH, ACTIVE_UNIFORMS, ACTIVE_UNIFORM_MAX_LENGTH\r
-   */\r
-  public final native int getProgramParameteri(WebGLProgram program, int pname) /*-{\r
-    return this.getProgramParameter(program, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname.\r
-   *\r
-   * @param pname one of BUFFER_SIZE, BUFFER_USAGE\r
-   */\r
-  public final native int getBufferParameter(int target, int pname) /*-{\r
-    return this.getBufferParameter(target, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed target and attachment.\r
-   *\r
-   * @param pname one of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\r
-   */\r
-  public final native int getFramebufferAttachmentParameteri(int target,\r
-      int attachment, int pname) /*-{\r
-    return this.getFramebufferAttachmentParameter(target, attachment, pname);\r
-  }-*/;\r
-\r
-  /**\r
-   * Return the value for the passed pname given the passed target and attachment.\r
-   *\r
-   * @param pname FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\r
-   * @return {@link WebGLRenderbuffer} or {@link WebGLTexture}\r
-   */\r
-  public final native <T extends WebGLObject> T getFramebufferAttachmentParametero(int target,\r
-      int attachment, int pname) /*-{\r
-    return this.getFramebufferAttachmentParameter(target, attachment, pname);\r
-  }-*/;\r
+       public final void uniformMatrix4fv (WebGLUniformLocation location, boolean transpose, Float32Array value) {\r
+               this.uniformMatrix4fv(location, transpose, (JavaScriptObject)value);\r
+       }\r
+\r
+       public final void uniformMatrix4fv (WebGLUniformLocation location, boolean transpose, float[] value) {\r
+               uniformMatrix4fv(location, transpose, ArrayUtils.toJsArray(value));\r
+       }\r
+\r
+       private final native void uniformMatrix4fv (WebGLUniformLocation location, boolean transpose, JavaScriptObject value) /*-{\r
+                                                                                                                                                                                                                                                                                                                                       this.uniformMatrix4fv(location, transpose, value);\r
+                                                                                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void useProgram (WebGLProgram program) /*-{\r
+                                                                                                                                                                       this.useProgram(program);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final native void validateProgram (WebGLProgram program) /*-{\r
+                                                                                                                                                                                       this.validateProgram(program);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void vertexAttrib1f (int indx, float x) /*-{\r
+                                                                                                                                                                       this.vertexAttrib1f(indx, x);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       public final void vertexAttrib1fv (int indx, Float32Array values) {\r
+               this.vertexAttrib1fv(indx, (JavaScriptObject)values);\r
+       }\r
+\r
+       public final void vertexAttrib1fv (int indx, float[] values) {\r
+               this.vertexAttrib1fv(indx, ArrayUtils.toJsArray(values));\r
+       }\r
+\r
+       private final native void vertexAttrib1fv (int indx, JavaScriptObject values) /*-{\r
+                                                                                                                                                                                                                       this.vertexAttrib1fv(indx, values);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void vertexAttrib2f (int indx, float x, float y) /*-{\r
+                                                                                                                                                                                               this.vertexAttrib2f(indx, x, y);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       public final void vertexAttrib2fv (int indx, Float32Array values) {\r
+               this.vertexAttrib2fv(indx, (JavaScriptObject)values);\r
+       }\r
+\r
+       public final void vertexAttrib2fv (int indx, float[] values) {\r
+               this.vertexAttrib2fv(indx, ArrayUtils.toJsArray(values));\r
+       }\r
+\r
+       private final native void vertexAttrib2fv (int indx, JavaScriptObject values) /*-{\r
+                                                                                                                                                                                                                       this.vertexAttrib2fv(indx, values);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void vertexAttrib3f (int indx, float x, float y, float z) /*-{\r
+                                                                                                                                                                                                                       this.vertexAttrib3f(indx, x, y, z);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final void vertexAttrib3fv (int indx, Float32Array values) {\r
+               this.vertexAttrib3fv(indx, (JavaScriptObject)values);\r
+       }\r
+\r
+       public final void vertexAttrib3fv (int indx, float[] values) {\r
+               this.vertexAttrib3fv(indx, ArrayUtils.toJsArray(values));\r
+       }\r
+\r
+       private final native void vertexAttrib3fv (int indx, JavaScriptObject values) /*-{\r
+                                                                                                                                                                                                                       this.vertexAttrib3fv(indx, values);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void vertexAttrib4f (int indx, float x, float y, float z, float w) /*-{\r
+                                                                                                                                                                                                                                               this.vertexAttrib4f(indx, x, y, z, w);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       public final void vertexAttrib4fv (int indx, Float32Array values) {\r
+               this.vertexAttrib4fv(indx, (JavaScriptObject)values);\r
+       }\r
+\r
+       public final void vertexAttrib4fv (int indx, float[] values) {\r
+               this.vertexAttrib4fv(indx, ArrayUtils.toJsArray(values));\r
+       }\r
+\r
+       private final native void vertexAttrib4fv (int indx, JavaScriptObject values) /*-{\r
+                                                                                                                                                                                                                       this.vertexAttrib4fv(indx, values);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void vertexAttribPointer (int indx, int size, int type, boolean normalized, int stride, int offset) /*-{\r
+                                                                                                                                                                                                                                                                                                                                       this.vertexAttribPointer(indx, size, type, normalized, stride, offset);\r
+                                                                                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       public final native void viewport (int x, int y, int width, int height) /*-{\r
+                                                                                                                                                                                                       this.viewport(x, y, width, height);\r
+                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname.\r
+        * \r
+        * @param pname one of RENDERER, SHADING_LANGUAGE_VERSION, VENDOR, VERSION */\r
+       public final native String getParameterString (int pname) /*-{\r
+                                                                                                                                                                       return this.getParameter(pname);\r
+                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname.\r
+        * \r
+        * @param pname one of ACTIVE_TEXTURE, ALPHA_BITS, BLEND_DST_ALPHA, BLEND_DST_RGB, BLEND_EQUATION_ALPHA, BLEND_EQUATION_RGB,\r
+        *           BLEND_SRC_ALPHA, BLEND_SRC_RGB, BLUE_BITS, CULL_FACE_MODE, DEPTH_BITS, DEPTH_FUNC, FRONT_FACE,\r
+        *           GENERATE_MIPMAP_HINT, GREEN_BITS, IMPLEMENTATION_COLOR_READ_FORMAT, IMPLEMENTATION_COLOR_READ_TYPE,\r
+        *           MAX_COMBINED_TEXTURE_IMAGE_UNITS, MAX_CUBE_MAP_TEXTURE_SIZE, MAX_FRAGMENT_UNIFORM_VECTORS, MAX_RENDERBUFFER_SIZE,\r
+        *           MAX_TEXTURE_IMAGE_UNITS, MAX_TEXTURE_SIZE, MAX_VARYING_VECTORS, MAX_VERTEX_ATTRIBS,\r
+        *           MAX_VERTEX_TEXTURE_IMAGE_UNITS, MAX_VERTEX_UNIFORM_VECTORS, NUM_COMPRESSED_TEXTURE_FORMATS, PACK_ALIGNMENT,\r
+        *           RED_BITS, SAMPLE_BUFFERS, SAMPLES, STENCIL_BACK_FAIL, STENCIL_BACK_FUNC, STENCIL_BACK_PASS_DEPTH_FAIL,\r
+        *           STENCIL_BACK_PASS_DEPTH_PASS, STENCIL_BACK_REF, STENCIL_BACK_VALUE_MASK, STENCIL_BACK_WRITEMASK, STENCIL_BITS,\r
+        *           STENCIL_CLEAR_VALUE, STENCIL_FAIL, STENCIL_FUNC, STENCIL_PASS_DEPTH_FAIL, STENCIL_PASS_DEPTH_PASS, STENCIL_REF,\r
+        *           STENCIL_VALUE_MASK, STENCIL_WRITEMASK, SUBPIXEL_BITS, UNPACK_ALIGNMENT */\r
+       public final native int getParameteri (int pname) /*-{\r
+                                                                                                                                               return this.getParameter(pname);\r
+                                                                                                                                               }-*/;\r
+\r
+       /** Return the value for the passed pname.\r
+        * \r
+        * @param pname one of BLEND, CULL_FACE, DEPTH_TEST, DEPTH_WRITEMASK, DITHER, POLYGON_OFFSET_FILL, SAMPLE_COVERAGE_INVERT,\r
+        *           SCISSOR_TEST, STENCIL_TEST, UNPACK_FLIP_Y_WEBGL, UNPACK_PREMULTIPLY_ALPHA_WEBGL */\r
+       public final native boolean getParameterb (int pname) /*-{\r
+                                                                                                                                                       return this.getParameter(pname);\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname.\r
+        * \r
+        * @param pname one of DEPTH_CLEAR_VALUE, LINE_WIDTH, POLYGON_OFFSET_FACTOR, POLYGON_OFFSET_UNITS, SAMPLE_COVERAGE_VALUE */\r
+       public final native float getParameterf (int pname) /*-{\r
+                                                                                                                                                       return this.getParameter(pname);\r
+                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname.\r
+        * \r
+        * @param pname one of ARRAY_BUFFER_BINDING, COMPRESSED_TEXTURE_FORMATS, CURRENT_PROGRAM, ELEMENT_ARRAY_BUFFER_BINDING,\r
+        *           FRAMEBUFFER_BINDING, RENDERBUFFER_BINDING, TEXTURE_BINDING_2D, TEXTURE_BINDING_CUBE_MAP */\r
+       public final native <T extends WebGLObject> T getParametero (int pname) /*-{\r
+                                                                                                                                                                                                       return this.getParameter(pname);\r
+                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname.\r
+        * \r
+        * @param pname one of ALIASED_LINE_WIDTH_RANGE, ALIASED_POINT_SIZE_RANGE, BLEND_COLOR, COLOR_CLEAR_VALUE, COLOR_WRITEMASK,\r
+        *           DEPTH_RANGE, MAX_VIEWPORT_DIMS, SCISSOR_BOX, VIEWPORT */\r
+       public final native <T extends ArrayBufferView> T getParameterv (int pname) /*-{\r
+                                                                                                                                                                                                                       return this.getParameter(pname);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the uniform value at the passed location in the passed program. */\r
+       public final native boolean getUniformb (WebGLProgram program, WebGLUniformLocation location) /*-{\r
+                                                                                                                                                                                                                                                                       return this.getUniform(program, location);\r
+                                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the uniform value at the passed location in the passed program. */\r
+       public final native int getUniformi (WebGLProgram program, WebGLUniformLocation location) /*-{\r
+                                                                                                                                                                                                                                                       return this.getUniform(program, location);\r
+                                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the uniform value at the passed location in the passed program. */\r
+       public final native float getUniformf (WebGLProgram program, WebGLUniformLocation location) /*-{\r
+                                                                                                                                                                                                                                                               return this.getUniform(program, location);\r
+                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the uniform value at the passed location in the passed program. */\r
+       public final native <T extends ArrayBufferView> T getUniformv (WebGLProgram program, WebGLUniformLocation location) /*-{\r
+                                                                                                                                                                                                                                                                                                                               return this.getUniform(program, location);\r
+                                                                                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the information requested in pname about the vertex attribute at the passed index.\r
+        * \r
+        * @param pname one of VERTEX_ATTRIB_ARRAY_SIZE, VERTEX_ATTRIB_ARRAY_STRIDE, VERTEX_ATTRIB_ARRAY_TYPE */\r
+       public final native int getVertexAttribi (int index, int pname) /*-{\r
+                                                                                                                                                                                       return this.getVertexAttrib(index, pname);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the information requested in pname about the vertex attribute at the passed index.\r
+        * \r
+        * @param pname one of VERTEX_ATTRIB_ARRAY_ENABLED, VERTEX_ATTRIB_ARRAY_NORMALIZED */\r
+       public final native boolean getVertexAttribb (int index, int pname) /*-{\r
+                                                                                                                                                                                               return this.getVertexAttrib(index, pname);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the information requested in pname about the vertex attribute at the passed index.\r
+        * \r
+        * @param pname VERTEX_ATTRIB_ARRAY_BUFFER_BINDING\r
+        * @return {@link WebGLBuffer} */\r
+       public final native <T extends WebGLObject> T getVertexAttribo (int index, int pname) /*-{\r
+                                                                                                                                                                                                                                               return this.getVertexAttrib(index, pname);\r
+                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the information requested in pname about the vertex attribute at the passed index.\r
+        * \r
+        * @param pname CURRENT_VERTEX_ATTRIB\r
+        * @return a {@link Float32Array} with 4 elements */\r
+       public final native Float32Array getVertexAttribv (int index, int pname) /*-{\r
+                                                                                                                                                                                                               return this.getVertexAttrib(index, pname);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed target. The type returned is the natural type for the requested\r
+        * pname, as given in the following table: If an attempt is made to call this function with no WebGLTexture bound (see above),\r
+        * an INVALID_OPERATION error is generated.\r
+        * \r
+        * @param pname one of TEXTURE_MAG_FILTER, TEXTURE_MIN_FILTER, TEXTURE_WRAP_S, TEXTURE_WRAP_T */\r
+       public final native int getTexParameter (int target, int pname) /*-{\r
+                                                                                                                                                                                       return this.getTexParameter(target, pname);\r
+                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed shader.\r
+        * \r
+        * @param pname one of DELETE_STATUS, COMPILE_STATUS */\r
+       public final native boolean getShaderParameterb (WebGLShader shader, int pname) /*-{\r
+                                                                                                                                                                                                                               return this.getShaderParameter(shader, pname);\r
+                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed shader.\r
+        * \r
+        * @param pname one of SHADER_TYPE, INFO_LOG_LENGTH, SHADER_SOURCE_LENGTH */\r
+       public final native int getShaderParameteri (WebGLShader shader, int pname) /*-{\r
+                                                                                                                                                                                                                       return this.getShaderParameter(shader, pname);\r
+                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed target.\r
+        * \r
+        * @param pname one of RENDERBUFFER_WIDTH, RENDERBUFFER_HEIGHT, RENDERBUFFER_INTERNAL_FORMAT, RENDERBUFFER_RED_SIZE,\r
+        *           RENDERBUFFER_GREEN_SIZE, RENDERBUFFER_BLUE_SIZE, RENDERBUFFER_ALPHA_SIZE, RENDERBUFFER_DEPTH_SIZE,\r
+        *           RENDERBUFFER_STENCIL_SIZE */\r
+       public final native int getRenderbufferParameter (int target, int pname) /*-{\r
+                                                                                                                                                                                                               return this.getRenderbufferParameter(target, pname);\r
+                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed program.\r
+        * \r
+        * @param pname one of DELETE_STATUS, LINK_STATUS, VALIDATE_STATUS */\r
+       public final native boolean getProgramParameterb (WebGLProgram program, int pname) /*-{\r
+                                                                                                                                                                                                                                       return this.getProgramParameter(program, pname);\r
+                                                                                                                                                                                                                                       }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed program.\r
+        * \r
+        * @param pname one of INFO_LOG_LENGTH, ATTACHED_SHADERS, ACTIVE_ATTRIBUTES, ACTIVE_ATTRIBUTE_MAX_LENGTH, ACTIVE_UNIFORMS,\r
+        *           ACTIVE_UNIFORM_MAX_LENGTH */\r
+       public final native int getProgramParameteri (WebGLProgram program, int pname) /*-{\r
+                                                                                                                                                                                                                               return this.getProgramParameter(program, pname);\r
+                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the value for the passed pname.\r
+        * \r
+        * @param pname one of BUFFER_SIZE, BUFFER_USAGE */\r
+       public final native int getBufferParameter (int target, int pname) /*-{\r
+                                                                                                                                                                                               return this.getBufferParameter(target, pname);\r
+                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed target and attachment.\r
+        * \r
+        * @param pname one of FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL,\r
+        *           FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */\r
+       public final native int getFramebufferAttachmentParameteri (int target, int attachment, int pname) /*-{\r
+                                                                                                                                                                                                                                                                               return this.getFramebufferAttachmentParameter(target, attachment, pname);\r
+                                                                                                                                                                                                                                                                               }-*/;\r
+\r
+       /** Return the value for the passed pname given the passed target and attachment.\r
+        * \r
+        * @param pname FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\r
+        * @return {@link WebGLRenderbuffer} or {@link WebGLTexture} */\r
+       public final native <T extends WebGLObject> T getFramebufferAttachmentParametero (int target, int attachment, int pname) /*-{\r
+                                                                                                                                                                                                                                                                                                                                               return this.getFramebufferAttachmentParameter(target, attachment, pname);\r
+                                                                                                                                                                                                                                                                                                                                               }-*/;\r
 }\r
index e00cced..5febd11 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
 public class WebGLShader extends WebGLObject {\r
 \r
-  protected WebGLShader() {\r
-  }\r
+       protected WebGLShader () {\r
+       }\r
 }\r
index bf0b591..210143c 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
 public class WebGLTexture extends WebGLObject {\r
 \r
-  protected WebGLTexture() {\r
-  }\r
+       protected WebGLTexture () {\r
+       }\r
 }\r
index 8a0081c..19f376d 100644 (file)
  * License for the specific language governing permissions and limitations under\r
  * the License.\r
  */\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
 public class WebGLUniformLocation extends WebGLObject {\r
 \r
-  protected WebGLUniformLocation() {\r
-  }\r
-}
\ No newline at end of file
+       protected WebGLUniformLocation () {\r
+       }\r
+}\r
index c14279d..489b78a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.google.gwt.webgl.client;\r
 \r
 import static com.google.gwt.webgl.client.WebGLRenderingContext.*;\r
 \r
 public class WebGLUtil {\r
 \r
-  public static float[] createPerspectiveMatrix(int fieldOfViewVertical,\r
-      float aspectRatio, float minimumClearance, float maximumClearance) {\r
-    double fieldOfViewInRad = fieldOfViewVertical * Math.PI / 180.0;\r
-    return new float[]{\r
-        (float) (Math.tan(fieldOfViewInRad) / aspectRatio),\r
-        0,\r
-        0,\r
-        0,\r
-        0,\r
-        (float) (1 / Math.tan(fieldOfViewVertical * Math.PI / 180.0)),\r
-        0,\r
-        0,\r
-        0,\r
-        0,\r
-        (minimumClearance + maximumClearance)\r
-            / (minimumClearance - maximumClearance),\r
-        -1,\r
-        0,\r
-        0,\r
-        2 * minimumClearance * maximumClearance\r
-            / (minimumClearance - maximumClearance), 0};\r
-  }\r
-\r
-  public static WebGLProgram createShaderProgram(WebGLRenderingContext gl,\r
-      String vertexSource, String fragmentSource) {\r
-    WebGLShader vertexShader = getShader(gl, VERTEX_SHADER, vertexSource);\r
-    WebGLShader fragmentShader = getShader(gl, FRAGMENT_SHADER, fragmentSource);\r
-\r
-    WebGLProgram shaderProgram = gl.createProgram();\r
-    gl.attachShader(shaderProgram, fragmentShader);\r
-    gl.attachShader(shaderProgram, vertexShader);\r
-    gl.linkProgram(shaderProgram);\r
-\r
-    if (!gl.getProgramParameterb(shaderProgram, LINK_STATUS)) {\r
-      throw new RuntimeException("Could not initialize shaders");\r
-    }\r
-\r
-    return shaderProgram;\r
-  }\r
-\r
-  private static WebGLShader getShader(WebGLRenderingContext gl,\r
-      int shaderType, String source) {\r
-    WebGLShader shader = gl.createShader(shaderType);\r
-    gl.shaderSource(shader, source);\r
-    gl.compileShader(shader);\r
-    if (!gl.getShaderParameterb(shader, COMPILE_STATUS)) {\r
-      throw new RuntimeException(gl.getShaderInfoLog(shader));\r
-    }\r
-    return shader;\r
-  }\r
-}
\ No newline at end of file
+       public static float[] createPerspectiveMatrix (int fieldOfViewVertical, float aspectRatio, float minimumClearance,\r
+               float maximumClearance) {\r
+               double fieldOfViewInRad = fieldOfViewVertical * Math.PI / 180.0;\r
+               return new float[] {(float)(Math.tan(fieldOfViewInRad) / aspectRatio), 0, 0, 0, 0,\r
+                       (float)(1 / Math.tan(fieldOfViewVertical * Math.PI / 180.0)), 0, 0, 0, 0,\r
+                       (minimumClearance + maximumClearance) / (minimumClearance - maximumClearance), -1, 0, 0,\r
+                       2 * minimumClearance * maximumClearance / (minimumClearance - maximumClearance), 0};\r
+       }\r
+\r
+       public static WebGLProgram createShaderProgram (WebGLRenderingContext gl, String vertexSource, String fragmentSource) {\r
+               WebGLShader vertexShader = getShader(gl, VERTEX_SHADER, vertexSource);\r
+               WebGLShader fragmentShader = getShader(gl, FRAGMENT_SHADER, fragmentSource);\r
+\r
+               WebGLProgram shaderProgram = gl.createProgram();\r
+               gl.attachShader(shaderProgram, fragmentShader);\r
+               gl.attachShader(shaderProgram, vertexShader);\r
+               gl.linkProgram(shaderProgram);\r
+\r
+               if (!gl.getProgramParameterb(shaderProgram, LINK_STATUS)) {\r
+                       throw new RuntimeException("Could not initialize shaders");\r
+               }\r
+\r
+               return shaderProgram;\r
+       }\r
+\r
+       private static WebGLShader getShader (WebGLRenderingContext gl, int shaderType, String source) {\r
+               WebGLShader shader = gl.createShader(shaderType);\r
+               gl.shaderSource(shader, source);\r
+               gl.compileShader(shader);\r
+               if (!gl.getShaderParameterb(shader, COMPILE_STATUS)) {\r
+                       throw new RuntimeException(gl.getShaderInfoLog(shader));\r
+               }\r
+               return shader;\r
+       }\r
+}\r
index 750a565..be227d8 100644 (file)
@@ -38,7 +38,7 @@ public class Mp3 {
 \r
                public Music (OpenALAudio audio, FileHandle file) {\r
                        super(audio, file);\r
-                       if(audio.noDevice) return;\r
+                       if (audio.noDevice) return;\r
                        bitstream = new Bitstream(file.read());\r
                        decoder = new MP3Decoder();\r
                        try {\r
@@ -106,7 +106,7 @@ public class Mp3 {
 \r
                public Sound (OpenALAudio audio, FileHandle file) {\r
                        super(audio);\r
-                       if(audio.noDevice) return;\r
+                       if (audio.noDevice) return;\r
                        ByteArrayOutputStream output = new ByteArrayOutputStream(4096);\r
 \r
                        Bitstream bitstream = new Bitstream(file.read());\r
index 66522fd..dc1db1a 100644 (file)
@@ -27,7 +27,7 @@ public class Ogg {
 \r
                public Music (OpenALAudio audio, FileHandle file) {\r
                        super(audio, file);\r
-                       if(audio.noDevice) return;\r
+                       if (audio.noDevice) return;\r
                        input = new OggInputStream(file.read());\r
                        setup(input.getChannels(), input.getSampleRate());\r
                }\r
@@ -50,7 +50,7 @@ public class Ogg {
        static public class Sound extends OpenALSound {\r
                public Sound (OpenALAudio audio, FileHandle file) {\r
                        super(audio);\r
-                       if(audio.noDevice) return;\r
+                       if (audio.noDevice) return;\r
                        OggInputStream input = new OggInputStream(file.read());\r
                        ByteArrayOutputStream output = new ByteArrayOutputStream(4096);\r
                        byte[] buffer = new byte[2048];\r
index d5a6c4e..35188d2 100644 (file)
 \r
 package com.badlogic.gdx.backends.openal;\r
 \r
-import static org.lwjgl.openal.AL10.AL_BUFFER;\r
-import static org.lwjgl.openal.AL10.AL_NO_ERROR;\r
-import static org.lwjgl.openal.AL10.AL_ORIENTATION;\r
-import static org.lwjgl.openal.AL10.AL_PAUSED;\r
-import static org.lwjgl.openal.AL10.AL_PLAYING;\r
-import static org.lwjgl.openal.AL10.AL_POSITION;\r
-import static org.lwjgl.openal.AL10.AL_SOURCE_STATE;\r
-import static org.lwjgl.openal.AL10.AL_STOPPED;\r
-import static org.lwjgl.openal.AL10.AL_VELOCITY;\r
-import static org.lwjgl.openal.AL10.alDeleteSources;\r
-import static org.lwjgl.openal.AL10.alGenSources;\r
-import static org.lwjgl.openal.AL10.alGetError;\r
-import static org.lwjgl.openal.AL10.alGetSourcei;\r
-import static org.lwjgl.openal.AL10.alListener;\r
-import static org.lwjgl.openal.AL10.alSourceStop;\r
-import static org.lwjgl.openal.AL10.alSourcei;\r
-\r
 import java.nio.FloatBuffer;\r
 \r
 import org.lwjgl.BufferUtils;\r
 import org.lwjgl.LWJGLException;\r
 import org.lwjgl.openal.AL;\r
 import org.lwjgl.openal.AL10;\r
-import org.lwjgl.openal.AL11;\r
 \r
 import com.badlogic.gdx.Audio;\r
 import com.badlogic.gdx.audio.AudioDevice;\r
@@ -52,6 +34,8 @@ import com.badlogic.gdx.utils.IntMap;
 import com.badlogic.gdx.utils.LongMap;\r
 import com.badlogic.gdx.utils.ObjectMap;\r
 \r
+import static org.lwjgl.openal.AL10.*;\r
+\r
 /** @author Nathan Sweet */\r
 public class OpenALAudio implements Audio {\r
        private final int deviceBufferSize;\r
index dc69c8f..e1dd068 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.backends.openal;\r
 \r
 import java.nio.ByteBuffer;\r
@@ -208,4 +209,4 @@ public class OpenALAudioDevice implements AudioDevice {
        public int getLatency () {\r
                return (int)(secondsPerBuffer * bufferCount * 1000);\r
        }\r
-}
\ No newline at end of file
+}\r
index 6369e1c..74086f1 100644 (file)
@@ -49,8 +49,8 @@ public abstract class OpenALMusic implements Music {
        public OpenALMusic (OpenALAudio audio, FileHandle file) {\r
                this.audio = audio;\r
                this.file = file;\r
-               if(audio != null) {\r
-                       if(!audio.noDevice) audio.music.add(this);\r
+               if (audio != null) {\r
+                       if (!audio.noDevice) audio.music.add(this);\r
                }\r
        }\r
 \r
@@ -61,7 +61,7 @@ public abstract class OpenALMusic implements Music {
        }\r
 \r
        public void play () {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                if (sourceID == -1) {\r
                        sourceID = audio.obtainSource(true);\r
                        if (sourceID == -1) return;\r
@@ -87,7 +87,7 @@ public abstract class OpenALMusic implements Music {
        }\r
 \r
        public void stop () {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                if (sourceID == -1) return;\r
                reset();\r
                audio.freeSource(sourceID);\r
@@ -97,13 +97,13 @@ public abstract class OpenALMusic implements Music {
        }\r
 \r
        public void pause () {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                if (sourceID != -1) alSourcePause(sourceID);\r
                isPlaying = false;\r
        }\r
 \r
        public boolean isPlaying () {\r
-               if(audio.noDevice) return false;\r
+               if (audio.noDevice) return false;\r
                if (sourceID == -1) return false;\r
                return isPlaying;\r
        }\r
@@ -118,12 +118,12 @@ public abstract class OpenALMusic implements Music {
 \r
        public void setVolume (float volume) {\r
                this.volume = volume;\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                if (sourceID != -1) alSourcef(sourceID, AL_GAIN, volume);\r
        }\r
 \r
        public float getPosition () {\r
-               if(audio.noDevice) return 0;\r
+               if (audio.noDevice) return 0;\r
                if (sourceID == -1) return 0;\r
                return renderedSeconds + alGetSourcef(sourceID, AL11.AL_SEC_OFFSET);\r
        }\r
@@ -134,17 +134,17 @@ public abstract class OpenALMusic implements Music {
 \r
        /** Resets the stream to the beginning. */\r
        abstract public void reset ();\r
-       \r
-       public int getChannels() {\r
-               return format == AL_FORMAT_STEREO16?2:1;\r
+\r
+       public int getChannels () {\r
+               return format == AL_FORMAT_STEREO16 ? 2 : 1;\r
        }\r
-       \r
-       public int getRate() {\r
+\r
+       public int getRate () {\r
                return sampleRate;\r
        }\r
 \r
        public void update () {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                if (sourceID == -1) return;\r
 \r
                boolean end = false;\r
@@ -183,7 +183,7 @@ public abstract class OpenALMusic implements Music {
        }\r
 \r
        public void dispose () {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                if (buffers == null) return;\r
                if (sourceID != -1) {\r
                        reset();\r
index e2760f1..3d25cf8 100644 (file)
@@ -50,7 +50,7 @@ public class OpenALSound implements Sound {
        }\r
 \r
        public long play (float volume) {\r
-               if(audio.noDevice) return 0;\r
+               if (audio.noDevice) return 0;\r
                int sourceID = audio.obtainSource(false);\r
                if (sourceID == -1) return -1;\r
                long soundId = audio.getSoundId(sourceID);\r
@@ -67,7 +67,7 @@ public class OpenALSound implements Sound {
 \r
        @Override\r
        public long loop (float volume) {\r
-               if(audio.noDevice) return 0;\r
+               if (audio.noDevice) return 0;\r
                int sourceID = audio.obtainSource(false);\r
                if (sourceID == -1) return -1;\r
                long soundId = audio.getSoundId(sourceID);\r
@@ -79,12 +79,12 @@ public class OpenALSound implements Sound {
        }\r
 \r
        public void stop () {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                audio.stopSourcesWithBuffer(bufferID);\r
        }\r
 \r
        public void dispose () {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                if (bufferID == -1) return;\r
                audio.freeBuffer(bufferID);\r
                alDeleteBuffers(bufferID);\r
@@ -93,32 +93,31 @@ public class OpenALSound implements Sound {
 \r
        @Override\r
        public void stop (long soundId) {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                audio.stopSound(soundId);\r
        }\r
 \r
        @Override\r
        public void setPitch (long soundId, float pitch) {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                audio.setSoundPitch(soundId, pitch);\r
        }\r
 \r
        @Override\r
        public void setVolume (long soundId, float volume) {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                audio.setSoundGain(soundId, volume);\r
        }\r
 \r
-\r
        @Override\r
        public void setLooping (long soundId, boolean looping) {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                audio.setSoundLooping(soundId, looping);\r
        }\r
 \r
        @Override\r
        public void setPan (long soundId, float pan, float volume) {\r
-               if(audio.noDevice) return;\r
+               if (audio.noDevice) return;\r
                audio.setSoundPan(soundId, pan, volume);\r
        }\r
 \r
index e7d4c0d..8eb7a2c 100644 (file)
@@ -31,7 +31,7 @@ public class Wav {
                public Music (OpenALAudio audio, FileHandle file) {\r
                        super(audio, file);\r
                        input = new WavInputStream(file);\r
-                       if(audio.noDevice) return;\r
+                       if (audio.noDevice) return;\r
                        setup(input.channels, input.sampleRate);\r
                }\r
 \r
@@ -60,7 +60,7 @@ public class Wav {
        static public class Sound extends OpenALSound {\r
                public Sound (OpenALAudio audio, FileHandle file) {\r
                        super(audio);\r
-                       if(audio.noDevice) return;\r
+                       if (audio.noDevice) return;\r
 \r
                        WavInputStream input = new WavInputStream(file);\r
                        ByteArrayOutputStream output = new ByteArrayOutputStream(4096);\r
index 1fb4dce..c07e36a 100644 (file)
@@ -2,7 +2,6 @@
 package com.badlogic.cubocy;\r
 \r
 import com.badlogic.cubocy.screens.GameScreen;\r
-import com.badlogic.cubocy.screens.IntroScreen;\r
 import com.badlogic.gdx.Game;\r
 \r
 public class Cubocy extends Game {\r
index d16217c..53689ce 100644 (file)
@@ -29,12 +29,12 @@ public class Map {
        public Map () {\r
                loadBinary();\r
        }\r
-       \r
-       private void loadBinary() {\r
+\r
+       private void loadBinary () {\r
                Pixmap pixmap = new Pixmap(Gdx.files.internal("data/levels.png"));\r
                tiles = new int[pixmap.getWidth()][pixmap.getHeight()];\r
                for (int y = 0; y < 35; y++) {\r
-                       for (int x = 0; x < 150; x++) {                         \r
+                       for (int x = 0; x < 150; x++) {\r
                                int pix = (pixmap.getPixel(x, y) >>> 8) & 0xffffff;\r
                                Gdx.app.log("Map", x + ", " + y + ", " + Integer.toHexString(pix));\r
                                if (match(pix, START)) {\r
@@ -70,11 +70,11 @@ public class Map {
                        lasers.get(i).init();\r
                }\r
        }\r
-       \r
-       boolean match(int src, int dst) {\r
+\r
+       boolean match (int src, int dst) {\r
                return src == dst;\r
        }\r
-       \r
+\r
        public void update (float deltaTime) {\r
                bob.update(deltaTime);\r
                if (bob.state == Bob.DEAD) bob = new Bob(this, activeDispenser.bounds.x, activeDispenser.bounds.y);\r
index 12bc90d..79cc4d8 100644 (file)
@@ -1,3 +1,4 @@
+\r
 package com.badlogic.gdxinvaders.client;\r
 \r
 import com.badlogic.gdx.ApplicationListener;\r
@@ -9,7 +10,7 @@ public class GdxInvadersGwt extends GwtApplication {
        @Override\r
        public GwtApplicationConfiguration getConfig () {\r
                GwtApplicationConfiguration config = new GwtApplicationConfiguration(480, 320);\r
-//             config.useDebugGL = true;\r
+// config.useDebugGL = true;\r
                return config;\r
        }\r
 \r
index a94c802..6942bb2 100644 (file)
@@ -15,9 +15,9 @@ package com.badlogic.gdxinvaders;
 \r
 import com.badlogic.gdx.Application.ApplicationType;\r
 import com.badlogic.gdx.Files.FileType;\r
-import com.badlogic.gdx.Input.Keys;\r
 import com.badlogic.gdx.Game;\r
 import com.badlogic.gdx.Gdx;\r
+import com.badlogic.gdx.Input.Keys;\r
 import com.badlogic.gdx.InputAdapter;\r
 import com.badlogic.gdx.audio.Music;\r
 import com.badlogic.gdxinvaders.screens.GameLoop;\r
@@ -44,9 +44,7 @@ public class GdxInvaders extends Game {
                        // the game loop\r
                        if (currentScreen instanceof MainMenu) {\r
                                setScreen(new GameLoop());\r
-                       }\r
-                       else\r
-                       {\r
+                       } else {\r
                                // if the current screen is a game loop screen we switch to the\r
                                // game over screen\r
                                if (currentScreen instanceof GameLoop) {\r
@@ -60,7 +58,7 @@ public class GdxInvaders extends Game {
                }\r
 \r
                // sleep on desktop as Jogl backend vsynch is broken...\r
-               if(Gdx.app.getType() == ApplicationType.Desktop) {\r
+               if (Gdx.app.getType() == ApplicationType.Desktop) {\r
                        try {\r
                                Thread.sleep(16);\r
                        } catch (InterruptedException e) {\r
@@ -77,16 +75,15 @@ public class GdxInvaders extends Game {
                Gdx.input.setInputProcessor(new InputAdapter() {\r
                        @Override\r
                        public boolean keyUp (int keycode) {\r
-                               if(keycode == Keys.ENTER && Gdx.app.getType() == ApplicationType.WebGL) {\r
-                                       if(!Gdx.graphics.isFullscreen()) Gdx.graphics.setDisplayMode(Gdx.graphics.getDisplayModes()[0]);\r
+                               if (keycode == Keys.ENTER && Gdx.app.getType() == ApplicationType.WebGL) {\r
+                                       if (!Gdx.graphics.isFullscreen()) Gdx.graphics.setDisplayMode(Gdx.graphics.getDisplayModes()[0]);\r
                                }\r
                                return true;\r
                        }\r
                });\r
        }\r
 \r
-       /**\r
-        * For this game each of our screens is an instance of InvadersScreen.\r
+       /** For this game each of our screens is an instance of InvadersScreen.\r
         * @return the currently active {@link InvadersScreen}. */\r
        @Override\r
        public InvadersScreen getScreen () {\r
index 86721ab..149a96a 100644 (file)
@@ -1,8 +1,10 @@
+\r
 package com.badlogic.gdxinvaders;\r
 \r
 import com.badlogic.gdxinvaders.simulation.Simulation;\r
 \r
 public interface Renderer {\r
-       public void render(Simulation sim, float delta);\r
-       public void dispose();\r
+       public void render (Simulation sim, float delta);\r
+\r
+       public void dispose ();\r
 }\r
index 3ce29c3..463f957 100644 (file)
@@ -28,7 +28,6 @@ import com.badlogic.gdx.graphics.VertexAttribute;
 import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
-import com.badlogic.gdx.graphics.g3d.loaders.ModelLoaderOld;\r
 import com.badlogic.gdx.graphics.g3d.loaders.obj.ObjLoader;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
index 910aaaf..4d85b39 100644 (file)
@@ -29,7 +29,6 @@ import com.badlogic.gdx.graphics.VertexAttribute;
 import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
-import com.badlogic.gdx.graphics.g3d.loaders.ModelLoaderOld;\r
 import com.badlogic.gdx.graphics.g3d.loaders.obj.ObjLoader;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.Matrix3;\r
@@ -77,15 +76,15 @@ public class RendererGL20 implements Renderer {
        private int lastLives = 0;\r
        private int lastWave = 0;\r
 \r
-       /** view and transform matrix for text rendering and transforming 3D objects**/\r
+       /** view and transform matrix for text rendering and transforming 3D objects **/\r
        private final Matrix4 viewMatrix = new Matrix4();\r
        private final Matrix4 transform = new Matrix4();\r
        private final Matrix4 normal = new Matrix4();\r
        private final Matrix3 normal3 = new Matrix3();\r
-       \r
+\r
        /** perspective camera **/\r
        private PerspectiveCamera camera;\r
-       \r
+\r
        /** shaders **/\r
        ShaderProgram texShader;\r
        ShaderProgram colorShader;\r
@@ -95,14 +94,17 @@ public class RendererGL20 implements Renderer {
                try {\r
                        spriteBatch = new SpriteBatch();\r
 \r
-                       texShader = new ShaderProgram(Gdx.files.internal("data/shaders/tex-vs.glsl"), Gdx.files.internal("data/shaders/tex-fs.glsl"));\r
-                       colorShader = new ShaderProgram(Gdx.files.internal("data/shaders/color-vs.glsl"), Gdx.files.internal("data/shaders/color-fs.glsl"));\r
-                       lightTexShader = new ShaderProgram(Gdx.files.internal("data/shaders/light-tex-vs.glsl"), Gdx.files.internal("data/shaders/light-tex-fs.glsl"));\r
-                       \r
-                       if(!texShader.isCompiled()) throw new GdxRuntimeException("Couldn't compile tex shader");\r
-                       if(!colorShader.isCompiled()) throw new GdxRuntimeException("Couldn't compile color shader");\r
-                       if(!lightTexShader.isCompiled()) throw new GdxRuntimeException("Couldn't compile light/tex shader");\r
-                       \r
+                       texShader = new ShaderProgram(Gdx.files.internal("data/shaders/tex-vs.glsl"),\r
+                               Gdx.files.internal("data/shaders/tex-fs.glsl"));\r
+                       colorShader = new ShaderProgram(Gdx.files.internal("data/shaders/color-vs.glsl"),\r
+                               Gdx.files.internal("data/shaders/color-fs.glsl"));\r
+                       lightTexShader = new ShaderProgram(Gdx.files.internal("data/shaders/light-tex-vs.glsl"),\r
+                               Gdx.files.internal("data/shaders/light-tex-fs.glsl"));\r
+\r
+                       if (!texShader.isCompiled()) throw new GdxRuntimeException("Couldn't compile tex shader");\r
+                       if (!colorShader.isCompiled()) throw new GdxRuntimeException("Couldn't compile color shader");\r
+                       if (!lightTexShader.isCompiled()) throw new GdxRuntimeException("Couldn't compile light/tex shader");\r
+\r
                        InputStream in = Gdx.files.internal("data/ship.obj").read();\r
                        shipMesh = ObjLoader.loadObj(in);\r
                        in.close();\r
@@ -235,7 +237,7 @@ public class RendererGL20 implements Renderer {
                normal.idt();\r
                normal.rotate(0, 1, 0, 180);\r
                normal3.set(normal.toNormalMatrix());\r
-               lightTexShader.setUniformMatrix("u_normal", normal3); \r
+               lightTexShader.setUniformMatrix("u_normal", normal3);\r
                shipMesh.render(lightTexShader, GL10.GL_TRIANGLES);\r
                lightTexShader.end();\r
        }\r
@@ -245,7 +247,7 @@ public class RendererGL20 implements Renderer {
                normal.idt();\r
                normal.rotate(0, 1, 0, invaderAngle);\r
                normal3.set(normal.toNormalMatrix());\r
-               lightTexShader.setUniformMatrix("u_normal", normal3); \r
+               lightTexShader.setUniformMatrix("u_normal", normal3);\r
                invaderTexture.bind();\r
                for (int i = 0; i < invaders.size(); i++) {\r
                        Invader invader = invaders.get(i);\r
@@ -298,7 +300,8 @@ public class RendererGL20 implements Renderer {
                        transform.set(camera.combined);\r
                        transform.translate(explosion.position.x, explosion.position.y, explosion.position.z);\r
                        texShader.setUniformMatrix("u_projView", transform);\r
-                       explosionMesh.render(texShader, GL10.GL_TRIANGLE_FAN, (int)(explosion.aliveTime / Explosion.EXPLOSION_LIVE_TIME * 15) * 4, 4);\r
+                       explosionMesh.render(texShader, GL10.GL_TRIANGLE_FAN,\r
+                               (int)(explosion.aliveTime / Explosion.EXPLOSION_LIVE_TIME * 15) * 4, 4);\r
                }\r
                texShader.end();\r
                Gdx.gl.glDisable(GL10.GL_BLEND);\r
index 5a40c21..17cee73 100644 (file)
 package com.badlogic.gdxinvaders.screens;\r
 \r
 import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.Application.ApplicationType;\r
 import com.badlogic.gdx.Input.Keys;\r
 import com.badlogic.gdx.audio.Sound;\r
-import com.badlogic.gdx.graphics.FPSLogger;\r
-import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdxinvaders.Renderer;\r
 import com.badlogic.gdxinvaders.RendererGL10;\r
 import com.badlogic.gdxinvaders.RendererGL20;\r
@@ -38,7 +35,7 @@ public class GameLoop extends InvadersScreen implements SimulationListener {
        public GameLoop () {\r
                simulation = new Simulation();\r
                simulation.listener = this;\r
-               renderer = Gdx.graphics.isGL20Available()? new RendererGL20(): new RendererGL10();\r
+               renderer = Gdx.graphics.isGL20Available() ? new RendererGL20() : new RendererGL10();\r
                explosion = Gdx.audio.newSound(Gdx.files.internal("data/explosion.ogg"));\r
                shot = Gdx.audio.newSound(Gdx.files.internal("data/shot.ogg"));\r
        }\r
index ec85713..64f5cb6 100644 (file)
@@ -18,12 +18,10 @@ import com.badlogic.gdx.Screen;
 /** Common class for a game screen, e.g. main menu, game loop, game over screen and so on.\r
  * @author mzechner */\r
 public abstract class InvadersScreen implements Screen {\r
-       /** Called when the screen should update itself, e.g. continue a simulation etc.\r
-        */\r
+       /** Called when the screen should update itself, e.g. continue a simulation etc. */\r
        public abstract void update (float delta);\r
 \r
-       /** Called when a screen should render itself\r
-        */\r
+       /** Called when a screen should render itself */\r
        public abstract void draw (float delta);\r
 \r
        /** Called by GdxInvaders to check whether the screen is done.\r
index b045f6c..3cd53c2 100644 (file)
@@ -13,8 +13,8 @@
 \r
 package com.badlogic.gdxinvaders.screens;\r
 \r
-import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Application.ApplicationType;\r
+import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.Texture;\r
@@ -82,7 +82,7 @@ public class MainMenu extends InvadersScreen {
                String text = "Touch screen to start!";\r
                float width = font.getBounds(text).width;\r
                font.draw(spriteBatch, text, 240 - width / 2, 128);\r
-               if(Gdx.app.getType() == ApplicationType.WebGL) {\r
+               if (Gdx.app.getType() == ApplicationType.WebGL) {\r
                        text = "Press Enter for Fullscreen Mode";\r
                        width = font.getBounds(text).width;\r
                        font.draw(spriteBatch, "Press Enter for Fullscreen Mode", 240 - width / 2, 128 - font.getLineHeight());\r
index 0ce04b5..4be684d 100644 (file)
@@ -1,3 +1,4 @@
+\r
 package com.badlogicgames.superjumper.client;\r
 \r
 import com.badlogic.gdx.ApplicationListener;\r
@@ -16,4 +17,4 @@ public class SuperJumperGwt extends GwtApplication {
        public ApplicationListener getApplicationListener () {\r
                return new SuperJumper();\r
        }\r
-}
\ No newline at end of file
+}\r
index b051a46..d00b88c 100644 (file)
@@ -29,13 +29,9 @@ public class SuperJumper extends Game {
                setScreen(new MainMenuScreen(this));\r
        }\r
 \r
-       /**\r
-               * {@link Game#dispose()} only calls {@link Screen#hide()} so you need to override\r
-               * {@link Game#dispose()} in order to call {@link Screen#dispose()} on each of your\r
-               * screens which still need to dispose of their resources.\r
-               * SuperJumper doesn't actually have such resources so this is only to complete the\r
-               * example.\r
-               */\r
+       /** {@link Game#dispose()} only calls {@link Screen#hide()} so you need to override {@link Game#dispose()} in order to call\r
+        * {@link Screen#dispose()} on each of your screens which still need to dispose of their resources. SuperJumper doesn't\r
+        * actually have such resources so this is only to complete the example. */\r
        @Override\r
        public void dispose () {\r
                super.dispose();\r
index b49913b..f971d02 100644 (file)
@@ -119,20 +119,20 @@ public class Field implements ContactListener {
                fieldElementsToTick = tickElements.toArray(new FieldElement[0]);
 
                delegate = new Field1Delegate();
-//             String delegateClass = layout.getDelegateClassName();
-//             if (delegateClass != null) {
-//                     if (delegateClass.indexOf('.') == -1) {
-//                             delegateClass = "com.dozingcatsoftware.bouncy.fields." + delegateClass;
-//                     }
-//                     try {
-//                             delegate = (Delegate)Class.forName(delegateClass).newInstance();
-//                     } catch (Exception ex) {
-//                             throw new RuntimeException(ex);
-//                     }
-//             } else {
-//                     // use no-op delegate if no class specified, so that field.getDelegate() is always non-null
-//                     delegate = new BaseFieldDelegate();
-//             }
+// String delegateClass = layout.getDelegateClassName();
+// if (delegateClass != null) {
+// if (delegateClass.indexOf('.') == -1) {
+// delegateClass = "com.dozingcatsoftware.bouncy.fields." + delegateClass;
+// }
+// try {
+// delegate = (Delegate)Class.forName(delegateClass).newInstance();
+// } catch (Exception ex) {
+// throw new RuntimeException(ex);
+// }
+// } else {
+// // use no-op delegate if no class specified, so that field.getDelegate() is always non-null
+// delegate = new BaseFieldDelegate();
+// }
        }
 
        public void startGame () {
index ce8fa7a..1979f61 100644 (file)
@@ -1,8 +1,6 @@
 \r
 package com.dozingcatsoftware.bouncy;\r
 \r
-import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.Matrix4;\r
index 8028fb6..67345e8 100644 (file)
@@ -37,14 +37,14 @@ public abstract class FieldElement {
                        if (params.containsKey("class")) {
                                // if package not specified, use this package
                                String className = (String)params.get("class");
-                               if(className.contains("BumperElement")) self = new BumperElement();
-                               if(className.contains("DropTargetGroupElement")) self = new DropTargetGroupElement();
-                               if(className.contains("FlipperElement")) self = new FlipperElement();
-                               if(className.contains("RolloverGroupElement")) self = new RolloverGroupElement();
-                               if(className.contains("SensorElement")) self = new SensorElement();
-                               if(className.contains("WallArcElement")) self = new WallArcElement();
-                               if(className.contains("WallElement")) self = new WallElement();
-                               if(className.contains("WallPathElement")) self = new WallPathElement();
+                               if (className.contains("BumperElement")) self = new BumperElement();
+                               if (className.contains("DropTargetGroupElement")) self = new DropTargetGroupElement();
+                               if (className.contains("FlipperElement")) self = new FlipperElement();
+                               if (className.contains("RolloverGroupElement")) self = new RolloverGroupElement();
+                               if (className.contains("SensorElement")) self = new SensorElement();
+                               if (className.contains("WallArcElement")) self = new WallArcElement();
+                               if (className.contains("WallElement")) self = new WallElement();
+                               if (className.contains("WallPathElement")) self = new WallPathElement();
                        } else {
                                self = new FlipperElement();
                        }
index c54e2f2..ffe2fbc 100644 (file)
@@ -132,10 +132,10 @@ public class JSONArray {
        public JSONArray (Object array) throws JSONException {
                this();
                if (array.getClass().isArray()) {
-//                     int length = Array.getLength(array);
-//                     for (int i = 0; i < length; i += 1) {
-//                             this.put(JSONObject.wrap(Array.get(array, i)));
-//                     }
+// int length = Array.getLength(array);
+// for (int i = 0; i < length; i += 1) {
+// this.put(JSONObject.wrap(Array.get(array, i)));
+// }
                } else {
                        throw new JSONException("JSONArray initial value should be a string or collection or array.");
                }
index c87acd6..8d0289c 100644 (file)
@@ -28,12 +28,9 @@ package com.dozingcatsoftware.bouncy.util;
 import java.io.IOException;
 import java.io.Writer;
 import java.util.Collection;
-import java.util.Enumeration;
 import java.util.HashMap;
 import java.util.Iterator;
-import java.util.Locale;
 import java.util.Map;
-import java.util.ResourceBundle;
 
 /** A JSONObject is an unordered collection of name/value pairs. Its external form is a string wrapped in curly braces with colons
  * between the names and values, and commas between the values and names. The internal form is an object having <code>get</code>
@@ -104,8 +101,7 @@ public class JSONObject {
        /** It is sometimes more convenient and less ambiguous to have a <code>NULL</code> object than to use Java's <code>null</code>
         * value. <code>JSONObject.NULL.equals(null)</code> returns <code>true</code>. <code>JSONObject.NULL.toString()</code> returns
         * <code>"null"</code>. */
-       @SuppressWarnings("synthetic-access")
-       public static final Object NULL = new Null();
+       @SuppressWarnings("synthetic-access") public static final Object NULL = new Null();
 
        /** Construct an empty JSONObject. */
        public JSONObject () {
@@ -225,14 +221,14 @@ public class JSONObject {
         * @param names An array of strings, the names of the fields to be obtained from the object. */
        public JSONObject (Object object, String names[]) {
                this();
-//             Class c = object.getClass();
-//             for (int i = 0; i < names.length; i += 1) {
-//                     String name = names[i];
-//                     try {
-//                             putOpt(name, c.getField(name).get(object));
-//                     } catch (Exception ignore) {
-//                     }
-//             }
+// Class c = object.getClass();
+// for (int i = 0; i < names.length; i += 1) {
+// String name = names[i];
+// try {
+// putOpt(name, c.getField(name).get(object));
+// } catch (Exception ignore) {
+// }
+// }
        }
 
        /** Construct a JSONObject from a source JSON text string. This is the most commonly used JSONObject constructor.
@@ -247,37 +243,37 @@ public class JSONObject {
         * @param baseName The ResourceBundle base name.
         * @param locale The Locale to load the ResourceBundle for.
         * @throws JSONException If any JSONExceptions are detected. */
-//     public JSONObject (String baseName, Locale locale) throws JSONException {
-//             this();
-//             ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, Thread.currentThread().getContextClassLoader());
+// public JSONObject (String baseName, Locale locale) throws JSONException {
+// this();
+// ResourceBundle bundle = ResourceBundle.getBundle(baseName, locale, Thread.currentThread().getContextClassLoader());
 //
-//// Iterate through the keys in the bundle.
+// // Iterate through the keys in the bundle.
 //
-//             Enumeration keys = bundle.getKeys();
-//             while (keys.hasMoreElements()) {
-//                     Object key = keys.nextElement();
-//                     if (key instanceof String) {
+// Enumeration keys = bundle.getKeys();
+// while (keys.hasMoreElements()) {
+// Object key = keys.nextElement();
+// if (key instanceof String) {
 //
-//// Go through the path, ensuring that there is a nested JSONObject for each
-//// segment except the last. Add the value using the last segment's name into
-//// the deepest nested JSONObject.
+// // Go through the path, ensuring that there is a nested JSONObject for each
+// // segment except the last. Add the value using the last segment's name into
+// // the deepest nested JSONObject.
 //
-//                             String[] path = ((String)key).split("\\.");
-//                             int last = path.length - 1;
-//                             JSONObject target = this;
-//                             for (int i = 0; i < last; i += 1) {
-//                                     String segment = path[i];
-//                                     JSONObject nextTarget = target.optJSONObject(segment);
-//                                     if (nextTarget == null) {
-//                                             nextTarget = new JSONObject();
-//                                             target.put(segment, nextTarget);
-//                                     }
-//                                     target = nextTarget;
-//                             }
-//                             target.put(path[last], bundle.getString((String)key));
-//                     }
-//             }
-//     }
+// String[] path = ((String)key).split("\\.");
+// int last = path.length - 1;
+// JSONObject target = this;
+// for (int i = 0; i < last; i += 1) {
+// String segment = path[i];
+// JSONObject nextTarget = target.optJSONObject(segment);
+// if (nextTarget == null) {
+// nextTarget = new JSONObject();
+// target.put(segment, nextTarget);
+// }
+// target = nextTarget;
+// }
+// target.put(path[last], bundle.getString((String)key));
+// }
+// }
+// }
 
        /** Accumulate values under a key. It is similar to the put method except that if there is already an object stored under the
         * key then a JSONArray is stored under the key to hold all of the accumulated values. If there is already a JSONArray, then
@@ -464,20 +460,20 @@ public class JSONObject {
         * 
         * @return An array of field names, or null if there are no names. */
        public static String[] getNames (Object object) {
-//             if (object == null) {
-//                     return null;
-//             }
-//             Class klass = object.getClass();
-//             Field[] fields = klass.getFields();
-//             int length = fields.length;
-//             if (length == 0) {
-//                     return null;
-//             }
-//             String[] names = new String[length];
-//             for (int i = 0; i < length; i += 1) {
-//                     names[i] = fields[i].getName();
-//             }
-//             return names;
+// if (object == null) {
+// return null;
+// }
+// Class klass = object.getClass();
+// Field[] fields = klass.getFields();
+// int length = fields.length;
+// if (length == 0) {
+// return null;
+// }
+// String[] names = new String[length];
+// for (int i = 0; i < length; i += 1) {
+// names[i] = fields[i].getName();
+// }
+// return names;
                return null;
        }
 
@@ -720,40 +716,40 @@ public class JSONObject {
 
 // If klass is a System class then set includeSuperClass to false.
 
-//             boolean includeSuperClass = klass.getClassLoader() != null;
+// boolean includeSuperClass = klass.getClassLoader() != null;
 //
-//             Method[] methods = (includeSuperClass) ? klass.getMethods() : klass.getDeclaredMethods();
-//             for (int i = 0; i < methods.length; i += 1) {
-//                     try {
-//                             Method method = methods[i];
-//                             if (Modifier.isPublic(method.getModifiers())) {
-//                                     String name = method.getName();
-//                                     String key = "";
-//                                     if (name.startsWith("get")) {
-//                                             if (name.equals("getClass") || name.equals("getDeclaringClass")) {
-//                                                     key = "";
-//                                             } else {
-//                                                     key = name.substring(3);
-//                                             }
-//                                     } else if (name.startsWith("is")) {
-//                                             key = name.substring(2);
-//                                     }
-//                                     if (key.length() > 0 && Character.isUpperCase(key.charAt(0)) && method.getParameterTypes().length == 0) {
-//                                             if (key.length() == 1) {
-//                                                     key = key.toLowerCase();
-//                                             } else if (!Character.isUpperCase(key.charAt(1))) {
-//                                                     key = key.substring(0, 1).toLowerCase() + key.substring(1);
-//                                             }
+// Method[] methods = (includeSuperClass) ? klass.getMethods() : klass.getDeclaredMethods();
+// for (int i = 0; i < methods.length; i += 1) {
+// try {
+// Method method = methods[i];
+// if (Modifier.isPublic(method.getModifiers())) {
+// String name = method.getName();
+// String key = "";
+// if (name.startsWith("get")) {
+// if (name.equals("getClass") || name.equals("getDeclaringClass")) {
+// key = "";
+// } else {
+// key = name.substring(3);
+// }
+// } else if (name.startsWith("is")) {
+// key = name.substring(2);
+// }
+// if (key.length() > 0 && Character.isUpperCase(key.charAt(0)) && method.getParameterTypes().length == 0) {
+// if (key.length() == 1) {
+// key = key.toLowerCase();
+// } else if (!Character.isUpperCase(key.charAt(1))) {
+// key = key.substring(0, 1).toLowerCase() + key.substring(1);
+// }
 //
-//                                             Object result = method.invoke(bean, (Object[])null);
-//                                             if (result != null) {
-//                                                     map.put(key, wrap(result));
-//                                             }
-//                                     }
-//                             }
-//                     } catch (Exception ignore) {
-//                     }
-//             }
+// Object result = method.invoke(bean, (Object[])null);
+// if (result != null) {
+// map.put(key, wrap(result));
+// }
+// }
+// }
+// } catch (Exception ignore) {
+// }
+// }
        }
 
        /** Put a key/boolean pair in the JSONObject.
@@ -1206,36 +1202,36 @@ public class JSONObject {
         * @param object The object to wrap
         * @return The wrapped value */
        public static Object wrap (Object object) {
-//             try {
-//                     if (object == null) {
-//                             return NULL;
-//                     }
-//                     if (object instanceof JSONObject || object instanceof JSONArray || NULL.equals(object) || object instanceof JSONString
-//                             || object instanceof Byte || object instanceof Character || object instanceof Short || object instanceof Integer
-//                             || object instanceof Long || object instanceof Boolean || object instanceof Float || object instanceof Double
-//                             || object instanceof String) {
-//                             return object;
-//                     }
+// try {
+// if (object == null) {
+// return NULL;
+// }
+// if (object instanceof JSONObject || object instanceof JSONArray || NULL.equals(object) || object instanceof JSONString
+// || object instanceof Byte || object instanceof Character || object instanceof Short || object instanceof Integer
+// || object instanceof Long || object instanceof Boolean || object instanceof Float || object instanceof Double
+// || object instanceof String) {
+// return object;
+// }
 //
-//                     if (object instanceof Collection) {
-//                             return new JSONArray((Collection)object);
-//                     }
-//                     if (object.getClass().isArray()) {
-//                             return new JSONArray(object);
-//                     }
-//                     if (object instanceof Map) {
-//                             return new JSONObject((Map)object);
-//                     }
-//                     Package objectPackage = object.getClass().getPackage();
-//                     String objectPackageName = (objectPackage != null ? objectPackage.getName() : "");
-//                     if (objectPackageName.startsWith("java.") || objectPackageName.startsWith("javax.")
-//                             || object.getClass().getClassLoader() == null) {
-//                             return object.toString();
-//                     }
-//                     return new JSONObject(object);
-//             } catch (Exception exception) {
-//                     return null;
-//             }
+// if (object instanceof Collection) {
+// return new JSONArray((Collection)object);
+// }
+// if (object.getClass().isArray()) {
+// return new JSONArray(object);
+// }
+// if (object instanceof Map) {
+// return new JSONObject((Map)object);
+// }
+// Package objectPackage = object.getClass().getPackage();
+// String objectPackageName = (objectPackage != null ? objectPackage.getName() : "");
+// if (objectPackageName.startsWith("java.") || objectPackageName.startsWith("javax.")
+// || object.getClass().getClassLoader() == null) {
+// return object.toString();
+// }
+// return new JSONObject(object);
+// } catch (Exception exception) {
+// return null;
+// }
                return null;
        }
 
index 5f0694d..2d5e080 100644 (file)
@@ -171,13 +171,12 @@ public class Assets {
                        try {\r
                                float density = Float.parseFloat(availableDensities[i].name());\r
                                densities.add(density);\r
-                       }\r
-                       catch (NumberFormatException ex) {\r
+                       } catch (NumberFormatException ex) {\r
                                // Ignore anything non-numeric, such as ".svn" folders.\r
                        }\r
                }\r
-               densities.shrink();     // Remove empty slots to get rid of zeroes.\r
-               densities.sort();       // Now the lowest density comes first.\r
+               densities.shrink(); // Remove empty slots to get rid of zeroes.\r
+               densities.sort(); // Now the lowest density comes first.\r
                return CameraHelper.bestDensity(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, densities.items);\r
        }\r
 \r
index 21d37bf..0048152 100644 (file)
@@ -85,7 +85,6 @@ public class StatusManager implements WorldListener {
        /** The number of times the player has been hit in this room. */\r
        private int playerHits;\r
 \r
-\r
        /** The number of robots that have been destroyed in this game (including those that have been shot). */\r
        private int gameRobotsDestroyed;\r
 \r
index 3fa5060..587503c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.audio;\r
 \r
 import com.badlogic.gdx.jnigen.AntScriptGenerator;\r
@@ -22,49 +23,20 @@ import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;
 import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 \r
 public class AudioBuild {\r
-       public static void main(String[] args) throws Exception {\r
-               new NativeCodeGenerator().generate("src", "bin", "jni", \r
-                                                                                  new String[] { "**/AudioTools.java", "**/KissFFT.java", "**/VorbisDecoder.java",  "**/Mpg123Decoder.java", "**/SoundTouch.java" }, \r
-                                                                                  null);\r
-               \r
-               String[] headerDirs = new String[] { "kissfft", "vorbis", "soundtouch/include", "soundtouch/source/SoundTouch/" };\r
-               String[] cIncludes = new String[] { \r
-                                                                                       "kissfft/*.c", \r
-                                                                                       "vorbis/*.c", \r
-                                                                                        "libmpg123/equalizer.c",\r
-                                                                                        "libmpg123/index.c",\r
-                                                                                        "libmpg123/layer2.c",\r
-                                                                                        "libmpg123/synth.c",\r
-                                                                                        "libmpg123/dct64.c",\r
-                                                                                        "libmpg123/format.c",\r
-                                                                                        "libmpg123/layer3.c",\r
-                                                                                        "libmpg123/ntom.c",\r
-                                                                                        "libmpg123/parse.c",\r
-                                                                                        "libmpg123/readers.c",\r
-                                                                                        "libmpg123/frame.c",\r
-                                                                                        "libmpg123/layer1.c",\r
-                                                                                        "libmpg123/libmpg123.c",\r
-                                                                                        "libmpg123/optimize.c",\r
-                                                                                        "libmpg123/synth_arm.S",\r
-                                                                                        "libmpg123/tabinit.c",\r
-                                                                                        "libmpg123/id3.c",\r
-                                                                                        "libmpg123/stringbuf.c",\r
-                                                                                        "libmpg123/icy.c",\r
-                                                                                        "libmpg123/icy2utf8.c",\r
-                                                                                        "libmpg123/compat.c",\r
-                                                                                        "libmpg123/synth_8bit.c",\r
-                                                                                        "libmpg123/synth_real.c",\r
-                                                                                        "libmpg123/synth_s32.c",\r
-               };\r
-               String[] cppIncludes = new String[] { \r
-                                                                                         "**/*AudioTools.cpp", \r
-                                                                                         "**/*KissFFT.cpp", \r
-                                                                                         "**/*VorbisDecoder.cpp",\r
-                                                                                         "**/*SoundTouch.cpp",\r
-                                                                                         "**/*Mpg123Decoder.cpp",\r
-                                                                                         "soundtouch/source/SoundTouch/*.cpp"\r
-               };\r
-               String[] cppExcludes = new String[] { "**/cpu_detect_x86_win.cpp" };\r
+       public static void main (String[] args) throws Exception {\r
+               new NativeCodeGenerator().generate("src", "bin", "jni", new String[] {"**/AudioTools.java", "**/KissFFT.java",\r
+                       "**/VorbisDecoder.java", "**/Mpg123Decoder.java", "**/SoundTouch.java"}, null);\r
+\r
+               String[] headerDirs = new String[] {"kissfft", "vorbis", "soundtouch/include", "soundtouch/source/SoundTouch/"};\r
+               String[] cIncludes = new String[] {"kissfft/*.c", "vorbis/*.c", "libmpg123/equalizer.c", "libmpg123/index.c",\r
+                       "libmpg123/layer2.c", "libmpg123/synth.c", "libmpg123/dct64.c", "libmpg123/format.c", "libmpg123/layer3.c",\r
+                       "libmpg123/ntom.c", "libmpg123/parse.c", "libmpg123/readers.c", "libmpg123/frame.c", "libmpg123/layer1.c",\r
+                       "libmpg123/libmpg123.c", "libmpg123/optimize.c", "libmpg123/synth_arm.S", "libmpg123/tabinit.c", "libmpg123/id3.c",\r
+                       "libmpg123/stringbuf.c", "libmpg123/icy.c", "libmpg123/icy2utf8.c", "libmpg123/compat.c", "libmpg123/synth_8bit.c",\r
+                       "libmpg123/synth_real.c", "libmpg123/synth_s32.c",};\r
+               String[] cppIncludes = new String[] {"**/*AudioTools.cpp", "**/*KissFFT.cpp", "**/*VorbisDecoder.cpp",\r
+                       "**/*SoundTouch.cpp", "**/*Mpg123Decoder.cpp", "soundtouch/source/SoundTouch/*.cpp"};\r
+               String[] cppExcludes = new String[] {"**/cpu_detect_x86_win.cpp"};\r
                String precompileTask = "<copy failonerror=\"true\" tofile=\"soundtouch/include/STTypes.h\" verbose=\"true\" overwrite=\"true\" file=\"STTypes.h.patched\"/>";\r
                String cFlags = " -DFIXED_POINT -DMPG123_NO_CONFIGURE -DOPT_GENERIC -DHAVE_STRERROR -DMPG123_NO_LARGENAME";\r
                String cppFlags = " -DFIXED_POINT -DMPG123_NO_CONFIGURE -DOPT_GENERIC -DHAVE_STRERROR -DMPG123_NO_LARGENAME";\r
@@ -80,7 +52,7 @@ public class AudioBuild {
                win32home.cppExcludes = cppExcludes;\r
                win32home.excludeFromMasterBuildFile = true;\r
                win32home.preCompileTask = precompileTask;\r
-               \r
+\r
                BuildTarget win32 = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32.cFlags += cFlags;\r
                win32.cppFlags += cppFlags;\r
@@ -89,7 +61,7 @@ public class AudioBuild {
                win32.cppIncludes = cppIncludes;\r
                win32.cppExcludes = cppExcludes;\r
                win32.preCompileTask = precompileTask;\r
-               \r
+\r
                BuildTarget win64 = BuildTarget.newDefaultTarget(TargetOs.Windows, true);\r
                win64.cFlags += cFlags;\r
                win64.cppFlags += cppFlags;\r
@@ -98,7 +70,7 @@ public class AudioBuild {
                win64.cppIncludes = cppIncludes;\r
                win64.cppExcludes = cppExcludes;\r
                win64.preCompileTask = precompileTask;\r
-               \r
+\r
                BuildTarget lin32 = BuildTarget.newDefaultTarget(TargetOs.Linux, false);\r
                lin32.cFlags += cFlags;\r
                lin32.cppFlags += cppFlags;\r
@@ -107,7 +79,7 @@ public class AudioBuild {
                lin32.cppIncludes = cppIncludes;\r
                lin32.cppExcludes = cppExcludes;\r
                lin32.preCompileTask = precompileTask;\r
-               \r
+\r
                BuildTarget lin64 = BuildTarget.newDefaultTarget(TargetOs.Linux, true);\r
                lin64.cFlags += cFlags;\r
                lin64.cppFlags += cppFlags;\r
@@ -116,7 +88,7 @@ public class AudioBuild {
                lin64.cppIncludes = cppIncludes;\r
                lin64.cppExcludes = cppExcludes;\r
                lin64.preCompileTask = precompileTask;\r
-               \r
+\r
                BuildTarget mac = BuildTarget.newDefaultTarget(TargetOs.MacOsX, false);\r
                mac.cFlags += cFlags;\r
                mac.cppFlags += cppFlags;\r
@@ -125,7 +97,7 @@ public class AudioBuild {
                mac.cppIncludes = cppIncludes;\r
                mac.cppExcludes = cppExcludes;\r
                mac.preCompileTask = precompileTask;\r
-               \r
+\r
                BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android, false);\r
                android.cFlags += " -DFIXED_POINT -D_ARM_ASSEM_ -D__ANDROID__ -DMPG123_NO_CONFIGURE -DOPT_GENERIC -DHAVE_STRERROR -DMPG123_NO_LARGENAME";\r
                android.cppFlags += " -DFIXED_POINT -D_ARM_ASSEM_ -D__ANDROID__ -DMPG123_NO_CONFIGURE -DOPT_GENERIC -DHAVE_STRERROR -DMPG123_NO_LARGENAME";\r
@@ -134,10 +106,10 @@ public class AudioBuild {
                android.cppIncludes = cppIncludes;\r
                android.cppExcludes = cppExcludes;\r
                android.preCompileTask = precompileTask;\r
-               \r
+\r
                new AntScriptGenerator().generate(buildConfig, win32home, win32, win64, lin32, lin64, mac, android);\r
-               \r
-//             BuildExecutor.executeAnt("jni/build-linux64.xml", "clean postcompile -v");\r
-//             BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");\r
+\r
+// BuildExecutor.executeAnt("jni/build-linux64.xml", "clean postcompile -v");\r
+// BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");\r
        }\r
-}
\ No newline at end of file
+}\r
index 940f752..8b56ca5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.audio;\r
 \r
 import com.badlogic.gdx.math.MathUtils;\r
@@ -128,4 +129,4 @@ public class CircularBuffer {
                System.out.println(buffer.read(read, 0, read.length) + " read\n");\r
                buffer.dump();\r
        }\r
-}
\ No newline at end of file
+}\r
index 21a2444..6f232d1 100644 (file)
@@ -31,7 +31,7 @@ public class AudioTools {
        static {\r
                new SharedLibraryLoader().load("gdx-audio");\r
        }\r
-       \r
+\r
        /** Converts the 16-bit signed PCM data given in source to 32-bit float PCM in the range [-1,1]. It is assumed that there's\r
         * numSamples elements available in both buffers. Source and target get read and written to from offset 0. All buffers must be\r
         * direct.\r
@@ -40,17 +40,15 @@ public class AudioTools {
         * @param target the target buffer\r
         * @param numSamples the number of samples */\r
        public static native void convertToFloat (ShortBuffer source, FloatBuffer target, int numSamples); /*\r
-               float inv = 1 / 32767.0f;\r
-               for( int i = 0; i < numSamples; i++, source++, target++ )\r
-               {\r
-                       float val = (*source * inv);\r
-                       if( val < -1 )\r
-                               val = -1;\r
-                       if( val > 1 )\r
-                               val = 1;\r
-                       *target = val;\r
-               }\r
-       */\r
+                                                                                                                                                                                                                                                                                * float inv = 1 / 32767.0f;\r
+                                                                                                                                                                                                                                                                                * for( int i = 0; i <\r
+                                                                                                                                                                                                                                                                                * numSamples; i++,\r
+                                                                                                                                                                                                                                                                                * source++, target++ ) {\r
+                                                                                                                                                                                                                                                                                * float val = (*source *\r
+                                                                                                                                                                                                                                                                                * inv); if( val < -1 ) val\r
+                                                                                                                                                                                                                                                                                * = -1; if( val > 1 ) val =\r
+                                                                                                                                                                                                                                                                                * 1;target = val; }\r
+                                                                                                                                                                                                                                                                                */\r
 \r
        /** Converts the 32-bit float PCM data given in source to 16-bit signed PCM in the range [-1,1]. It is assumed that there's\r
         * numSamples elements available in both buffers. Source and target get read and written to from offset 0. All buffers must be\r
@@ -60,9 +58,12 @@ public class AudioTools {
         * @param target the target buffer\r
         * @param numSamples the number of samples */\r
        public static native void convertToShort (FloatBuffer source, ShortBuffer target, int numSamples); /*\r
-               for( int i = 0; i < numSamples; i++, source++, target++ )\r
-               *target = (short)(*source * 32767);\r
-       */\r
+                                                                                                                                                                                                                                                                                * for( int i = 0; i <\r
+                                                                                                                                                                                                                                                                                * numSamples; i++,\r
+                                                                                                                                                                                                                                                                                * source++, target++ )\r
+                                                                                                                                                                                                                                                                                * target = (short)(*source\r
+                                                                                                                                                                                                                                                                                * * 32767);\r
+                                                                                                                                                                                                                                                                                */\r
 \r
        /** Converts the samples in source which are assumed to be interleaved left/right stereo samples to mono, writting the converted\r
         * samples to target. Source is assumed to hold numSamples samples, target should hold numSamples / 2. Samples are read and\r
@@ -72,14 +73,13 @@ public class AudioTools {
         * @param target the target buffer\r
         * @param numSamples the number of samples to convert (target will have numSamples /2 filled after a call to this) */\r
        public static native void convertToMonoShort (ShortBuffer source, ShortBuffer target, int numSamples); /*\r
-               for( int i = 0; i < numSamples / 2; i++ )\r
-               {\r
-                       int val = *(source++);\r
-                       val += *(source++);\r
-                       val >>= 1;\r
-                       *target++ = val;\r
-               }\r
-       */\r
+                                                                                                                                                                                                                                                                                        * for( int i = 0; i <\r
+                                                                                                                                                                                                                                                                                        * numSamples / 2; i++ )\r
+                                                                                                                                                                                                                                                                                        * { int val =\r
+                                                                                                                                                                                                                                                                                        * *(source++); val +=\r
+                                                                                                                                                                                                                                                                                        * *(source++); val >>=\r
+                                                                                                                                                                                                                                                                                        * 1;target++ = val; }\r
+                                                                                                                                                                                                                                                                                        */\r
 \r
        /** Converts the samples in source which are assumed to be interleaved left/right stereo samples to mono, writting the converted\r
         * samples to target. Source is assumed to hold numSamples samples, target should hold numSamples / 2. Samples are read and\r
@@ -89,14 +89,13 @@ public class AudioTools {
         * @param target the target buffer\r
         * @param numSamples the number of samples to convert (target will have numSamples /2 filled after a call to this) */\r
        public static native void convertToMonoFloat (FloatBuffer source, FloatBuffer target, int numSamples); /*\r
-               for( int i = 0; i < numSamples / 2; i++ )\r
-               {\r
-                       float val = *(source++);\r
-                       val += *(source++);\r
-                       val /= 2;\r
-                       *target++ = val;\r
-               }\r
-       */\r
+                                                                                                                                                                                                                                                                                        * for( int i = 0; i <\r
+                                                                                                                                                                                                                                                                                        * numSamples / 2; i++ )\r
+                                                                                                                                                                                                                                                                                        * { float val =\r
+                                                                                                                                                                                                                                                                                        * *(source++); val +=\r
+                                                                                                                                                                                                                                                                                        * *(source++); val /= 2;\r
+                                                                                                                                                                                                                                                                                        * target++ = val; }\r
+                                                                                                                                                                                                                                                                                        */\r
 \r
        /** Calculates the spectral flux between the two given spectra. Both buffers are assumed to hold numSamples elements. Spectrum B\r
         * is the current spectrum spectrum A the last spectrum. All buffers must be direct.\r
@@ -106,15 +105,19 @@ public class AudioTools {
         * @param numSamples the number of elements\r
         * @return the spectral flux */\r
        public static native float spectralFlux (FloatBuffer spectrumA, FloatBuffer spectrumB, int numSamples); /*\r
-               float flux = 0;\r
-               for( int i = 0; i < numSamples; i++ )\r
-               {\r
-                       float value = *spectrumB++ - *spectrumA++;\r
-                       flux += value < 0? 0: value;\r
-               }\r
-               // no cleanup required as we have direct buffers\r
-               return flux;\r
-       */\r
+                                                                                                                                                                                                                                                                                                * float flux = 0;\r
+                                                                                                                                                                                                                                                                                                * for( int i = 0; i <\r
+                                                                                                                                                                                                                                                                                                * numSamples; i++ ) {\r
+                                                                                                                                                                                                                                                                                                * float value =\r
+                                                                                                                                                                                                                                                                                                * *spectrumB++ -\r
+                                                                                                                                                                                                                                                                                                * *spectrumA++; flux\r
+                                                                                                                                                                                                                                                                                                * += value < 0? 0:\r
+                                                                                                                                                                                                                                                                                                * value; } // no\r
+                                                                                                                                                                                                                                                                                                * cleanup required as\r
+                                                                                                                                                                                                                                                                                                * we have direct\r
+                                                                                                                                                                                                                                                                                                * buffers return\r
+                                                                                                                                                                                                                                                                                                * flux;\r
+                                                                                                                                                                                                                                                                                                */\r
 \r
        /** Allcoates a direct buffer for the given number of samples and channels. The final numer of samples is numSamples *\r
         * numChannels.\r
@@ -164,49 +167,40 @@ public class AudioTools {
                for (int i = offsetSrc, ii = offsetDst; i < numBytes; i++, ii++)\r
                        dst[i] = src[ii] * scale;\r
        }\r
-       \r
-       /**\r
-        * Generates a mono PCM sample buffer for the given frequency and length in\r
-        * samples for use with AudioMixer.\r
+\r
+       /** Generates a mono PCM sample buffer for the given frequency and length in samples for use with AudioMixer.\r
         * \r
         * @param frequency\r
         * @param numSamples\r
-        * @return PCM data for a sine wave\r
-        */\r
-       public static short[] generate(int samplingRate, int frequency, int numSamples) {\r
+        * @return PCM data for a sine wave */\r
+       public static short[] generate (int samplingRate, int frequency, int numSamples) {\r
                short[] samples = new short[numSamples];\r
-               float increment = (float) (2 * Math.PI) * frequency / (float)samplingRate;\r
+               float increment = (float)(2 * Math.PI) * frequency / (float)samplingRate;\r
                float angle = 0;\r
 \r
                for (int i = 0; i < numSamples; i++) {\r
                        samples[i] = (short)(Math.sin(angle) * Short.MAX_VALUE);\r
                        angle += increment;\r
                }\r
-               \r
+\r
                return samples;\r
        }\r
-       \r
-       /**\r
-        * Generates a mono PCM sample buffer for the given frequency and length in\r
-        * seconds for use with AudioMixer.\r
+\r
+       /** Generates a mono PCM sample buffer for the given frequency and length in seconds for use with AudioMixer.\r
         * \r
         * @param frequency\r
-        * @param length\r
-        */\r
-       public static short[] generate(int samplingRate, int frequency, float length) {\r
-               int numSamples = (int) (samplingRate * length);\r
+        * @param length */\r
+       public static short[] generate (int samplingRate, int frequency, float length) {\r
+               int numSamples = (int)(samplingRate * length);\r
                return generate(samplingRate, frequency, numSamples);\r
        }\r
-       \r
-       /**\r
-        * Generates a mono PCM sample buffer for the given frequency and length in\r
-        * seconds for use with AudioMixer.\r
+\r
+       /** Generates a mono PCM sample buffer for the given frequency and length in seconds for use with AudioMixer.\r
         * \r
-        * @param frequency\r
-        */\r
-       public static float[] generateFloat(int samplingRate, int frequency, int numSamples) {\r
+        * @param frequency */\r
+       public static float[] generateFloat (int samplingRate, int frequency, int numSamples) {\r
                float[] samples = new float[numSamples];\r
-               float increment = (float) (2 * Math.PI) * frequency / (float)samplingRate;\r
+               float increment = (float)(2 * Math.PI) * frequency / (float)samplingRate;\r
                float angle = 0;\r
 \r
                for (int i = 0; i < numSamples; i++) {\r
@@ -215,16 +209,13 @@ public class AudioTools {
                }\r
                return samples;\r
        }\r
-       \r
-       /**\r
-        * Generates a mono PCM sample buffer for the given frequency and length in\r
-        * seconds for use with AudioMixer.\r
+\r
+       /** Generates a mono PCM sample buffer for the given frequency and length in seconds for use with AudioMixer.\r
         * \r
         * @param frequency\r
-        * @param length\r
-        */\r
-       public static float[] generateFloat(int samplingRate, int frequency, float length) {\r
-               int numSamples = (int) (samplingRate * length);\r
+        * @param length */\r
+       public static float[] generateFloat (int samplingRate, int frequency, float length) {\r
+               int numSamples = (int)(samplingRate * length);\r
                return generateFloat(samplingRate, frequency, numSamples);\r
        }\r
 }\r
index 943d0a5..6bcef0b 100644 (file)
@@ -54,7 +54,8 @@ public class KissFFT implements Disposable {
        public void getImagPart (short[] imag) {\r
                getImagPart(addr, imag);\r
        }\r
-       \r
+\r
+       // @off\r
        /*JNI\r
        #include <kiss_fftr.h>\r
        #include <stdlib.h>\r
index 273e808..a5ac186 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.audio.io;\r
+\r
 /*******************************************************************************\r
  * Copyright 2011 See AUTHORS file.\r
  * \r
@@ -30,10 +32,10 @@ package com.badlogic.gdx.audio.io;
  * limitations under the License.\r
  ******************************************************************************/\r
 \r
-\r
 import com.badlogic.gdx.utils.Disposable;\r
 \r
-/** Abstract class for audio decoders that return successive amplitude frames. When a decoder is no longer used it has to be disposed.\r
+/** Abstract class for audio decoders that return successive amplitude frames. When a decoder is no longer used it has to be\r
+ * disposed.\r
  * \r
  * @author badlogicgames@gmail.com */\r
 public abstract class Decoder implements Disposable {\r
@@ -41,22 +43,20 @@ public abstract class Decoder implements Disposable {
         * number is smaller than the capacity of the buffer then the end of stream has been reached. The provided ShortBuffer must be\r
         * a direct buffer.\r
         * \r
-        * @param samples The number of samples to read. \r
+        * @param samples The number of samples to read.\r
         * @param offset the offset at which to start writting samples to\r
         * @return the number of samples read, < numSamples means end of file */\r
        public abstract int readSamples (short[] samples, int offset, int numSamples);\r
-       \r
-       /**\r
-        * Reads in the entire sound file into a single short[] array.\r
-        */\r
-       public short[] readAllSamples() {\r
+\r
+       /** Reads in the entire sound file into a single short[] array. */\r
+       public short[] readAllSamples () {\r
                short[] out = new short[(int)Math.ceil(getLength() * getRate() * getChannels())];\r
-               short[] buffer = new short[1024*5];\r
+               short[] buffer = new short[1024 * 5];\r
                int readSamples = 0;\r
                int totalSamples = 0;\r
-               \r
-               while((readSamples = readSamples(buffer, 0, buffer.length)) > 0) {\r
-                       if(readSamples + totalSamples >= out.length) {\r
+\r
+               while ((readSamples = readSamples(buffer, 0, buffer.length)) > 0) {\r
+                       if (readSamples + totalSamples >= out.length) {\r
                                short[] tmp = new short[readSamples + totalSamples];\r
                                System.arraycopy(out, 0, tmp, 0, totalSamples);\r
                                out = tmp;\r
@@ -64,14 +64,14 @@ public abstract class Decoder implements Disposable {
                        System.arraycopy(buffer, 0, out, totalSamples, readSamples);\r
                        totalSamples += readSamples;\r
                }\r
-               \r
-               if(out.length != totalSamples) {\r
+\r
+               if (out.length != totalSamples) {\r
                        short[] tmp = new short[totalSamples];\r
                        System.arraycopy(out, 0, tmp, 0, totalSamples);\r
                        out = tmp;\r
                }\r
                return out;\r
-               \r
+\r
        }\r
 \r
        /** Skips numSamples samples. If the decoded file is in stereo the left and right channel samples are counted as 2 samples.\r
@@ -91,4 +91,4 @@ public abstract class Decoder implements Disposable {
 \r
        /** Disposes the decoder and frees all associated resources */\r
        public abstract void dispose ();\r
-}
\ No newline at end of file
+}\r
index 033aea1..253d101 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.audio.io;\r
+\r
 /*******************************************************************************\r
  * Copyright 2011 See AUTHORS file.\r
  * \r
@@ -30,7 +32,6 @@ package com.badlogic.gdx.audio.io;
  * limitations under the License.\r
  ******************************************************************************/\r
 \r
-\r
 import com.badlogic.gdx.Files.FileType;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
@@ -42,13 +43,12 @@ public class Mpg123Decoder extends Decoder {
        static {\r
                new SharedLibraryLoader().load("gdx-audio");\r
        }\r
-       \r
+\r
        public final long handle;\r
 \r
-       /** Opens the given file for mp3 decoding. Throws an IllegalArugmentException in case the file could not be opened.\r
-        */\r
+       /** Opens the given file for mp3 decoding. Throws an IllegalArugmentException in case the file could not be opened. */\r
        public Mpg123Decoder (FileHandle file) {\r
-               if(file.type() != FileType.External && file.type() != FileType.Absolute)\r
+               if (file.type() != FileType.External && file.type() != FileType.Absolute)\r
                        throw new IllegalArgumentException("File must be absolute or external!");\r
                handle = openFile(file.file().getAbsolutePath());\r
        }\r
@@ -75,12 +75,13 @@ public class Mpg123Decoder extends Decoder {
        public float getLength () {\r
                return getLength(handle);\r
        }\r
-       \r
+\r
        @Override\r
        public void dispose () {\r
                closeFile(handle);\r
        }\r
 \r
+       // @off\r
        /*JNI\r
        extern "C" {\r
        #include "libmpg123/mpg123.h"\r
index a435a13..0811266 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.audio.io;\r
+\r
 /*******************************************************************************\r
  * Copyright 2011 See AUTHORS file.\r
  * \r
@@ -30,7 +32,6 @@ package com.badlogic.gdx.audio.io;
  * limitations under the License.\r
  ******************************************************************************/\r
 \r
-\r
 import com.badlogic.gdx.Files.FileType;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
@@ -41,20 +42,18 @@ public class VorbisDecoder extends Decoder {
        static {\r
                new SharedLibraryLoader().load("gdx-audio");\r
        }\r
-       \r
+\r
        /** address of native OggFileHandle structure **/\r
        private final long handle;\r
 \r
        /** Opens the given file for ogg decoding. Throws an IllegalArugmentException in case the file could not be opened.\r
         * \r
-        * @param file external or absolute {@link FileHandle}\r
-        */\r
+        * @param file external or absolute {@link FileHandle} */\r
        public VorbisDecoder (FileHandle file) {\r
-               if(file.type() != FileType.External && file.type() != FileType.Absolute)\r
+               if (file.type() != FileType.External && file.type() != FileType.Absolute)\r
                        throw new IllegalArgumentException("File must be absolute or external!");\r
                handle = openFile(file.file().getAbsolutePath());\r
-               if (handle == 0)\r
-                       throw new IllegalArgumentException("couldn't open file '" + file + "'");\r
+               if (handle == 0) throw new IllegalArgumentException("couldn't open file '" + file + "'");\r
        }\r
 \r
        @Override\r
@@ -87,6 +86,7 @@ public class VorbisDecoder extends Decoder {
                return skipSamples(handle, numSamples);\r
        }\r
 \r
+       // @off\r
        /*JNI\r
        #include <ogg.h>\r
        #include <ivorbiscodec.h>\r
index 0ebeaed..ad6f226 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.audio.io;\r
 \r
 import java.io.EOFException;\r
@@ -23,35 +24,30 @@ import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
-/**\r
- * {@link Decoder} implementation for WAV files, pure Java, beware.\r
- * @author mzechner\r
- *\r
- */\r
+/** {@link Decoder} implementation for WAV files, pure Java, beware.\r
+ * @author mzechner */\r
 public class WavDecoder extends Decoder {\r
        WavInputStream in;\r
        byte[] buffer = new byte[1024];\r
-       \r
-       /**\r
-        * Creates a new WAV decoder. The file can be of any type.\r
-        * @param file the {@link FileHandle}\r
-        */\r
-       public WavDecoder(FileHandle file) {\r
+\r
+       /** Creates a new WAV decoder. The file can be of any type.\r
+        * @param file the {@link FileHandle} */\r
+       public WavDecoder (FileHandle file) {\r
                in = new WavInputStream(file);\r
        }\r
-       \r
+\r
        @Override\r
-       public int readSamples(short[] samples, int offset, int numSamples) {\r
+       public int readSamples (short[] samples, int offset, int numSamples) {\r
                int read = 0;\r
                int total = 0;\r
-               if(buffer.length < samples.length * 2) buffer = new byte[samples.length * 2];\r
+               if (buffer.length < samples.length * 2) buffer = new byte[samples.length * 2];\r
                numSamples *= 2;\r
                try {\r
-                       while((read = in.read(buffer, total, numSamples - total)) > 0) {\r
+                       while ((read = in.read(buffer, total, numSamples - total)) > 0) {\r
                                total += read;\r
                        }\r
                        total = total - (total % 2);\r
-                       for(int j=0; j < total; j+=2) {\r
+                       for (int j = 0; j < total; j += 2) {\r
                                samples[offset++] = (short)(((buffer[j + 1] << 8) & 0xff00) | (buffer[j] & 0xff));\r
                        }\r
                } catch (IOException e) {\r
@@ -62,7 +58,7 @@ public class WavDecoder extends Decoder {
        }\r
 \r
        @Override\r
-       public int skipSamples(int numSamples) {\r
+       public int skipSamples (int numSamples) {\r
                try {\r
                        return (int)in.skip(numSamples * 2 * getChannels()) / (2 * getChannels());\r
                } catch (IOException e) {\r
@@ -72,25 +68,25 @@ public class WavDecoder extends Decoder {
        }\r
 \r
        @Override\r
-       public int getChannels() {\r
+       public int getChannels () {\r
                return in.channels;\r
        }\r
 \r
        @Override\r
-       public int getRate() {\r
+       public int getRate () {\r
                return in.sampleRate;\r
        }\r
 \r
        @Override\r
-       public float getLength() {\r
+       public float getLength () {\r
                return (in.dataRemaining / (2 * getChannels()) / (float)getRate());\r
        }\r
 \r
        @Override\r
-       public void dispose() {\r
+       public void dispose () {\r
                try {\r
-                       if(in != null) in.close();\r
-               } catch(Exception e) {\r
+                       if (in != null) in.close();\r
+               } catch (Exception e) {\r
                        // silent catch ftw...\r
                }\r
        }\r
@@ -167,4 +163,4 @@ public class WavDecoder extends Decoder {
                        return length;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index ecc5465..5d85273 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.audio.transform;\r
 \r
 import com.badlogic.gdx.utils.Disposable;\r
@@ -25,63 +26,44 @@ public class SoundTouch implements Disposable {
        /** Pitch transposer anti-alias filter length (8 .. 128 taps, default = 32) **/\r
        public static int SETTING_AA_FILTER_LENGTH = 1;\r
 \r
-       /** Enable/disable quick seeking algorithm in tempo changer routine\r
-        * (enabling quick seeking lowers CPU utilization but causes a minor sound\r
-        * quality compromising) \r
-        */\r
+       /** Enable/disable quick seeking algorithm in tempo changer routine (enabling quick seeking lowers CPU utilization but causes a\r
+        * minor sound quality compromising) */\r
        public static int SETTING_USE_QUICKSEEK = 2;\r
 \r
-       /** Time-stretch algorithm single processing sequence length in milliseconds. This determines \r
-        * to how long sequences the original sound is chopped in the time-stretch algorithm. \r
-        * See "STTypes.h" or README for more information.\r
-        */\r
+       /** Time-stretch algorithm single processing sequence length in milliseconds. This determines to how long sequences the original\r
+        * sound is chopped in the time-stretch algorithm. See "STTypes.h" or README for more information. */\r
        public static int SETTING_SEQUENCE_MS = 3;\r
 \r
-       /** Time-stretch algorithm seeking window length in milliseconds for algorithm that finds the \r
-        * best possible overlapping location. This determines from how wide window the algorithm \r
-        * may look for an optimal joining location when mixing the sound sequences back together. \r
-        * See "STTypes.h" or README for more information.\r
-        */\r
+       /** Time-stretch algorithm seeking window length in milliseconds for algorithm that finds the best possible overlapping\r
+        * location. This determines from how wide window the algorithm may look for an optimal joining location when mixing the sound\r
+        * sequences back together. See "STTypes.h" or README for more information. */\r
        public static int SETTING_SEEKWINDOW_MS = 4;\r
 \r
-       /** Time-stretch algorithm overlap length in milliseconds. When the chopped sound sequences \r
-        * are mixed back together, to form a continuous sound stream, this parameter defines over \r
-        * how long period the two consecutive sequences are let to overlap each other. \r
-        * See "STTypes.h" or README for more information.\r
-        */\r
+       /** Time-stretch algorithm overlap length in milliseconds. When the chopped sound sequences are mixed back together, to form a\r
+        * continuous sound stream, this parameter defines over how long period the two consecutive sequences are let to overlap each\r
+        * other. See "STTypes.h" or README for more information. */\r
        public static int SETTING_OVERLAP_MS = 5;\r
 \r
-\r
-       /** Call "getSetting" with this ID to query nominal average processing sequence\r
-        * size in samples. This value tells approcimate value how many input samples \r
-        * SoundTouch needs to gather before it does DSP processing run for the sample batch.\r
-        *\r
-        * Notices: \r
-        * - This is read-only parameter, i.e. setSetting ignores this parameter\r
-        * - Returned value is approximate average value, exact processing batch\r
-        *   size may wary from time to time\r
-        * - This parameter value is not constant but may change depending on \r
-        *   tempo/pitch/rate/samplerate settings.\r
-        */\r
+       /** Call "getSetting" with this ID to query nominal average processing sequence size in samples. This value tells approcimate\r
+        * value how many input samples SoundTouch needs to gather before it does DSP processing run for the sample batch.\r
+        * \r
+        * Notices: - This is read-only parameter, i.e. setSetting ignores this parameter - Returned value is approximate average\r
+        * value, exact processing batch size may wary from time to time - This parameter value is not constant but may change\r
+        * depending on tempo/pitch/rate/samplerate settings. */\r
        public static int SETTING_NOMINAL_INPUT_SEQUENCE = 6;\r
 \r
-\r
-       /** Call "getSetting" with this ID to query nominal average processing output \r
-        * size in samples. This value tells approcimate value how many output samples \r
-        * SoundTouch outputs once it does DSP processing run for a batch of input samples.\r
-        *      \r
-        * Notices: \r
-        * - This is read-only parameter, i.e. setSetting ignores this parameter\r
-        * - Returned value is approximate average value, exact processing batch\r
-        *   size may wary from time to time\r
-        * - This parameter value is not constant but may change depending on \r
-        *   tempo/pitch/rate/samplerate settings.\r
-        */\r
+       /** Call "getSetting" with this ID to query nominal average processing output size in samples. This value tells approcimate\r
+        * value how many output samples SoundTouch outputs once it does DSP processing run for a batch of input samples.\r
+        * \r
+        * Notices: - This is read-only parameter, i.e. setSetting ignores this parameter - Returned value is approximate average\r
+        * value, exact processing batch size may wary from time to time - This parameter value is not constant but may change\r
+        * depending on tempo/pitch/rate/samplerate settings. */\r
        public static int SETTING_NOMINAL_OUTPUT_SEQUENCE = 7;\r
 \r
        /** the address of the C++ object **/\r
        private final long addr;\r
-       \r
+\r
+       // @off\r
        /*JNI\r
        #include "SoundTouch.h"\r
        using namespace soundtouch;\r
index 96a5f2b..a99e14d 100644 (file)
@@ -9,42 +9,41 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class BroadphaseNativeTypes {
-  public final static int BOX_SHAPE_PROXYTYPE = 0;
-  public final static int TRIANGLE_SHAPE_PROXYTYPE = BOX_SHAPE_PROXYTYPE + 1;
-  public final static int TETRAHEDRAL_SHAPE_PROXYTYPE = TRIANGLE_SHAPE_PROXYTYPE + 1;
-  public final static int CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE = TETRAHEDRAL_SHAPE_PROXYTYPE + 1;
-  public final static int CONVEX_HULL_SHAPE_PROXYTYPE = CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE + 1;
-  public final static int CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE = CONVEX_HULL_SHAPE_PROXYTYPE + 1;
-  public final static int CUSTOM_POLYHEDRAL_SHAPE_TYPE = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE + 1;
-  public final static int IMPLICIT_CONVEX_SHAPES_START_HERE = CUSTOM_POLYHEDRAL_SHAPE_TYPE + 1;
-  public final static int SPHERE_SHAPE_PROXYTYPE = IMPLICIT_CONVEX_SHAPES_START_HERE + 1;
-  public final static int MULTI_SPHERE_SHAPE_PROXYTYPE = SPHERE_SHAPE_PROXYTYPE + 1;
-  public final static int CAPSULE_SHAPE_PROXYTYPE = MULTI_SPHERE_SHAPE_PROXYTYPE + 1;
-  public final static int CONE_SHAPE_PROXYTYPE = CAPSULE_SHAPE_PROXYTYPE + 1;
-  public final static int CONVEX_SHAPE_PROXYTYPE = CONE_SHAPE_PROXYTYPE + 1;
-  public final static int CYLINDER_SHAPE_PROXYTYPE = CONVEX_SHAPE_PROXYTYPE + 1;
-  public final static int UNIFORM_SCALING_SHAPE_PROXYTYPE = CYLINDER_SHAPE_PROXYTYPE + 1;
-  public final static int MINKOWSKI_SUM_SHAPE_PROXYTYPE = UNIFORM_SCALING_SHAPE_PROXYTYPE + 1;
-  public final static int MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE = MINKOWSKI_SUM_SHAPE_PROXYTYPE + 1;
-  public final static int BOX_2D_SHAPE_PROXYTYPE = MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE + 1;
-  public final static int CONVEX_2D_SHAPE_PROXYTYPE = BOX_2D_SHAPE_PROXYTYPE + 1;
-  public final static int CUSTOM_CONVEX_SHAPE_TYPE = CONVEX_2D_SHAPE_PROXYTYPE + 1;
-  public final static int CONCAVE_SHAPES_START_HERE = CUSTOM_CONVEX_SHAPE_TYPE + 1;
-  public final static int TRIANGLE_MESH_SHAPE_PROXYTYPE = CONCAVE_SHAPES_START_HERE + 1;
-  public final static int SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE = TRIANGLE_MESH_SHAPE_PROXYTYPE + 1;
-  public final static int FAST_CONCAVE_MESH_PROXYTYPE = SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE + 1;
-  public final static int TERRAIN_SHAPE_PROXYTYPE = FAST_CONCAVE_MESH_PROXYTYPE + 1;
-  public final static int GIMPACT_SHAPE_PROXYTYPE = TERRAIN_SHAPE_PROXYTYPE + 1;
-  public final static int MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE = GIMPACT_SHAPE_PROXYTYPE + 1;
-  public final static int EMPTY_SHAPE_PROXYTYPE = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE + 1;
-  public final static int STATIC_PLANE_PROXYTYPE = EMPTY_SHAPE_PROXYTYPE + 1;
-  public final static int CUSTOM_CONCAVE_SHAPE_TYPE = STATIC_PLANE_PROXYTYPE + 1;
-  public final static int CONCAVE_SHAPES_END_HERE = CUSTOM_CONCAVE_SHAPE_TYPE + 1;
-  public final static int COMPOUND_SHAPE_PROXYTYPE = CONCAVE_SHAPES_END_HERE + 1;
-  public final static int SOFTBODY_SHAPE_PROXYTYPE = COMPOUND_SHAPE_PROXYTYPE + 1;
-  public final static int HFFLUID_SHAPE_PROXYTYPE = SOFTBODY_SHAPE_PROXYTYPE + 1;
-  public final static int HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE = HFFLUID_SHAPE_PROXYTYPE + 1;
-  public final static int INVALID_SHAPE_PROXYTYPE = HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE + 1;
-  public final static int MAX_BROADPHASE_COLLISION_TYPES = INVALID_SHAPE_PROXYTYPE + 1;
+       public final static int BOX_SHAPE_PROXYTYPE = 0;
+       public final static int TRIANGLE_SHAPE_PROXYTYPE = BOX_SHAPE_PROXYTYPE + 1;
+       public final static int TETRAHEDRAL_SHAPE_PROXYTYPE = TRIANGLE_SHAPE_PROXYTYPE + 1;
+       public final static int CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE = TETRAHEDRAL_SHAPE_PROXYTYPE + 1;
+       public final static int CONVEX_HULL_SHAPE_PROXYTYPE = CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE + 1;
+       public final static int CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE = CONVEX_HULL_SHAPE_PROXYTYPE + 1;
+       public final static int CUSTOM_POLYHEDRAL_SHAPE_TYPE = CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE + 1;
+       public final static int IMPLICIT_CONVEX_SHAPES_START_HERE = CUSTOM_POLYHEDRAL_SHAPE_TYPE + 1;
+       public final static int SPHERE_SHAPE_PROXYTYPE = IMPLICIT_CONVEX_SHAPES_START_HERE + 1;
+       public final static int MULTI_SPHERE_SHAPE_PROXYTYPE = SPHERE_SHAPE_PROXYTYPE + 1;
+       public final static int CAPSULE_SHAPE_PROXYTYPE = MULTI_SPHERE_SHAPE_PROXYTYPE + 1;
+       public final static int CONE_SHAPE_PROXYTYPE = CAPSULE_SHAPE_PROXYTYPE + 1;
+       public final static int CONVEX_SHAPE_PROXYTYPE = CONE_SHAPE_PROXYTYPE + 1;
+       public final static int CYLINDER_SHAPE_PROXYTYPE = CONVEX_SHAPE_PROXYTYPE + 1;
+       public final static int UNIFORM_SCALING_SHAPE_PROXYTYPE = CYLINDER_SHAPE_PROXYTYPE + 1;
+       public final static int MINKOWSKI_SUM_SHAPE_PROXYTYPE = UNIFORM_SCALING_SHAPE_PROXYTYPE + 1;
+       public final static int MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE = MINKOWSKI_SUM_SHAPE_PROXYTYPE + 1;
+       public final static int BOX_2D_SHAPE_PROXYTYPE = MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE + 1;
+       public final static int CONVEX_2D_SHAPE_PROXYTYPE = BOX_2D_SHAPE_PROXYTYPE + 1;
+       public final static int CUSTOM_CONVEX_SHAPE_TYPE = CONVEX_2D_SHAPE_PROXYTYPE + 1;
+       public final static int CONCAVE_SHAPES_START_HERE = CUSTOM_CONVEX_SHAPE_TYPE + 1;
+       public final static int TRIANGLE_MESH_SHAPE_PROXYTYPE = CONCAVE_SHAPES_START_HERE + 1;
+       public final static int SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE = TRIANGLE_MESH_SHAPE_PROXYTYPE + 1;
+       public final static int FAST_CONCAVE_MESH_PROXYTYPE = SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE + 1;
+       public final static int TERRAIN_SHAPE_PROXYTYPE = FAST_CONCAVE_MESH_PROXYTYPE + 1;
+       public final static int GIMPACT_SHAPE_PROXYTYPE = TERRAIN_SHAPE_PROXYTYPE + 1;
+       public final static int MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE = GIMPACT_SHAPE_PROXYTYPE + 1;
+       public final static int EMPTY_SHAPE_PROXYTYPE = MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE + 1;
+       public final static int STATIC_PLANE_PROXYTYPE = EMPTY_SHAPE_PROXYTYPE + 1;
+       public final static int CUSTOM_CONCAVE_SHAPE_TYPE = STATIC_PLANE_PROXYTYPE + 1;
+       public final static int CONCAVE_SHAPES_END_HERE = CUSTOM_CONCAVE_SHAPE_TYPE + 1;
+       public final static int COMPOUND_SHAPE_PROXYTYPE = CONCAVE_SHAPES_END_HERE + 1;
+       public final static int SOFTBODY_SHAPE_PROXYTYPE = COMPOUND_SHAPE_PROXYTYPE + 1;
+       public final static int HFFLUID_SHAPE_PROXYTYPE = SOFTBODY_SHAPE_PROXYTYPE + 1;
+       public final static int HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE = HFFLUID_SHAPE_PROXYTYPE + 1;
+       public final static int INVALID_SHAPE_PROXYTYPE = HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE + 1;
+       public final static int MAX_BROADPHASE_COLLISION_TYPES = INVALID_SHAPE_PROXYTYPE + 1;
 }
-
index 6a2a13e..79c739b 100644 (file)
@@ -8,74 +8,70 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class ClosestPointInput {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected ClosestPointInput(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(ClosestPointInput obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_ClosestPointInput(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public ClosestPointInput() {
-    this(gdxBulletJNI.new_ClosestPointInput(), true);
-  }
-
-  public void setM_transformA(btTransform value) {
-    gdxBulletJNI.ClosestPointInput_m_transformA_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_transformA() {
-    long cPtr = gdxBulletJNI.ClosestPointInput_m_transformA_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_transformB(btTransform value) {
-    gdxBulletJNI.ClosestPointInput_m_transformB_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_transformB() {
-    long cPtr = gdxBulletJNI.ClosestPointInput_m_transformB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_maximumDistanceSquared(float value) {
-    gdxBulletJNI.ClosestPointInput_m_maximumDistanceSquared_set(swigCPtr, this, value);
-  }
-
-  public float getM_maximumDistanceSquared() {
-    return gdxBulletJNI.ClosestPointInput_m_maximumDistanceSquared_get(swigCPtr, this);
-  }
-
-  public void setM_stackAlloc(btStackAlloc value) {
-    gdxBulletJNI.ClosestPointInput_m_stackAlloc_set(swigCPtr, this, btStackAlloc.getCPtr(value), value);
-  }
-
-  public btStackAlloc getM_stackAlloc() {
-    long cPtr = gdxBulletJNI.ClosestPointInput_m_stackAlloc_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected ClosestPointInput (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (ClosestPointInput obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_ClosestPointInput(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public ClosestPointInput () {
+               this(gdxBulletJNI.new_ClosestPointInput(), true);
+       }
+
+       public void setM_transformA (btTransform value) {
+               gdxBulletJNI.ClosestPointInput_m_transformA_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_transformA () {
+               long cPtr = gdxBulletJNI.ClosestPointInput_m_transformA_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_transformB (btTransform value) {
+               gdxBulletJNI.ClosestPointInput_m_transformB_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_transformB () {
+               long cPtr = gdxBulletJNI.ClosestPointInput_m_transformB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_maximumDistanceSquared (float value) {
+               gdxBulletJNI.ClosestPointInput_m_maximumDistanceSquared_set(swigCPtr, this, value);
+       }
+
+       public float getM_maximumDistanceSquared () {
+               return gdxBulletJNI.ClosestPointInput_m_maximumDistanceSquared_get(swigCPtr, this);
+       }
+
+       public void setM_stackAlloc (btStackAlloc value) {
+               gdxBulletJNI.ClosestPointInput_m_stackAlloc_set(swigCPtr, this, btStackAlloc.getCPtr(value), value);
+       }
+
+       public btStackAlloc getM_stackAlloc () {
+               long cPtr = gdxBulletJNI.ClosestPointInput_m_stackAlloc_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
+       }
 
 }
index df495f3..aae2f4a 100644 (file)
@@ -8,70 +8,66 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class ConvexH {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected ConvexH(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(ConvexH obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_ConvexH(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public ConvexH() {
-    this(gdxBulletJNI.new_ConvexH__SWIG_0(), true);
-  }
-
-  public void setVertices(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
-    gdxBulletJNI.ConvexH_vertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getVertices() {
-    long cPtr = gdxBulletJNI.ConvexH_vertices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
-  }
-
-  public void setEdges(SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t value) {
-    gdxBulletJNI.ConvexH_edges_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t getEdges() {
-    long cPtr = gdxBulletJNI.ConvexH_edges_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t(cPtr, false);
-  }
-
-  public void setFacets(SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t value) {
-    gdxBulletJNI.ConvexH_facets_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t getFacets() {
-    long cPtr = gdxBulletJNI.ConvexH_facets_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t(cPtr, false);
-  }
-
-  public ConvexH(int vertices_size, int edges_size, int facets_size) {
-    this(gdxBulletJNI.new_ConvexH__SWIG_1(vertices_size, edges_size, facets_size), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected ConvexH (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (ConvexH obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_ConvexH(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public ConvexH () {
+               this(gdxBulletJNI.new_ConvexH__SWIG_0(), true);
+       }
+
+       public void setVertices (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
+               gdxBulletJNI.ConvexH_vertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getVertices () {
+               long cPtr = gdxBulletJNI.ConvexH_vertices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
+       }
+
+       public void setEdges (SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t value) {
+               gdxBulletJNI.ConvexH_edges_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t getEdges () {
+               long cPtr = gdxBulletJNI.ConvexH_edges_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t(cPtr, false);
+       }
+
+       public void setFacets (SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t value) {
+               gdxBulletJNI.ConvexH_facets_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t getFacets () {
+               long cPtr = gdxBulletJNI.ConvexH_facets_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t(cPtr, false);
+       }
+
+       public ConvexH (int vertices_size, int edges_size, int facets_size) {
+               this(gdxBulletJNI.new_ConvexH__SWIG_1(vertices_size, edges_size, facets_size), true);
+       }
 
 }
index 74d3683..9fc08ae 100644 (file)
@@ -9,54 +9,52 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class GrahamVector2 extends btVector3 {
-  private long swigCPtr;
-
-  protected GrahamVector2(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.GrahamVector2_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(GrahamVector2 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_GrahamVector2(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public GrahamVector2(Vector3 org, int orgIndex) {
-    this(gdxBulletJNI.new_GrahamVector2(org, orgIndex), true);
-  }
-
-  public void setM_angle(float value) {
-    gdxBulletJNI.GrahamVector2_m_angle_set(swigCPtr, this, value);
-  }
-
-  public float getM_angle() {
-    return gdxBulletJNI.GrahamVector2_m_angle_get(swigCPtr, this);
-  }
-
-  public void setM_orgIndex(int value) {
-    gdxBulletJNI.GrahamVector2_m_orgIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_orgIndex() {
-    return gdxBulletJNI.GrahamVector2_m_orgIndex_get(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected GrahamVector2 (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.GrahamVector2_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (GrahamVector2 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_GrahamVector2(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public GrahamVector2 (Vector3 org, int orgIndex) {
+               this(gdxBulletJNI.new_GrahamVector2(org, orgIndex), true);
+       }
+
+       public void setM_angle (float value) {
+               gdxBulletJNI.GrahamVector2_m_angle_set(swigCPtr, this, value);
+       }
+
+       public float getM_angle () {
+               return gdxBulletJNI.GrahamVector2_m_angle_get(swigCPtr, this);
+       }
+
+       public void setM_orgIndex (int value) {
+               gdxBulletJNI.GrahamVector2_m_orgIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_orgIndex () {
+               return gdxBulletJNI.GrahamVector2_m_orgIndex_get(swigCPtr, this);
+       }
 
 }
index 21391b2..a03e8c5 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class HullDesc {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected HullDesc(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(HullDesc obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_HullDesc(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public HullDesc() {
-    this(gdxBulletJNI.new_HullDesc__SWIG_0(), true);
-  }
-
-  public HullDesc(int flag, long vcount, btVector3 vertices, long stride) {
-    this(gdxBulletJNI.new_HullDesc__SWIG_1(flag, vcount, btVector3.getCPtr(vertices), vertices, stride), true);
-  }
-
-  public HullDesc(int flag, long vcount, btVector3 vertices) {
-    this(gdxBulletJNI.new_HullDesc__SWIG_2(flag, vcount, btVector3.getCPtr(vertices), vertices), true);
-  }
-
-  public boolean HasHullFlag(int flag) {
-    return gdxBulletJNI.HullDesc_HasHullFlag(swigCPtr, this, flag);
-  }
-
-  public void SetHullFlag(int flag) {
-    gdxBulletJNI.HullDesc_SetHullFlag(swigCPtr, this, flag);
-  }
-
-  public void ClearHullFlag(int flag) {
-    gdxBulletJNI.HullDesc_ClearHullFlag(swigCPtr, this, flag);
-  }
-
-  public void setMFlags(long value) {
-    gdxBulletJNI.HullDesc_mFlags_set(swigCPtr, this, value);
-  }
-
-  public long getMFlags() {
-    return gdxBulletJNI.HullDesc_mFlags_get(swigCPtr, this);
-  }
-
-  public void setMVcount(long value) {
-    gdxBulletJNI.HullDesc_mVcount_set(swigCPtr, this, value);
-  }
-
-  public long getMVcount() {
-    return gdxBulletJNI.HullDesc_mVcount_get(swigCPtr, this);
-  }
-
-  public void setMVertices(btVector3 value) {
-    gdxBulletJNI.HullDesc_mVertices_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getMVertices() {
-    long cPtr = gdxBulletJNI.HullDesc_mVertices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setMVertexStride(long value) {
-    gdxBulletJNI.HullDesc_mVertexStride_set(swigCPtr, this, value);
-  }
-
-  public long getMVertexStride() {
-    return gdxBulletJNI.HullDesc_mVertexStride_get(swigCPtr, this);
-  }
-
-  public void setMNormalEpsilon(float value) {
-    gdxBulletJNI.HullDesc_mNormalEpsilon_set(swigCPtr, this, value);
-  }
-
-  public float getMNormalEpsilon() {
-    return gdxBulletJNI.HullDesc_mNormalEpsilon_get(swigCPtr, this);
-  }
-
-  public void setMMaxVertices(long value) {
-    gdxBulletJNI.HullDesc_mMaxVertices_set(swigCPtr, this, value);
-  }
-
-  public long getMMaxVertices() {
-    return gdxBulletJNI.HullDesc_mMaxVertices_get(swigCPtr, this);
-  }
-
-  public void setMMaxFaces(long value) {
-    gdxBulletJNI.HullDesc_mMaxFaces_set(swigCPtr, this, value);
-  }
-
-  public long getMMaxFaces() {
-    return gdxBulletJNI.HullDesc_mMaxFaces_get(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected HullDesc (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (HullDesc obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_HullDesc(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public HullDesc () {
+               this(gdxBulletJNI.new_HullDesc__SWIG_0(), true);
+       }
+
+       public HullDesc (int flag, long vcount, btVector3 vertices, long stride) {
+               this(gdxBulletJNI.new_HullDesc__SWIG_1(flag, vcount, btVector3.getCPtr(vertices), vertices, stride), true);
+       }
+
+       public HullDesc (int flag, long vcount, btVector3 vertices) {
+               this(gdxBulletJNI.new_HullDesc__SWIG_2(flag, vcount, btVector3.getCPtr(vertices), vertices), true);
+       }
+
+       public boolean HasHullFlag (int flag) {
+               return gdxBulletJNI.HullDesc_HasHullFlag(swigCPtr, this, flag);
+       }
+
+       public void SetHullFlag (int flag) {
+               gdxBulletJNI.HullDesc_SetHullFlag(swigCPtr, this, flag);
+       }
+
+       public void ClearHullFlag (int flag) {
+               gdxBulletJNI.HullDesc_ClearHullFlag(swigCPtr, this, flag);
+       }
+
+       public void setMFlags (long value) {
+               gdxBulletJNI.HullDesc_mFlags_set(swigCPtr, this, value);
+       }
+
+       public long getMFlags () {
+               return gdxBulletJNI.HullDesc_mFlags_get(swigCPtr, this);
+       }
+
+       public void setMVcount (long value) {
+               gdxBulletJNI.HullDesc_mVcount_set(swigCPtr, this, value);
+       }
+
+       public long getMVcount () {
+               return gdxBulletJNI.HullDesc_mVcount_get(swigCPtr, this);
+       }
+
+       public void setMVertices (btVector3 value) {
+               gdxBulletJNI.HullDesc_mVertices_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getMVertices () {
+               long cPtr = gdxBulletJNI.HullDesc_mVertices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setMVertexStride (long value) {
+               gdxBulletJNI.HullDesc_mVertexStride_set(swigCPtr, this, value);
+       }
+
+       public long getMVertexStride () {
+               return gdxBulletJNI.HullDesc_mVertexStride_get(swigCPtr, this);
+       }
+
+       public void setMNormalEpsilon (float value) {
+               gdxBulletJNI.HullDesc_mNormalEpsilon_set(swigCPtr, this, value);
+       }
+
+       public float getMNormalEpsilon () {
+               return gdxBulletJNI.HullDesc_mNormalEpsilon_get(swigCPtr, this);
+       }
+
+       public void setMMaxVertices (long value) {
+               gdxBulletJNI.HullDesc_mMaxVertices_set(swigCPtr, this, value);
+       }
+
+       public long getMMaxVertices () {
+               return gdxBulletJNI.HullDesc_mMaxVertices_get(swigCPtr, this);
+       }
+
+       public void setMMaxFaces (long value) {
+               gdxBulletJNI.HullDesc_mMaxFaces_set(swigCPtr, this, value);
+       }
+
+       public long getMMaxFaces () {
+               return gdxBulletJNI.HullDesc_mMaxFaces_get(swigCPtr, this);
+       }
 
 }
index b8e1294..204a57d 100644 (file)
@@ -9,7 +9,6 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class HullError {
-  public final static int QE_OK = 0;
-  public final static int QE_FAIL = QE_OK + 1;
+       public final static int QE_OK = 0;
+       public final static int QE_FAIL = QE_OK + 1;
 }
-
index b765d3b..ac46ca9 100644 (file)
@@ -9,8 +9,7 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class HullFlag {
-  public final static int QF_TRIANGLES = (1 << 0);
-  public final static int QF_REVERSE_ORDER = (1 << 1);
-  public final static int QF_DEFAULT = QF_TRIANGLES;
+       public final static int QF_TRIANGLES = (1 << 0);
+       public final static int QF_REVERSE_ORDER = (1 << 1);
+       public final static int QF_DEFAULT = QF_TRIANGLES;
 }
-
index e71454b..56e73ff 100644 (file)
@@ -8,56 +8,53 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class HullLibrary {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected HullLibrary(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(HullLibrary obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_HullLibrary(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_vertexIndexMapping(SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
-    gdxBulletJNI.HullLibrary_m_vertexIndexMapping_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_int_t getM_vertexIndexMapping() {
-    long cPtr = gdxBulletJNI.HullLibrary_m_vertexIndexMapping_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
-  }
-
-  public int CreateConvexHull(HullDesc desc, HullResult result) {
-    return gdxBulletJNI.HullLibrary_CreateConvexHull(swigCPtr, this, HullDesc.getCPtr(desc), desc, HullResult.getCPtr(result), result);
-  }
-
-  public int ReleaseResult(HullResult result) {
-    return gdxBulletJNI.HullLibrary_ReleaseResult(swigCPtr, this, HullResult.getCPtr(result), result);
-  }
-
-  public HullLibrary() {
-    this(gdxBulletJNI.new_HullLibrary(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected HullLibrary (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (HullLibrary obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_HullLibrary(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_vertexIndexMapping (SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
+               gdxBulletJNI.HullLibrary_m_vertexIndexMapping_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_int_t getM_vertexIndexMapping () {
+               long cPtr = gdxBulletJNI.HullLibrary_m_vertexIndexMapping_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
+       }
+
+       public int CreateConvexHull (HullDesc desc, HullResult result) {
+               return gdxBulletJNI.HullLibrary_CreateConvexHull(swigCPtr, this, HullDesc.getCPtr(desc), desc, HullResult.getCPtr(result),
+                       result);
+       }
+
+       public int ReleaseResult (HullResult result) {
+               return gdxBulletJNI.HullLibrary_ReleaseResult(swigCPtr, this, HullResult.getCPtr(result), result);
+       }
+
+       public HullLibrary () {
+               this(gdxBulletJNI.new_HullLibrary(), true);
+       }
 
 }
index a6c0ebc..7fe956a 100644 (file)
@@ -8,89 +8,85 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class HullResult {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected HullResult(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(HullResult obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_HullResult(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public HullResult() {
-    this(gdxBulletJNI.new_HullResult(), true);
-  }
-
-  public void setMPolygons(boolean value) {
-    gdxBulletJNI.HullResult_mPolygons_set(swigCPtr, this, value);
-  }
-
-  public boolean getMPolygons() {
-    return gdxBulletJNI.HullResult_mPolygons_get(swigCPtr, this);
-  }
-
-  public void setMNumOutputVertices(long value) {
-    gdxBulletJNI.HullResult_mNumOutputVertices_set(swigCPtr, this, value);
-  }
-
-  public long getMNumOutputVertices() {
-    return gdxBulletJNI.HullResult_mNumOutputVertices_get(swigCPtr, this);
-  }
-
-  public void setM_OutputVertices(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
-    gdxBulletJNI.HullResult_m_OutputVertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getM_OutputVertices() {
-    long cPtr = gdxBulletJNI.HullResult_m_OutputVertices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
-  }
-
-  public void setMNumFaces(long value) {
-    gdxBulletJNI.HullResult_mNumFaces_set(swigCPtr, this, value);
-  }
-
-  public long getMNumFaces() {
-    return gdxBulletJNI.HullResult_mNumFaces_get(swigCPtr, this);
-  }
-
-  public void setMNumIndices(long value) {
-    gdxBulletJNI.HullResult_mNumIndices_set(swigCPtr, this, value);
-  }
-
-  public long getMNumIndices() {
-    return gdxBulletJNI.HullResult_mNumIndices_get(swigCPtr, this);
-  }
-
-  public void setM_Indices(SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t value) {
-    gdxBulletJNI.HullResult_m_Indices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t getM_Indices() {
-    long cPtr = gdxBulletJNI.HullResult_m_Indices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected HullResult (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (HullResult obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_HullResult(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public HullResult () {
+               this(gdxBulletJNI.new_HullResult(), true);
+       }
+
+       public void setMPolygons (boolean value) {
+               gdxBulletJNI.HullResult_mPolygons_set(swigCPtr, this, value);
+       }
+
+       public boolean getMPolygons () {
+               return gdxBulletJNI.HullResult_mPolygons_get(swigCPtr, this);
+       }
+
+       public void setMNumOutputVertices (long value) {
+               gdxBulletJNI.HullResult_mNumOutputVertices_set(swigCPtr, this, value);
+       }
+
+       public long getMNumOutputVertices () {
+               return gdxBulletJNI.HullResult_mNumOutputVertices_get(swigCPtr, this);
+       }
+
+       public void setM_OutputVertices (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
+               gdxBulletJNI.HullResult_m_OutputVertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getM_OutputVertices () {
+               long cPtr = gdxBulletJNI.HullResult_m_OutputVertices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
+       }
+
+       public void setMNumFaces (long value) {
+               gdxBulletJNI.HullResult_mNumFaces_set(swigCPtr, this, value);
+       }
+
+       public long getMNumFaces () {
+               return gdxBulletJNI.HullResult_mNumFaces_get(swigCPtr, this);
+       }
+
+       public void setMNumIndices (long value) {
+               gdxBulletJNI.HullResult_mNumIndices_set(swigCPtr, this, value);
+       }
+
+       public long getMNumIndices () {
+               return gdxBulletJNI.HullResult_mNumIndices_get(swigCPtr, this);
+       }
+
+       public void setM_Indices (SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t value) {
+               gdxBulletJNI.HullResult_m_Indices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t getM_Indices () {
+               long cPtr = gdxBulletJNI.HullResult_m_Indices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t(cPtr, false);
+       }
 
 }
index 7eb4b11..8b14e2f 100644 (file)
@@ -9,11 +9,10 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class PHY_ScalarType {
-  public final static int PHY_FLOAT = 0;
-  public final static int PHY_DOUBLE = PHY_FLOAT + 1;
-  public final static int PHY_INTEGER = PHY_DOUBLE + 1;
-  public final static int PHY_SHORT = PHY_INTEGER + 1;
-  public final static int PHY_FIXEDPOINT88 = PHY_SHORT + 1;
-  public final static int PHY_UCHAR = PHY_FIXEDPOINT88 + 1;
+       public final static int PHY_FLOAT = 0;
+       public final static int PHY_DOUBLE = PHY_FLOAT + 1;
+       public final static int PHY_INTEGER = PHY_DOUBLE + 1;
+       public final static int PHY_SHORT = PHY_INTEGER + 1;
+       public final static int PHY_FIXEDPOINT88 = PHY_SHORT + 1;
+       public final static int PHY_UCHAR = PHY_FIXEDPOINT88 + 1;
 }
-
index 7aa82ad..5db0803 100644 (file)
@@ -8,81 +8,77 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class PHullResult {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected PHullResult(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(PHullResult obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_PHullResult(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public PHullResult() {
-    this(gdxBulletJNI.new_PHullResult(), true);
-  }
-
-  public void setMVcount(long value) {
-    gdxBulletJNI.PHullResult_mVcount_set(swigCPtr, this, value);
-  }
-
-  public long getMVcount() {
-    return gdxBulletJNI.PHullResult_mVcount_get(swigCPtr, this);
-  }
-
-  public void setMIndexCount(long value) {
-    gdxBulletJNI.PHullResult_mIndexCount_set(swigCPtr, this, value);
-  }
-
-  public long getMIndexCount() {
-    return gdxBulletJNI.PHullResult_mIndexCount_get(swigCPtr, this);
-  }
-
-  public void setMFaceCount(long value) {
-    gdxBulletJNI.PHullResult_mFaceCount_set(swigCPtr, this, value);
-  }
-
-  public long getMFaceCount() {
-    return gdxBulletJNI.PHullResult_mFaceCount_get(swigCPtr, this);
-  }
-
-  public void setMVertices(btVector3 value) {
-    gdxBulletJNI.PHullResult_mVertices_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getMVertices() {
-    long cPtr = gdxBulletJNI.PHullResult_mVertices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_Indices(SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t value) {
-    gdxBulletJNI.PHullResult_m_Indices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t getM_Indices() {
-    long cPtr = gdxBulletJNI.PHullResult_m_Indices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected PHullResult (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (PHullResult obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_PHullResult(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public PHullResult () {
+               this(gdxBulletJNI.new_PHullResult(), true);
+       }
+
+       public void setMVcount (long value) {
+               gdxBulletJNI.PHullResult_mVcount_set(swigCPtr, this, value);
+       }
+
+       public long getMVcount () {
+               return gdxBulletJNI.PHullResult_mVcount_get(swigCPtr, this);
+       }
+
+       public void setMIndexCount (long value) {
+               gdxBulletJNI.PHullResult_mIndexCount_set(swigCPtr, this, value);
+       }
+
+       public long getMIndexCount () {
+               return gdxBulletJNI.PHullResult_mIndexCount_get(swigCPtr, this);
+       }
+
+       public void setMFaceCount (long value) {
+               gdxBulletJNI.PHullResult_mFaceCount_set(swigCPtr, this, value);
+       }
+
+       public long getMFaceCount () {
+               return gdxBulletJNI.PHullResult_mFaceCount_get(swigCPtr, this);
+       }
+
+       public void setMVertices (btVector3 value) {
+               gdxBulletJNI.PHullResult_mVertices_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getMVertices () {
+               long cPtr = gdxBulletJNI.PHullResult_mVertices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_Indices (SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t value) {
+               gdxBulletJNI.PHullResult_m_Indices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t getM_Indices () {
+               long cPtr = gdxBulletJNI.PHullResult_m_Indices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t(cPtr, false);
+       }
 
 }
index 99ce8a8..062c840 100644 (file)
@@ -9,46 +9,44 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class Result {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected Result(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(Result obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_Result(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setShapeIdentifiersA(int partId0, int index0) {
-    gdxBulletJNI.Result_setShapeIdentifiersA(swigCPtr, this, partId0, index0);
-  }
-
-  public void setShapeIdentifiersB(int partId1, int index1) {
-    gdxBulletJNI.Result_setShapeIdentifiersB(swigCPtr, this, partId1, index1);
-  }
-
-  public void addContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) {
-    gdxBulletJNI.Result_addContactPoint(swigCPtr, this, normalOnBInWorld, pointInWorld, depth);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected Result (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (Result obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_Result(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setShapeIdentifiersA (int partId0, int index0) {
+               gdxBulletJNI.Result_setShapeIdentifiersA(swigCPtr, this, partId0, index0);
+       }
+
+       public void setShapeIdentifiersB (int partId1, int index1) {
+               gdxBulletJNI.Result_setShapeIdentifiersB(swigCPtr, this, partId1, index1);
+       }
+
+       public void addContactPoint (Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) {
+               gdxBulletJNI.Result_addContactPoint(swigCPtr, this, normalOnBInWorld, pointInWorld, depth);
+       }
 
 }
index 60db456..887d766 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_PHY_ScalarType {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_PHY_ScalarType(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_PHY_ScalarType (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_PHY_ScalarType() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_PHY_ScalarType () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_PHY_ScalarType obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_PHY_ScalarType obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index d641a78..6291777 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_ConvexH__HalfEdge_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 20d5934..bb1150a 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index b5b95f9..b6d1c7f 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 7a004be..cbb35cb 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 89cfd69..d412df4 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index ee40538..7d0434c 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 8b191e0..435641e 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 00c8f39..952db0d 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 6f96b34..039c189 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index cf752bc..820cd89 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btFace_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btFace_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btFace_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btFace_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btFace_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btFace_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btFace_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index c6f249f..0803c33 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 5249bac..a9faae7 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index e1fc239..44f43cc 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btPlane_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 9b0adb6..075692f 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index d9a2c32..1da57cf 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 9512421..4e0278d 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 30d8461..93e3d9f 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_int_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_int_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_int_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_int_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_int_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_int_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_int_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 0a16574..829eef3 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btAlignedObjectArrayT_unsigned_int_t obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 8792f44..da42ef2 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btCollisionWorld__ContactResultCallback {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btCollisionWorld__ContactResultCallback(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btCollisionWorld__ContactResultCallback (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btCollisionWorld__ContactResultCallback() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btCollisionWorld__ContactResultCallback () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btCollisionWorld__ContactResultCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btCollisionWorld__ContactResultCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 8efb013..8339413 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btCollisionWorld__ConvexResultCallback {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btCollisionWorld__ConvexResultCallback(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btCollisionWorld__ConvexResultCallback (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btCollisionWorld__ConvexResultCallback() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btCollisionWorld__ConvexResultCallback () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btCollisionWorld__ConvexResultCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btCollisionWorld__ConvexResultCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 95a9704..ddb39e5 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btCollisionWorld__RayResultCallback {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btCollisionWorld__RayResultCallback(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btCollisionWorld__RayResultCallback (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btCollisionWorld__RayResultCallback() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btCollisionWorld__RayResultCallback () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btCollisionWorld__RayResultCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btCollisionWorld__RayResultCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index a0cde22..67ecf06 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btConvexCast__CastResult {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btConvexCast__CastResult(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btConvexCast__CastResult (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btConvexCast__CastResult() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btConvexCast__CastResult () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btConvexCast__CastResult obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btConvexCast__CastResult obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index de6bbfe..d25fa0e 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btDbvt__IClone {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btDbvt__IClone(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btDbvt__IClone (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btDbvt__IClone() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btDbvt__IClone () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btDbvt__IClone obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btDbvt__IClone obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 75a1f6e..e711578 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btDbvt__ICollide {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btDbvt__ICollide(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btDbvt__ICollide (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btDbvt__ICollide() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btDbvt__ICollide () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btDbvt__ICollide obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btDbvt__ICollide obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index d69ed39..c8a81ac 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btDbvt__IWriter {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btDbvt__IWriter(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btDbvt__IWriter (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btDbvt__IWriter() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btDbvt__IWriter () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btDbvt__IWriter obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btDbvt__IWriter obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index bd3142e..2d6aa53 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btDbvt__sStkNPS {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btDbvt__sStkNPS(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btDbvt__sStkNPS (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btDbvt__sStkNPS() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btDbvt__sStkNPS () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btDbvt__sStkNPS obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btDbvt__sStkNPS obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 0abac22..d1a9667 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index a23e0d8..d9140f4 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btGjkEpaSolver2__sResults {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btGjkEpaSolver2__sResults(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btGjkEpaSolver2__sResults (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btGjkEpaSolver2__sResults() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btGjkEpaSolver2__sResults () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btGjkEpaSolver2__sResults obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btGjkEpaSolver2__sResults obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 4009286..005d4a9 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btMatrix3x3DoubleData {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btMatrix3x3DoubleData(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btMatrix3x3DoubleData (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btMatrix3x3DoubleData() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btMatrix3x3DoubleData () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btMatrix3x3DoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btMatrix3x3DoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 3acd2a8..2320619 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btMatrix3x3FloatData {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btMatrix3x3FloatData(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btMatrix3x3FloatData (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btMatrix3x3FloatData() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btMatrix3x3FloatData () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btMatrix3x3FloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btMatrix3x3FloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index f25fffb..183af90 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 5de1153..e6a68d3 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btSerializer {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btSerializer(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btSerializer (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btSerializer() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btSerializer () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btSerializer obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btSerializer obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index e23ae32..fa3649b 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btSimplexSolverInterface {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btSimplexSolverInterface(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btSimplexSolverInterface (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btSimplexSolverInterface() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btSimplexSolverInterface () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btSimplexSolverInterface obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btSimplexSolverInterface obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index ad83508..017121d 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btSimulationIslandManager__IslandCallback {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btSimulationIslandManager__IslandCallback(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btSimulationIslandManager__IslandCallback (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btSimulationIslandManager__IslandCallback() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btSimulationIslandManager__IslandCallback () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btSimulationIslandManager__IslandCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btSimulationIslandManager__IslandCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index a7d46e7..5fe9896 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_btTypedConstraint__btConstraintInfo1(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_btTypedConstraint__btConstraintInfo1() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index d29c0e3..54dd4e8 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_double {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_double(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_double (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_double() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_double () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_double obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_double obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index d64a58c..dfb79e5 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_p_btDynamicsWorld_float__void {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_p_btDynamicsWorld_float__void(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_p_btDynamicsWorld_float__void (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_p_btDynamicsWorld_float__void() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_p_btDynamicsWorld_float__void () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_p_btDynamicsWorld_float__void obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_f_p_btDynamicsWorld_float__void obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 0015d8a..8a19c3b 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_p_void__bool {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_p_void__bool(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_p_void__bool (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_p_void__bool() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_p_void__bool () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_p_void__bool obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_f_p_void__bool obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 513abd4..95a383c 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_p_void__void {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_p_void__void(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_p_void__void (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_p_void__void() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_p_void__void () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_p_void__void obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_f_p_void__void obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index c177402..1e9425c 100644 (file)
@@ -9,18 +9,18 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void (long cPtr,
+               boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 55e434c..3b778d9 100644 (file)
@@ -9,18 +9,19 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool (
+               long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (
+               SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index be1a7e7..8bca6da 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index e1a68f9..ea122f0 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_size_t__p_void {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_size_t__p_void(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_size_t__p_void (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_size_t__p_void() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_size_t__p_void () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_size_t__p_void obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_f_size_t__p_void obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 3c8cae8..1888516 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_f_size_t_int__p_void {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_f_size_t_int__p_void(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_f_size_t_int__p_void (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_f_size_t_int__p_void() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_f_size_t_int__p_void () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_f_size_t_int__p_void obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_f_size_t_int__p_void obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 29d3bca..895e3ad 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_float {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_float(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_float (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_float() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_float () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_float obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_float obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 8148236..aaef702 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_int {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_int(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_int (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_int() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_int () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_int obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_int obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 45ba282..f963f88 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_p_btCollisionObject {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_p_btCollisionObject(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_p_btCollisionObject (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_p_btCollisionObject() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_p_btCollisionObject () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_p_btCollisionObject obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_p_btCollisionObject obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index dc744e7..ab46e4a 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_p_btDbvtProxy {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_p_btDbvtProxy(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_p_btDbvtProxy (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_p_btDbvtProxy() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_p_btDbvtProxy () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_p_btDbvtProxy obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_p_btDbvtProxy obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index b73d570..2d2f56e 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_p_btPersistentManifold {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_p_btPersistentManifold(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_p_btPersistentManifold (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_p_btPersistentManifold() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_p_btPersistentManifold () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_p_btPersistentManifold obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_p_btPersistentManifold obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 2cab098..5d5b62e 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_p_btTypedConstraint {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_p_btTypedConstraint(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_p_btTypedConstraint (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_p_btTypedConstraint() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_p_btTypedConstraint () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_p_btTypedConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_p_btTypedConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index a5b2d67..02e5e0d 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_p_btVector3 {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_p_btVector3(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_p_btVector3 (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_p_btVector3() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_p_btVector3 () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_p_btVector3 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_p_btVector3 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 190c78b..9985c5f 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_p_unsigned_char {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_p_unsigned_char(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_p_unsigned_char (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_p_unsigned_char() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_p_unsigned_char () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_p_unsigned_char obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_p_unsigned_char obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 3285b94..1dd59d0 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_unsigned_char {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_unsigned_char(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_unsigned_char (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_unsigned_char() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_unsigned_char () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_unsigned_char obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_unsigned_char obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index aa9e852..f259a97 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_unsigned_int {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_unsigned_int(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_unsigned_int (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_unsigned_int() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_unsigned_int () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_unsigned_int obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_unsigned_int obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index cf415ef..a022725 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_unsigned_short {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_unsigned_short(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_unsigned_short (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_unsigned_short() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_unsigned_short () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_unsigned_short obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_unsigned_short obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 479d915..64d7b1e 100644 (file)
@@ -9,18 +9,17 @@
 package com.badlogic.gdx.physics.bullet;
 
 public class SWIGTYPE_p_void {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected SWIGTYPE_p_void(long cPtr, boolean futureUse) {
-    swigCPtr = cPtr;
-  }
+       protected SWIGTYPE_p_void (long cPtr, boolean futureUse) {
+               swigCPtr = cPtr;
+       }
 
-  protected SWIGTYPE_p_void() {
-    swigCPtr = 0;
-  }
+       protected SWIGTYPE_p_void () {
+               swigCPtr = 0;
+       }
 
-  public static long getCPtr(SWIGTYPE_p_void obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (SWIGTYPE_p_void obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 }
-
index 0dcc96c..85ad82a 100644 (file)
@@ -9,50 +9,53 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class SphereTriangleDetector {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected SphereTriangleDetector(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(SphereTriangleDetector obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_SphereTriangleDetector(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void getClosestPoints(ClosestPointInput input, Result output, btIDebugDraw debugDraw, boolean swapResults) {
-    gdxBulletJNI.SphereTriangleDetector_getClosestPoints__SWIG_0(swigCPtr, this, ClosestPointInput.getCPtr(input), input, Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw, swapResults);
-  }
-
-  public void getClosestPoints(ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
-    gdxBulletJNI.SphereTriangleDetector_getClosestPoints__SWIG_1(swigCPtr, this, ClosestPointInput.getCPtr(input), input, Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
-  }
-
-  public SphereTriangleDetector(btSphereShape sphere, btTriangleShape triangle, float contactBreakingThreshold) {
-    this(gdxBulletJNI.new_SphereTriangleDetector(btSphereShape.getCPtr(sphere), sphere, btTriangleShape.getCPtr(triangle), triangle, contactBreakingThreshold), true);
-  }
-
-  public boolean collide(Vector3 sphereCenter, Vector3 point, Vector3 resultNormal, SWIGTYPE_p_float depth, SWIGTYPE_p_float timeOfImpact, float contactBreakingThreshold) {
-    return gdxBulletJNI.SphereTriangleDetector_collide(swigCPtr, this, sphereCenter, point, resultNormal, SWIGTYPE_p_float.getCPtr(depth), SWIGTYPE_p_float.getCPtr(timeOfImpact), contactBreakingThreshold);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected SphereTriangleDetector (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (SphereTriangleDetector obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_SphereTriangleDetector(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void getClosestPoints (ClosestPointInput input, Result output, btIDebugDraw debugDraw, boolean swapResults) {
+               gdxBulletJNI.SphereTriangleDetector_getClosestPoints__SWIG_0(swigCPtr, this, ClosestPointInput.getCPtr(input), input,
+                       Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw, swapResults);
+       }
+
+       public void getClosestPoints (ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
+               gdxBulletJNI.SphereTriangleDetector_getClosestPoints__SWIG_1(swigCPtr, this, ClosestPointInput.getCPtr(input), input,
+                       Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
+       }
+
+       public SphereTriangleDetector (btSphereShape sphere, btTriangleShape triangle, float contactBreakingThreshold) {
+               this(gdxBulletJNI.new_SphereTriangleDetector(btSphereShape.getCPtr(sphere), sphere, btTriangleShape.getCPtr(triangle),
+                       triangle, contactBreakingThreshold), true);
+       }
+
+       public boolean collide (Vector3 sphereCenter, Vector3 point, Vector3 resultNormal, SWIGTYPE_p_float depth,
+               SWIGTYPE_p_float timeOfImpact, float contactBreakingThreshold) {
+               return gdxBulletJNI.SphereTriangleDetector_collide(swigCPtr, this, sphereCenter, point, resultNormal,
+                       SWIGTYPE_p_float.getCPtr(depth), SWIGTYPE_p_float.getCPtr(timeOfImpact), contactBreakingThreshold);
+       }
 
 }
index 91e82b9..1e5f37d 100644 (file)
@@ -9,50 +9,51 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class bt32BitAxisSweep3 {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected bt32BitAxisSweep3(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(bt32BitAxisSweep3 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_bt32BitAxisSweep3(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public bt32BitAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, long maxHandles, btOverlappingPairCache pairCache, boolean disableRaycastAccelerator) {
-    this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_0(worldAabbMin, worldAabbMax, maxHandles, btOverlappingPairCache.getCPtr(pairCache), pairCache, disableRaycastAccelerator), true);
-  }
-
-  public bt32BitAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, long maxHandles, btOverlappingPairCache pairCache) {
-    this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_1(worldAabbMin, worldAabbMax, maxHandles, btOverlappingPairCache.getCPtr(pairCache), pairCache), true);
-  }
-
-  public bt32BitAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, long maxHandles) {
-    this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_2(worldAabbMin, worldAabbMax, maxHandles), true);
-  }
-
-  public bt32BitAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax) {
-    this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_3(worldAabbMin, worldAabbMax), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected bt32BitAxisSweep3 (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (bt32BitAxisSweep3 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_bt32BitAxisSweep3(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public bt32BitAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax, long maxHandles, btOverlappingPairCache pairCache,
+               boolean disableRaycastAccelerator) {
+               this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_0(worldAabbMin, worldAabbMax, maxHandles,
+                       btOverlappingPairCache.getCPtr(pairCache), pairCache, disableRaycastAccelerator), true);
+       }
+
+       public bt32BitAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax, long maxHandles, btOverlappingPairCache pairCache) {
+               this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_1(worldAabbMin, worldAabbMax, maxHandles,
+                       btOverlappingPairCache.getCPtr(pairCache), pairCache), true);
+       }
+
+       public bt32BitAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax, long maxHandles) {
+               this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_2(worldAabbMin, worldAabbMax, maxHandles), true);
+       }
+
+       public bt32BitAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax) {
+               this(gdxBulletJNI.new_bt32BitAxisSweep3__SWIG_3(worldAabbMin, worldAabbMax), true);
+       }
 
 }
index 83bafa2..593d4bf 100644 (file)
@@ -9,8 +9,7 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class bt6DofFlags {
-  public final static int BT_6DOF_FLAGS_CFM_NORM = 1;
-  public final static int BT_6DOF_FLAGS_CFM_STOP = 2;
-  public final static int BT_6DOF_FLAGS_ERP_STOP = 4;
+       public final static int BT_6DOF_FLAGS_CFM_NORM = 1;
+       public final static int BT_6DOF_FLAGS_CFM_STOP = 2;
+       public final static int BT_6DOF_FLAGS_ERP_STOP = 4;
 }
-
index 500e1fc..c475998 100644 (file)
@@ -8,43 +8,40 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btActionInterface {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btActionInterface(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btActionInterface obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btActionInterface(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void updateAction(btCollisionWorld collisionWorld, float deltaTimeStep) {
-    gdxBulletJNI.btActionInterface_updateAction(swigCPtr, this, btCollisionWorld.getCPtr(collisionWorld), collisionWorld, deltaTimeStep);
-  }
-
-  public void debugDraw(btIDebugDraw debugDrawer) {
-    gdxBulletJNI.btActionInterface_debugDraw(swigCPtr, this, btIDebugDraw.getCPtr(debugDrawer), debugDrawer);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btActionInterface (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btActionInterface obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btActionInterface(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void updateAction (btCollisionWorld collisionWorld, float deltaTimeStep) {
+               gdxBulletJNI.btActionInterface_updateAction(swigCPtr, this, btCollisionWorld.getCPtr(collisionWorld), collisionWorld,
+                       deltaTimeStep);
+       }
+
+       public void debugDraw (btIDebugDraw debugDrawer) {
+               gdxBulletJNI.btActionInterface_debugDraw(swigCPtr, this, btIDebugDraw.getCPtr(debugDrawer), debugDrawer);
+       }
 
 }
index 5574e94..b632c6f 100644 (file)
@@ -8,35 +8,31 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btActivatingCollisionAlgorithm extends btCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btActivatingCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btActivatingCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btActivatingCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btActivatingCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       private long swigCPtr;
+
+       protected btActivatingCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btActivatingCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btActivatingCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btActivatingCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
 }
index 74d8e4b..6a9f0a5 100644 (file)
@@ -9,47 +9,45 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btAngleCompareFunc {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btAngleCompareFunc(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btAngleCompareFunc obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btAngleCompareFunc(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_anchor(btVector3 value) {
-    gdxBulletJNI.btAngleCompareFunc_m_anchor_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_anchor() {
-    long cPtr = gdxBulletJNI.btAngleCompareFunc_m_anchor_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public btAngleCompareFunc(Vector3 anchor) {
-    this(gdxBulletJNI.new_btAngleCompareFunc(anchor), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btAngleCompareFunc (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btAngleCompareFunc obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btAngleCompareFunc(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_anchor (btVector3 value) {
+               gdxBulletJNI.btAngleCompareFunc_m_anchor_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_anchor () {
+               long cPtr = gdxBulletJNI.btAngleCompareFunc_m_anchor_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public btAngleCompareFunc (Vector3 anchor) {
+               this(gdxBulletJNI.new_btAngleCompareFunc(anchor), true);
+       }
 
 }
index 2e4fd7b..0f923be 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btAngularLimit {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btAngularLimit(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btAngularLimit obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btAngularLimit(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btAngularLimit() {
-    this(gdxBulletJNI.new_btAngularLimit(), true);
-  }
-
-  public void set(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
-    gdxBulletJNI.btAngularLimit_set__SWIG_0(swigCPtr, this, low, high, _softness, _biasFactor, _relaxationFactor);
-  }
-
-  public void set(float low, float high, float _softness, float _biasFactor) {
-    gdxBulletJNI.btAngularLimit_set__SWIG_1(swigCPtr, this, low, high, _softness, _biasFactor);
-  }
-
-  public void set(float low, float high, float _softness) {
-    gdxBulletJNI.btAngularLimit_set__SWIG_2(swigCPtr, this, low, high, _softness);
-  }
-
-  public void set(float low, float high) {
-    gdxBulletJNI.btAngularLimit_set__SWIG_3(swigCPtr, this, low, high);
-  }
-
-  public void test(float angle) {
-    gdxBulletJNI.btAngularLimit_test(swigCPtr, this, angle);
-  }
-
-  public float getSoftness() {
-    return gdxBulletJNI.btAngularLimit_getSoftness(swigCPtr, this);
-  }
-
-  public float getBiasFactor() {
-    return gdxBulletJNI.btAngularLimit_getBiasFactor(swigCPtr, this);
-  }
-
-  public float getRelaxationFactor() {
-    return gdxBulletJNI.btAngularLimit_getRelaxationFactor(swigCPtr, this);
-  }
-
-  public float getCorrection() {
-    return gdxBulletJNI.btAngularLimit_getCorrection(swigCPtr, this);
-  }
-
-  public float getSign() {
-    return gdxBulletJNI.btAngularLimit_getSign(swigCPtr, this);
-  }
-
-  public float getHalfRange() {
-    return gdxBulletJNI.btAngularLimit_getHalfRange(swigCPtr, this);
-  }
-
-  public boolean isLimit() {
-    return gdxBulletJNI.btAngularLimit_isLimit(swigCPtr, this);
-  }
-
-  public void fit(SWIGTYPE_p_float angle) {
-    gdxBulletJNI.btAngularLimit_fit(swigCPtr, this, SWIGTYPE_p_float.getCPtr(angle));
-  }
-
-  public float getError() {
-    return gdxBulletJNI.btAngularLimit_getError(swigCPtr, this);
-  }
-
-  public float getLow() {
-    return gdxBulletJNI.btAngularLimit_getLow(swigCPtr, this);
-  }
-
-  public float getHigh() {
-    return gdxBulletJNI.btAngularLimit_getHigh(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btAngularLimit (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btAngularLimit obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btAngularLimit(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btAngularLimit () {
+               this(gdxBulletJNI.new_btAngularLimit(), true);
+       }
+
+       public void set (float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
+               gdxBulletJNI.btAngularLimit_set__SWIG_0(swigCPtr, this, low, high, _softness, _biasFactor, _relaxationFactor);
+       }
+
+       public void set (float low, float high, float _softness, float _biasFactor) {
+               gdxBulletJNI.btAngularLimit_set__SWIG_1(swigCPtr, this, low, high, _softness, _biasFactor);
+       }
+
+       public void set (float low, float high, float _softness) {
+               gdxBulletJNI.btAngularLimit_set__SWIG_2(swigCPtr, this, low, high, _softness);
+       }
+
+       public void set (float low, float high) {
+               gdxBulletJNI.btAngularLimit_set__SWIG_3(swigCPtr, this, low, high);
+       }
+
+       public void test (float angle) {
+               gdxBulletJNI.btAngularLimit_test(swigCPtr, this, angle);
+       }
+
+       public float getSoftness () {
+               return gdxBulletJNI.btAngularLimit_getSoftness(swigCPtr, this);
+       }
+
+       public float getBiasFactor () {
+               return gdxBulletJNI.btAngularLimit_getBiasFactor(swigCPtr, this);
+       }
+
+       public float getRelaxationFactor () {
+               return gdxBulletJNI.btAngularLimit_getRelaxationFactor(swigCPtr, this);
+       }
+
+       public float getCorrection () {
+               return gdxBulletJNI.btAngularLimit_getCorrection(swigCPtr, this);
+       }
+
+       public float getSign () {
+               return gdxBulletJNI.btAngularLimit_getSign(swigCPtr, this);
+       }
+
+       public float getHalfRange () {
+               return gdxBulletJNI.btAngularLimit_getHalfRange(swigCPtr, this);
+       }
+
+       public boolean isLimit () {
+               return gdxBulletJNI.btAngularLimit_isLimit(swigCPtr, this);
+       }
+
+       public void fit (SWIGTYPE_p_float angle) {
+               gdxBulletJNI.btAngularLimit_fit(swigCPtr, this, SWIGTYPE_p_float.getCPtr(angle));
+       }
+
+       public float getError () {
+               return gdxBulletJNI.btAngularLimit_getError(swigCPtr, this);
+       }
+
+       public float getLow () {
+               return gdxBulletJNI.btAngularLimit_getLow(swigCPtr, this);
+       }
+
+       public float getHigh () {
+               return gdxBulletJNI.btAngularLimit_getHigh(swigCPtr, this);
+       }
 
 }
index 6712228..b92c749 100644 (file)
@@ -9,50 +9,51 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btAxisSweep3 {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btAxisSweep3(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btAxisSweep3 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btAxisSweep3(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles, btOverlappingPairCache pairCache, boolean disableRaycastAccelerator) {
-    this(gdxBulletJNI.new_btAxisSweep3__SWIG_0(worldAabbMin, worldAabbMax, maxHandles, btOverlappingPairCache.getCPtr(pairCache), pairCache, disableRaycastAccelerator), true);
-  }
-
-  public btAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles, btOverlappingPairCache pairCache) {
-    this(gdxBulletJNI.new_btAxisSweep3__SWIG_1(worldAabbMin, worldAabbMax, maxHandles, btOverlappingPairCache.getCPtr(pairCache), pairCache), true);
-  }
-
-  public btAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles) {
-    this(gdxBulletJNI.new_btAxisSweep3__SWIG_2(worldAabbMin, worldAabbMax, maxHandles), true);
-  }
-
-  public btAxisSweep3(Vector3 worldAabbMin, Vector3 worldAabbMax) {
-    this(gdxBulletJNI.new_btAxisSweep3__SWIG_3(worldAabbMin, worldAabbMax), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btAxisSweep3 (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btAxisSweep3 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btAxisSweep3(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles, btOverlappingPairCache pairCache,
+               boolean disableRaycastAccelerator) {
+               this(gdxBulletJNI.new_btAxisSweep3__SWIG_0(worldAabbMin, worldAabbMax, maxHandles,
+                       btOverlappingPairCache.getCPtr(pairCache), pairCache, disableRaycastAccelerator), true);
+       }
+
+       public btAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles, btOverlappingPairCache pairCache) {
+               this(gdxBulletJNI.new_btAxisSweep3__SWIG_1(worldAabbMin, worldAabbMax, maxHandles,
+                       btOverlappingPairCache.getCPtr(pairCache), pairCache), true);
+       }
+
+       public btAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax, int maxHandles) {
+               this(gdxBulletJNI.new_btAxisSweep3__SWIG_2(worldAabbMin, worldAabbMax, maxHandles), true);
+       }
+
+       public btAxisSweep3 (Vector3 worldAabbMin, Vector3 worldAabbMax) {
+               this(gdxBulletJNI.new_btAxisSweep3__SWIG_3(worldAabbMin, worldAabbMax), true);
+       }
 
 }
index 701aff6..e1cdb68 100644 (file)
@@ -9,66 +9,64 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btBU_Simplex1to4 extends btPolyhedralConvexAabbCachingShape {
-  private long swigCPtr;
-
-  protected btBU_Simplex1to4(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btBU_Simplex1to4_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBU_Simplex1to4 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBU_Simplex1to4(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btBU_Simplex1to4() {
-    this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_0(), true);
-  }
-
-  public btBU_Simplex1to4(Vector3 pt0) {
-    this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_1(pt0), true);
-  }
-
-  public btBU_Simplex1to4(Vector3 pt0, Vector3 pt1) {
-    this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_2(pt0, pt1), true);
-  }
-
-  public btBU_Simplex1to4(Vector3 pt0, Vector3 pt1, Vector3 pt2) {
-    this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_3(pt0, pt1, pt2), true);
-  }
-
-  public btBU_Simplex1to4(Vector3 pt0, Vector3 pt1, Vector3 pt2, Vector3 pt3) {
-    this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_4(pt0, pt1, pt2, pt3), true);
-  }
-
-  public void reset() {
-    gdxBulletJNI.btBU_Simplex1to4_reset(swigCPtr, this);
-  }
-
-  public void addVertex(Vector3 pt) {
-    gdxBulletJNI.btBU_Simplex1to4_addVertex(swigCPtr, this, pt);
-  }
-
-  public int getIndex(int i) {
-    return gdxBulletJNI.btBU_Simplex1to4_getIndex(swigCPtr, this, i);
-  }
+       private long swigCPtr;
+
+       protected btBU_Simplex1to4 (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btBU_Simplex1to4_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBU_Simplex1to4 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBU_Simplex1to4(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btBU_Simplex1to4 () {
+               this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_0(), true);
+       }
+
+       public btBU_Simplex1to4 (Vector3 pt0) {
+               this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_1(pt0), true);
+       }
+
+       public btBU_Simplex1to4 (Vector3 pt0, Vector3 pt1) {
+               this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_2(pt0, pt1), true);
+       }
+
+       public btBU_Simplex1to4 (Vector3 pt0, Vector3 pt1, Vector3 pt2) {
+               this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_3(pt0, pt1, pt2), true);
+       }
+
+       public btBU_Simplex1to4 (Vector3 pt0, Vector3 pt1, Vector3 pt2, Vector3 pt3) {
+               this(gdxBulletJNI.new_btBU_Simplex1to4__SWIG_4(pt0, pt1, pt2, pt3), true);
+       }
+
+       public void reset () {
+               gdxBulletJNI.btBU_Simplex1to4_reset(swigCPtr, this);
+       }
+
+       public void addVertex (Vector3 pt) {
+               gdxBulletJNI.btBU_Simplex1to4_addVertex(swigCPtr, this, pt);
+       }
+
+       public int getIndex (int i) {
+               return gdxBulletJNI.btBU_Simplex1to4_getIndex(swigCPtr, this, i);
+       }
 
 }
index d0aecd3..3b037a3 100644 (file)
@@ -8,57 +8,53 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBlock {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBlock(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBlock obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBlock(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setPrevious(btBlock value) {
-    gdxBulletJNI.btBlock_previous_set(swigCPtr, this, btBlock.getCPtr(value), value);
-  }
-
-  public btBlock getPrevious() {
-    long cPtr = gdxBulletJNI.btBlock_previous_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBlock(cPtr, false);
-  }
-
-  public void setAddress(SWIGTYPE_p_unsigned_char value) {
-    gdxBulletJNI.btBlock_address_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_unsigned_char getAddress() {
-    long cPtr = gdxBulletJNI.btBlock_address_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
-  }
-
-  public btBlock() {
-    this(gdxBulletJNI.new_btBlock(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBlock (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBlock obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBlock(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setPrevious (btBlock value) {
+               gdxBulletJNI.btBlock_previous_set(swigCPtr, this, btBlock.getCPtr(value), value);
+       }
+
+       public btBlock getPrevious () {
+               long cPtr = gdxBulletJNI.btBlock_previous_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBlock(cPtr, false);
+       }
+
+       public void setAddress (SWIGTYPE_p_unsigned_char value) {
+               gdxBulletJNI.btBlock_address_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_unsigned_char getAddress () {
+               long cPtr = gdxBulletJNI.btBlock_address_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+       }
+
+       public btBlock () {
+               this(gdxBulletJNI.new_btBlock(), true);
+       }
 
 }
index 328620c..bf64a82 100644 (file)
@@ -8,43 +8,42 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBox2dBox2dCollisionAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btBox2dBox2dCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btBox2dBox2dCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBox2dBox2dCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBox2dBox2dCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btBox2dBox2dCollisionAlgorithm(btCollisionAlgorithmConstructionInfo ci) {
-    this(gdxBulletJNI.new_btBox2dBox2dCollisionAlgorithm__SWIG_0(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
-  }
-
-  public btBox2dBox2dCollisionAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1) {
-    this(gdxBulletJNI.new_btBox2dBox2dCollisionAlgorithm__SWIG_1(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1), true);
-  }
+       private long swigCPtr;
+
+       protected btBox2dBox2dCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btBox2dBox2dCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBox2dBox2dCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBox2dBox2dCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btBox2dBox2dCollisionAlgorithm (btCollisionAlgorithmConstructionInfo ci) {
+               this(gdxBulletJNI.new_btBox2dBox2dCollisionAlgorithm__SWIG_0(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
+       }
+
+       public btBox2dBox2dCollisionAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci,
+               btCollisionObject body0, btCollisionObject body1) {
+               this(gdxBulletJNI.new_btBox2dBox2dCollisionAlgorithm__SWIG_1(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1), true);
+       }
 
 }
index 8a41fa0..ed5fe68 100644 (file)
@@ -9,68 +9,66 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btBox2dShape extends btPolyhedralConvexShape {
-  private long swigCPtr;
-
-  protected btBox2dShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btBox2dShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBox2dShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBox2dShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public Vector3 getHalfExtentsWithMargin() {
-       return gdxBulletJNI.btBox2dShape_getHalfExtentsWithMargin(swigCPtr, this);
-}
-
-  public Vector3 getHalfExtentsWithoutMargin() {
-       return gdxBulletJNI.btBox2dShape_getHalfExtentsWithoutMargin(swigCPtr, this);
-}
-
-  public btBox2dShape(Vector3 boxHalfExtents) {
-    this(gdxBulletJNI.new_btBox2dShape(boxHalfExtents), true);
-  }
-
-  public int getVertexCount() {
-    return gdxBulletJNI.btBox2dShape_getVertexCount(swigCPtr, this);
-  }
-
-  public btVector3 getVertices() {
-    long cPtr = gdxBulletJNI.btBox2dShape_getVertices(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public btVector3 getNormals() {
-    long cPtr = gdxBulletJNI.btBox2dShape_getNormals(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public Vector3 getCentroid() {
-       return gdxBulletJNI.btBox2dShape_getCentroid(swigCPtr, this);
-}
-
-  public void getPlaneEquation(btVector4 plane, int i) {
-    gdxBulletJNI.btBox2dShape_getPlaneEquation(swigCPtr, this, btVector4.getCPtr(plane), plane, i);
-  }
+       private long swigCPtr;
+
+       protected btBox2dShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btBox2dShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBox2dShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBox2dShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public Vector3 getHalfExtentsWithMargin () {
+               return gdxBulletJNI.btBox2dShape_getHalfExtentsWithMargin(swigCPtr, this);
+       }
+
+       public Vector3 getHalfExtentsWithoutMargin () {
+               return gdxBulletJNI.btBox2dShape_getHalfExtentsWithoutMargin(swigCPtr, this);
+       }
+
+       public btBox2dShape (Vector3 boxHalfExtents) {
+               this(gdxBulletJNI.new_btBox2dShape(boxHalfExtents), true);
+       }
+
+       public int getVertexCount () {
+               return gdxBulletJNI.btBox2dShape_getVertexCount(swigCPtr, this);
+       }
+
+       public btVector3 getVertices () {
+               long cPtr = gdxBulletJNI.btBox2dShape_getVertices(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public btVector3 getNormals () {
+               long cPtr = gdxBulletJNI.btBox2dShape_getNormals(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public Vector3 getCentroid () {
+               return gdxBulletJNI.btBox2dShape_getCentroid(swigCPtr, this);
+       }
+
+       public void getPlaneEquation (btVector4 plane, int i) {
+               gdxBulletJNI.btBox2dShape_getPlaneEquation(swigCPtr, this, btVector4.getCPtr(plane), plane, i);
+       }
 
 }
index 0c6037b..0d9f20b 100644 (file)
@@ -8,43 +8,42 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBoxBoxCollisionAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btBoxBoxCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btBoxBoxCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBoxBoxCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBoxBoxCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btBoxBoxCollisionAlgorithm(btCollisionAlgorithmConstructionInfo ci) {
-    this(gdxBulletJNI.new_btBoxBoxCollisionAlgorithm__SWIG_0(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
-  }
-
-  public btBoxBoxCollisionAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1) {
-    this(gdxBulletJNI.new_btBoxBoxCollisionAlgorithm__SWIG_1(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1), true);
-  }
+       private long swigCPtr;
+
+       protected btBoxBoxCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btBoxBoxCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBoxBoxCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBoxBoxCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btBoxBoxCollisionAlgorithm (btCollisionAlgorithmConstructionInfo ci) {
+               this(gdxBulletJNI.new_btBoxBoxCollisionAlgorithm__SWIG_0(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
+       }
+
+       public btBoxBoxCollisionAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0,
+               btCollisionObject body1) {
+               this(gdxBulletJNI.new_btBoxBoxCollisionAlgorithm__SWIG_1(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1), true);
+       }
 
 }
index 1708cad..03b7ec0 100644 (file)
@@ -8,65 +8,63 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBoxBoxDetector {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btBoxBoxDetector(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btBoxBoxDetector (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btBoxBoxDetector obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btBoxBoxDetector obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBoxBoxDetector(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBoxBoxDetector(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setM_box1(btBoxShape value) {
-    gdxBulletJNI.btBoxBoxDetector_m_box1_set(swigCPtr, this, btBoxShape.getCPtr(value), value);
-  }
+       public void setM_box1 (btBoxShape value) {
+               gdxBulletJNI.btBoxBoxDetector_m_box1_set(swigCPtr, this, btBoxShape.getCPtr(value), value);
+       }
 
-  public btBoxShape getM_box1() {
-    long cPtr = gdxBulletJNI.btBoxBoxDetector_m_box1_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBoxShape(cPtr, false);
-  }
+       public btBoxShape getM_box1 () {
+               long cPtr = gdxBulletJNI.btBoxBoxDetector_m_box1_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBoxShape(cPtr, false);
+       }
 
-  public void setM_box2(btBoxShape value) {
-    gdxBulletJNI.btBoxBoxDetector_m_box2_set(swigCPtr, this, btBoxShape.getCPtr(value), value);
-  }
+       public void setM_box2 (btBoxShape value) {
+               gdxBulletJNI.btBoxBoxDetector_m_box2_set(swigCPtr, this, btBoxShape.getCPtr(value), value);
+       }
 
-  public btBoxShape getM_box2() {
-    long cPtr = gdxBulletJNI.btBoxBoxDetector_m_box2_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBoxShape(cPtr, false);
-  }
+       public btBoxShape getM_box2 () {
+               long cPtr = gdxBulletJNI.btBoxBoxDetector_m_box2_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBoxShape(cPtr, false);
+       }
 
-  public btBoxBoxDetector(btBoxShape box1, btBoxShape box2) {
-    this(gdxBulletJNI.new_btBoxBoxDetector(btBoxShape.getCPtr(box1), box1, btBoxShape.getCPtr(box2), box2), true);
-  }
+       public btBoxBoxDetector (btBoxShape box1, btBoxShape box2) {
+               this(gdxBulletJNI.new_btBoxBoxDetector(btBoxShape.getCPtr(box1), box1, btBoxShape.getCPtr(box2), box2), true);
+       }
 
-  public void getClosestPoints(ClosestPointInput input, Result output, btIDebugDraw debugDraw, boolean swapResults) {
-    gdxBulletJNI.btBoxBoxDetector_getClosestPoints__SWIG_0(swigCPtr, this, ClosestPointInput.getCPtr(input), input, Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw, swapResults);
-  }
+       public void getClosestPoints (ClosestPointInput input, Result output, btIDebugDraw debugDraw, boolean swapResults) {
+               gdxBulletJNI.btBoxBoxDetector_getClosestPoints__SWIG_0(swigCPtr, this, ClosestPointInput.getCPtr(input), input,
+                       Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw, swapResults);
+       }
 
-  public void getClosestPoints(ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
-    gdxBulletJNI.btBoxBoxDetector_getClosestPoints__SWIG_1(swigCPtr, this, ClosestPointInput.getCPtr(input), input, Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
-  }
+       public void getClosestPoints (ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
+               gdxBulletJNI.btBoxBoxDetector_getClosestPoints__SWIG_1(swigCPtr, this, ClosestPointInput.getCPtr(input), input,
+                       Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
+       }
 
 }
index e6b9fd9..06775a8 100644 (file)
@@ -9,50 +9,48 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btBoxShape extends btPolyhedralConvexShape {
-  private long swigCPtr;
-
-  protected btBoxShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btBoxShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBoxShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBoxShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public Vector3 getHalfExtentsWithMargin() {
-       return gdxBulletJNI.btBoxShape_getHalfExtentsWithMargin(swigCPtr, this);
-}
-
-  public Vector3 getHalfExtentsWithoutMargin() {
-       return gdxBulletJNI.btBoxShape_getHalfExtentsWithoutMargin(swigCPtr, this);
-}
-
-  public btBoxShape(Vector3 boxHalfExtents) {
-    this(gdxBulletJNI.new_btBoxShape(boxHalfExtents), true);
-  }
-
-  public void getPlaneEquation(btVector4 plane, int i) {
-    gdxBulletJNI.btBoxShape_getPlaneEquation(swigCPtr, this, btVector4.getCPtr(plane), plane, i);
-  }
+       private long swigCPtr;
+
+       protected btBoxShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btBoxShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBoxShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBoxShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public Vector3 getHalfExtentsWithMargin () {
+               return gdxBulletJNI.btBoxShape_getHalfExtentsWithMargin(swigCPtr, this);
+       }
+
+       public Vector3 getHalfExtentsWithoutMargin () {
+               return gdxBulletJNI.btBoxShape_getHalfExtentsWithoutMargin(swigCPtr, this);
+       }
+
+       public btBoxShape (Vector3 boxHalfExtents) {
+               this(gdxBulletJNI.new_btBoxShape(boxHalfExtents), true);
+       }
+
+       public void getPlaneEquation (btVector4 plane, int i) {
+               gdxBulletJNI.btBoxShape_getPlaneEquation(swigCPtr, this, btVector4.getCPtr(plane), plane, i);
+       }
 
 }
index 930dbb8..fa2d430 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBroadphaseAabbCallback {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBroadphaseAabbCallback(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBroadphaseAabbCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBroadphaseAabbCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public boolean process(btBroadphaseProxy proxy) {
-    return gdxBulletJNI.btBroadphaseAabbCallback_process(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBroadphaseAabbCallback (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBroadphaseAabbCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBroadphaseAabbCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public boolean process (btBroadphaseProxy proxy) {
+               return gdxBulletJNI.btBroadphaseAabbCallback_process(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy);
+       }
 
 }
index 0bfb751..64abd3f 100644 (file)
@@ -9,88 +9,95 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btBroadphaseInterface {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBroadphaseInterface(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBroadphaseInterface obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBroadphaseInterface(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btBroadphaseProxy createProxy(Vector3 aabbMin, Vector3 aabbMax, int shapeType, SWIGTYPE_p_void userPtr, short collisionFilterGroup, short collisionFilterMask, btDispatcher dispatcher, SWIGTYPE_p_void multiSapProxy) {
-    long cPtr = gdxBulletJNI.btBroadphaseInterface_createProxy(swigCPtr, this, aabbMin, aabbMax, shapeType, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup, collisionFilterMask, btDispatcher.getCPtr(dispatcher), dispatcher, SWIGTYPE_p_void.getCPtr(multiSapProxy));
-    return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
-  }
-
-  public void destroyProxy(btBroadphaseProxy proxy, btDispatcher dispatcher) {
-    gdxBulletJNI.btBroadphaseInterface_destroyProxy(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void setAabb(btBroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax, btDispatcher dispatcher) {
-    gdxBulletJNI.btBroadphaseInterface_setAabb(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy, aabbMin, aabbMax, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void getAabb(btBroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btBroadphaseInterface_getAabb(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy, aabbMin, aabbMax);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btBroadphaseInterface_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin, aabbMax);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
-    gdxBulletJNI.btBroadphaseInterface_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
-    gdxBulletJNI.btBroadphaseInterface_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback);
-  }
-
-  public void aabbTest(Vector3 aabbMin, Vector3 aabbMax, btBroadphaseAabbCallback callback) {
-    gdxBulletJNI.btBroadphaseInterface_aabbTest(swigCPtr, this, aabbMin, aabbMax, btBroadphaseAabbCallback.getCPtr(callback), callback);
-  }
-
-  public void calculateOverlappingPairs(btDispatcher dispatcher) {
-    gdxBulletJNI.btBroadphaseInterface_calculateOverlappingPairs(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public btOverlappingPairCache getOverlappingPairCache() {
-    long cPtr = gdxBulletJNI.btBroadphaseInterface_getOverlappingPairCache__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
-  }
-
-  public void getBroadphaseAabb(Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btBroadphaseInterface_getBroadphaseAabb(swigCPtr, this, aabbMin, aabbMax);
-  }
-
-  public void resetPool(btDispatcher dispatcher) {
-    gdxBulletJNI.btBroadphaseInterface_resetPool(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void printStats() {
-    gdxBulletJNI.btBroadphaseInterface_printStats(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBroadphaseInterface (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBroadphaseInterface obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBroadphaseInterface(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btBroadphaseProxy createProxy (Vector3 aabbMin, Vector3 aabbMax, int shapeType, SWIGTYPE_p_void userPtr,
+               short collisionFilterGroup, short collisionFilterMask, btDispatcher dispatcher, SWIGTYPE_p_void multiSapProxy) {
+               long cPtr = gdxBulletJNI.btBroadphaseInterface_createProxy(swigCPtr, this, aabbMin, aabbMax, shapeType,
+                       SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup, collisionFilterMask, btDispatcher.getCPtr(dispatcher),
+                       dispatcher, SWIGTYPE_p_void.getCPtr(multiSapProxy));
+               return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
+       }
+
+       public void destroyProxy (btBroadphaseProxy proxy, btDispatcher dispatcher) {
+               gdxBulletJNI.btBroadphaseInterface_destroyProxy(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy,
+                       btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void setAabb (btBroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax, btDispatcher dispatcher) {
+               gdxBulletJNI.btBroadphaseInterface_setAabb(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy, aabbMin, aabbMax,
+                       btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void getAabb (btBroadphaseProxy proxy, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btBroadphaseInterface_getAabb(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy, aabbMin, aabbMax);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btBroadphaseInterface_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin, aabbMax);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
+               gdxBulletJNI.btBroadphaseInterface_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
+               gdxBulletJNI.btBroadphaseInterface_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback);
+       }
+
+       public void aabbTest (Vector3 aabbMin, Vector3 aabbMax, btBroadphaseAabbCallback callback) {
+               gdxBulletJNI.btBroadphaseInterface_aabbTest(swigCPtr, this, aabbMin, aabbMax, btBroadphaseAabbCallback.getCPtr(callback),
+                       callback);
+       }
+
+       public void calculateOverlappingPairs (btDispatcher dispatcher) {
+               gdxBulletJNI.btBroadphaseInterface_calculateOverlappingPairs(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public btOverlappingPairCache getOverlappingPairCache () {
+               long cPtr = gdxBulletJNI.btBroadphaseInterface_getOverlappingPairCache__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
+       }
+
+       public void getBroadphaseAabb (Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btBroadphaseInterface_getBroadphaseAabb(swigCPtr, this, aabbMin, aabbMax);
+       }
+
+       public void resetPool (btDispatcher dispatcher) {
+               gdxBulletJNI.btBroadphaseInterface_resetPool(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void printStats () {
+               gdxBulletJNI.btBroadphaseInterface_printStats(swigCPtr, this);
+       }
 
 }
index f71dde6..5d868cb 100644 (file)
@@ -8,74 +8,71 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBroadphasePair {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBroadphasePair(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBroadphasePair obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBroadphasePair(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btBroadphasePair() {
-    this(gdxBulletJNI.new_btBroadphasePair__SWIG_0(), true);
-  }
-
-  public btBroadphasePair(btBroadphasePair other) {
-    this(gdxBulletJNI.new_btBroadphasePair__SWIG_1(btBroadphasePair.getCPtr(other), other), true);
-  }
-
-  public btBroadphasePair(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    this(gdxBulletJNI.new_btBroadphasePair__SWIG_2(btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1), true);
-  }
-
-  public void setM_pProxy0(btBroadphaseProxy value) {
-    gdxBulletJNI.btBroadphasePair_m_pProxy0_set(swigCPtr, this, btBroadphaseProxy.getCPtr(value), value);
-  }
-
-  public btBroadphaseProxy getM_pProxy0() {
-    long cPtr = gdxBulletJNI.btBroadphasePair_m_pProxy0_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
-  }
-
-  public void setM_pProxy1(btBroadphaseProxy value) {
-    gdxBulletJNI.btBroadphasePair_m_pProxy1_set(swigCPtr, this, btBroadphaseProxy.getCPtr(value), value);
-  }
-
-  public btBroadphaseProxy getM_pProxy1() {
-    long cPtr = gdxBulletJNI.btBroadphasePair_m_pProxy1_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
-  }
-
-  public void setM_algorithm(btCollisionAlgorithm value) {
-    gdxBulletJNI.btBroadphasePair_m_algorithm_set(swigCPtr, this, btCollisionAlgorithm.getCPtr(value), value);
-  }
-
-  public btCollisionAlgorithm getM_algorithm() {
-    long cPtr = gdxBulletJNI.btBroadphasePair_m_algorithm_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBroadphasePair (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBroadphasePair obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBroadphasePair(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btBroadphasePair () {
+               this(gdxBulletJNI.new_btBroadphasePair__SWIG_0(), true);
+       }
+
+       public btBroadphasePair (btBroadphasePair other) {
+               this(gdxBulletJNI.new_btBroadphasePair__SWIG_1(btBroadphasePair.getCPtr(other), other), true);
+       }
+
+       public btBroadphasePair (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               this(gdxBulletJNI.new_btBroadphasePair__SWIG_2(btBroadphaseProxy.getCPtr(proxy0), proxy0,
+                       btBroadphaseProxy.getCPtr(proxy1), proxy1), true);
+       }
+
+       public void setM_pProxy0 (btBroadphaseProxy value) {
+               gdxBulletJNI.btBroadphasePair_m_pProxy0_set(swigCPtr, this, btBroadphaseProxy.getCPtr(value), value);
+       }
+
+       public btBroadphaseProxy getM_pProxy0 () {
+               long cPtr = gdxBulletJNI.btBroadphasePair_m_pProxy0_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
+       }
+
+       public void setM_pProxy1 (btBroadphaseProxy value) {
+               gdxBulletJNI.btBroadphasePair_m_pProxy1_set(swigCPtr, this, btBroadphaseProxy.getCPtr(value), value);
+       }
+
+       public btBroadphaseProxy getM_pProxy1 () {
+               long cPtr = gdxBulletJNI.btBroadphasePair_m_pProxy1_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
+       }
+
+       public void setM_algorithm (btCollisionAlgorithm value) {
+               gdxBulletJNI.btBroadphasePair_m_algorithm_set(swigCPtr, this, btCollisionAlgorithm.getCPtr(value), value);
+       }
+
+       public btCollisionAlgorithm getM_algorithm () {
+               long cPtr = gdxBulletJNI.btBroadphasePair_m_algorithm_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
+       }
 
 }
index 44895c3..f65d958 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBroadphasePairSortPredicate {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBroadphasePairSortPredicate(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBroadphasePairSortPredicate obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBroadphasePairSortPredicate(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btBroadphasePairSortPredicate() {
-    this(gdxBulletJNI.new_btBroadphasePairSortPredicate(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBroadphasePairSortPredicate (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBroadphasePairSortPredicate obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBroadphasePairSortPredicate(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btBroadphasePairSortPredicate () {
+               this(gdxBulletJNI.new_btBroadphasePairSortPredicate(), true);
+       }
 
 }
index 15824bc..7439c8c 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btBroadphaseProxy {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBroadphaseProxy(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBroadphaseProxy obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBroadphaseProxy(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_clientObject(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btBroadphaseProxy_m_clientObject_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_clientObject() {
-    long cPtr = gdxBulletJNI.btBroadphaseProxy_m_clientObject_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setM_collisionFilterGroup(short value) {
-    gdxBulletJNI.btBroadphaseProxy_m_collisionFilterGroup_set(swigCPtr, this, value);
-  }
-
-  public short getM_collisionFilterGroup() {
-    return gdxBulletJNI.btBroadphaseProxy_m_collisionFilterGroup_get(swigCPtr, this);
-  }
-
-  public void setM_collisionFilterMask(short value) {
-    gdxBulletJNI.btBroadphaseProxy_m_collisionFilterMask_set(swigCPtr, this, value);
-  }
-
-  public short getM_collisionFilterMask() {
-    return gdxBulletJNI.btBroadphaseProxy_m_collisionFilterMask_get(swigCPtr, this);
-  }
-
-  public void setM_multiSapParentProxy(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btBroadphaseProxy_m_multiSapParentProxy_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_multiSapParentProxy() {
-    long cPtr = gdxBulletJNI.btBroadphaseProxy_m_multiSapParentProxy_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setM_uniqueId(int value) {
-    gdxBulletJNI.btBroadphaseProxy_m_uniqueId_set(swigCPtr, this, value);
-  }
-
-  public int getM_uniqueId() {
-    return gdxBulletJNI.btBroadphaseProxy_m_uniqueId_get(swigCPtr, this);
-  }
-
-  public void setM_aabbMin(btVector3 value) {
-    gdxBulletJNI.btBroadphaseProxy_m_aabbMin_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_aabbMin() {
-    long cPtr = gdxBulletJNI.btBroadphaseProxy_m_aabbMin_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_aabbMax(btVector3 value) {
-    gdxBulletJNI.btBroadphaseProxy_m_aabbMax_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_aabbMax() {
-    long cPtr = gdxBulletJNI.btBroadphaseProxy_m_aabbMax_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public int getUid() {
-    return gdxBulletJNI.btBroadphaseProxy_getUid(swigCPtr, this);
-  }
-
-  public btBroadphaseProxy() {
-    this(gdxBulletJNI.new_btBroadphaseProxy__SWIG_0(), true);
-  }
-
-  public btBroadphaseProxy(Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_void userPtr, short collisionFilterGroup, short collisionFilterMask, SWIGTYPE_p_void multiSapParentProxy) {
-    this(gdxBulletJNI.new_btBroadphaseProxy__SWIG_1(aabbMin, aabbMax, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup, collisionFilterMask, SWIGTYPE_p_void.getCPtr(multiSapParentProxy)), true);
-  }
-
-  public btBroadphaseProxy(Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_void userPtr, short collisionFilterGroup, short collisionFilterMask) {
-    this(gdxBulletJNI.new_btBroadphaseProxy__SWIG_2(aabbMin, aabbMax, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup, collisionFilterMask), true);
-  }
-
-  public static boolean isPolyhedral(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isPolyhedral(proxyType);
-  }
-
-  public static boolean isConvex(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isConvex(proxyType);
-  }
-
-  public static boolean isNonMoving(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isNonMoving(proxyType);
-  }
-
-  public static boolean isConcave(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isConcave(proxyType);
-  }
-
-  public static boolean isCompound(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isCompound(proxyType);
-  }
-
-  public static boolean isSoftBody(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isSoftBody(proxyType);
-  }
-
-  public static boolean isInfinite(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isInfinite(proxyType);
-  }
-
-  public static boolean isConvex2d(int proxyType) {
-    return gdxBulletJNI.btBroadphaseProxy_isConvex2d(proxyType);
-  }
-
-  public final static class CollisionFilterGroups {
-    public final static int DefaultFilter = 1;
-    public final static int StaticFilter = 2;
-    public final static int KinematicFilter = 4;
-    public final static int DebrisFilter = 8;
-    public final static int SensorTrigger = 16;
-    public final static int CharacterFilter = 32;
-    public final static int AllFilter = -1;
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBroadphaseProxy (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBroadphaseProxy obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBroadphaseProxy(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_clientObject (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btBroadphaseProxy_m_clientObject_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_clientObject () {
+               long cPtr = gdxBulletJNI.btBroadphaseProxy_m_clientObject_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setM_collisionFilterGroup (short value) {
+               gdxBulletJNI.btBroadphaseProxy_m_collisionFilterGroup_set(swigCPtr, this, value);
+       }
+
+       public short getM_collisionFilterGroup () {
+               return gdxBulletJNI.btBroadphaseProxy_m_collisionFilterGroup_get(swigCPtr, this);
+       }
+
+       public void setM_collisionFilterMask (short value) {
+               gdxBulletJNI.btBroadphaseProxy_m_collisionFilterMask_set(swigCPtr, this, value);
+       }
+
+       public short getM_collisionFilterMask () {
+               return gdxBulletJNI.btBroadphaseProxy_m_collisionFilterMask_get(swigCPtr, this);
+       }
+
+       public void setM_multiSapParentProxy (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btBroadphaseProxy_m_multiSapParentProxy_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_multiSapParentProxy () {
+               long cPtr = gdxBulletJNI.btBroadphaseProxy_m_multiSapParentProxy_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setM_uniqueId (int value) {
+               gdxBulletJNI.btBroadphaseProxy_m_uniqueId_set(swigCPtr, this, value);
+       }
+
+       public int getM_uniqueId () {
+               return gdxBulletJNI.btBroadphaseProxy_m_uniqueId_get(swigCPtr, this);
+       }
+
+       public void setM_aabbMin (btVector3 value) {
+               gdxBulletJNI.btBroadphaseProxy_m_aabbMin_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_aabbMin () {
+               long cPtr = gdxBulletJNI.btBroadphaseProxy_m_aabbMin_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_aabbMax (btVector3 value) {
+               gdxBulletJNI.btBroadphaseProxy_m_aabbMax_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_aabbMax () {
+               long cPtr = gdxBulletJNI.btBroadphaseProxy_m_aabbMax_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public int getUid () {
+               return gdxBulletJNI.btBroadphaseProxy_getUid(swigCPtr, this);
+       }
+
+       public btBroadphaseProxy () {
+               this(gdxBulletJNI.new_btBroadphaseProxy__SWIG_0(), true);
+       }
+
+       public btBroadphaseProxy (Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_void userPtr, short collisionFilterGroup,
+               short collisionFilterMask, SWIGTYPE_p_void multiSapParentProxy) {
+               this(gdxBulletJNI.new_btBroadphaseProxy__SWIG_1(aabbMin, aabbMax, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup,
+                       collisionFilterMask, SWIGTYPE_p_void.getCPtr(multiSapParentProxy)), true);
+       }
+
+       public btBroadphaseProxy (Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_void userPtr, short collisionFilterGroup,
+               short collisionFilterMask) {
+               this(gdxBulletJNI.new_btBroadphaseProxy__SWIG_2(aabbMin, aabbMax, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup,
+                       collisionFilterMask), true);
+       }
+
+       public static boolean isPolyhedral (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isPolyhedral(proxyType);
+       }
+
+       public static boolean isConvex (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isConvex(proxyType);
+       }
+
+       public static boolean isNonMoving (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isNonMoving(proxyType);
+       }
+
+       public static boolean isConcave (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isConcave(proxyType);
+       }
+
+       public static boolean isCompound (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isCompound(proxyType);
+       }
+
+       public static boolean isSoftBody (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isSoftBody(proxyType);
+       }
+
+       public static boolean isInfinite (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isInfinite(proxyType);
+       }
+
+       public static boolean isConvex2d (int proxyType) {
+               return gdxBulletJNI.btBroadphaseProxy_isConvex2d(proxyType);
+       }
+
+       public final static class CollisionFilterGroups {
+               public final static int DefaultFilter = 1;
+               public final static int StaticFilter = 2;
+               public final static int KinematicFilter = 4;
+               public final static int DebrisFilter = 8;
+               public final static int SensorTrigger = 16;
+               public final static int CharacterFilter = 32;
+               public final static int AllFilter = -1;
+       }
 
 }
index 3fe807c..77c89a2 100644 (file)
@@ -8,60 +8,56 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBroadphaseRayCallback extends btBroadphaseAabbCallback {
-  private long swigCPtr;
-
-  protected btBroadphaseRayCallback(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btBroadphaseRayCallback_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBroadphaseRayCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBroadphaseRayCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_rayDirectionInverse(btVector3 value) {
-    gdxBulletJNI.btBroadphaseRayCallback_m_rayDirectionInverse_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_rayDirectionInverse() {
-    long cPtr = gdxBulletJNI.btBroadphaseRayCallback_m_rayDirectionInverse_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_signs(long[] value) {
-    gdxBulletJNI.btBroadphaseRayCallback_m_signs_set(swigCPtr, this, value);
-  }
-
-  public long[] getM_signs() {
-    return gdxBulletJNI.btBroadphaseRayCallback_m_signs_get(swigCPtr, this);
-  }
-
-  public void setM_lambda_max(float value) {
-    gdxBulletJNI.btBroadphaseRayCallback_m_lambda_max_set(swigCPtr, this, value);
-  }
-
-  public float getM_lambda_max() {
-    return gdxBulletJNI.btBroadphaseRayCallback_m_lambda_max_get(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btBroadphaseRayCallback (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btBroadphaseRayCallback_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBroadphaseRayCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBroadphaseRayCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_rayDirectionInverse (btVector3 value) {
+               gdxBulletJNI.btBroadphaseRayCallback_m_rayDirectionInverse_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_rayDirectionInverse () {
+               long cPtr = gdxBulletJNI.btBroadphaseRayCallback_m_rayDirectionInverse_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_signs (long[] value) {
+               gdxBulletJNI.btBroadphaseRayCallback_m_signs_set(swigCPtr, this, value);
+       }
+
+       public long[] getM_signs () {
+               return gdxBulletJNI.btBroadphaseRayCallback_m_signs_get(swigCPtr, this);
+       }
+
+       public void setM_lambda_max (float value) {
+               gdxBulletJNI.btBroadphaseRayCallback_m_lambda_max_set(swigCPtr, this, value);
+       }
+
+       public float getM_lambda_max () {
+               return gdxBulletJNI.btBroadphaseRayCallback_m_lambda_max_get(swigCPtr, this);
+       }
 
 }
index 80926e1..46794a7 100644 (file)
@@ -8,83 +8,80 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBvhSubtreeInfo {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBvhSubtreeInfo(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBvhSubtreeInfo obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBvhSubtreeInfo(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_quantizedAabbMin(int[] value) {
-    gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMin_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_quantizedAabbMin() {
-    return gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMin_get(swigCPtr, this);
-  }
-
-  public void setM_quantizedAabbMax(int[] value) {
-    gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMax_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_quantizedAabbMax() {
-    return gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMax_get(swigCPtr, this);
-  }
-
-  public void setM_rootNodeIndex(int value) {
-    gdxBulletJNI.btBvhSubtreeInfo_m_rootNodeIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_rootNodeIndex() {
-    return gdxBulletJNI.btBvhSubtreeInfo_m_rootNodeIndex_get(swigCPtr, this);
-  }
-
-  public void setM_subtreeSize(int value) {
-    gdxBulletJNI.btBvhSubtreeInfo_m_subtreeSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_subtreeSize() {
-    return gdxBulletJNI.btBvhSubtreeInfo_m_subtreeSize_get(swigCPtr, this);
-  }
-
-  public void setM_padding(int[] value) {
-    gdxBulletJNI.btBvhSubtreeInfo_m_padding_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_padding() {
-    return gdxBulletJNI.btBvhSubtreeInfo_m_padding_get(swigCPtr, this);
-  }
-
-  public btBvhSubtreeInfo() {
-    this(gdxBulletJNI.new_btBvhSubtreeInfo(), true);
-  }
-
-  public void setAabbFromQuantizeNode(btQuantizedBvhNode quantizedNode) {
-    gdxBulletJNI.btBvhSubtreeInfo_setAabbFromQuantizeNode(swigCPtr, this, btQuantizedBvhNode.getCPtr(quantizedNode), quantizedNode);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBvhSubtreeInfo (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBvhSubtreeInfo obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBvhSubtreeInfo(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_quantizedAabbMin (int[] value) {
+               gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMin_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_quantizedAabbMin () {
+               return gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMin_get(swigCPtr, this);
+       }
+
+       public void setM_quantizedAabbMax (int[] value) {
+               gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMax_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_quantizedAabbMax () {
+               return gdxBulletJNI.btBvhSubtreeInfo_m_quantizedAabbMax_get(swigCPtr, this);
+       }
+
+       public void setM_rootNodeIndex (int value) {
+               gdxBulletJNI.btBvhSubtreeInfo_m_rootNodeIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_rootNodeIndex () {
+               return gdxBulletJNI.btBvhSubtreeInfo_m_rootNodeIndex_get(swigCPtr, this);
+       }
+
+       public void setM_subtreeSize (int value) {
+               gdxBulletJNI.btBvhSubtreeInfo_m_subtreeSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_subtreeSize () {
+               return gdxBulletJNI.btBvhSubtreeInfo_m_subtreeSize_get(swigCPtr, this);
+       }
+
+       public void setM_padding (int[] value) {
+               gdxBulletJNI.btBvhSubtreeInfo_m_padding_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_padding () {
+               return gdxBulletJNI.btBvhSubtreeInfo_m_padding_get(swigCPtr, this);
+       }
+
+       public btBvhSubtreeInfo () {
+               this(gdxBulletJNI.new_btBvhSubtreeInfo(), true);
+       }
+
+       public void setAabbFromQuantizeNode (btQuantizedBvhNode quantizedNode) {
+               gdxBulletJNI.btBvhSubtreeInfo_setAabbFromQuantizeNode(swigCPtr, this, btQuantizedBvhNode.getCPtr(quantizedNode),
+                       quantizedNode);
+       }
 
 }
index c0723c9..a1bcbe0 100644 (file)
@@ -8,71 +8,67 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btBvhSubtreeInfoData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btBvhSubtreeInfoData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBvhSubtreeInfoData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBvhSubtreeInfoData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_rootNodeIndex(int value) {
-    gdxBulletJNI.btBvhSubtreeInfoData_m_rootNodeIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_rootNodeIndex() {
-    return gdxBulletJNI.btBvhSubtreeInfoData_m_rootNodeIndex_get(swigCPtr, this);
-  }
-
-  public void setM_subtreeSize(int value) {
-    gdxBulletJNI.btBvhSubtreeInfoData_m_subtreeSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_subtreeSize() {
-    return gdxBulletJNI.btBvhSubtreeInfoData_m_subtreeSize_get(swigCPtr, this);
-  }
-
-  public void setM_quantizedAabbMin(int[] value) {
-    gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMin_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_quantizedAabbMin() {
-    return gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMin_get(swigCPtr, this);
-  }
-
-  public void setM_quantizedAabbMax(int[] value) {
-    gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMax_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_quantizedAabbMax() {
-    return gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMax_get(swigCPtr, this);
-  }
-
-  public btBvhSubtreeInfoData() {
-    this(gdxBulletJNI.new_btBvhSubtreeInfoData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btBvhSubtreeInfoData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBvhSubtreeInfoData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBvhSubtreeInfoData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_rootNodeIndex (int value) {
+               gdxBulletJNI.btBvhSubtreeInfoData_m_rootNodeIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_rootNodeIndex () {
+               return gdxBulletJNI.btBvhSubtreeInfoData_m_rootNodeIndex_get(swigCPtr, this);
+       }
+
+       public void setM_subtreeSize (int value) {
+               gdxBulletJNI.btBvhSubtreeInfoData_m_subtreeSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_subtreeSize () {
+               return gdxBulletJNI.btBvhSubtreeInfoData_m_subtreeSize_get(swigCPtr, this);
+       }
+
+       public void setM_quantizedAabbMin (int[] value) {
+               gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMin_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_quantizedAabbMin () {
+               return gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMin_get(swigCPtr, this);
+       }
+
+       public void setM_quantizedAabbMax (int[] value) {
+               gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMax_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_quantizedAabbMax () {
+               return gdxBulletJNI.btBvhSubtreeInfoData_m_quantizedAabbMax_get(swigCPtr, this);
+       }
+
+       public btBvhSubtreeInfoData () {
+               this(gdxBulletJNI.new_btBvhSubtreeInfoData(), true);
+       }
 
 }
index be2e6fd..ec421b2 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btBvhTriangleMeshShape extends btTriangleMeshShape {
-  private long swigCPtr;
-
-  protected btBvhTriangleMeshShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btBvhTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btBvhTriangleMeshShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btBvhTriangleMeshShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btBvhTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, boolean buildBvh) {
-    this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_0(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression, buildBvh), true);
-  }
-
-  public btBvhTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression) {
-    this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_1(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression), true);
-  }
-
-  public btBvhTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, boolean buildBvh) {
-    this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_2(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh), true);
-  }
-
-  public btBvhTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
-    this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_3(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax), true);
-  }
-
-  public boolean getOwnsBvh() {
-    return gdxBulletJNI.btBvhTriangleMeshShape_getOwnsBvh(swigCPtr, this);
-  }
-
-  public void performRaycast(btTriangleCallback callback, Vector3 raySource, Vector3 rayTarget) {
-    gdxBulletJNI.btBvhTriangleMeshShape_performRaycast(swigCPtr, this, btTriangleCallback.getCPtr(callback), callback, raySource, rayTarget);
-  }
-
-  public void performConvexcast(btTriangleCallback callback, Vector3 boxSource, Vector3 boxTarget, Vector3 boxMin, Vector3 boxMax) {
-    gdxBulletJNI.btBvhTriangleMeshShape_performConvexcast(swigCPtr, this, btTriangleCallback.getCPtr(callback), callback, boxSource, boxTarget, boxMin, boxMax);
-  }
-
-  public void refitTree(Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btBvhTriangleMeshShape_refitTree(swigCPtr, this, aabbMin, aabbMax);
-  }
-
-  public void partialRefitTree(Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btBvhTriangleMeshShape_partialRefitTree(swigCPtr, this, aabbMin, aabbMax);
-  }
-
-  public btOptimizedBvh getOptimizedBvh() {
-    long cPtr = gdxBulletJNI.btBvhTriangleMeshShape_getOptimizedBvh(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOptimizedBvh(cPtr, false);
-  }
-
-  public void setOptimizedBvh(btOptimizedBvh bvh, Vector3 localScaling) {
-    gdxBulletJNI.btBvhTriangleMeshShape_setOptimizedBvh__SWIG_0(swigCPtr, this, btOptimizedBvh.getCPtr(bvh), bvh, localScaling);
-  }
-
-  public void setOptimizedBvh(btOptimizedBvh bvh) {
-    gdxBulletJNI.btBvhTriangleMeshShape_setOptimizedBvh__SWIG_1(swigCPtr, this, btOptimizedBvh.getCPtr(bvh), bvh);
-  }
-
-  public void buildOptimizedBvh() {
-    gdxBulletJNI.btBvhTriangleMeshShape_buildOptimizedBvh(swigCPtr, this);
-  }
-
-  public boolean usesQuantizedAabbCompression() {
-    return gdxBulletJNI.btBvhTriangleMeshShape_usesQuantizedAabbCompression(swigCPtr, this);
-  }
-
-  public void setTriangleInfoMap(btTriangleInfoMap triangleInfoMap) {
-    gdxBulletJNI.btBvhTriangleMeshShape_setTriangleInfoMap(swigCPtr, this, btTriangleInfoMap.getCPtr(triangleInfoMap), triangleInfoMap);
-  }
-
-  public btTriangleInfoMap getTriangleInfoMap() {
-    long cPtr = gdxBulletJNI.btBvhTriangleMeshShape_getTriangleInfoMap__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTriangleInfoMap(cPtr, false);
-  }
-
-  public void serializeSingleBvh(SWIGTYPE_p_btSerializer serializer) {
-    gdxBulletJNI.btBvhTriangleMeshShape_serializeSingleBvh(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
-
-  public void serializeSingleTriangleInfoMap(SWIGTYPE_p_btSerializer serializer) {
-    gdxBulletJNI.btBvhTriangleMeshShape_serializeSingleTriangleInfoMap(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
+       private long swigCPtr;
+
+       protected btBvhTriangleMeshShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btBvhTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btBvhTriangleMeshShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btBvhTriangleMeshShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btBvhTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, boolean buildBvh) {
+               this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_0(btStridingMeshInterface.getCPtr(meshInterface), meshInterface,
+                       useQuantizedAabbCompression, buildBvh), true);
+       }
+
+       public btBvhTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression) {
+               this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_1(btStridingMeshInterface.getCPtr(meshInterface), meshInterface,
+                       useQuantizedAabbCompression), true);
+       }
+
+       public btBvhTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin,
+               Vector3 bvhAabbMax, boolean buildBvh) {
+               this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_2(btStridingMeshInterface.getCPtr(meshInterface), meshInterface,
+                       useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh), true);
+       }
+
+       public btBvhTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin,
+               Vector3 bvhAabbMax) {
+               this(gdxBulletJNI.new_btBvhTriangleMeshShape__SWIG_3(btStridingMeshInterface.getCPtr(meshInterface), meshInterface,
+                       useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax), true);
+       }
+
+       public boolean getOwnsBvh () {
+               return gdxBulletJNI.btBvhTriangleMeshShape_getOwnsBvh(swigCPtr, this);
+       }
+
+       public void performRaycast (btTriangleCallback callback, Vector3 raySource, Vector3 rayTarget) {
+               gdxBulletJNI.btBvhTriangleMeshShape_performRaycast(swigCPtr, this, btTriangleCallback.getCPtr(callback), callback,
+                       raySource, rayTarget);
+       }
+
+       public void performConvexcast (btTriangleCallback callback, Vector3 boxSource, Vector3 boxTarget, Vector3 boxMin,
+               Vector3 boxMax) {
+               gdxBulletJNI.btBvhTriangleMeshShape_performConvexcast(swigCPtr, this, btTriangleCallback.getCPtr(callback), callback,
+                       boxSource, boxTarget, boxMin, boxMax);
+       }
+
+       public void refitTree (Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btBvhTriangleMeshShape_refitTree(swigCPtr, this, aabbMin, aabbMax);
+       }
+
+       public void partialRefitTree (Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btBvhTriangleMeshShape_partialRefitTree(swigCPtr, this, aabbMin, aabbMax);
+       }
+
+       public btOptimizedBvh getOptimizedBvh () {
+               long cPtr = gdxBulletJNI.btBvhTriangleMeshShape_getOptimizedBvh(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOptimizedBvh(cPtr, false);
+       }
+
+       public void setOptimizedBvh (btOptimizedBvh bvh, Vector3 localScaling) {
+               gdxBulletJNI.btBvhTriangleMeshShape_setOptimizedBvh__SWIG_0(swigCPtr, this, btOptimizedBvh.getCPtr(bvh), bvh, localScaling);
+       }
+
+       public void setOptimizedBvh (btOptimizedBvh bvh) {
+               gdxBulletJNI.btBvhTriangleMeshShape_setOptimizedBvh__SWIG_1(swigCPtr, this, btOptimizedBvh.getCPtr(bvh), bvh);
+       }
+
+       public void buildOptimizedBvh () {
+               gdxBulletJNI.btBvhTriangleMeshShape_buildOptimizedBvh(swigCPtr, this);
+       }
+
+       public boolean usesQuantizedAabbCompression () {
+               return gdxBulletJNI.btBvhTriangleMeshShape_usesQuantizedAabbCompression(swigCPtr, this);
+       }
+
+       public void setTriangleInfoMap (btTriangleInfoMap triangleInfoMap) {
+               gdxBulletJNI.btBvhTriangleMeshShape_setTriangleInfoMap(swigCPtr, this, btTriangleInfoMap.getCPtr(triangleInfoMap),
+                       triangleInfoMap);
+       }
+
+       public btTriangleInfoMap getTriangleInfoMap () {
+               long cPtr = gdxBulletJNI.btBvhTriangleMeshShape_getTriangleInfoMap__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTriangleInfoMap(cPtr, false);
+       }
+
+       public void serializeSingleBvh (SWIGTYPE_p_btSerializer serializer) {
+               gdxBulletJNI.btBvhTriangleMeshShape_serializeSingleBvh(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
+
+       public void serializeSingleTriangleInfoMap (SWIGTYPE_p_btSerializer serializer) {
+               gdxBulletJNI.btBvhTriangleMeshShape_serializeSingleTriangleInfoMap(swigCPtr, this,
+                       SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
 
 }
index 94f4fc7..1237fad 100644 (file)
@@ -8,51 +8,47 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCapsuleShape extends btConvexInternalShape {
-  private long swigCPtr;
-
-  protected btCapsuleShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCapsuleShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCapsuleShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCapsuleShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btCapsuleShape(float radius, float height) {
-    this(gdxBulletJNI.new_btCapsuleShape__SWIG_1(radius, height), true);
-  }
-
-  public int getUpAxis() {
-    return gdxBulletJNI.btCapsuleShape_getUpAxis(swigCPtr, this);
-  }
-
-  public float getRadius() {
-    return gdxBulletJNI.btCapsuleShape_getRadius(swigCPtr, this);
-  }
-
-  public float getHalfHeight() {
-    return gdxBulletJNI.btCapsuleShape_getHalfHeight(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btCapsuleShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCapsuleShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCapsuleShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCapsuleShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btCapsuleShape (float radius, float height) {
+               this(gdxBulletJNI.new_btCapsuleShape__SWIG_1(radius, height), true);
+       }
+
+       public int getUpAxis () {
+               return gdxBulletJNI.btCapsuleShape_getUpAxis(swigCPtr, this);
+       }
+
+       public float getRadius () {
+               return gdxBulletJNI.btCapsuleShape_getRadius(swigCPtr, this);
+       }
+
+       public float getHalfHeight () {
+               return gdxBulletJNI.btCapsuleShape_getHalfHeight(swigCPtr, this);
+       }
 
 }
index 6a33b63..2ddafd2 100644 (file)
@@ -8,64 +8,61 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCapsuleShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btCapsuleShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btCapsuleShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btCapsuleShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btCapsuleShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCapsuleShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCapsuleShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setM_convexInternalShapeData(btConvexInternalShapeData value) {
-    gdxBulletJNI.btCapsuleShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value), value);
-  }
+       public void setM_convexInternalShapeData (btConvexInternalShapeData value) {
+               gdxBulletJNI.btCapsuleShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value),
+                       value);
+       }
 
-  public btConvexInternalShapeData getM_convexInternalShapeData() {
-    long cPtr = gdxBulletJNI.btCapsuleShapeData_m_convexInternalShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
-  }
+       public btConvexInternalShapeData getM_convexInternalShapeData () {
+               long cPtr = gdxBulletJNI.btCapsuleShapeData_m_convexInternalShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
+       }
 
-  public void setM_upAxis(int value) {
-    gdxBulletJNI.btCapsuleShapeData_m_upAxis_set(swigCPtr, this, value);
-  }
+       public void setM_upAxis (int value) {
+               gdxBulletJNI.btCapsuleShapeData_m_upAxis_set(swigCPtr, this, value);
+       }
 
-  public int getM_upAxis() {
-    return gdxBulletJNI.btCapsuleShapeData_m_upAxis_get(swigCPtr, this);
-  }
+       public int getM_upAxis () {
+               return gdxBulletJNI.btCapsuleShapeData_m_upAxis_get(swigCPtr, this);
+       }
 
-  public void setM_padding(String value) {
-    gdxBulletJNI.btCapsuleShapeData_m_padding_set(swigCPtr, this, value);
-  }
+       public void setM_padding (String value) {
+               gdxBulletJNI.btCapsuleShapeData_m_padding_set(swigCPtr, this, value);
+       }
 
-  public String getM_padding() {
-    return gdxBulletJNI.btCapsuleShapeData_m_padding_get(swigCPtr, this);
-  }
+       public String getM_padding () {
+               return gdxBulletJNI.btCapsuleShapeData_m_padding_get(swigCPtr, this);
+       }
 
-  public btCapsuleShapeData() {
-    this(gdxBulletJNI.new_btCapsuleShapeData(), true);
-  }
+       public btCapsuleShapeData () {
+               this(gdxBulletJNI.new_btCapsuleShapeData(), true);
+       }
 
 }
index e15dc67..c30cc7d 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCapsuleShapeX extends btCapsuleShape {
-  private long swigCPtr;
-
-  protected btCapsuleShapeX(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCapsuleShapeX_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCapsuleShapeX obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCapsuleShapeX(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btCapsuleShapeX(float radius, float height) {
-    this(gdxBulletJNI.new_btCapsuleShapeX(radius, height), true);
-  }
+       private long swigCPtr;
+
+       protected btCapsuleShapeX (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCapsuleShapeX_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCapsuleShapeX obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCapsuleShapeX(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btCapsuleShapeX (float radius, float height) {
+               this(gdxBulletJNI.new_btCapsuleShapeX(radius, height), true);
+       }
 
 }
index 0eb3455..3fb3eb8 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCapsuleShapeZ extends btCapsuleShape {
-  private long swigCPtr;
-
-  protected btCapsuleShapeZ(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCapsuleShapeZ_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCapsuleShapeZ obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCapsuleShapeZ(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btCapsuleShapeZ(float radius, float height) {
-    this(gdxBulletJNI.new_btCapsuleShapeZ(radius, height), true);
-  }
+       private long swigCPtr;
+
+       protected btCapsuleShapeZ (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCapsuleShapeZ_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCapsuleShapeZ obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCapsuleShapeZ(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btCapsuleShapeZ (float radius, float height) {
+               this(gdxBulletJNI.new_btCapsuleShapeZ(radius, height), true);
+       }
 
 }
index 64e8008..31f4c11 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCharIndexTripletData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCharIndexTripletData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCharIndexTripletData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCharIndexTripletData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_values(short[] value) {
-    gdxBulletJNI.btCharIndexTripletData_m_values_set(swigCPtr, this, value);
-  }
-
-  public short[] getM_values() {
-    return gdxBulletJNI.btCharIndexTripletData_m_values_get(swigCPtr, this);
-  }
-
-  public void setM_pad(char value) {
-    gdxBulletJNI.btCharIndexTripletData_m_pad_set(swigCPtr, this, value);
-  }
-
-  public char getM_pad() {
-    return gdxBulletJNI.btCharIndexTripletData_m_pad_get(swigCPtr, this);
-  }
-
-  public btCharIndexTripletData() {
-    this(gdxBulletJNI.new_btCharIndexTripletData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCharIndexTripletData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCharIndexTripletData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCharIndexTripletData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_values (short[] value) {
+               gdxBulletJNI.btCharIndexTripletData_m_values_set(swigCPtr, this, value);
+       }
+
+       public short[] getM_values () {
+               return gdxBulletJNI.btCharIndexTripletData_m_values_get(swigCPtr, this);
+       }
+
+       public void setM_pad (char value) {
+               gdxBulletJNI.btCharIndexTripletData_m_pad_set(swigCPtr, this, value);
+       }
+
+       public char getM_pad () {
+               return gdxBulletJNI.btCharIndexTripletData_m_pad_get(swigCPtr, this);
+       }
+
+       public btCharIndexTripletData () {
+               this(gdxBulletJNI.new_btCharIndexTripletData(), true);
+       }
 
 }
index 2fa42cd..ff5f18a 100644 (file)
@@ -9,70 +9,70 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCharacterControllerInterface extends btActionInterface {
-  private long swigCPtr;
-
-  protected btCharacterControllerInterface(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCharacterControllerInterface_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCharacterControllerInterface obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCharacterControllerInterface(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setWalkDirection(Vector3 walkDirection) {
-    gdxBulletJNI.btCharacterControllerInterface_setWalkDirection(swigCPtr, this, walkDirection);
-  }
-
-  public void setVelocityForTimeInterval(Vector3 velocity, float timeInterval) {
-    gdxBulletJNI.btCharacterControllerInterface_setVelocityForTimeInterval(swigCPtr, this, velocity, timeInterval);
-  }
-
-  public void reset() {
-    gdxBulletJNI.btCharacterControllerInterface_reset(swigCPtr, this);
-  }
-
-  public void warp(Vector3 origin) {
-    gdxBulletJNI.btCharacterControllerInterface_warp(swigCPtr, this, origin);
-  }
-
-  public void preStep(btCollisionWorld collisionWorld) {
-    gdxBulletJNI.btCharacterControllerInterface_preStep(swigCPtr, this, btCollisionWorld.getCPtr(collisionWorld), collisionWorld);
-  }
-
-  public void playerStep(btCollisionWorld collisionWorld, float dt) {
-    gdxBulletJNI.btCharacterControllerInterface_playerStep(swigCPtr, this, btCollisionWorld.getCPtr(collisionWorld), collisionWorld, dt);
-  }
-
-  public boolean canJump() {
-    return gdxBulletJNI.btCharacterControllerInterface_canJump(swigCPtr, this);
-  }
-
-  public void jump() {
-    gdxBulletJNI.btCharacterControllerInterface_jump(swigCPtr, this);
-  }
-
-  public boolean onGround() {
-    return gdxBulletJNI.btCharacterControllerInterface_onGround(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btCharacterControllerInterface (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCharacterControllerInterface_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCharacterControllerInterface obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCharacterControllerInterface(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setWalkDirection (Vector3 walkDirection) {
+               gdxBulletJNI.btCharacterControllerInterface_setWalkDirection(swigCPtr, this, walkDirection);
+       }
+
+       public void setVelocityForTimeInterval (Vector3 velocity, float timeInterval) {
+               gdxBulletJNI.btCharacterControllerInterface_setVelocityForTimeInterval(swigCPtr, this, velocity, timeInterval);
+       }
+
+       public void reset () {
+               gdxBulletJNI.btCharacterControllerInterface_reset(swigCPtr, this);
+       }
+
+       public void warp (Vector3 origin) {
+               gdxBulletJNI.btCharacterControllerInterface_warp(swigCPtr, this, origin);
+       }
+
+       public void preStep (btCollisionWorld collisionWorld) {
+               gdxBulletJNI.btCharacterControllerInterface_preStep(swigCPtr, this, btCollisionWorld.getCPtr(collisionWorld),
+                       collisionWorld);
+       }
+
+       public void playerStep (btCollisionWorld collisionWorld, float dt) {
+               gdxBulletJNI.btCharacterControllerInterface_playerStep(swigCPtr, this, btCollisionWorld.getCPtr(collisionWorld),
+                       collisionWorld, dt);
+       }
+
+       public boolean canJump () {
+               return gdxBulletJNI.btCharacterControllerInterface_canJump(swigCPtr, this);
+       }
+
+       public void jump () {
+               gdxBulletJNI.btCharacterControllerInterface_jump(swigCPtr, this);
+       }
+
+       public boolean onGround () {
+               return gdxBulletJNI.btCharacterControllerInterface_onGround(swigCPtr, this);
+       }
 
 }
index 9af1a33..f80f955 100644 (file)
@@ -8,47 +8,50 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionAlgorithm {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void processCollision(btCollisionObject body0, btCollisionObject body1, btDispatcherInfo dispatchInfo, btManifoldResult resultOut) {
-    gdxBulletJNI.btCollisionAlgorithm_processCollision(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btManifoldResult.getCPtr(resultOut), resultOut);
-  }
-
-  public float calculateTimeOfImpact(btCollisionObject body0, btCollisionObject body1, btDispatcherInfo dispatchInfo, btManifoldResult resultOut) {
-    return gdxBulletJNI.btCollisionAlgorithm_calculateTimeOfImpact(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btManifoldResult.getCPtr(resultOut), resultOut);
-  }
-
-  public void getAllContactManifolds(SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t manifoldArray) {
-    gdxBulletJNI.btCollisionAlgorithm_getAllContactManifolds(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t.getCPtr(manifoldArray));
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void processCollision (btCollisionObject body0, btCollisionObject body1, btDispatcherInfo dispatchInfo,
+               btManifoldResult resultOut) {
+               gdxBulletJNI.btCollisionAlgorithm_processCollision(swigCPtr, this, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo,
+                       btManifoldResult.getCPtr(resultOut), resultOut);
+       }
+
+       public float calculateTimeOfImpact (btCollisionObject body0, btCollisionObject body1, btDispatcherInfo dispatchInfo,
+               btManifoldResult resultOut) {
+               return gdxBulletJNI.btCollisionAlgorithm_calculateTimeOfImpact(swigCPtr, this, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo,
+                       btManifoldResult.getCPtr(resultOut), resultOut);
+       }
+
+       public void getAllContactManifolds (SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t manifoldArray) {
+               gdxBulletJNI.btCollisionAlgorithm_getAllContactManifolds(swigCPtr, this,
+                       SWIGTYPE_p_btAlignedObjectArrayT_btPersistentManifold_p_t.getCPtr(manifoldArray));
+       }
 
 }
index 8003baf..ee77411 100644 (file)
@@ -8,61 +8,59 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionAlgorithmConstructionInfo {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btCollisionAlgorithmConstructionInfo(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btCollisionAlgorithmConstructionInfo (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btCollisionAlgorithmConstructionInfo obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btCollisionAlgorithmConstructionInfo obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionAlgorithmConstructionInfo(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionAlgorithmConstructionInfo(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public btCollisionAlgorithmConstructionInfo() {
-    this(gdxBulletJNI.new_btCollisionAlgorithmConstructionInfo__SWIG_0(), true);
-  }
+       public btCollisionAlgorithmConstructionInfo () {
+               this(gdxBulletJNI.new_btCollisionAlgorithmConstructionInfo__SWIG_0(), true);
+       }
 
-  public btCollisionAlgorithmConstructionInfo(btDispatcher dispatcher, int temp) {
-    this(gdxBulletJNI.new_btCollisionAlgorithmConstructionInfo__SWIG_1(btDispatcher.getCPtr(dispatcher), dispatcher, temp), true);
-  }
+       public btCollisionAlgorithmConstructionInfo (btDispatcher dispatcher, int temp) {
+               this(gdxBulletJNI.new_btCollisionAlgorithmConstructionInfo__SWIG_1(btDispatcher.getCPtr(dispatcher), dispatcher, temp),
+                       true);
+       }
 
-  public void setM_dispatcher1(btDispatcher value) {
-    gdxBulletJNI.btCollisionAlgorithmConstructionInfo_m_dispatcher1_set(swigCPtr, this, btDispatcher.getCPtr(value), value);
-  }
+       public void setM_dispatcher1 (btDispatcher value) {
+               gdxBulletJNI.btCollisionAlgorithmConstructionInfo_m_dispatcher1_set(swigCPtr, this, btDispatcher.getCPtr(value), value);
+       }
 
-  public btDispatcher getM_dispatcher1() {
-    long cPtr = gdxBulletJNI.btCollisionAlgorithmConstructionInfo_m_dispatcher1_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
-  }
+       public btDispatcher getM_dispatcher1 () {
+               long cPtr = gdxBulletJNI.btCollisionAlgorithmConstructionInfo_m_dispatcher1_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
+       }
 
-  public void setM_manifold(btPersistentManifold value) {
-    gdxBulletJNI.btCollisionAlgorithmConstructionInfo_m_manifold_set(swigCPtr, this, btPersistentManifold.getCPtr(value), value);
-  }
+       public void setM_manifold (btPersistentManifold value) {
+               gdxBulletJNI
+                       .btCollisionAlgorithmConstructionInfo_m_manifold_set(swigCPtr, this, btPersistentManifold.getCPtr(value), value);
+       }
 
-  public btPersistentManifold getM_manifold() {
-    long cPtr = gdxBulletJNI.btCollisionAlgorithmConstructionInfo_m_manifold_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
+       public btPersistentManifold getM_manifold () {
+               long cPtr = gdxBulletJNI.btCollisionAlgorithmConstructionInfo_m_manifold_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
 
 }
index 067563f..6854687 100644 (file)
@@ -8,52 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionAlgorithmCreateFunc {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionAlgorithmCreateFunc(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionAlgorithmCreateFunc obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionAlgorithmCreateFunc(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_swapped(boolean value) {
-    gdxBulletJNI.btCollisionAlgorithmCreateFunc_m_swapped_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_swapped() {
-    return gdxBulletJNI.btCollisionAlgorithmCreateFunc_m_swapped_get(swigCPtr, this);
-  }
-
-  public btCollisionAlgorithmCreateFunc() {
-    this(gdxBulletJNI.new_btCollisionAlgorithmCreateFunc(), true);
-  }
-
-  public btCollisionAlgorithm CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo arg0, btCollisionObject body0, btCollisionObject body1) {
-    long cPtr = gdxBulletJNI.btCollisionAlgorithmCreateFunc_CreateCollisionAlgorithm(swigCPtr, this, btCollisionAlgorithmConstructionInfo.getCPtr(arg0), arg0, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1);
-    return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionAlgorithmCreateFunc (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionAlgorithmCreateFunc obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionAlgorithmCreateFunc(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_swapped (boolean value) {
+               gdxBulletJNI.btCollisionAlgorithmCreateFunc_m_swapped_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_swapped () {
+               return gdxBulletJNI.btCollisionAlgorithmCreateFunc_m_swapped_get(swigCPtr, this);
+       }
+
+       public btCollisionAlgorithmCreateFunc () {
+               this(gdxBulletJNI.new_btCollisionAlgorithmCreateFunc(), true);
+       }
+
+       public btCollisionAlgorithm CreateCollisionAlgorithm (btCollisionAlgorithmConstructionInfo arg0, btCollisionObject body0,
+               btCollisionObject body1) {
+               long cPtr = gdxBulletJNI.btCollisionAlgorithmCreateFunc_CreateCollisionAlgorithm(swigCPtr, this,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(arg0), arg0, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1);
+               return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
+       }
 
 }
index 027edfe..c04b973 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionConfiguration {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionConfiguration(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionConfiguration obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionConfiguration(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btPoolAllocator getPersistentManifoldPool() {
-    long cPtr = gdxBulletJNI.btCollisionConfiguration_getPersistentManifoldPool(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
-  }
-
-  public btPoolAllocator getCollisionAlgorithmPool() {
-    long cPtr = gdxBulletJNI.btCollisionConfiguration_getCollisionAlgorithmPool(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
-  }
-
-  public btStackAlloc getStackAllocator() {
-    long cPtr = gdxBulletJNI.btCollisionConfiguration_getStackAllocator(swigCPtr, this);
-    return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
-  }
-
-  public btCollisionAlgorithmCreateFunc getCollisionAlgorithmCreateFunc(int proxyType0, int proxyType1) {
-    long cPtr = gdxBulletJNI.btCollisionConfiguration_getCollisionAlgorithmCreateFunc(swigCPtr, this, proxyType0, proxyType1);
-    return (cPtr == 0) ? null : new btCollisionAlgorithmCreateFunc(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionConfiguration (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionConfiguration obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionConfiguration(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btPoolAllocator getPersistentManifoldPool () {
+               long cPtr = gdxBulletJNI.btCollisionConfiguration_getPersistentManifoldPool(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
+       }
+
+       public btPoolAllocator getCollisionAlgorithmPool () {
+               long cPtr = gdxBulletJNI.btCollisionConfiguration_getCollisionAlgorithmPool(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
+       }
+
+       public btStackAlloc getStackAllocator () {
+               long cPtr = gdxBulletJNI.btCollisionConfiguration_getStackAllocator(swigCPtr, this);
+               return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
+       }
+
+       public btCollisionAlgorithmCreateFunc getCollisionAlgorithmCreateFunc (int proxyType0, int proxyType1) {
+               long cPtr = gdxBulletJNI.btCollisionConfiguration_getCollisionAlgorithmCreateFunc(swigCPtr, this, proxyType0, proxyType1);
+               return (cPtr == 0) ? null : new btCollisionAlgorithmCreateFunc(cPtr, false);
+       }
 
 }
index 4235f7d..11c73fd 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionDispatcher extends btDispatcher {
-  private long swigCPtr;
-
-  protected btCollisionDispatcher(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCollisionDispatcher_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionDispatcher obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionDispatcher(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public int getDispatcherFlags() {
-    return gdxBulletJNI.btCollisionDispatcher_getDispatcherFlags(swigCPtr, this);
-  }
-
-  public void setDispatcherFlags(int flags) {
-    gdxBulletJNI.btCollisionDispatcher_setDispatcherFlags(swigCPtr, this, flags);
-  }
-
-  public void registerCollisionCreateFunc(int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc createFunc) {
-    gdxBulletJNI.btCollisionDispatcher_registerCollisionCreateFunc(swigCPtr, this, proxyType0, proxyType1, btCollisionAlgorithmCreateFunc.getCPtr(createFunc), createFunc);
-  }
-
-  public btPersistentManifold getManifoldByIndexInternal(int index) {
-    long cPtr = gdxBulletJNI.btCollisionDispatcher_getManifoldByIndexInternal__SWIG_0(swigCPtr, this, index);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
-
-  public btCollisionDispatcher(btCollisionConfiguration collisionConfiguration) {
-    this(gdxBulletJNI.new_btCollisionDispatcher(btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
-  }
-
-  public btCollisionAlgorithm findAlgorithm(btCollisionObject body0, btCollisionObject body1, btPersistentManifold sharedManifold) {
-    long cPtr = gdxBulletJNI.btCollisionDispatcher_findAlgorithm__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, btPersistentManifold.getCPtr(sharedManifold), sharedManifold);
-    return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
-  }
-
-  public btCollisionAlgorithm findAlgorithm(btCollisionObject body0, btCollisionObject body1) {
-    long cPtr = gdxBulletJNI.btCollisionDispatcher_findAlgorithm__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1);
-    return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
-  }
-
-  public void setNearCallback(SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void nearCallback) {
-    gdxBulletJNI.btCollisionDispatcher_setNearCallback(swigCPtr, this, SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void.getCPtr(nearCallback));
-  }
-
-  public SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void getNearCallback() {
-    long cPtr = gdxBulletJNI.btCollisionDispatcher_getNearCallback(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void(cPtr, false);
-  }
-
-  public static void defaultNearCallback(btBroadphasePair collisionPair, btCollisionDispatcher dispatcher, btDispatcherInfo dispatchInfo) {
-    gdxBulletJNI.btCollisionDispatcher_defaultNearCallback(btBroadphasePair.getCPtr(collisionPair), collisionPair, btCollisionDispatcher.getCPtr(dispatcher), dispatcher, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo);
-  }
-
-  public btCollisionConfiguration getCollisionConfiguration() {
-    long cPtr = gdxBulletJNI.btCollisionDispatcher_getCollisionConfiguration__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionConfiguration(cPtr, false);
-  }
-
-  public void setCollisionConfiguration(btCollisionConfiguration config) {
-    gdxBulletJNI.btCollisionDispatcher_setCollisionConfiguration(swigCPtr, this, btCollisionConfiguration.getCPtr(config), config);
-  }
-
-  public btPoolAllocator getInternalManifoldPool() {
-    long cPtr = gdxBulletJNI.btCollisionDispatcher_getInternalManifoldPool__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
-  }
-
-  public final static class DispatcherFlags {
-    public final static int CD_STATIC_STATIC_REPORTED = 1;
-    public final static int CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2;
-    public final static int CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION = 4;
-  }
+       private long swigCPtr;
+
+       protected btCollisionDispatcher (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCollisionDispatcher_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionDispatcher obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionDispatcher(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public int getDispatcherFlags () {
+               return gdxBulletJNI.btCollisionDispatcher_getDispatcherFlags(swigCPtr, this);
+       }
+
+       public void setDispatcherFlags (int flags) {
+               gdxBulletJNI.btCollisionDispatcher_setDispatcherFlags(swigCPtr, this, flags);
+       }
+
+       public void registerCollisionCreateFunc (int proxyType0, int proxyType1, btCollisionAlgorithmCreateFunc createFunc) {
+               gdxBulletJNI.btCollisionDispatcher_registerCollisionCreateFunc(swigCPtr, this, proxyType0, proxyType1,
+                       btCollisionAlgorithmCreateFunc.getCPtr(createFunc), createFunc);
+       }
+
+       public btPersistentManifold getManifoldByIndexInternal (int index) {
+               long cPtr = gdxBulletJNI.btCollisionDispatcher_getManifoldByIndexInternal__SWIG_0(swigCPtr, this, index);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
+
+       public btCollisionDispatcher (btCollisionConfiguration collisionConfiguration) {
+               this(gdxBulletJNI.new_btCollisionDispatcher(btCollisionConfiguration.getCPtr(collisionConfiguration),
+                       collisionConfiguration), true);
+       }
+
+       public btCollisionAlgorithm findAlgorithm (btCollisionObject body0, btCollisionObject body1,
+               btPersistentManifold sharedManifold) {
+               long cPtr = gdxBulletJNI.btCollisionDispatcher_findAlgorithm__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(body0),
+                       body0, btCollisionObject.getCPtr(body1), body1, btPersistentManifold.getCPtr(sharedManifold), sharedManifold);
+               return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
+       }
+
+       public btCollisionAlgorithm findAlgorithm (btCollisionObject body0, btCollisionObject body1) {
+               long cPtr = gdxBulletJNI.btCollisionDispatcher_findAlgorithm__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(body0),
+                       body0, btCollisionObject.getCPtr(body1), body1);
+               return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
+       }
+
+       public void setNearCallback (
+               SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void nearCallback) {
+               gdxBulletJNI.btCollisionDispatcher_setNearCallback(swigCPtr, this,
+                       SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void.getCPtr(nearCallback));
+       }
+
+       public SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void getNearCallback () {
+               long cPtr = gdxBulletJNI.btCollisionDispatcher_getNearCallback(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_f_r_btBroadphasePair_r_btCollisionDispatcher_r_q_const__btDispatcherInfo__void(
+                       cPtr, false);
+       }
+
+       public static void defaultNearCallback (btBroadphasePair collisionPair, btCollisionDispatcher dispatcher,
+               btDispatcherInfo dispatchInfo) {
+               gdxBulletJNI.btCollisionDispatcher_defaultNearCallback(btBroadphasePair.getCPtr(collisionPair), collisionPair,
+                       btCollisionDispatcher.getCPtr(dispatcher), dispatcher, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo);
+       }
+
+       public btCollisionConfiguration getCollisionConfiguration () {
+               long cPtr = gdxBulletJNI.btCollisionDispatcher_getCollisionConfiguration__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionConfiguration(cPtr, false);
+       }
+
+       public void setCollisionConfiguration (btCollisionConfiguration config) {
+               gdxBulletJNI.btCollisionDispatcher_setCollisionConfiguration(swigCPtr, this, btCollisionConfiguration.getCPtr(config),
+                       config);
+       }
+
+       public btPoolAllocator getInternalManifoldPool () {
+               long cPtr = gdxBulletJNI.btCollisionDispatcher_getInternalManifoldPool__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
+       }
+
+       public final static class DispatcherFlags {
+               public final static int CD_STATIC_STATIC_REPORTED = 1;
+               public final static int CD_USE_RELATIVE_CONTACT_BREAKING_THRESHOLD = 2;
+               public final static int CD_DISABLE_CONTACTPOOL_DYNAMIC_ALLOCATION = 4;
+       }
 
 }
index 4462f32..598ef3b 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCollisionObject {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionObject(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionObject obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionObject(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public boolean mergesSimulationIslands() {
-    return gdxBulletJNI.btCollisionObject_mergesSimulationIslands(swigCPtr, this);
-  }
-
-  public Vector3 getAnisotropicFriction() {
-       return gdxBulletJNI.btCollisionObject_getAnisotropicFriction__SWIG_0(swigCPtr, this);
-}
-
-  public void setAnisotropicFriction(Vector3 anisotropicFriction) {
-    gdxBulletJNI.btCollisionObject_setAnisotropicFriction(swigCPtr, this, anisotropicFriction);
-  }
-
-  public boolean hasAnisotropicFriction() {
-    return gdxBulletJNI.btCollisionObject_hasAnisotropicFriction(swigCPtr, this);
-  }
-
-  public void setContactProcessingThreshold(float contactProcessingThreshold) {
-    gdxBulletJNI.btCollisionObject_setContactProcessingThreshold(swigCPtr, this, contactProcessingThreshold);
-  }
-
-  public float getContactProcessingThreshold() {
-    return gdxBulletJNI.btCollisionObject_getContactProcessingThreshold(swigCPtr, this);
-  }
-
-  public boolean isStaticObject() {
-    return gdxBulletJNI.btCollisionObject_isStaticObject(swigCPtr, this);
-  }
-
-  public boolean isKinematicObject() {
-    return gdxBulletJNI.btCollisionObject_isKinematicObject(swigCPtr, this);
-  }
-
-  public boolean isStaticOrKinematicObject() {
-    return gdxBulletJNI.btCollisionObject_isStaticOrKinematicObject(swigCPtr, this);
-  }
-
-  public boolean hasContactResponse() {
-    return gdxBulletJNI.btCollisionObject_hasContactResponse(swigCPtr, this);
-  }
-
-  public btCollisionObject() {
-    this(gdxBulletJNI.new_btCollisionObject(), true);
-  }
-
-  public void setCollisionShape(btCollisionShape collisionShape) {
-    gdxBulletJNI.btCollisionObject_setCollisionShape(swigCPtr, this, btCollisionShape.getCPtr(collisionShape), collisionShape);
-  }
-
-  public btCollisionShape getCollisionShape() {
-    long cPtr = gdxBulletJNI.btCollisionObject_getCollisionShape__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
-  }
-
-  public btCollisionShape getRootCollisionShape() {
-    long cPtr = gdxBulletJNI.btCollisionObject_getRootCollisionShape__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
-  }
-
-  public void internalSetTemporaryCollisionShape(btCollisionShape collisionShape) {
-    gdxBulletJNI.btCollisionObject_internalSetTemporaryCollisionShape(swigCPtr, this, btCollisionShape.getCPtr(collisionShape), collisionShape);
-  }
-
-  public SWIGTYPE_p_void internalGetExtensionPointer() {
-    long cPtr = gdxBulletJNI.btCollisionObject_internalGetExtensionPointer(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void internalSetExtensionPointer(SWIGTYPE_p_void pointer) {
-    gdxBulletJNI.btCollisionObject_internalSetExtensionPointer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(pointer));
-  }
-
-  public int getActivationState() {
-    return gdxBulletJNI.btCollisionObject_getActivationState(swigCPtr, this);
-  }
-
-  public void setActivationState(int newState) {
-    gdxBulletJNI.btCollisionObject_setActivationState(swigCPtr, this, newState);
-  }
-
-  public void setDeactivationTime(float time) {
-    gdxBulletJNI.btCollisionObject_setDeactivationTime(swigCPtr, this, time);
-  }
-
-  public float getDeactivationTime() {
-    return gdxBulletJNI.btCollisionObject_getDeactivationTime(swigCPtr, this);
-  }
-
-  public void forceActivationState(int newState) {
-    gdxBulletJNI.btCollisionObject_forceActivationState(swigCPtr, this, newState);
-  }
-
-  public void activate(boolean forceActivation) {
-    gdxBulletJNI.btCollisionObject_activate__SWIG_0(swigCPtr, this, forceActivation);
-  }
-
-  public void activate() {
-    gdxBulletJNI.btCollisionObject_activate__SWIG_1(swigCPtr, this);
-  }
-
-  public boolean isActive() {
-    return gdxBulletJNI.btCollisionObject_isActive(swigCPtr, this);
-  }
-
-  public void setRestitution(float rest) {
-    gdxBulletJNI.btCollisionObject_setRestitution(swigCPtr, this, rest);
-  }
-
-  public float getRestitution() {
-    return gdxBulletJNI.btCollisionObject_getRestitution(swigCPtr, this);
-  }
-
-  public void setFriction(float frict) {
-    gdxBulletJNI.btCollisionObject_setFriction(swigCPtr, this, frict);
-  }
-
-  public float getFriction() {
-    return gdxBulletJNI.btCollisionObject_getFriction(swigCPtr, this);
-  }
-
-  public int getInternalType() {
-    return gdxBulletJNI.btCollisionObject_getInternalType(swigCPtr, this);
-  }
-
-  public btTransform getWorldTransform() {
-    return new btTransform(gdxBulletJNI.btCollisionObject_getWorldTransform__SWIG_0(swigCPtr, this), false);
-  }
-
-  public void setWorldTransform(btTransform worldTrans) {
-    gdxBulletJNI.btCollisionObject_setWorldTransform(swigCPtr, this, btTransform.getCPtr(worldTrans), worldTrans);
-  }
-
-  public btBroadphaseProxy getBroadphaseHandle() {
-    long cPtr = gdxBulletJNI.btCollisionObject_getBroadphaseHandle__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
-  }
-
-  public void setBroadphaseHandle(btBroadphaseProxy handle) {
-    gdxBulletJNI.btCollisionObject_setBroadphaseHandle(swigCPtr, this, btBroadphaseProxy.getCPtr(handle), handle);
-  }
-
-  public btTransform getInterpolationWorldTransform() {
-    return new btTransform(gdxBulletJNI.btCollisionObject_getInterpolationWorldTransform__SWIG_0(swigCPtr, this), false);
-  }
-
-  public void setInterpolationWorldTransform(btTransform trans) {
-    gdxBulletJNI.btCollisionObject_setInterpolationWorldTransform(swigCPtr, this, btTransform.getCPtr(trans), trans);
-  }
-
-  public void setInterpolationLinearVelocity(Vector3 linvel) {
-    gdxBulletJNI.btCollisionObject_setInterpolationLinearVelocity(swigCPtr, this, linvel);
-  }
-
-  public void setInterpolationAngularVelocity(Vector3 angvel) {
-    gdxBulletJNI.btCollisionObject_setInterpolationAngularVelocity(swigCPtr, this, angvel);
-  }
-
-  public Vector3 getInterpolationLinearVelocity() {
-       return gdxBulletJNI.btCollisionObject_getInterpolationLinearVelocity__SWIG_0(swigCPtr, this);
-}
-
-  public Vector3 getInterpolationAngularVelocity() {
-       return gdxBulletJNI.btCollisionObject_getInterpolationAngularVelocity__SWIG_0(swigCPtr, this);
-}
-
-  public int getIslandTag() {
-    return gdxBulletJNI.btCollisionObject_getIslandTag(swigCPtr, this);
-  }
-
-  public void setIslandTag(int tag) {
-    gdxBulletJNI.btCollisionObject_setIslandTag(swigCPtr, this, tag);
-  }
-
-  public int getCompanionId() {
-    return gdxBulletJNI.btCollisionObject_getCompanionId(swigCPtr, this);
-  }
-
-  public void setCompanionId(int id) {
-    gdxBulletJNI.btCollisionObject_setCompanionId(swigCPtr, this, id);
-  }
-
-  public float getHitFraction() {
-    return gdxBulletJNI.btCollisionObject_getHitFraction(swigCPtr, this);
-  }
-
-  public void setHitFraction(float hitFraction) {
-    gdxBulletJNI.btCollisionObject_setHitFraction(swigCPtr, this, hitFraction);
-  }
-
-  public int getCollisionFlags() {
-    return gdxBulletJNI.btCollisionObject_getCollisionFlags(swigCPtr, this);
-  }
-
-  public void setCollisionFlags(int flags) {
-    gdxBulletJNI.btCollisionObject_setCollisionFlags(swigCPtr, this, flags);
-  }
-
-  public float getCcdSweptSphereRadius() {
-    return gdxBulletJNI.btCollisionObject_getCcdSweptSphereRadius(swigCPtr, this);
-  }
-
-  public void setCcdSweptSphereRadius(float radius) {
-    gdxBulletJNI.btCollisionObject_setCcdSweptSphereRadius(swigCPtr, this, radius);
-  }
-
-  public float getCcdMotionThreshold() {
-    return gdxBulletJNI.btCollisionObject_getCcdMotionThreshold(swigCPtr, this);
-  }
-
-  public float getCcdSquareMotionThreshold() {
-    return gdxBulletJNI.btCollisionObject_getCcdSquareMotionThreshold(swigCPtr, this);
-  }
-
-  public void setCcdMotionThreshold(float ccdMotionThreshold) {
-    gdxBulletJNI.btCollisionObject_setCcdMotionThreshold(swigCPtr, this, ccdMotionThreshold);
-  }
-
-  public SWIGTYPE_p_void getUserPointer() {
-    long cPtr = gdxBulletJNI.btCollisionObject_getUserPointer(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setUserPointer(SWIGTYPE_p_void userPointer) {
-    gdxBulletJNI.btCollisionObject_setUserPointer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(userPointer));
-  }
-
-  public boolean checkCollideWith(btCollisionObject co) {
-    return gdxBulletJNI.btCollisionObject_checkCollideWith(swigCPtr, this, btCollisionObject.getCPtr(co), co);
-  }
-
-  public int calculateSerializeBufferSize() {
-    return gdxBulletJNI.btCollisionObject_calculateSerializeBufferSize(swigCPtr, this);
-  }
-
-  public String serialize(SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
-    return gdxBulletJNI.btCollisionObject_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer), SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
-
-  public void serializeSingleObject(SWIGTYPE_p_btSerializer serializer) {
-    gdxBulletJNI.btCollisionObject_serializeSingleObject(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
-
-  public void getAnisotropicFriction(Vector3 out) {
-    gdxBulletJNI.btCollisionObject_getAnisotropicFriction__SWIG_1(swigCPtr, this, out);
-  }
-
-  public void getWorldTransform(btTransform out) {
-    gdxBulletJNI.btCollisionObject_getWorldTransform__SWIG_2(swigCPtr, this, btTransform.getCPtr(out), out);
-  }
-
-  public void getInterpolationWorldTransform(btTransform out) {
-    gdxBulletJNI.btCollisionObject_getInterpolationWorldTransform__SWIG_2(swigCPtr, this, btTransform.getCPtr(out), out);
-  }
-
-  public void getInterpolationLinearVelocity(Vector3 out) {
-    gdxBulletJNI.btCollisionObject_getInterpolationLinearVelocity__SWIG_1(swigCPtr, this, out);
-  }
-
-  public void getInterpolationAngularVelocity(Vector3 out) {
-    gdxBulletJNI.btCollisionObject_getInterpolationAngularVelocity__SWIG_1(swigCPtr, this, out);
-  }
-
-  public final static class CollisionFlags {
-    public final static int CF_STATIC_OBJECT = 1;
-    public final static int CF_KINEMATIC_OBJECT = 2;
-    public final static int CF_NO_CONTACT_RESPONSE = 4;
-    public final static int CF_CUSTOM_MATERIAL_CALLBACK = 8;
-    public final static int CF_CHARACTER_OBJECT = 16;
-    public final static int CF_DISABLE_VISUALIZE_OBJECT = 32;
-    public final static int CF_DISABLE_SPU_COLLISION_PROCESSING = 64;
-  }
-
-  public final static class CollisionObjectTypes {
-    public final static int CO_COLLISION_OBJECT = 1;
-    public final static int CO_RIGID_BODY = 2;
-    public final static int CO_GHOST_OBJECT = 4;
-    public final static int CO_SOFT_BODY = 8;
-    public final static int CO_HF_FLUID = 16;
-    public final static int CO_USER_TYPE = 32;
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionObject (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionObject obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionObject(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public boolean mergesSimulationIslands () {
+               return gdxBulletJNI.btCollisionObject_mergesSimulationIslands(swigCPtr, this);
+       }
+
+       public Vector3 getAnisotropicFriction () {
+               return gdxBulletJNI.btCollisionObject_getAnisotropicFriction__SWIG_0(swigCPtr, this);
+       }
+
+       public void setAnisotropicFriction (Vector3 anisotropicFriction) {
+               gdxBulletJNI.btCollisionObject_setAnisotropicFriction(swigCPtr, this, anisotropicFriction);
+       }
+
+       public boolean hasAnisotropicFriction () {
+               return gdxBulletJNI.btCollisionObject_hasAnisotropicFriction(swigCPtr, this);
+       }
+
+       public void setContactProcessingThreshold (float contactProcessingThreshold) {
+               gdxBulletJNI.btCollisionObject_setContactProcessingThreshold(swigCPtr, this, contactProcessingThreshold);
+       }
+
+       public float getContactProcessingThreshold () {
+               return gdxBulletJNI.btCollisionObject_getContactProcessingThreshold(swigCPtr, this);
+       }
+
+       public boolean isStaticObject () {
+               return gdxBulletJNI.btCollisionObject_isStaticObject(swigCPtr, this);
+       }
+
+       public boolean isKinematicObject () {
+               return gdxBulletJNI.btCollisionObject_isKinematicObject(swigCPtr, this);
+       }
+
+       public boolean isStaticOrKinematicObject () {
+               return gdxBulletJNI.btCollisionObject_isStaticOrKinematicObject(swigCPtr, this);
+       }
+
+       public boolean hasContactResponse () {
+               return gdxBulletJNI.btCollisionObject_hasContactResponse(swigCPtr, this);
+       }
+
+       public btCollisionObject () {
+               this(gdxBulletJNI.new_btCollisionObject(), true);
+       }
+
+       public void setCollisionShape (btCollisionShape collisionShape) {
+               gdxBulletJNI.btCollisionObject_setCollisionShape(swigCPtr, this, btCollisionShape.getCPtr(collisionShape), collisionShape);
+       }
+
+       public btCollisionShape getCollisionShape () {
+               long cPtr = gdxBulletJNI.btCollisionObject_getCollisionShape__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
+       }
+
+       public btCollisionShape getRootCollisionShape () {
+               long cPtr = gdxBulletJNI.btCollisionObject_getRootCollisionShape__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
+       }
+
+       public void internalSetTemporaryCollisionShape (btCollisionShape collisionShape) {
+               gdxBulletJNI.btCollisionObject_internalSetTemporaryCollisionShape(swigCPtr, this, btCollisionShape.getCPtr(collisionShape),
+                       collisionShape);
+       }
+
+       public SWIGTYPE_p_void internalGetExtensionPointer () {
+               long cPtr = gdxBulletJNI.btCollisionObject_internalGetExtensionPointer(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void internalSetExtensionPointer (SWIGTYPE_p_void pointer) {
+               gdxBulletJNI.btCollisionObject_internalSetExtensionPointer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(pointer));
+       }
+
+       public int getActivationState () {
+               return gdxBulletJNI.btCollisionObject_getActivationState(swigCPtr, this);
+       }
+
+       public void setActivationState (int newState) {
+               gdxBulletJNI.btCollisionObject_setActivationState(swigCPtr, this, newState);
+       }
+
+       public void setDeactivationTime (float time) {
+               gdxBulletJNI.btCollisionObject_setDeactivationTime(swigCPtr, this, time);
+       }
+
+       public float getDeactivationTime () {
+               return gdxBulletJNI.btCollisionObject_getDeactivationTime(swigCPtr, this);
+       }
+
+       public void forceActivationState (int newState) {
+               gdxBulletJNI.btCollisionObject_forceActivationState(swigCPtr, this, newState);
+       }
+
+       public void activate (boolean forceActivation) {
+               gdxBulletJNI.btCollisionObject_activate__SWIG_0(swigCPtr, this, forceActivation);
+       }
+
+       public void activate () {
+               gdxBulletJNI.btCollisionObject_activate__SWIG_1(swigCPtr, this);
+       }
+
+       public boolean isActive () {
+               return gdxBulletJNI.btCollisionObject_isActive(swigCPtr, this);
+       }
+
+       public void setRestitution (float rest) {
+               gdxBulletJNI.btCollisionObject_setRestitution(swigCPtr, this, rest);
+       }
+
+       public float getRestitution () {
+               return gdxBulletJNI.btCollisionObject_getRestitution(swigCPtr, this);
+       }
+
+       public void setFriction (float frict) {
+               gdxBulletJNI.btCollisionObject_setFriction(swigCPtr, this, frict);
+       }
+
+       public float getFriction () {
+               return gdxBulletJNI.btCollisionObject_getFriction(swigCPtr, this);
+       }
+
+       public int getInternalType () {
+               return gdxBulletJNI.btCollisionObject_getInternalType(swigCPtr, this);
+       }
+
+       public btTransform getWorldTransform () {
+               return new btTransform(gdxBulletJNI.btCollisionObject_getWorldTransform__SWIG_0(swigCPtr, this), false);
+       }
+
+       public void setWorldTransform (btTransform worldTrans) {
+               gdxBulletJNI.btCollisionObject_setWorldTransform(swigCPtr, this, btTransform.getCPtr(worldTrans), worldTrans);
+       }
+
+       public btBroadphaseProxy getBroadphaseHandle () {
+               long cPtr = gdxBulletJNI.btCollisionObject_getBroadphaseHandle__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
+       }
+
+       public void setBroadphaseHandle (btBroadphaseProxy handle) {
+               gdxBulletJNI.btCollisionObject_setBroadphaseHandle(swigCPtr, this, btBroadphaseProxy.getCPtr(handle), handle);
+       }
+
+       public btTransform getInterpolationWorldTransform () {
+               return new btTransform(gdxBulletJNI.btCollisionObject_getInterpolationWorldTransform__SWIG_0(swigCPtr, this), false);
+       }
+
+       public void setInterpolationWorldTransform (btTransform trans) {
+               gdxBulletJNI.btCollisionObject_setInterpolationWorldTransform(swigCPtr, this, btTransform.getCPtr(trans), trans);
+       }
+
+       public void setInterpolationLinearVelocity (Vector3 linvel) {
+               gdxBulletJNI.btCollisionObject_setInterpolationLinearVelocity(swigCPtr, this, linvel);
+       }
+
+       public void setInterpolationAngularVelocity (Vector3 angvel) {
+               gdxBulletJNI.btCollisionObject_setInterpolationAngularVelocity(swigCPtr, this, angvel);
+       }
+
+       public Vector3 getInterpolationLinearVelocity () {
+               return gdxBulletJNI.btCollisionObject_getInterpolationLinearVelocity__SWIG_0(swigCPtr, this);
+       }
+
+       public Vector3 getInterpolationAngularVelocity () {
+               return gdxBulletJNI.btCollisionObject_getInterpolationAngularVelocity__SWIG_0(swigCPtr, this);
+       }
+
+       public int getIslandTag () {
+               return gdxBulletJNI.btCollisionObject_getIslandTag(swigCPtr, this);
+       }
+
+       public void setIslandTag (int tag) {
+               gdxBulletJNI.btCollisionObject_setIslandTag(swigCPtr, this, tag);
+       }
+
+       public int getCompanionId () {
+               return gdxBulletJNI.btCollisionObject_getCompanionId(swigCPtr, this);
+       }
+
+       public void setCompanionId (int id) {
+               gdxBulletJNI.btCollisionObject_setCompanionId(swigCPtr, this, id);
+       }
+
+       public float getHitFraction () {
+               return gdxBulletJNI.btCollisionObject_getHitFraction(swigCPtr, this);
+       }
+
+       public void setHitFraction (float hitFraction) {
+               gdxBulletJNI.btCollisionObject_setHitFraction(swigCPtr, this, hitFraction);
+       }
+
+       public int getCollisionFlags () {
+               return gdxBulletJNI.btCollisionObject_getCollisionFlags(swigCPtr, this);
+       }
+
+       public void setCollisionFlags (int flags) {
+               gdxBulletJNI.btCollisionObject_setCollisionFlags(swigCPtr, this, flags);
+       }
+
+       public float getCcdSweptSphereRadius () {
+               return gdxBulletJNI.btCollisionObject_getCcdSweptSphereRadius(swigCPtr, this);
+       }
+
+       public void setCcdSweptSphereRadius (float radius) {
+               gdxBulletJNI.btCollisionObject_setCcdSweptSphereRadius(swigCPtr, this, radius);
+       }
+
+       public float getCcdMotionThreshold () {
+               return gdxBulletJNI.btCollisionObject_getCcdMotionThreshold(swigCPtr, this);
+       }
+
+       public float getCcdSquareMotionThreshold () {
+               return gdxBulletJNI.btCollisionObject_getCcdSquareMotionThreshold(swigCPtr, this);
+       }
+
+       public void setCcdMotionThreshold (float ccdMotionThreshold) {
+               gdxBulletJNI.btCollisionObject_setCcdMotionThreshold(swigCPtr, this, ccdMotionThreshold);
+       }
+
+       public SWIGTYPE_p_void getUserPointer () {
+               long cPtr = gdxBulletJNI.btCollisionObject_getUserPointer(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setUserPointer (SWIGTYPE_p_void userPointer) {
+               gdxBulletJNI.btCollisionObject_setUserPointer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(userPointer));
+       }
+
+       public boolean checkCollideWith (btCollisionObject co) {
+               return gdxBulletJNI.btCollisionObject_checkCollideWith(swigCPtr, this, btCollisionObject.getCPtr(co), co);
+       }
+
+       public int calculateSerializeBufferSize () {
+               return gdxBulletJNI.btCollisionObject_calculateSerializeBufferSize(swigCPtr, this);
+       }
+
+       public String serialize (SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
+               return gdxBulletJNI.btCollisionObject_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer),
+                       SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
+
+       public void serializeSingleObject (SWIGTYPE_p_btSerializer serializer) {
+               gdxBulletJNI.btCollisionObject_serializeSingleObject(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
+
+       public void getAnisotropicFriction (Vector3 out) {
+               gdxBulletJNI.btCollisionObject_getAnisotropicFriction__SWIG_1(swigCPtr, this, out);
+       }
+
+       public void getWorldTransform (btTransform out) {
+               gdxBulletJNI.btCollisionObject_getWorldTransform__SWIG_2(swigCPtr, this, btTransform.getCPtr(out), out);
+       }
+
+       public void getInterpolationWorldTransform (btTransform out) {
+               gdxBulletJNI.btCollisionObject_getInterpolationWorldTransform__SWIG_2(swigCPtr, this, btTransform.getCPtr(out), out);
+       }
+
+       public void getInterpolationLinearVelocity (Vector3 out) {
+               gdxBulletJNI.btCollisionObject_getInterpolationLinearVelocity__SWIG_1(swigCPtr, this, out);
+       }
+
+       public void getInterpolationAngularVelocity (Vector3 out) {
+               gdxBulletJNI.btCollisionObject_getInterpolationAngularVelocity__SWIG_1(swigCPtr, this, out);
+       }
+
+       public final static class CollisionFlags {
+               public final static int CF_STATIC_OBJECT = 1;
+               public final static int CF_KINEMATIC_OBJECT = 2;
+               public final static int CF_NO_CONTACT_RESPONSE = 4;
+               public final static int CF_CUSTOM_MATERIAL_CALLBACK = 8;
+               public final static int CF_CHARACTER_OBJECT = 16;
+               public final static int CF_DISABLE_VISUALIZE_OBJECT = 32;
+               public final static int CF_DISABLE_SPU_COLLISION_PROCESSING = 64;
+       }
+
+       public final static class CollisionObjectTypes {
+               public final static int CO_COLLISION_OBJECT = 1;
+               public final static int CO_RIGID_BODY = 2;
+               public final static int CO_GHOST_OBJECT = 4;
+               public final static int CO_SOFT_BODY = 8;
+               public final static int CO_HF_FLUID = 16;
+               public final static int CO_USER_TYPE = 32;
+       }
 
 }
index 34ad347..c5a1e72 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionObjectArray {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionObjectArray(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionObjectArray obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionObjectArray(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btCollisionObjectArray() {
-    this(gdxBulletJNI.new_btCollisionObjectArray__SWIG_0(), true);
-  }
-
-  public btCollisionObjectArray(btCollisionObjectArray otherArray) {
-    this(gdxBulletJNI.new_btCollisionObjectArray__SWIG_1(btCollisionObjectArray.getCPtr(otherArray), otherArray), true);
-  }
-
-  public int size() {
-    return gdxBulletJNI.btCollisionObjectArray_size(swigCPtr, this);
-  }
-
-  public btCollisionObject at(int n) {
-    long cPtr = gdxBulletJNI.btCollisionObjectArray_at__SWIG_0(swigCPtr, this, n);
-    return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
-  }
-
-  public void clear() {
-    gdxBulletJNI.btCollisionObjectArray_clear(swigCPtr, this);
-  }
-
-  public void pop_back() {
-    gdxBulletJNI.btCollisionObjectArray_pop_back(swigCPtr, this);
-  }
-
-  public void resize(int newsize, btCollisionObject fillData) {
-    gdxBulletJNI.btCollisionObjectArray_resize__SWIG_0(swigCPtr, this, newsize, btCollisionObject.getCPtr(fillData), fillData);
-  }
-
-  public void resize(int newsize) {
-    gdxBulletJNI.btCollisionObjectArray_resize__SWIG_1(swigCPtr, this, newsize);
-  }
-
-  public SWIGTYPE_p_p_btCollisionObject expandNonInitializing() {
-    return new SWIGTYPE_p_p_btCollisionObject(gdxBulletJNI.btCollisionObjectArray_expandNonInitializing(swigCPtr, this), false);
-  }
-
-  public SWIGTYPE_p_p_btCollisionObject expand(btCollisionObject fillValue) {
-    return new SWIGTYPE_p_p_btCollisionObject(gdxBulletJNI.btCollisionObjectArray_expand__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(fillValue), fillValue), false);
-  }
-
-  public SWIGTYPE_p_p_btCollisionObject expand() {
-    return new SWIGTYPE_p_p_btCollisionObject(gdxBulletJNI.btCollisionObjectArray_expand__SWIG_1(swigCPtr, this), false);
-  }
-
-  public void push_back(btCollisionObject _Val) {
-    gdxBulletJNI.btCollisionObjectArray_push_back(swigCPtr, this, btCollisionObject.getCPtr(_Val), _Val);
-  }
-
-  public int capacity() {
-    return gdxBulletJNI.btCollisionObjectArray_capacity(swigCPtr, this);
-  }
-
-  public void reserve(int _Count) {
-    gdxBulletJNI.btCollisionObjectArray_reserve(swigCPtr, this, _Count);
-  }
-
-  public void swap(int index0, int index1) {
-    gdxBulletJNI.btCollisionObjectArray_swap(swigCPtr, this, index0, index1);
-  }
-
-  public int findBinarySearch(btCollisionObject key) {
-    return gdxBulletJNI.btCollisionObjectArray_findBinarySearch(swigCPtr, this, btCollisionObject.getCPtr(key), key);
-  }
-
-  public int findLinearSearch(btCollisionObject key) {
-    return gdxBulletJNI.btCollisionObjectArray_findLinearSearch(swigCPtr, this, btCollisionObject.getCPtr(key), key);
-  }
-
-  public void remove(btCollisionObject key) {
-    gdxBulletJNI.btCollisionObjectArray_remove(swigCPtr, this, btCollisionObject.getCPtr(key), key);
-  }
-
-  public void initializeFromBuffer(SWIGTYPE_p_void buffer, int size, int capacity) {
-    gdxBulletJNI.btCollisionObjectArray_initializeFromBuffer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(buffer), size, capacity);
-  }
-
-  public void copyFromArray(btCollisionObjectArray otherArray) {
-    gdxBulletJNI.btCollisionObjectArray_copyFromArray(swigCPtr, this, btCollisionObjectArray.getCPtr(otherArray), otherArray);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionObjectArray (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionObjectArray obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionObjectArray(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btCollisionObjectArray () {
+               this(gdxBulletJNI.new_btCollisionObjectArray__SWIG_0(), true);
+       }
+
+       public btCollisionObjectArray (btCollisionObjectArray otherArray) {
+               this(gdxBulletJNI.new_btCollisionObjectArray__SWIG_1(btCollisionObjectArray.getCPtr(otherArray), otherArray), true);
+       }
+
+       public int size () {
+               return gdxBulletJNI.btCollisionObjectArray_size(swigCPtr, this);
+       }
+
+       public btCollisionObject at (int n) {
+               long cPtr = gdxBulletJNI.btCollisionObjectArray_at__SWIG_0(swigCPtr, this, n);
+               return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
+       }
+
+       public void clear () {
+               gdxBulletJNI.btCollisionObjectArray_clear(swigCPtr, this);
+       }
+
+       public void pop_back () {
+               gdxBulletJNI.btCollisionObjectArray_pop_back(swigCPtr, this);
+       }
+
+       public void resize (int newsize, btCollisionObject fillData) {
+               gdxBulletJNI.btCollisionObjectArray_resize__SWIG_0(swigCPtr, this, newsize, btCollisionObject.getCPtr(fillData), fillData);
+       }
+
+       public void resize (int newsize) {
+               gdxBulletJNI.btCollisionObjectArray_resize__SWIG_1(swigCPtr, this, newsize);
+       }
+
+       public SWIGTYPE_p_p_btCollisionObject expandNonInitializing () {
+               return new SWIGTYPE_p_p_btCollisionObject(gdxBulletJNI.btCollisionObjectArray_expandNonInitializing(swigCPtr, this), false);
+       }
+
+       public SWIGTYPE_p_p_btCollisionObject expand (btCollisionObject fillValue) {
+               return new SWIGTYPE_p_p_btCollisionObject(gdxBulletJNI.btCollisionObjectArray_expand__SWIG_0(swigCPtr, this,
+                       btCollisionObject.getCPtr(fillValue), fillValue), false);
+       }
+
+       public SWIGTYPE_p_p_btCollisionObject expand () {
+               return new SWIGTYPE_p_p_btCollisionObject(gdxBulletJNI.btCollisionObjectArray_expand__SWIG_1(swigCPtr, this), false);
+       }
+
+       public void push_back (btCollisionObject _Val) {
+               gdxBulletJNI.btCollisionObjectArray_push_back(swigCPtr, this, btCollisionObject.getCPtr(_Val), _Val);
+       }
+
+       public int capacity () {
+               return gdxBulletJNI.btCollisionObjectArray_capacity(swigCPtr, this);
+       }
+
+       public void reserve (int _Count) {
+               gdxBulletJNI.btCollisionObjectArray_reserve(swigCPtr, this, _Count);
+       }
+
+       public void swap (int index0, int index1) {
+               gdxBulletJNI.btCollisionObjectArray_swap(swigCPtr, this, index0, index1);
+       }
+
+       public int findBinarySearch (btCollisionObject key) {
+               return gdxBulletJNI.btCollisionObjectArray_findBinarySearch(swigCPtr, this, btCollisionObject.getCPtr(key), key);
+       }
+
+       public int findLinearSearch (btCollisionObject key) {
+               return gdxBulletJNI.btCollisionObjectArray_findLinearSearch(swigCPtr, this, btCollisionObject.getCPtr(key), key);
+       }
+
+       public void remove (btCollisionObject key) {
+               gdxBulletJNI.btCollisionObjectArray_remove(swigCPtr, this, btCollisionObject.getCPtr(key), key);
+       }
+
+       public void initializeFromBuffer (SWIGTYPE_p_void buffer, int size, int capacity) {
+               gdxBulletJNI.btCollisionObjectArray_initializeFromBuffer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(buffer), size, capacity);
+       }
+
+       public void copyFromArray (btCollisionObjectArray otherArray) {
+               gdxBulletJNI.btCollisionObjectArray_copyFromArray(swigCPtr, this, btCollisionObjectArray.getCPtr(otherArray), otherArray);
+       }
 
 }
index af4c7fc..01db0eb 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionObjectDoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionObjectDoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionObjectDoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionObjectDoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_broadphaseHandle(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_broadphaseHandle_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_broadphaseHandle() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_broadphaseHandle_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setM_collisionShape(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_collisionShape_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_collisionShape() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_collisionShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setM_rootCollisionShape(btCollisionShapeData value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_rootCollisionShape_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
-  }
-
-  public btCollisionShapeData getM_rootCollisionShape() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_rootCollisionShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
-  }
-
-  public void setM_name(String value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_name_set(swigCPtr, this, value);
-  }
-
-  public String getM_name() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_name_get(swigCPtr, this);
-  }
-
-  public void setM_worldTransform(btTransformDoubleData value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_worldTransform_set(swigCPtr, this, btTransformDoubleData.getCPtr(value), value);
-  }
-
-  public btTransformDoubleData getM_worldTransform() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_worldTransform_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
-  }
-
-  public void setM_interpolationWorldTransform(btTransformDoubleData value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationWorldTransform_set(swigCPtr, this, btTransformDoubleData.getCPtr(value), value);
-  }
-
-  public btTransformDoubleData getM_interpolationWorldTransform() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationWorldTransform_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
-  }
-
-  public void setM_interpolationLinearVelocity(btVector3DoubleData value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationLinearVelocity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_interpolationLinearVelocity() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationLinearVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_interpolationAngularVelocity(btVector3DoubleData value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationAngularVelocity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_interpolationAngularVelocity() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationAngularVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_anisotropicFriction(btVector3DoubleData value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_anisotropicFriction_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_anisotropicFriction() {
-    long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_anisotropicFriction_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_contactProcessingThreshold(double value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_contactProcessingThreshold_set(swigCPtr, this, value);
-  }
-
-  public double getM_contactProcessingThreshold() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_contactProcessingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_deactivationTime(double value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_deactivationTime_set(swigCPtr, this, value);
-  }
-
-  public double getM_deactivationTime() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_deactivationTime_get(swigCPtr, this);
-  }
-
-  public void setM_friction(double value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_friction_set(swigCPtr, this, value);
-  }
-
-  public double getM_friction() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_friction_get(swigCPtr, this);
-  }
-
-  public void setM_restitution(double value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_restitution_set(swigCPtr, this, value);
-  }
-
-  public double getM_restitution() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_restitution_get(swigCPtr, this);
-  }
-
-  public void setM_hitFraction(double value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_hitFraction_set(swigCPtr, this, value);
-  }
-
-  public double getM_hitFraction() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_hitFraction_get(swigCPtr, this);
-  }
-
-  public void setM_ccdSweptSphereRadius(double value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_ccdSweptSphereRadius_set(swigCPtr, this, value);
-  }
-
-  public double getM_ccdSweptSphereRadius() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_ccdSweptSphereRadius_get(swigCPtr, this);
-  }
-
-  public void setM_ccdMotionThreshold(double value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_ccdMotionThreshold_set(swigCPtr, this, value);
-  }
-
-  public double getM_ccdMotionThreshold() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_ccdMotionThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_hasAnisotropicFriction(int value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_hasAnisotropicFriction_set(swigCPtr, this, value);
-  }
-
-  public int getM_hasAnisotropicFriction() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_hasAnisotropicFriction_get(swigCPtr, this);
-  }
-
-  public void setM_collisionFlags(int value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_collisionFlags_set(swigCPtr, this, value);
-  }
-
-  public int getM_collisionFlags() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_collisionFlags_get(swigCPtr, this);
-  }
-
-  public void setM_islandTag1(int value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_islandTag1_set(swigCPtr, this, value);
-  }
-
-  public int getM_islandTag1() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_islandTag1_get(swigCPtr, this);
-  }
-
-  public void setM_companionId(int value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_companionId_set(swigCPtr, this, value);
-  }
-
-  public int getM_companionId() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_companionId_get(swigCPtr, this);
-  }
-
-  public void setM_activationState1(int value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_activationState1_set(swigCPtr, this, value);
-  }
-
-  public int getM_activationState1() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_activationState1_get(swigCPtr, this);
-  }
-
-  public void setM_internalType(int value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_internalType_set(swigCPtr, this, value);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionObjectDoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionObjectDoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionObjectDoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_broadphaseHandle (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_broadphaseHandle_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_broadphaseHandle () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_broadphaseHandle_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setM_collisionShape (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_collisionShape_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_collisionShape () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_collisionShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setM_rootCollisionShape (btCollisionShapeData value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_rootCollisionShape_set(swigCPtr, this, btCollisionShapeData.getCPtr(value),
+                       value);
+       }
+
+       public btCollisionShapeData getM_rootCollisionShape () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_rootCollisionShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
+       }
+
+       public void setM_name (String value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_name_set(swigCPtr, this, value);
+       }
+
+       public String getM_name () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_name_get(swigCPtr, this);
+       }
+
+       public void setM_worldTransform (btTransformDoubleData value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_worldTransform_set(swigCPtr, this, btTransformDoubleData.getCPtr(value), value);
+       }
+
+       public btTransformDoubleData getM_worldTransform () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_worldTransform_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
+       }
+
+       public void setM_interpolationWorldTransform (btTransformDoubleData value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationWorldTransform_set(swigCPtr, this,
+                       btTransformDoubleData.getCPtr(value), value);
+       }
+
+       public btTransformDoubleData getM_interpolationWorldTransform () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationWorldTransform_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
+       }
+
+       public void setM_interpolationLinearVelocity (btVector3DoubleData value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationLinearVelocity_set(swigCPtr, this,
+                       btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_interpolationLinearVelocity () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationLinearVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_interpolationAngularVelocity (btVector3DoubleData value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationAngularVelocity_set(swigCPtr, this,
+                       btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_interpolationAngularVelocity () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_interpolationAngularVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_anisotropicFriction (btVector3DoubleData value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_anisotropicFriction_set(swigCPtr, this, btVector3DoubleData.getCPtr(value),
+                       value);
+       }
+
+       public btVector3DoubleData getM_anisotropicFriction () {
+               long cPtr = gdxBulletJNI.btCollisionObjectDoubleData_m_anisotropicFriction_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_contactProcessingThreshold (double value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_contactProcessingThreshold_set(swigCPtr, this, value);
+       }
+
+       public double getM_contactProcessingThreshold () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_contactProcessingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_deactivationTime (double value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_deactivationTime_set(swigCPtr, this, value);
+       }
+
+       public double getM_deactivationTime () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_deactivationTime_get(swigCPtr, this);
+       }
+
+       public void setM_friction (double value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_friction_set(swigCPtr, this, value);
+       }
+
+       public double getM_friction () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_friction_get(swigCPtr, this);
+       }
+
+       public void setM_restitution (double value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_restitution_set(swigCPtr, this, value);
+       }
+
+       public double getM_restitution () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_restitution_get(swigCPtr, this);
+       }
+
+       public void setM_hitFraction (double value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_hitFraction_set(swigCPtr, this, value);
+       }
+
+       public double getM_hitFraction () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_hitFraction_get(swigCPtr, this);
+       }
+
+       public void setM_ccdSweptSphereRadius (double value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_ccdSweptSphereRadius_set(swigCPtr, this, value);
+       }
+
+       public double getM_ccdSweptSphereRadius () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_ccdSweptSphereRadius_get(swigCPtr, this);
+       }
+
+       public void setM_ccdMotionThreshold (double value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_ccdMotionThreshold_set(swigCPtr, this, value);
+       }
+
+       public double getM_ccdMotionThreshold () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_ccdMotionThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_hasAnisotropicFriction (int value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_hasAnisotropicFriction_set(swigCPtr, this, value);
+       }
+
+       public int getM_hasAnisotropicFriction () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_hasAnisotropicFriction_get(swigCPtr, this);
+       }
+
+       public void setM_collisionFlags (int value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_collisionFlags_set(swigCPtr, this, value);
+       }
+
+       public int getM_collisionFlags () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_collisionFlags_get(swigCPtr, this);
+       }
+
+       public void setM_islandTag1 (int value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_islandTag1_set(swigCPtr, this, value);
+       }
+
+       public int getM_islandTag1 () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_islandTag1_get(swigCPtr, this);
+       }
+
+       public void setM_companionId (int value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_companionId_set(swigCPtr, this, value);
+       }
+
+       public int getM_companionId () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_companionId_get(swigCPtr, this);
+       }
+
+       public void setM_activationState1 (int value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_activationState1_set(swigCPtr, this, value);
+       }
+
+       public int getM_activationState1 () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_activationState1_get(swigCPtr, this);
+       }
+
+       public void setM_internalType (int value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_internalType_set(swigCPtr, this, value);
+       }
 
-  public int getM_internalType() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_internalType_get(swigCPtr, this);
-  }
+       public int getM_internalType () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_internalType_get(swigCPtr, this);
+       }
 
-  public void setM_checkCollideWith(int value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_checkCollideWith_set(swigCPtr, this, value);
-  }
+       public void setM_checkCollideWith (int value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_checkCollideWith_set(swigCPtr, this, value);
+       }
 
-  public int getM_checkCollideWith() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_checkCollideWith_get(swigCPtr, this);
-  }
+       public int getM_checkCollideWith () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_checkCollideWith_get(swigCPtr, this);
+       }
 
-  public void setM_padding(String value) {
-    gdxBulletJNI.btCollisionObjectDoubleData_m_padding_set(swigCPtr, this, value);
-  }
+       public void setM_padding (String value) {
+               gdxBulletJNI.btCollisionObjectDoubleData_m_padding_set(swigCPtr, this, value);
+       }
 
-  public String getM_padding() {
-    return gdxBulletJNI.btCollisionObjectDoubleData_m_padding_get(swigCPtr, this);
-  }
+       public String getM_padding () {
+               return gdxBulletJNI.btCollisionObjectDoubleData_m_padding_get(swigCPtr, this);
+       }
 
-  public btCollisionObjectDoubleData() {
-    this(gdxBulletJNI.new_btCollisionObjectDoubleData(), true);
-  }
+       public btCollisionObjectDoubleData () {
+               this(gdxBulletJNI.new_btCollisionObjectDoubleData(), true);
+       }
 
 }
index 5fa4a23..8bcf6ab 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionObjectFloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionObjectFloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionObjectFloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionObjectFloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_broadphaseHandle(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_broadphaseHandle_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_broadphaseHandle() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_broadphaseHandle_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setM_collisionShape(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_collisionShape_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_collisionShape() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_collisionShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setM_rootCollisionShape(btCollisionShapeData value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_rootCollisionShape_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
-  }
-
-  public btCollisionShapeData getM_rootCollisionShape() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_rootCollisionShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
-  }
-
-  public void setM_name(String value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_name_set(swigCPtr, this, value);
-  }
-
-  public String getM_name() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_name_get(swigCPtr, this);
-  }
-
-  public void setM_worldTransform(btTransformFloatData value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_worldTransform_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_worldTransform() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_worldTransform_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_interpolationWorldTransform(btTransformFloatData value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_interpolationWorldTransform_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_interpolationWorldTransform() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_interpolationWorldTransform_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_interpolationLinearVelocity(btVector3FloatData value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_interpolationLinearVelocity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_interpolationLinearVelocity() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_interpolationLinearVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_interpolationAngularVelocity(btVector3FloatData value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_interpolationAngularVelocity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_interpolationAngularVelocity() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_interpolationAngularVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_anisotropicFriction(btVector3FloatData value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_anisotropicFriction_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_anisotropicFriction() {
-    long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_anisotropicFriction_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_contactProcessingThreshold(float value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_contactProcessingThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_contactProcessingThreshold() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_contactProcessingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_deactivationTime(float value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_deactivationTime_set(swigCPtr, this, value);
-  }
-
-  public float getM_deactivationTime() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_deactivationTime_get(swigCPtr, this);
-  }
-
-  public void setM_friction(float value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_friction_set(swigCPtr, this, value);
-  }
-
-  public float getM_friction() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_friction_get(swigCPtr, this);
-  }
-
-  public void setM_restitution(float value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_restitution_set(swigCPtr, this, value);
-  }
-
-  public float getM_restitution() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_restitution_get(swigCPtr, this);
-  }
-
-  public void setM_hitFraction(float value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_hitFraction_set(swigCPtr, this, value);
-  }
-
-  public float getM_hitFraction() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_hitFraction_get(swigCPtr, this);
-  }
-
-  public void setM_ccdSweptSphereRadius(float value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_ccdSweptSphereRadius_set(swigCPtr, this, value);
-  }
-
-  public float getM_ccdSweptSphereRadius() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_ccdSweptSphereRadius_get(swigCPtr, this);
-  }
-
-  public void setM_ccdMotionThreshold(float value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_ccdMotionThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_ccdMotionThreshold() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_ccdMotionThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_hasAnisotropicFriction(int value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_hasAnisotropicFriction_set(swigCPtr, this, value);
-  }
-
-  public int getM_hasAnisotropicFriction() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_hasAnisotropicFriction_get(swigCPtr, this);
-  }
-
-  public void setM_collisionFlags(int value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_collisionFlags_set(swigCPtr, this, value);
-  }
-
-  public int getM_collisionFlags() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_collisionFlags_get(swigCPtr, this);
-  }
-
-  public void setM_islandTag1(int value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_islandTag1_set(swigCPtr, this, value);
-  }
-
-  public int getM_islandTag1() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_islandTag1_get(swigCPtr, this);
-  }
-
-  public void setM_companionId(int value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_companionId_set(swigCPtr, this, value);
-  }
-
-  public int getM_companionId() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_companionId_get(swigCPtr, this);
-  }
-
-  public void setM_activationState1(int value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_activationState1_set(swigCPtr, this, value);
-  }
-
-  public int getM_activationState1() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_activationState1_get(swigCPtr, this);
-  }
-
-  public void setM_internalType(int value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_internalType_set(swigCPtr, this, value);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionObjectFloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionObjectFloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionObjectFloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_broadphaseHandle (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_broadphaseHandle_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_broadphaseHandle () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_broadphaseHandle_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setM_collisionShape (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_collisionShape_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_collisionShape () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_collisionShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setM_rootCollisionShape (btCollisionShapeData value) {
+               gdxBulletJNI
+                       .btCollisionObjectFloatData_m_rootCollisionShape_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
+       }
+
+       public btCollisionShapeData getM_rootCollisionShape () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_rootCollisionShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
+       }
+
+       public void setM_name (String value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_name_set(swigCPtr, this, value);
+       }
+
+       public String getM_name () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_name_get(swigCPtr, this);
+       }
+
+       public void setM_worldTransform (btTransformFloatData value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_worldTransform_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_worldTransform () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_worldTransform_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_interpolationWorldTransform (btTransformFloatData value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_interpolationWorldTransform_set(swigCPtr, this,
+                       btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_interpolationWorldTransform () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_interpolationWorldTransform_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_interpolationLinearVelocity (btVector3FloatData value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_interpolationLinearVelocity_set(swigCPtr, this,
+                       btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_interpolationLinearVelocity () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_interpolationLinearVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_interpolationAngularVelocity (btVector3FloatData value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_interpolationAngularVelocity_set(swigCPtr, this,
+                       btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_interpolationAngularVelocity () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_interpolationAngularVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_anisotropicFriction (btVector3FloatData value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_anisotropicFriction_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_anisotropicFriction () {
+               long cPtr = gdxBulletJNI.btCollisionObjectFloatData_m_anisotropicFriction_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_contactProcessingThreshold (float value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_contactProcessingThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_contactProcessingThreshold () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_contactProcessingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_deactivationTime (float value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_deactivationTime_set(swigCPtr, this, value);
+       }
+
+       public float getM_deactivationTime () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_deactivationTime_get(swigCPtr, this);
+       }
+
+       public void setM_friction (float value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_friction_set(swigCPtr, this, value);
+       }
+
+       public float getM_friction () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_friction_get(swigCPtr, this);
+       }
+
+       public void setM_restitution (float value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_restitution_set(swigCPtr, this, value);
+       }
+
+       public float getM_restitution () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_restitution_get(swigCPtr, this);
+       }
+
+       public void setM_hitFraction (float value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_hitFraction_set(swigCPtr, this, value);
+       }
+
+       public float getM_hitFraction () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_hitFraction_get(swigCPtr, this);
+       }
+
+       public void setM_ccdSweptSphereRadius (float value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_ccdSweptSphereRadius_set(swigCPtr, this, value);
+       }
+
+       public float getM_ccdSweptSphereRadius () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_ccdSweptSphereRadius_get(swigCPtr, this);
+       }
+
+       public void setM_ccdMotionThreshold (float value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_ccdMotionThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_ccdMotionThreshold () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_ccdMotionThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_hasAnisotropicFriction (int value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_hasAnisotropicFriction_set(swigCPtr, this, value);
+       }
+
+       public int getM_hasAnisotropicFriction () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_hasAnisotropicFriction_get(swigCPtr, this);
+       }
+
+       public void setM_collisionFlags (int value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_collisionFlags_set(swigCPtr, this, value);
+       }
+
+       public int getM_collisionFlags () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_collisionFlags_get(swigCPtr, this);
+       }
+
+       public void setM_islandTag1 (int value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_islandTag1_set(swigCPtr, this, value);
+       }
+
+       public int getM_islandTag1 () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_islandTag1_get(swigCPtr, this);
+       }
+
+       public void setM_companionId (int value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_companionId_set(swigCPtr, this, value);
+       }
+
+       public int getM_companionId () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_companionId_get(swigCPtr, this);
+       }
+
+       public void setM_activationState1 (int value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_activationState1_set(swigCPtr, this, value);
+       }
+
+       public int getM_activationState1 () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_activationState1_get(swigCPtr, this);
+       }
+
+       public void setM_internalType (int value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_internalType_set(swigCPtr, this, value);
+       }
 
-  public int getM_internalType() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_internalType_get(swigCPtr, this);
-  }
+       public int getM_internalType () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_internalType_get(swigCPtr, this);
+       }
 
-  public void setM_checkCollideWith(int value) {
-    gdxBulletJNI.btCollisionObjectFloatData_m_checkCollideWith_set(swigCPtr, this, value);
-  }
+       public void setM_checkCollideWith (int value) {
+               gdxBulletJNI.btCollisionObjectFloatData_m_checkCollideWith_set(swigCPtr, this, value);
+       }
 
-  public int getM_checkCollideWith() {
-    return gdxBulletJNI.btCollisionObjectFloatData_m_checkCollideWith_get(swigCPtr, this);
-  }
+       public int getM_checkCollideWith () {
+               return gdxBulletJNI.btCollisionObjectFloatData_m_checkCollideWith_get(swigCPtr, this);
+       }
 
-  public btCollisionObjectFloatData() {
-    this(gdxBulletJNI.new_btCollisionObjectFloatData(), true);
-  }
+       public btCollisionObjectFloatData () {
+               this(gdxBulletJNI.new_btCollisionObjectFloatData(), true);
+       }
 
 }
index 7f927d6..c1af01f 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCollisionShape {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionShape(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-
-  public static btCollisionShape newDerivedObject(long swigCPtr, boolean owner) {
-    if (swigCPtr == 0) {
-      return null;
-    }
-    
-    final int shapeType = gdxBulletJNI.btCollisionShape_getShapeType(swigCPtr, null);
-    
-    switch (shapeType) {
-    case BroadphaseNativeTypes.BOX_SHAPE_PROXYTYPE:
-      return new btBoxShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.TRIANGLE_SHAPE_PROXYTYPE:
-      return new btTriangleShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.TETRAHEDRAL_SHAPE_PROXYTYPE:
-      return new btBU_Simplex1to4(swigCPtr, owner);
-    case BroadphaseNativeTypes.CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE:
-      return new btConvexTriangleMeshShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CONVEX_HULL_SHAPE_PROXYTYPE:
-      return new btConvexHullShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
-      return new btConvexPointCloudShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CUSTOM_POLYHEDRAL_SHAPE_TYPE:
-      // TODO ?
-      break;
-    case BroadphaseNativeTypes.SPHERE_SHAPE_PROXYTYPE:
-      return new btSphereShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.MULTI_SPHERE_SHAPE_PROXYTYPE:
-      return new btMultiSphereShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CAPSULE_SHAPE_PROXYTYPE:
-      return new btCapsuleShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CONE_SHAPE_PROXYTYPE:
-      return new btConeShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CONVEX_SHAPE_PROXYTYPE:
-      return new btConvexShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CYLINDER_SHAPE_PROXYTYPE:
-      return new btCylinderShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.UNIFORM_SCALING_SHAPE_PROXYTYPE:
-      return new btUniformScalingShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.MINKOWSKI_SUM_SHAPE_PROXYTYPE:
-      // btMinkowskiSumShape is actually a MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE and nothing
-      // is one of these
-      break;
-    case BroadphaseNativeTypes.MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE:
-      return new btMinkowskiSumShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.BOX_2D_SHAPE_PROXYTYPE:
-      return new btBox2dShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CONVEX_2D_SHAPE_PROXYTYPE:
-      return new btConvex2dShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CUSTOM_CONVEX_SHAPE_TYPE:
-      // TODO ?
-      break;
-    case BroadphaseNativeTypes.TRIANGLE_MESH_SHAPE_PROXYTYPE:
-      return new btBvhTriangleMeshShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE:
-      return new btScaledBvhTriangleMeshShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.FAST_CONCAVE_MESH_PROXYTYPE:
-      // TODO I couldn't find one
-      break;
-    case BroadphaseNativeTypes.TERRAIN_SHAPE_PROXYTYPE:
-      return new btHeightfieldTerrainShape(swigCPtr, owner);
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionShape (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public static btCollisionShape newDerivedObject (long swigCPtr, boolean owner) {
+               if (swigCPtr == 0) {
+                       return null;
+               }
+
+               final int shapeType = gdxBulletJNI.btCollisionShape_getShapeType(swigCPtr, null);
+
+               switch (shapeType) {
+               case BroadphaseNativeTypes.BOX_SHAPE_PROXYTYPE:
+                       return new btBoxShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.TRIANGLE_SHAPE_PROXYTYPE:
+                       return new btTriangleShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.TETRAHEDRAL_SHAPE_PROXYTYPE:
+                       return new btBU_Simplex1to4(swigCPtr, owner);
+               case BroadphaseNativeTypes.CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE:
+                       return new btConvexTriangleMeshShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CONVEX_HULL_SHAPE_PROXYTYPE:
+                       return new btConvexHullShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CONVEX_POINT_CLOUD_SHAPE_PROXYTYPE:
+                       return new btConvexPointCloudShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CUSTOM_POLYHEDRAL_SHAPE_TYPE:
+                       // TODO ?
+                       break;
+               case BroadphaseNativeTypes.SPHERE_SHAPE_PROXYTYPE:
+                       return new btSphereShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.MULTI_SPHERE_SHAPE_PROXYTYPE:
+                       return new btMultiSphereShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CAPSULE_SHAPE_PROXYTYPE:
+                       return new btCapsuleShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CONE_SHAPE_PROXYTYPE:
+                       return new btConeShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CONVEX_SHAPE_PROXYTYPE:
+                       return new btConvexShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CYLINDER_SHAPE_PROXYTYPE:
+                       return new btCylinderShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.UNIFORM_SCALING_SHAPE_PROXYTYPE:
+                       return new btUniformScalingShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.MINKOWSKI_SUM_SHAPE_PROXYTYPE:
+                       // btMinkowskiSumShape is actually a MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE and nothing
+                       // is one of these
+                       break;
+               case BroadphaseNativeTypes.MINKOWSKI_DIFFERENCE_SHAPE_PROXYTYPE:
+                       return new btMinkowskiSumShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.BOX_2D_SHAPE_PROXYTYPE:
+                       return new btBox2dShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CONVEX_2D_SHAPE_PROXYTYPE:
+                       return new btConvex2dShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CUSTOM_CONVEX_SHAPE_TYPE:
+                       // TODO ?
+                       break;
+               case BroadphaseNativeTypes.TRIANGLE_MESH_SHAPE_PROXYTYPE:
+                       return new btBvhTriangleMeshShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE:
+                       return new btScaledBvhTriangleMeshShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.FAST_CONCAVE_MESH_PROXYTYPE:
+                       // TODO I couldn't find one
+                       break;
+               case BroadphaseNativeTypes.TERRAIN_SHAPE_PROXYTYPE:
+                       return new btHeightfieldTerrainShape(swigCPtr, owner);
 /*
-    case BroadphaseNativeTypes.GIMPACT_SHAPE_PROXYTYPE:
-      return new btGimpactShape(swigCPtr, owner);
-*/
-    case BroadphaseNativeTypes.MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE:
-      return new btMultimaterialTriangleMeshShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.EMPTY_SHAPE_PROXYTYPE:
-      return new btEmptyShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.STATIC_PLANE_PROXYTYPE:
-      return new btStaticPlaneShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.CUSTOM_CONCAVE_SHAPE_TYPE:
-      // TODO ?
-      break;
-    case BroadphaseNativeTypes.COMPOUND_SHAPE_PROXYTYPE:
-      return new btCompoundShape(swigCPtr, owner);
+ * case BroadphaseNativeTypes.GIMPACT_SHAPE_PROXYTYPE: return new btGimpactShape(swigCPtr, owner);
+ */
+               case BroadphaseNativeTypes.MULTIMATERIAL_TRIANGLE_MESH_PROXYTYPE:
+                       return new btMultimaterialTriangleMeshShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.EMPTY_SHAPE_PROXYTYPE:
+                       return new btEmptyShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.STATIC_PLANE_PROXYTYPE:
+                       return new btStaticPlaneShape(swigCPtr, owner);
+               case BroadphaseNativeTypes.CUSTOM_CONCAVE_SHAPE_TYPE:
+                       // TODO ?
+                       break;
+               case BroadphaseNativeTypes.COMPOUND_SHAPE_PROXYTYPE:
+                       return new btCompoundShape(swigCPtr, owner);
 /*
-    case BroadphaseNativeTypes.SOFTBODY_SHAPE_PROXYTYPE:
-      return new btSoftBodyShape(swigCPtr, owner);
-    case BroadphaseNativeTypes.HFFLUID_SHAPE_PROXYTYPE:
-      return new (swigCPtr, owner);
-    case BroadphaseNativeTypes.HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE:
-      return new (swigCPtr, owner);
-    case BroadphaseNativeTypes.INVALID_SHAPE_PROXYTYPE:
-      return new (swigCPtr, owner);
-*/
-    }
-
-    throw new RuntimeException("Unknown shape type " + Integer.toString(shapeType));
-  }
-
-  public void getAabb(btTransform t, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btCollisionShape_getAabb(swigCPtr, this, btTransform.getCPtr(t), t, aabbMin, aabbMax);
-  }
-
-  public void getBoundingSphere(Vector3 center, SWIGTYPE_p_float radius) {
-    gdxBulletJNI.btCollisionShape_getBoundingSphere(swigCPtr, this, center, SWIGTYPE_p_float.getCPtr(radius));
-  }
-
-  public float getAngularMotionDisc() {
-    return gdxBulletJNI.btCollisionShape_getAngularMotionDisc(swigCPtr, this);
-  }
-
-  public float getContactBreakingThreshold(float defaultContactThresholdFactor) {
-    return gdxBulletJNI.btCollisionShape_getContactBreakingThreshold(swigCPtr, this, defaultContactThresholdFactor);
-  }
-
-  public void calculateTemporalAabb(btTransform curTrans, Vector3 linvel, Vector3 angvel, float timeStep, Vector3 temporalAabbMin, Vector3 temporalAabbMax) {
-    gdxBulletJNI.btCollisionShape_calculateTemporalAabb(swigCPtr, this, btTransform.getCPtr(curTrans), curTrans, linvel, angvel, timeStep, temporalAabbMin, temporalAabbMax);
-  }
-
-  public boolean isPolyhedral() {
-    return gdxBulletJNI.btCollisionShape_isPolyhedral(swigCPtr, this);
-  }
-
-  public boolean isConvex2d() {
-    return gdxBulletJNI.btCollisionShape_isConvex2d(swigCPtr, this);
-  }
-
-  public boolean isConvex() {
-    return gdxBulletJNI.btCollisionShape_isConvex(swigCPtr, this);
-  }
-
-  public boolean isNonMoving() {
-    return gdxBulletJNI.btCollisionShape_isNonMoving(swigCPtr, this);
-  }
-
-  public boolean isConcave() {
-    return gdxBulletJNI.btCollisionShape_isConcave(swigCPtr, this);
-  }
-
-  public boolean isCompound() {
-    return gdxBulletJNI.btCollisionShape_isCompound(swigCPtr, this);
-  }
-
-  public boolean isSoftBody() {
-    return gdxBulletJNI.btCollisionShape_isSoftBody(swigCPtr, this);
-  }
-
-  public boolean isInfinite() {
-    return gdxBulletJNI.btCollisionShape_isInfinite(swigCPtr, this);
-  }
-
-  public void setLocalScaling(Vector3 scaling) {
-    gdxBulletJNI.btCollisionShape_setLocalScaling(swigCPtr, this, scaling);
-  }
-
-  public Vector3 getLocalScaling() {
-       return gdxBulletJNI.btCollisionShape_getLocalScaling(swigCPtr, this);
-}
-
-  public void calculateLocalInertia(float mass, Vector3 inertia) {
-    gdxBulletJNI.btCollisionShape_calculateLocalInertia(swigCPtr, this, mass, inertia);
-  }
-
-  public String getName() {
-    return gdxBulletJNI.btCollisionShape_getName(swigCPtr, this);
-  }
-
-  public int getShapeType() {
-    return gdxBulletJNI.btCollisionShape_getShapeType(swigCPtr, this);
-  }
-
-  public void setMargin(float margin) {
-    gdxBulletJNI.btCollisionShape_setMargin(swigCPtr, this, margin);
-  }
-
-  public float getMargin() {
-    return gdxBulletJNI.btCollisionShape_getMargin(swigCPtr, this);
-  }
-
-  public void setUserPointer(SWIGTYPE_p_void userPtr) {
-    gdxBulletJNI.btCollisionShape_setUserPointer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(userPtr));
-  }
-
-  public SWIGTYPE_p_void getUserPointer() {
-    long cPtr = gdxBulletJNI.btCollisionShape_getUserPointer(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public int calculateSerializeBufferSize() {
-    return gdxBulletJNI.btCollisionShape_calculateSerializeBufferSize(swigCPtr, this);
-  }
-
-  public String serialize(SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
-    return gdxBulletJNI.btCollisionShape_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer), SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
-
-  public void serializeSingleShape(SWIGTYPE_p_btSerializer serializer) {
-    gdxBulletJNI.btCollisionShape_serializeSingleShape(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
+ * case BroadphaseNativeTypes.SOFTBODY_SHAPE_PROXYTYPE: return new btSoftBodyShape(swigCPtr, owner); case
+ * BroadphaseNativeTypes.HFFLUID_SHAPE_PROXYTYPE: return new (swigCPtr, owner); case
+ * BroadphaseNativeTypes.HFFLUID_BUOYANT_CONVEX_SHAPE_PROXYTYPE: return new (swigCPtr, owner); case
+ * BroadphaseNativeTypes.INVALID_SHAPE_PROXYTYPE: return new (swigCPtr, owner);
+ */
+               }
+
+               throw new RuntimeException("Unknown shape type " + Integer.toString(shapeType));
+       }
+
+       public void getAabb (btTransform t, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btCollisionShape_getAabb(swigCPtr, this, btTransform.getCPtr(t), t, aabbMin, aabbMax);
+       }
+
+       public void getBoundingSphere (Vector3 center, SWIGTYPE_p_float radius) {
+               gdxBulletJNI.btCollisionShape_getBoundingSphere(swigCPtr, this, center, SWIGTYPE_p_float.getCPtr(radius));
+       }
+
+       public float getAngularMotionDisc () {
+               return gdxBulletJNI.btCollisionShape_getAngularMotionDisc(swigCPtr, this);
+       }
+
+       public float getContactBreakingThreshold (float defaultContactThresholdFactor) {
+               return gdxBulletJNI.btCollisionShape_getContactBreakingThreshold(swigCPtr, this, defaultContactThresholdFactor);
+       }
+
+       public void calculateTemporalAabb (btTransform curTrans, Vector3 linvel, Vector3 angvel, float timeStep,
+               Vector3 temporalAabbMin, Vector3 temporalAabbMax) {
+               gdxBulletJNI.btCollisionShape_calculateTemporalAabb(swigCPtr, this, btTransform.getCPtr(curTrans), curTrans, linvel,
+                       angvel, timeStep, temporalAabbMin, temporalAabbMax);
+       }
+
+       public boolean isPolyhedral () {
+               return gdxBulletJNI.btCollisionShape_isPolyhedral(swigCPtr, this);
+       }
+
+       public boolean isConvex2d () {
+               return gdxBulletJNI.btCollisionShape_isConvex2d(swigCPtr, this);
+       }
+
+       public boolean isConvex () {
+               return gdxBulletJNI.btCollisionShape_isConvex(swigCPtr, this);
+       }
+
+       public boolean isNonMoving () {
+               return gdxBulletJNI.btCollisionShape_isNonMoving(swigCPtr, this);
+       }
+
+       public boolean isConcave () {
+               return gdxBulletJNI.btCollisionShape_isConcave(swigCPtr, this);
+       }
+
+       public boolean isCompound () {
+               return gdxBulletJNI.btCollisionShape_isCompound(swigCPtr, this);
+       }
+
+       public boolean isSoftBody () {
+               return gdxBulletJNI.btCollisionShape_isSoftBody(swigCPtr, this);
+       }
+
+       public boolean isInfinite () {
+               return gdxBulletJNI.btCollisionShape_isInfinite(swigCPtr, this);
+       }
+
+       public void setLocalScaling (Vector3 scaling) {
+               gdxBulletJNI.btCollisionShape_setLocalScaling(swigCPtr, this, scaling);
+       }
+
+       public Vector3 getLocalScaling () {
+               return gdxBulletJNI.btCollisionShape_getLocalScaling(swigCPtr, this);
+       }
+
+       public void calculateLocalInertia (float mass, Vector3 inertia) {
+               gdxBulletJNI.btCollisionShape_calculateLocalInertia(swigCPtr, this, mass, inertia);
+       }
+
+       public String getName () {
+               return gdxBulletJNI.btCollisionShape_getName(swigCPtr, this);
+       }
+
+       public int getShapeType () {
+               return gdxBulletJNI.btCollisionShape_getShapeType(swigCPtr, this);
+       }
+
+       public void setMargin (float margin) {
+               gdxBulletJNI.btCollisionShape_setMargin(swigCPtr, this, margin);
+       }
+
+       public float getMargin () {
+               return gdxBulletJNI.btCollisionShape_getMargin(swigCPtr, this);
+       }
+
+       public void setUserPointer (SWIGTYPE_p_void userPtr) {
+               gdxBulletJNI.btCollisionShape_setUserPointer(swigCPtr, this, SWIGTYPE_p_void.getCPtr(userPtr));
+       }
+
+       public SWIGTYPE_p_void getUserPointer () {
+               long cPtr = gdxBulletJNI.btCollisionShape_getUserPointer(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public int calculateSerializeBufferSize () {
+               return gdxBulletJNI.btCollisionShape_calculateSerializeBufferSize(swigCPtr, this);
+       }
+
+       public String serialize (SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
+               return gdxBulletJNI.btCollisionShape_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer),
+                       SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
+
+       public void serializeSingleShape (SWIGTYPE_p_btSerializer serializer) {
+               gdxBulletJNI.btCollisionShape_serializeSingleShape(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
 
 }
index a0aecfa..f0adfb0 100644 (file)
@@ -8,63 +8,59 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCollisionShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btCollisionShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btCollisionShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btCollisionShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btCollisionShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setM_name(String value) {
-    gdxBulletJNI.btCollisionShapeData_m_name_set(swigCPtr, this, value);
-  }
+       public void setM_name (String value) {
+               gdxBulletJNI.btCollisionShapeData_m_name_set(swigCPtr, this, value);
+       }
 
-  public String getM_name() {
-    return gdxBulletJNI.btCollisionShapeData_m_name_get(swigCPtr, this);
-  }
+       public String getM_name () {
+               return gdxBulletJNI.btCollisionShapeData_m_name_get(swigCPtr, this);
+       }
 
-  public void setM_shapeType(int value) {
-    gdxBulletJNI.btCollisionShapeData_m_shapeType_set(swigCPtr, this, value);
-  }
+       public void setM_shapeType (int value) {
+               gdxBulletJNI.btCollisionShapeData_m_shapeType_set(swigCPtr, this, value);
+       }
 
-  public int getM_shapeType() {
-    return gdxBulletJNI.btCollisionShapeData_m_shapeType_get(swigCPtr, this);
-  }
+       public int getM_shapeType () {
+               return gdxBulletJNI.btCollisionShapeData_m_shapeType_get(swigCPtr, this);
+       }
 
-  public void setM_padding(String value) {
-    gdxBulletJNI.btCollisionShapeData_m_padding_set(swigCPtr, this, value);
-  }
+       public void setM_padding (String value) {
+               gdxBulletJNI.btCollisionShapeData_m_padding_set(swigCPtr, this, value);
+       }
 
-  public String getM_padding() {
-    return gdxBulletJNI.btCollisionShapeData_m_padding_get(swigCPtr, this);
-  }
+       public String getM_padding () {
+               return gdxBulletJNI.btCollisionShapeData_m_padding_get(swigCPtr, this);
+       }
 
-  public btCollisionShapeData() {
-    this(gdxBulletJNI.new_btCollisionShapeData(), true);
-  }
+       public btCollisionShapeData () {
+               this(gdxBulletJNI.new_btCollisionShapeData(), true);
+       }
 
 }
index 88b8803..20661d7 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCollisionWorld {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCollisionWorld(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCollisionWorld obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCollisionWorld(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btCollisionWorld(btDispatcher dispatcher, btBroadphaseInterface broadphasePairCache, btCollisionConfiguration collisionConfiguration) {
-    this(gdxBulletJNI.new_btCollisionWorld(btDispatcher.getCPtr(dispatcher), dispatcher, btBroadphaseInterface.getCPtr(broadphasePairCache), broadphasePairCache, btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
-  }
-
-  public void setBroadphase(btBroadphaseInterface pairCache) {
-    gdxBulletJNI.btCollisionWorld_setBroadphase(swigCPtr, this, btBroadphaseInterface.getCPtr(pairCache), pairCache);
-  }
-
-  public btBroadphaseInterface getBroadphase() {
-    long cPtr = gdxBulletJNI.btCollisionWorld_getBroadphase__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphaseInterface(cPtr, false);
-  }
-
-  public btOverlappingPairCache getPairCache() {
-    long cPtr = gdxBulletJNI.btCollisionWorld_getPairCache(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
-  }
-
-  public btDispatcher getDispatcher() {
-    long cPtr = gdxBulletJNI.btCollisionWorld_getDispatcher__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
-  }
-
-  public void updateSingleAabb(btCollisionObject colObj) {
-    gdxBulletJNI.btCollisionWorld_updateSingleAabb(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj);
-  }
-
-  public void updateAabbs() {
-    gdxBulletJNI.btCollisionWorld_updateAabbs(swigCPtr, this);
-  }
-
-  public void setDebugDrawer(btIDebugDraw debugDrawer) {
-    gdxBulletJNI.btCollisionWorld_setDebugDrawer(swigCPtr, this, btIDebugDraw.getCPtr(debugDrawer), debugDrawer);
-  }
-
-  public btIDebugDraw getDebugDrawer() {
-    long cPtr = gdxBulletJNI.btCollisionWorld_getDebugDrawer(swigCPtr, this);
-    return (cPtr == 0) ? null : new btIDebugDraw(cPtr, false);
-  }
-
-  public void debugDrawWorld() {
-    gdxBulletJNI.btCollisionWorld_debugDrawWorld(swigCPtr, this);
-  }
-
-  public void debugDrawObject(btTransform worldTransform, btCollisionShape shape, Vector3 color) {
-    gdxBulletJNI.btCollisionWorld_debugDrawObject(swigCPtr, this, btTransform.getCPtr(worldTransform), worldTransform, btCollisionShape.getCPtr(shape), shape, color);
-  }
-
-  public int getNumCollisionObjects() {
-    return gdxBulletJNI.btCollisionWorld_getNumCollisionObjects(swigCPtr, this);
-  }
-
-  public void rayTest(Vector3 rayFromWorld, Vector3 rayToWorld, SWIGTYPE_p_btCollisionWorld__RayResultCallback resultCallback) {
-    gdxBulletJNI.btCollisionWorld_rayTest(swigCPtr, this, rayFromWorld, rayToWorld, SWIGTYPE_p_btCollisionWorld__RayResultCallback.getCPtr(resultCallback));
-  }
-
-  public void convexSweepTest(btConvexShape castShape, btTransform from, btTransform to, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback, float allowedCcdPenetration) {
-    gdxBulletJNI.btCollisionWorld_convexSweepTest__SWIG_0(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, btTransform.getCPtr(from), from, btTransform.getCPtr(to), to, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback), allowedCcdPenetration);
-  }
-
-  public void convexSweepTest(btConvexShape castShape, btTransform from, btTransform to, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback) {
-    gdxBulletJNI.btCollisionWorld_convexSweepTest__SWIG_1(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, btTransform.getCPtr(from), from, btTransform.getCPtr(to), to, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback));
-  }
-
-  public void contactTest(btCollisionObject colObj, SWIGTYPE_p_btCollisionWorld__ContactResultCallback resultCallback) {
-    gdxBulletJNI.btCollisionWorld_contactTest(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj, SWIGTYPE_p_btCollisionWorld__ContactResultCallback.getCPtr(resultCallback));
-  }
-
-  public void contactPairTest(btCollisionObject colObjA, btCollisionObject colObjB, SWIGTYPE_p_btCollisionWorld__ContactResultCallback resultCallback) {
-    gdxBulletJNI.btCollisionWorld_contactPairTest(swigCPtr, this, btCollisionObject.getCPtr(colObjA), colObjA, btCollisionObject.getCPtr(colObjB), colObjB, SWIGTYPE_p_btCollisionWorld__ContactResultCallback.getCPtr(resultCallback));
-  }
-
-  public static void rayTestSingle(btTransform rayFromTrans, btTransform rayToTrans, btCollisionObject collisionObject, btCollisionShape collisionShape, btTransform colObjWorldTransform, SWIGTYPE_p_btCollisionWorld__RayResultCallback resultCallback) {
-    gdxBulletJNI.btCollisionWorld_rayTestSingle(btTransform.getCPtr(rayFromTrans), rayFromTrans, btTransform.getCPtr(rayToTrans), rayToTrans, btCollisionObject.getCPtr(collisionObject), collisionObject, btCollisionShape.getCPtr(collisionShape), collisionShape, btTransform.getCPtr(colObjWorldTransform), colObjWorldTransform, SWIGTYPE_p_btCollisionWorld__RayResultCallback.getCPtr(resultCallback));
-  }
-
-  public static void objectQuerySingle(btConvexShape castShape, btTransform rayFromTrans, btTransform rayToTrans, btCollisionObject collisionObject, btCollisionShape collisionShape, btTransform colObjWorldTransform, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback, float allowedPenetration) {
-    gdxBulletJNI.btCollisionWorld_objectQuerySingle(btConvexShape.getCPtr(castShape), castShape, btTransform.getCPtr(rayFromTrans), rayFromTrans, btTransform.getCPtr(rayToTrans), rayToTrans, btCollisionObject.getCPtr(collisionObject), collisionObject, btCollisionShape.getCPtr(collisionShape), collisionShape, btTransform.getCPtr(colObjWorldTransform), colObjWorldTransform, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback), allowedPenetration);
-  }
-
-  public void addCollisionObject(btCollisionObject collisionObject, short collisionFilterGroup, short collisionFilterMask) {
-    gdxBulletJNI.btCollisionWorld_addCollisionObject__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(collisionObject), collisionObject, collisionFilterGroup, collisionFilterMask);
-  }
-
-  public void addCollisionObject(btCollisionObject collisionObject, short collisionFilterGroup) {
-    gdxBulletJNI.btCollisionWorld_addCollisionObject__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(collisionObject), collisionObject, collisionFilterGroup);
-  }
-
-  public void addCollisionObject(btCollisionObject collisionObject) {
-    gdxBulletJNI.btCollisionWorld_addCollisionObject__SWIG_2(swigCPtr, this, btCollisionObject.getCPtr(collisionObject), collisionObject);
-  }
-
-  public btCollisionObjectArray getCollisionObjectArray() {
-    return new btCollisionObjectArray(gdxBulletJNI.btCollisionWorld_getCollisionObjectArray__SWIG_0(swigCPtr, this), false);
-  }
-
-  public void removeCollisionObject(btCollisionObject collisionObject) {
-    gdxBulletJNI.btCollisionWorld_removeCollisionObject(swigCPtr, this, btCollisionObject.getCPtr(collisionObject), collisionObject);
-  }
-
-  public void performDiscreteCollisionDetection() {
-    gdxBulletJNI.btCollisionWorld_performDiscreteCollisionDetection(swigCPtr, this);
-  }
-
-  public btDispatcherInfo getDispatchInfo() {
-    return new btDispatcherInfo(gdxBulletJNI.btCollisionWorld_getDispatchInfo__SWIG_0(swigCPtr, this), false);
-  }
-
-  public boolean getForceUpdateAllAabbs() {
-    return gdxBulletJNI.btCollisionWorld_getForceUpdateAllAabbs(swigCPtr, this);
-  }
-
-  public void setForceUpdateAllAabbs(boolean forceUpdateAllAabbs) {
-    gdxBulletJNI.btCollisionWorld_setForceUpdateAllAabbs(swigCPtr, this, forceUpdateAllAabbs);
-  }
-
-  public void serialize(SWIGTYPE_p_btSerializer serializer) {
-    gdxBulletJNI.btCollisionWorld_serialize(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCollisionWorld (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCollisionWorld obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCollisionWorld(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btCollisionWorld (btDispatcher dispatcher, btBroadphaseInterface broadphasePairCache,
+               btCollisionConfiguration collisionConfiguration) {
+               this(gdxBulletJNI.new_btCollisionWorld(btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btBroadphaseInterface.getCPtr(broadphasePairCache), broadphasePairCache,
+                       btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
+       }
+
+       public void setBroadphase (btBroadphaseInterface pairCache) {
+               gdxBulletJNI.btCollisionWorld_setBroadphase(swigCPtr, this, btBroadphaseInterface.getCPtr(pairCache), pairCache);
+       }
+
+       public btBroadphaseInterface getBroadphase () {
+               long cPtr = gdxBulletJNI.btCollisionWorld_getBroadphase__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphaseInterface(cPtr, false);
+       }
+
+       public btOverlappingPairCache getPairCache () {
+               long cPtr = gdxBulletJNI.btCollisionWorld_getPairCache(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
+       }
+
+       public btDispatcher getDispatcher () {
+               long cPtr = gdxBulletJNI.btCollisionWorld_getDispatcher__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDispatcher(cPtr, false);
+       }
+
+       public void updateSingleAabb (btCollisionObject colObj) {
+               gdxBulletJNI.btCollisionWorld_updateSingleAabb(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj);
+       }
+
+       public void updateAabbs () {
+               gdxBulletJNI.btCollisionWorld_updateAabbs(swigCPtr, this);
+       }
+
+       public void setDebugDrawer (btIDebugDraw debugDrawer) {
+               gdxBulletJNI.btCollisionWorld_setDebugDrawer(swigCPtr, this, btIDebugDraw.getCPtr(debugDrawer), debugDrawer);
+       }
+
+       public btIDebugDraw getDebugDrawer () {
+               long cPtr = gdxBulletJNI.btCollisionWorld_getDebugDrawer(swigCPtr, this);
+               return (cPtr == 0) ? null : new btIDebugDraw(cPtr, false);
+       }
+
+       public void debugDrawWorld () {
+               gdxBulletJNI.btCollisionWorld_debugDrawWorld(swigCPtr, this);
+       }
+
+       public void debugDrawObject (btTransform worldTransform, btCollisionShape shape, Vector3 color) {
+               gdxBulletJNI.btCollisionWorld_debugDrawObject(swigCPtr, this, btTransform.getCPtr(worldTransform), worldTransform,
+                       btCollisionShape.getCPtr(shape), shape, color);
+       }
+
+       public int getNumCollisionObjects () {
+               return gdxBulletJNI.btCollisionWorld_getNumCollisionObjects(swigCPtr, this);
+       }
+
+       public void rayTest (Vector3 rayFromWorld, Vector3 rayToWorld, SWIGTYPE_p_btCollisionWorld__RayResultCallback resultCallback) {
+               gdxBulletJNI.btCollisionWorld_rayTest(swigCPtr, this, rayFromWorld, rayToWorld,
+                       SWIGTYPE_p_btCollisionWorld__RayResultCallback.getCPtr(resultCallback));
+       }
+
+       public void convexSweepTest (btConvexShape castShape, btTransform from, btTransform to,
+               SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback, float allowedCcdPenetration) {
+               gdxBulletJNI.btCollisionWorld_convexSweepTest__SWIG_0(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape,
+                       btTransform.getCPtr(from), from, btTransform.getCPtr(to), to,
+                       SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback), allowedCcdPenetration);
+       }
+
+       public void convexSweepTest (btConvexShape castShape, btTransform from, btTransform to,
+               SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback) {
+               gdxBulletJNI.btCollisionWorld_convexSweepTest__SWIG_1(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape,
+                       btTransform.getCPtr(from), from, btTransform.getCPtr(to), to,
+                       SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback));
+       }
+
+       public void contactTest (btCollisionObject colObj, SWIGTYPE_p_btCollisionWorld__ContactResultCallback resultCallback) {
+               gdxBulletJNI.btCollisionWorld_contactTest(swigCPtr, this, btCollisionObject.getCPtr(colObj), colObj,
+                       SWIGTYPE_p_btCollisionWorld__ContactResultCallback.getCPtr(resultCallback));
+       }
+
+       public void contactPairTest (btCollisionObject colObjA, btCollisionObject colObjB,
+               SWIGTYPE_p_btCollisionWorld__ContactResultCallback resultCallback) {
+               gdxBulletJNI.btCollisionWorld_contactPairTest(swigCPtr, this, btCollisionObject.getCPtr(colObjA), colObjA,
+                       btCollisionObject.getCPtr(colObjB), colObjB, SWIGTYPE_p_btCollisionWorld__ContactResultCallback.getCPtr(resultCallback));
+       }
+
+       public static void rayTestSingle (btTransform rayFromTrans, btTransform rayToTrans, btCollisionObject collisionObject,
+               btCollisionShape collisionShape, btTransform colObjWorldTransform,
+               SWIGTYPE_p_btCollisionWorld__RayResultCallback resultCallback) {
+               gdxBulletJNI.btCollisionWorld_rayTestSingle(btTransform.getCPtr(rayFromTrans), rayFromTrans,
+                       btTransform.getCPtr(rayToTrans), rayToTrans, btCollisionObject.getCPtr(collisionObject), collisionObject,
+                       btCollisionShape.getCPtr(collisionShape), collisionShape, btTransform.getCPtr(colObjWorldTransform),
+                       colObjWorldTransform, SWIGTYPE_p_btCollisionWorld__RayResultCallback.getCPtr(resultCallback));
+       }
+
+       public static void objectQuerySingle (btConvexShape castShape, btTransform rayFromTrans, btTransform rayToTrans,
+               btCollisionObject collisionObject, btCollisionShape collisionShape, btTransform colObjWorldTransform,
+               SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback, float allowedPenetration) {
+               gdxBulletJNI.btCollisionWorld_objectQuerySingle(btConvexShape.getCPtr(castShape), castShape,
+                       btTransform.getCPtr(rayFromTrans), rayFromTrans, btTransform.getCPtr(rayToTrans), rayToTrans,
+                       btCollisionObject.getCPtr(collisionObject), collisionObject, btCollisionShape.getCPtr(collisionShape), collisionShape,
+                       btTransform.getCPtr(colObjWorldTransform), colObjWorldTransform,
+                       SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback), allowedPenetration);
+       }
+
+       public void addCollisionObject (btCollisionObject collisionObject, short collisionFilterGroup, short collisionFilterMask) {
+               gdxBulletJNI.btCollisionWorld_addCollisionObject__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
+                       collisionObject, collisionFilterGroup, collisionFilterMask);
+       }
+
+       public void addCollisionObject (btCollisionObject collisionObject, short collisionFilterGroup) {
+               gdxBulletJNI.btCollisionWorld_addCollisionObject__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
+                       collisionObject, collisionFilterGroup);
+       }
+
+       public void addCollisionObject (btCollisionObject collisionObject) {
+               gdxBulletJNI.btCollisionWorld_addCollisionObject__SWIG_2(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
+                       collisionObject);
+       }
+
+       public btCollisionObjectArray getCollisionObjectArray () {
+               return new btCollisionObjectArray(gdxBulletJNI.btCollisionWorld_getCollisionObjectArray__SWIG_0(swigCPtr, this), false);
+       }
+
+       public void removeCollisionObject (btCollisionObject collisionObject) {
+               gdxBulletJNI.btCollisionWorld_removeCollisionObject(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
+                       collisionObject);
+       }
+
+       public void performDiscreteCollisionDetection () {
+               gdxBulletJNI.btCollisionWorld_performDiscreteCollisionDetection(swigCPtr, this);
+       }
+
+       public btDispatcherInfo getDispatchInfo () {
+               return new btDispatcherInfo(gdxBulletJNI.btCollisionWorld_getDispatchInfo__SWIG_0(swigCPtr, this), false);
+       }
+
+       public boolean getForceUpdateAllAabbs () {
+               return gdxBulletJNI.btCollisionWorld_getForceUpdateAllAabbs(swigCPtr, this);
+       }
+
+       public void setForceUpdateAllAabbs (boolean forceUpdateAllAabbs) {
+               gdxBulletJNI.btCollisionWorld_setForceUpdateAllAabbs(swigCPtr, this, forceUpdateAllAabbs);
+       }
+
+       public void serialize (SWIGTYPE_p_btSerializer serializer) {
+               gdxBulletJNI.btCollisionWorld_serialize(swigCPtr, this, SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
 
 }
index f19ea49..6bdd775 100644 (file)
@@ -8,39 +8,37 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCompoundCollisionAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btCompoundCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCompoundCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCompoundCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCompoundCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btCompoundCollisionAlgorithm(btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1, boolean isSwapped) {
-    this(gdxBulletJNI.new_btCompoundCollisionAlgorithm(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, isSwapped), true);
-  }
+       private long swigCPtr;
+
+       protected btCompoundCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCompoundCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCompoundCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCompoundCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btCompoundCollisionAlgorithm (btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0,
+               btCollisionObject body1, boolean isSwapped) {
+               this(gdxBulletJNI.new_btCompoundCollisionAlgorithm(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci,
+                       btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, isSwapped), true);
+       }
 
 }
index 73b9590..caaacca 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCompoundShape extends btCollisionShape {
-  private long swigCPtr;
-
-  protected btCompoundShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCompoundShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCompoundShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCompoundShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btCompoundShape(boolean enableDynamicAabbTree) {
-    this(gdxBulletJNI.new_btCompoundShape__SWIG_0(enableDynamicAabbTree), true);
-  }
-
-  public btCompoundShape() {
-    this(gdxBulletJNI.new_btCompoundShape__SWIG_1(), true);
-  }
-
-  public void addChildShape(btTransform localTransform, btCollisionShape shape) {
-    gdxBulletJNI.btCompoundShape_addChildShape(swigCPtr, this, btTransform.getCPtr(localTransform), localTransform, btCollisionShape.getCPtr(shape), shape);
-  }
-
-  public void removeChildShape(btCollisionShape shape) {
-    gdxBulletJNI.btCompoundShape_removeChildShape(swigCPtr, this, btCollisionShape.getCPtr(shape), shape);
-  }
-
-  public void removeChildShapeByIndex(int childShapeindex) {
-    gdxBulletJNI.btCompoundShape_removeChildShapeByIndex(swigCPtr, this, childShapeindex);
-  }
-
-  public int getNumChildShapes() {
-    return gdxBulletJNI.btCompoundShape_getNumChildShapes(swigCPtr, this);
-  }
-
-  public btCollisionShape getChildShape(int index) {
-    long cPtr = gdxBulletJNI.btCompoundShape_getChildShape__SWIG_0(swigCPtr, this, index);
-    return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
-  }
-
-  public btTransform getChildTransform(int index) {
-    return new btTransform(gdxBulletJNI.btCompoundShape_getChildTransform__SWIG_0(swigCPtr, this, index), false);
-  }
-
-  public void updateChildTransform(int childIndex, btTransform newChildTransform, boolean shouldRecalculateLocalAabb) {
-    gdxBulletJNI.btCompoundShape_updateChildTransform__SWIG_0(swigCPtr, this, childIndex, btTransform.getCPtr(newChildTransform), newChildTransform, shouldRecalculateLocalAabb);
-  }
-
-  public void updateChildTransform(int childIndex, btTransform newChildTransform) {
-    gdxBulletJNI.btCompoundShape_updateChildTransform__SWIG_1(swigCPtr, this, childIndex, btTransform.getCPtr(newChildTransform), newChildTransform);
-  }
-
-  public btCompoundShapeChild getChildList() {
-    long cPtr = gdxBulletJNI.btCompoundShape_getChildList(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCompoundShapeChild(cPtr, false);
-  }
-
-  public void recalculateLocalAabb() {
-    gdxBulletJNI.btCompoundShape_recalculateLocalAabb(swigCPtr, this);
-  }
-
-  public btDbvt getDynamicAabbTree() {
-    long cPtr = gdxBulletJNI.btCompoundShape_getDynamicAabbTree__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvt(cPtr, false);
-  }
-
-  public void createAabbTreeFromChildren() {
-    gdxBulletJNI.btCompoundShape_createAabbTreeFromChildren(swigCPtr, this);
-  }
-
-  public void calculatePrincipalAxisTransform(float[] masses, btTransform principal, Vector3 inertia) {
-    gdxBulletJNI.btCompoundShape_calculatePrincipalAxisTransform(swigCPtr, this, masses, btTransform.getCPtr(principal), principal, inertia);
-  }
-
-  public int getUpdateRevision() {
-    return gdxBulletJNI.btCompoundShape_getUpdateRevision(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btCompoundShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCompoundShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCompoundShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCompoundShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btCompoundShape (boolean enableDynamicAabbTree) {
+               this(gdxBulletJNI.new_btCompoundShape__SWIG_0(enableDynamicAabbTree), true);
+       }
+
+       public btCompoundShape () {
+               this(gdxBulletJNI.new_btCompoundShape__SWIG_1(), true);
+       }
+
+       public void addChildShape (btTransform localTransform, btCollisionShape shape) {
+               gdxBulletJNI.btCompoundShape_addChildShape(swigCPtr, this, btTransform.getCPtr(localTransform), localTransform,
+                       btCollisionShape.getCPtr(shape), shape);
+       }
+
+       public void removeChildShape (btCollisionShape shape) {
+               gdxBulletJNI.btCompoundShape_removeChildShape(swigCPtr, this, btCollisionShape.getCPtr(shape), shape);
+       }
+
+       public void removeChildShapeByIndex (int childShapeindex) {
+               gdxBulletJNI.btCompoundShape_removeChildShapeByIndex(swigCPtr, this, childShapeindex);
+       }
+
+       public int getNumChildShapes () {
+               return gdxBulletJNI.btCompoundShape_getNumChildShapes(swigCPtr, this);
+       }
+
+       public btCollisionShape getChildShape (int index) {
+               long cPtr = gdxBulletJNI.btCompoundShape_getChildShape__SWIG_0(swigCPtr, this, index);
+               return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
+       }
+
+       public btTransform getChildTransform (int index) {
+               return new btTransform(gdxBulletJNI.btCompoundShape_getChildTransform__SWIG_0(swigCPtr, this, index), false);
+       }
+
+       public void updateChildTransform (int childIndex, btTransform newChildTransform, boolean shouldRecalculateLocalAabb) {
+               gdxBulletJNI.btCompoundShape_updateChildTransform__SWIG_0(swigCPtr, this, childIndex,
+                       btTransform.getCPtr(newChildTransform), newChildTransform, shouldRecalculateLocalAabb);
+       }
+
+       public void updateChildTransform (int childIndex, btTransform newChildTransform) {
+               gdxBulletJNI.btCompoundShape_updateChildTransform__SWIG_1(swigCPtr, this, childIndex,
+                       btTransform.getCPtr(newChildTransform), newChildTransform);
+       }
+
+       public btCompoundShapeChild getChildList () {
+               long cPtr = gdxBulletJNI.btCompoundShape_getChildList(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCompoundShapeChild(cPtr, false);
+       }
+
+       public void recalculateLocalAabb () {
+               gdxBulletJNI.btCompoundShape_recalculateLocalAabb(swigCPtr, this);
+       }
+
+       public btDbvt getDynamicAabbTree () {
+               long cPtr = gdxBulletJNI.btCompoundShape_getDynamicAabbTree__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvt(cPtr, false);
+       }
+
+       public void createAabbTreeFromChildren () {
+               gdxBulletJNI.btCompoundShape_createAabbTreeFromChildren(swigCPtr, this);
+       }
+
+       public void calculatePrincipalAxisTransform (float[] masses, btTransform principal, Vector3 inertia) {
+               gdxBulletJNI.btCompoundShape_calculatePrincipalAxisTransform(swigCPtr, this, masses, btTransform.getCPtr(principal),
+                       principal, inertia);
+       }
+
+       public int getUpdateRevision () {
+               return gdxBulletJNI.btCompoundShape_getUpdateRevision(swigCPtr, this);
+       }
 
 }
index 34506f5..651c472 100644 (file)
@@ -8,82 +8,78 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCompoundShapeChild {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCompoundShapeChild(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCompoundShapeChild obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCompoundShapeChild(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_transform(btTransform value) {
-    gdxBulletJNI.btCompoundShapeChild_m_transform_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_transform() {
-    long cPtr = gdxBulletJNI.btCompoundShapeChild_m_transform_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_childShape(btCollisionShape value) {
-    gdxBulletJNI.btCompoundShapeChild_m_childShape_set(swigCPtr, this, btCollisionShape.getCPtr(value), value);
-  }
-
-  public btCollisionShape getM_childShape() {
-    long cPtr = gdxBulletJNI.btCompoundShapeChild_m_childShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
-  }
-
-  public void setM_childShapeType(int value) {
-    gdxBulletJNI.btCompoundShapeChild_m_childShapeType_set(swigCPtr, this, value);
-  }
-
-  public int getM_childShapeType() {
-    return gdxBulletJNI.btCompoundShapeChild_m_childShapeType_get(swigCPtr, this);
-  }
-
-  public void setM_childMargin(float value) {
-    gdxBulletJNI.btCompoundShapeChild_m_childMargin_set(swigCPtr, this, value);
-  }
-
-  public float getM_childMargin() {
-    return gdxBulletJNI.btCompoundShapeChild_m_childMargin_get(swigCPtr, this);
-  }
-
-  public void setM_node(btDbvtNode value) {
-    gdxBulletJNI.btCompoundShapeChild_m_node_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
-  }
-
-  public btDbvtNode getM_node() {
-    long cPtr = gdxBulletJNI.btCompoundShapeChild_m_node_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
-  }
-
-  public btCompoundShapeChild() {
-    this(gdxBulletJNI.new_btCompoundShapeChild(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCompoundShapeChild (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCompoundShapeChild obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCompoundShapeChild(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_transform (btTransform value) {
+               gdxBulletJNI.btCompoundShapeChild_m_transform_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_transform () {
+               long cPtr = gdxBulletJNI.btCompoundShapeChild_m_transform_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_childShape (btCollisionShape value) {
+               gdxBulletJNI.btCompoundShapeChild_m_childShape_set(swigCPtr, this, btCollisionShape.getCPtr(value), value);
+       }
+
+       public btCollisionShape getM_childShape () {
+               long cPtr = gdxBulletJNI.btCompoundShapeChild_m_childShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
+       }
+
+       public void setM_childShapeType (int value) {
+               gdxBulletJNI.btCompoundShapeChild_m_childShapeType_set(swigCPtr, this, value);
+       }
+
+       public int getM_childShapeType () {
+               return gdxBulletJNI.btCompoundShapeChild_m_childShapeType_get(swigCPtr, this);
+       }
+
+       public void setM_childMargin (float value) {
+               gdxBulletJNI.btCompoundShapeChild_m_childMargin_set(swigCPtr, this, value);
+       }
+
+       public float getM_childMargin () {
+               return gdxBulletJNI.btCompoundShapeChild_m_childMargin_get(swigCPtr, this);
+       }
+
+       public void setM_node (btDbvtNode value) {
+               gdxBulletJNI.btCompoundShapeChild_m_node_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
+       }
+
+       public btDbvtNode getM_node () {
+               long cPtr = gdxBulletJNI.btCompoundShapeChild_m_node_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
+       }
+
+       public btCompoundShapeChild () {
+               this(gdxBulletJNI.new_btCompoundShapeChild(), true);
+       }
 
 }
index a0b2fe5..6a72b20 100644 (file)
@@ -8,73 +8,69 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCompoundShapeChildData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCompoundShapeChildData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCompoundShapeChildData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCompoundShapeChildData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_transform(btTransformFloatData value) {
-    gdxBulletJNI.btCompoundShapeChildData_m_transform_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_transform() {
-    long cPtr = gdxBulletJNI.btCompoundShapeChildData_m_transform_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_childShape(btCollisionShapeData value) {
-    gdxBulletJNI.btCompoundShapeChildData_m_childShape_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
-  }
-
-  public btCollisionShapeData getM_childShape() {
-    long cPtr = gdxBulletJNI.btCompoundShapeChildData_m_childShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
-  }
-
-  public void setM_childShapeType(int value) {
-    gdxBulletJNI.btCompoundShapeChildData_m_childShapeType_set(swigCPtr, this, value);
-  }
-
-  public int getM_childShapeType() {
-    return gdxBulletJNI.btCompoundShapeChildData_m_childShapeType_get(swigCPtr, this);
-  }
-
-  public void setM_childMargin(float value) {
-    gdxBulletJNI.btCompoundShapeChildData_m_childMargin_set(swigCPtr, this, value);
-  }
-
-  public float getM_childMargin() {
-    return gdxBulletJNI.btCompoundShapeChildData_m_childMargin_get(swigCPtr, this);
-  }
-
-  public btCompoundShapeChildData() {
-    this(gdxBulletJNI.new_btCompoundShapeChildData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCompoundShapeChildData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCompoundShapeChildData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCompoundShapeChildData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_transform (btTransformFloatData value) {
+               gdxBulletJNI.btCompoundShapeChildData_m_transform_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_transform () {
+               long cPtr = gdxBulletJNI.btCompoundShapeChildData_m_transform_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_childShape (btCollisionShapeData value) {
+               gdxBulletJNI.btCompoundShapeChildData_m_childShape_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
+       }
+
+       public btCollisionShapeData getM_childShape () {
+               long cPtr = gdxBulletJNI.btCompoundShapeChildData_m_childShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
+       }
+
+       public void setM_childShapeType (int value) {
+               gdxBulletJNI.btCompoundShapeChildData_m_childShapeType_set(swigCPtr, this, value);
+       }
+
+       public int getM_childShapeType () {
+               return gdxBulletJNI.btCompoundShapeChildData_m_childShapeType_get(swigCPtr, this);
+       }
+
+       public void setM_childMargin (float value) {
+               gdxBulletJNI.btCompoundShapeChildData_m_childMargin_set(swigCPtr, this, value);
+       }
+
+       public float getM_childMargin () {
+               return gdxBulletJNI.btCompoundShapeChildData_m_childMargin_get(swigCPtr, this);
+       }
+
+       public btCompoundShapeChildData () {
+               this(gdxBulletJNI.new_btCompoundShapeChildData(), true);
+       }
 
 }
index 114e9d9..aeac015 100644 (file)
@@ -8,73 +8,69 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCompoundShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btCompoundShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCompoundShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCompoundShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_collisionShapeData(btCollisionShapeData value) {
-    gdxBulletJNI.btCompoundShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
-  }
-
-  public btCollisionShapeData getM_collisionShapeData() {
-    long cPtr = gdxBulletJNI.btCompoundShapeData_m_collisionShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
-  }
-
-  public void setM_childShapePtr(btCompoundShapeChildData value) {
-    gdxBulletJNI.btCompoundShapeData_m_childShapePtr_set(swigCPtr, this, btCompoundShapeChildData.getCPtr(value), value);
-  }
-
-  public btCompoundShapeChildData getM_childShapePtr() {
-    long cPtr = gdxBulletJNI.btCompoundShapeData_m_childShapePtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCompoundShapeChildData(cPtr, false);
-  }
-
-  public void setM_numChildShapes(int value) {
-    gdxBulletJNI.btCompoundShapeData_m_numChildShapes_set(swigCPtr, this, value);
-  }
-
-  public int getM_numChildShapes() {
-    return gdxBulletJNI.btCompoundShapeData_m_numChildShapes_get(swigCPtr, this);
-  }
-
-  public void setM_collisionMargin(float value) {
-    gdxBulletJNI.btCompoundShapeData_m_collisionMargin_set(swigCPtr, this, value);
-  }
-
-  public float getM_collisionMargin() {
-    return gdxBulletJNI.btCompoundShapeData_m_collisionMargin_get(swigCPtr, this);
-  }
-
-  public btCompoundShapeData() {
-    this(gdxBulletJNI.new_btCompoundShapeData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btCompoundShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCompoundShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCompoundShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_collisionShapeData (btCollisionShapeData value) {
+               gdxBulletJNI.btCompoundShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
+       }
+
+       public btCollisionShapeData getM_collisionShapeData () {
+               long cPtr = gdxBulletJNI.btCompoundShapeData_m_collisionShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
+       }
+
+       public void setM_childShapePtr (btCompoundShapeChildData value) {
+               gdxBulletJNI.btCompoundShapeData_m_childShapePtr_set(swigCPtr, this, btCompoundShapeChildData.getCPtr(value), value);
+       }
+
+       public btCompoundShapeChildData getM_childShapePtr () {
+               long cPtr = gdxBulletJNI.btCompoundShapeData_m_childShapePtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCompoundShapeChildData(cPtr, false);
+       }
+
+       public void setM_numChildShapes (int value) {
+               gdxBulletJNI.btCompoundShapeData_m_numChildShapes_set(swigCPtr, this, value);
+       }
+
+       public int getM_numChildShapes () {
+               return gdxBulletJNI.btCompoundShapeData_m_numChildShapes_get(swigCPtr, this);
+       }
+
+       public void setM_collisionMargin (float value) {
+               gdxBulletJNI.btCompoundShapeData_m_collisionMargin_set(swigCPtr, this, value);
+       }
+
+       public float getM_collisionMargin () {
+               return gdxBulletJNI.btCompoundShapeData_m_collisionMargin_get(swigCPtr, this);
+       }
+
+       public btCompoundShapeData () {
+               this(gdxBulletJNI.new_btCompoundShapeData(), true);
+       }
 
 }
index 60e7e3d..1b4b101 100644 (file)
@@ -9,38 +9,37 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConcaveShape extends btCollisionShape {
-  private long swigCPtr;
-
-  protected btConcaveShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConcaveShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConcaveShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConcaveShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void processAllTriangles(btTriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btConcaveShape_processAllTriangles(swigCPtr, this, btTriangleCallback.getCPtr(callback), callback, aabbMin, aabbMax);
-  }
+       private long swigCPtr;
+
+       protected btConcaveShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConcaveShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConcaveShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConcaveShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void processAllTriangles (btTriangleCallback callback, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btConcaveShape_processAllTriangles(swigCPtr, this, btTriangleCallback.getCPtr(callback), callback, aabbMin,
+                       aabbMax);
+       }
 
 }
index a8c17fb..ba85503 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConeShape extends btConvexInternalShape {
-  private long swigCPtr;
-
-  protected btConeShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConeShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConeShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConeShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConeShape(float radius, float height) {
-    this(gdxBulletJNI.new_btConeShape(radius, height), true);
-  }
-
-  public float getRadius() {
-    return gdxBulletJNI.btConeShape_getRadius(swigCPtr, this);
-  }
-
-  public float getHeight() {
-    return gdxBulletJNI.btConeShape_getHeight(swigCPtr, this);
-  }
-
-  public void setConeUpIndex(int upIndex) {
-    gdxBulletJNI.btConeShape_setConeUpIndex(swigCPtr, this, upIndex);
-  }
-
-  public int getConeUpIndex() {
-    return gdxBulletJNI.btConeShape_getConeUpIndex(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btConeShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConeShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConeShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConeShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConeShape (float radius, float height) {
+               this(gdxBulletJNI.new_btConeShape(radius, height), true);
+       }
+
+       public float getRadius () {
+               return gdxBulletJNI.btConeShape_getRadius(swigCPtr, this);
+       }
+
+       public float getHeight () {
+               return gdxBulletJNI.btConeShape_getHeight(swigCPtr, this);
+       }
+
+       public void setConeUpIndex (int upIndex) {
+               gdxBulletJNI.btConeShape_setConeUpIndex(swigCPtr, this, upIndex);
+       }
+
+       public int getConeUpIndex () {
+               return gdxBulletJNI.btConeShape_getConeUpIndex(swigCPtr, this);
+       }
 
 }
index c854dd8..1e404ba 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConeShapeX extends btConeShape {
-  private long swigCPtr;
-
-  protected btConeShapeX(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConeShapeX_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConeShapeX obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConeShapeX(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConeShapeX(float radius, float height) {
-    this(gdxBulletJNI.new_btConeShapeX(radius, height), true);
-  }
+       private long swigCPtr;
+
+       protected btConeShapeX (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConeShapeX_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConeShapeX obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConeShapeX(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConeShapeX (float radius, float height) {
+               this(gdxBulletJNI.new_btConeShapeX(radius, height), true);
+       }
 
 }
index 2dca097..5e6a8e0 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConeShapeZ extends btConeShape {
-  private long swigCPtr;
-
-  protected btConeShapeZ(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConeShapeZ_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConeShapeZ obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConeShapeZ(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConeShapeZ(float radius, float height) {
-    this(gdxBulletJNI.new_btConeShapeZ(radius, height), true);
-  }
+       private long swigCPtr;
+
+       protected btConeShapeZ (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConeShapeZ_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConeShapeZ obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConeShapeZ(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConeShapeZ (float radius, float height) {
+               this(gdxBulletJNI.new_btConeShapeZ(radius, height), true);
+       }
 
 }
index c4dda96..7f38bd0 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
 import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Quaternion;
+import com.badlogic.gdx.math.Vector3;
 
 public class btConeTwistConstraint extends btTypedConstraint {
-  private long swigCPtr;
-
-  protected btConeTwistConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConeTwistConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConeTwistConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConeTwistConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConeTwistConstraint(btRigidBody rbA, btRigidBody rbB, btTransform rbAFrame, btTransform rbBFrame) {
-    this(gdxBulletJNI.new_btConeTwistConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(rbAFrame), rbAFrame, btTransform.getCPtr(rbBFrame), rbBFrame), true);
-  }
-
-  public btConeTwistConstraint(btRigidBody rbA, btTransform rbAFrame) {
-    this(gdxBulletJNI.new_btConeTwistConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, btTransform.getCPtr(rbAFrame), rbAFrame), true);
-  }
-
-  public void getInfo1NonVirtual(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
-    gdxBulletJNI.btConeTwistConstraint_getInfo1NonVirtual(swigCPtr, this, SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
-  }
-
-  public void getInfo2NonVirtual(btConstraintInfo2 info, btTransform transA, btTransform transB, Matrix3 invInertiaWorldA, Matrix3 invInertiaWorldB) {
-    gdxBulletJNI.btConeTwistConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, invInertiaWorldA, invInertiaWorldB);
-  }
-
-  public void updateRHS(float timeStep) {
-    gdxBulletJNI.btConeTwistConstraint_updateRHS(swigCPtr, this, timeStep);
-  }
-
-  public btRigidBody getRigidBodyA() {
-    return new btRigidBody(gdxBulletJNI.btConeTwistConstraint_getRigidBodyA(swigCPtr, this), false);
-  }
-
-  public btRigidBody getRigidBodyB() {
-    return new btRigidBody(gdxBulletJNI.btConeTwistConstraint_getRigidBodyB(swigCPtr, this), false);
-  }
-
-  public void setAngularOnly(boolean angularOnly) {
-    gdxBulletJNI.btConeTwistConstraint_setAngularOnly(swigCPtr, this, angularOnly);
-  }
-
-  public void setLimit(int limitIndex, float limitValue) {
-    gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_0(swigCPtr, this, limitIndex, limitValue);
-  }
-
-  public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor, float _relaxationFactor) {
-    gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_1(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor, _relaxationFactor);
-  }
-
-  public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor) {
-    gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_2(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan, _softness, _biasFactor);
-  }
-
-  public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness) {
-    gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_3(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan, _softness);
-  }
-
-  public void setLimit(float _swingSpan1, float _swingSpan2, float _twistSpan) {
-    gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_4(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan);
-  }
-
-  public btTransform getAFrame() {
-    return new btTransform(gdxBulletJNI.btConeTwistConstraint_getAFrame(swigCPtr, this), false);
-  }
-
-  public btTransform getBFrame() {
-    return new btTransform(gdxBulletJNI.btConeTwistConstraint_getBFrame(swigCPtr, this), false);
-  }
-
-  public int getSolveTwistLimit() {
-    return gdxBulletJNI.btConeTwistConstraint_getSolveTwistLimit(swigCPtr, this);
-  }
-
-  public int getSolveSwingLimit() {
-    return gdxBulletJNI.btConeTwistConstraint_getSolveSwingLimit(swigCPtr, this);
-  }
-
-  public float getTwistLimitSign() {
-    return gdxBulletJNI.btConeTwistConstraint_getTwistLimitSign(swigCPtr, this);
-  }
-
-  public void calcAngleInfo() {
-    gdxBulletJNI.btConeTwistConstraint_calcAngleInfo(swigCPtr, this);
-  }
-
-  public void calcAngleInfo2(btTransform transA, btTransform transB, Matrix3 invInertiaWorldA, Matrix3 invInertiaWorldB) {
-    gdxBulletJNI.btConeTwistConstraint_calcAngleInfo2(swigCPtr, this, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, invInertiaWorldA, invInertiaWorldB);
-  }
-
-  public float getSwingSpan1() {
-    return gdxBulletJNI.btConeTwistConstraint_getSwingSpan1(swigCPtr, this);
-  }
-
-  public float getSwingSpan2() {
-    return gdxBulletJNI.btConeTwistConstraint_getSwingSpan2(swigCPtr, this);
-  }
-
-  public float getTwistSpan() {
-    return gdxBulletJNI.btConeTwistConstraint_getTwistSpan(swigCPtr, this);
-  }
-
-  public float getTwistAngle() {
-    return gdxBulletJNI.btConeTwistConstraint_getTwistAngle(swigCPtr, this);
-  }
-
-  public boolean isPastSwingLimit() {
-    return gdxBulletJNI.btConeTwistConstraint_isPastSwingLimit(swigCPtr, this);
-  }
-
-  public void setDamping(float damping) {
-    gdxBulletJNI.btConeTwistConstraint_setDamping(swigCPtr, this, damping);
-  }
-
-  public void enableMotor(boolean b) {
-    gdxBulletJNI.btConeTwistConstraint_enableMotor(swigCPtr, this, b);
-  }
-
-  public void setMaxMotorImpulse(float maxMotorImpulse) {
-    gdxBulletJNI.btConeTwistConstraint_setMaxMotorImpulse(swigCPtr, this, maxMotorImpulse);
-  }
-
-  public void setMaxMotorImpulseNormalized(float maxMotorImpulse) {
-    gdxBulletJNI.btConeTwistConstraint_setMaxMotorImpulseNormalized(swigCPtr, this, maxMotorImpulse);
-  }
-
-  public float getFixThresh() {
-    return gdxBulletJNI.btConeTwistConstraint_getFixThresh(swigCPtr, this);
-  }
-
-  public void setFixThresh(float fixThresh) {
-    gdxBulletJNI.btConeTwistConstraint_setFixThresh(swigCPtr, this, fixThresh);
-  }
-
-  public void setMotorTarget(Quaternion q) {
-    gdxBulletJNI.btConeTwistConstraint_setMotorTarget(swigCPtr, this, q);
-  }
-
-  public void setMotorTargetInConstraintSpace(Quaternion q) {
-    gdxBulletJNI.btConeTwistConstraint_setMotorTargetInConstraintSpace(swigCPtr, this, q);
-  }
-
-  public Vector3 GetPointForAngle(float fAngleInRadians, float fLength) {
-       return gdxBulletJNI.btConeTwistConstraint_GetPointForAngle(swigCPtr, this, fAngleInRadians, fLength);
-}
-
-  public void setParam(int num, float value, int axis) {
-    gdxBulletJNI.btConeTwistConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
-  }
-
-  public void setParam(int num, float value) {
-    gdxBulletJNI.btConeTwistConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
-  }
-
-  public void setFrames(btTransform frameA, btTransform frameB) {
-    gdxBulletJNI.btConeTwistConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA, btTransform.getCPtr(frameB), frameB);
-  }
-
-  public btTransform getFrameOffsetA() {
-    return new btTransform(gdxBulletJNI.btConeTwistConstraint_getFrameOffsetA(swigCPtr, this), false);
-  }
-
-  public btTransform getFrameOffsetB() {
-    return new btTransform(gdxBulletJNI.btConeTwistConstraint_getFrameOffsetB(swigCPtr, this), false);
-  }
-
-  public float getParam(int num, int axis) {
-    return gdxBulletJNI.btConeTwistConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
-  }
-
-  public float getParam(int num) {
-    return gdxBulletJNI.btConeTwistConstraint_getParam__SWIG_1(swigCPtr, this, num);
-  }
+       private long swigCPtr;
+
+       protected btConeTwistConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConeTwistConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConeTwistConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConeTwistConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConeTwistConstraint (btRigidBody rbA, btRigidBody rbB, btTransform rbAFrame, btTransform rbBFrame) {
+               this(gdxBulletJNI.new_btConeTwistConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB,
+                       btTransform.getCPtr(rbAFrame), rbAFrame, btTransform.getCPtr(rbBFrame), rbBFrame), true);
+       }
+
+       public btConeTwistConstraint (btRigidBody rbA, btTransform rbAFrame) {
+               this(
+                       gdxBulletJNI.new_btConeTwistConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, btTransform.getCPtr(rbAFrame), rbAFrame),
+                       true);
+       }
+
+       public void getInfo1NonVirtual (SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
+               gdxBulletJNI.btConeTwistConstraint_getInfo1NonVirtual(swigCPtr, this,
+                       SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
+       }
+
+       public void getInfo2NonVirtual (btConstraintInfo2 info, btTransform transA, btTransform transB, Matrix3 invInertiaWorldA,
+               Matrix3 invInertiaWorldB) {
+               gdxBulletJNI.btConeTwistConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info,
+                       btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, invInertiaWorldA, invInertiaWorldB);
+       }
+
+       public void updateRHS (float timeStep) {
+               gdxBulletJNI.btConeTwistConstraint_updateRHS(swigCPtr, this, timeStep);
+       }
+
+       public btRigidBody getRigidBodyA () {
+               return new btRigidBody(gdxBulletJNI.btConeTwistConstraint_getRigidBodyA(swigCPtr, this), false);
+       }
+
+       public btRigidBody getRigidBodyB () {
+               return new btRigidBody(gdxBulletJNI.btConeTwistConstraint_getRigidBodyB(swigCPtr, this), false);
+       }
+
+       public void setAngularOnly (boolean angularOnly) {
+               gdxBulletJNI.btConeTwistConstraint_setAngularOnly(swigCPtr, this, angularOnly);
+       }
+
+       public void setLimit (int limitIndex, float limitValue) {
+               gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_0(swigCPtr, this, limitIndex, limitValue);
+       }
+
+       public void setLimit (float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor,
+               float _relaxationFactor) {
+               gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_1(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan, _softness,
+                       _biasFactor, _relaxationFactor);
+       }
+
+       public void setLimit (float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness, float _biasFactor) {
+               gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_2(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan, _softness,
+                       _biasFactor);
+       }
+
+       public void setLimit (float _swingSpan1, float _swingSpan2, float _twistSpan, float _softness) {
+               gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_3(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan, _softness);
+       }
+
+       public void setLimit (float _swingSpan1, float _swingSpan2, float _twistSpan) {
+               gdxBulletJNI.btConeTwistConstraint_setLimit__SWIG_4(swigCPtr, this, _swingSpan1, _swingSpan2, _twistSpan);
+       }
+
+       public btTransform getAFrame () {
+               return new btTransform(gdxBulletJNI.btConeTwistConstraint_getAFrame(swigCPtr, this), false);
+       }
+
+       public btTransform getBFrame () {
+               return new btTransform(gdxBulletJNI.btConeTwistConstraint_getBFrame(swigCPtr, this), false);
+       }
+
+       public int getSolveTwistLimit () {
+               return gdxBulletJNI.btConeTwistConstraint_getSolveTwistLimit(swigCPtr, this);
+       }
+
+       public int getSolveSwingLimit () {
+               return gdxBulletJNI.btConeTwistConstraint_getSolveSwingLimit(swigCPtr, this);
+       }
+
+       public float getTwistLimitSign () {
+               return gdxBulletJNI.btConeTwistConstraint_getTwistLimitSign(swigCPtr, this);
+       }
+
+       public void calcAngleInfo () {
+               gdxBulletJNI.btConeTwistConstraint_calcAngleInfo(swigCPtr, this);
+       }
+
+       public void calcAngleInfo2 (btTransform transA, btTransform transB, Matrix3 invInertiaWorldA, Matrix3 invInertiaWorldB) {
+               gdxBulletJNI.btConeTwistConstraint_calcAngleInfo2(swigCPtr, this, btTransform.getCPtr(transA), transA,
+                       btTransform.getCPtr(transB), transB, invInertiaWorldA, invInertiaWorldB);
+       }
+
+       public float getSwingSpan1 () {
+               return gdxBulletJNI.btConeTwistConstraint_getSwingSpan1(swigCPtr, this);
+       }
+
+       public float getSwingSpan2 () {
+               return gdxBulletJNI.btConeTwistConstraint_getSwingSpan2(swigCPtr, this);
+       }
+
+       public float getTwistSpan () {
+               return gdxBulletJNI.btConeTwistConstraint_getTwistSpan(swigCPtr, this);
+       }
+
+       public float getTwistAngle () {
+               return gdxBulletJNI.btConeTwistConstraint_getTwistAngle(swigCPtr, this);
+       }
+
+       public boolean isPastSwingLimit () {
+               return gdxBulletJNI.btConeTwistConstraint_isPastSwingLimit(swigCPtr, this);
+       }
+
+       public void setDamping (float damping) {
+               gdxBulletJNI.btConeTwistConstraint_setDamping(swigCPtr, this, damping);
+       }
+
+       public void enableMotor (boolean b) {
+               gdxBulletJNI.btConeTwistConstraint_enableMotor(swigCPtr, this, b);
+       }
+
+       public void setMaxMotorImpulse (float maxMotorImpulse) {
+               gdxBulletJNI.btConeTwistConstraint_setMaxMotorImpulse(swigCPtr, this, maxMotorImpulse);
+       }
+
+       public void setMaxMotorImpulseNormalized (float maxMotorImpulse) {
+               gdxBulletJNI.btConeTwistConstraint_setMaxMotorImpulseNormalized(swigCPtr, this, maxMotorImpulse);
+       }
+
+       public float getFixThresh () {
+               return gdxBulletJNI.btConeTwistConstraint_getFixThresh(swigCPtr, this);
+       }
+
+       public void setFixThresh (float fixThresh) {
+               gdxBulletJNI.btConeTwistConstraint_setFixThresh(swigCPtr, this, fixThresh);
+       }
+
+       public void setMotorTarget (Quaternion q) {
+               gdxBulletJNI.btConeTwistConstraint_setMotorTarget(swigCPtr, this, q);
+       }
+
+       public void setMotorTargetInConstraintSpace (Quaternion q) {
+               gdxBulletJNI.btConeTwistConstraint_setMotorTargetInConstraintSpace(swigCPtr, this, q);
+       }
+
+       public Vector3 GetPointForAngle (float fAngleInRadians, float fLength) {
+               return gdxBulletJNI.btConeTwistConstraint_GetPointForAngle(swigCPtr, this, fAngleInRadians, fLength);
+       }
+
+       public void setParam (int num, float value, int axis) {
+               gdxBulletJNI.btConeTwistConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
+       }
+
+       public void setParam (int num, float value) {
+               gdxBulletJNI.btConeTwistConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
+       }
+
+       public void setFrames (btTransform frameA, btTransform frameB) {
+               gdxBulletJNI.btConeTwistConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA,
+                       btTransform.getCPtr(frameB), frameB);
+       }
+
+       public btTransform getFrameOffsetA () {
+               return new btTransform(gdxBulletJNI.btConeTwistConstraint_getFrameOffsetA(swigCPtr, this), false);
+       }
+
+       public btTransform getFrameOffsetB () {
+               return new btTransform(gdxBulletJNI.btConeTwistConstraint_getFrameOffsetB(swigCPtr, this), false);
+       }
+
+       public float getParam (int num, int axis) {
+               return gdxBulletJNI.btConeTwistConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
+       }
+
+       public float getParam (int num) {
+               return gdxBulletJNI.btConeTwistConstraint_getParam__SWIG_1(swigCPtr, this, num);
+       }
 
 }
index 7e95d5c..f1f3f80 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConeTwistConstraintData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConeTwistConstraintData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConeTwistConstraintData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConeTwistConstraintData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_typeConstraintData(btTypedConstraintData value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
-  }
-
-  public btTypedConstraintData getM_typeConstraintData() {
-    long cPtr = gdxBulletJNI.btConeTwistConstraintData_m_typeConstraintData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
-  }
-
-  public void setM_rbAFrame(btTransformFloatData value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbAFrame() {
-    long cPtr = gdxBulletJNI.btConeTwistConstraintData_m_rbAFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_rbBFrame(btTransformFloatData value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbBFrame() {
-    long cPtr = gdxBulletJNI.btConeTwistConstraintData_m_rbBFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_swingSpan1(float value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_swingSpan1_set(swigCPtr, this, value);
-  }
-
-  public float getM_swingSpan1() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_swingSpan1_get(swigCPtr, this);
-  }
-
-  public void setM_swingSpan2(float value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_swingSpan2_set(swigCPtr, this, value);
-  }
-
-  public float getM_swingSpan2() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_swingSpan2_get(swigCPtr, this);
-  }
-
-  public void setM_twistSpan(float value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_twistSpan_set(swigCPtr, this, value);
-  }
-
-  public float getM_twistSpan() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_twistSpan_get(swigCPtr, this);
-  }
-
-  public void setM_limitSoftness(float value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_limitSoftness_set(swigCPtr, this, value);
-  }
-
-  public float getM_limitSoftness() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_limitSoftness_get(swigCPtr, this);
-  }
-
-  public void setM_biasFactor(float value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_biasFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_biasFactor() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_biasFactor_get(swigCPtr, this);
-  }
-
-  public void setM_relaxationFactor(float value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_relaxationFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_relaxationFactor() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_relaxationFactor_get(swigCPtr, this);
-  }
-
-  public void setM_damping(float value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_damping_set(swigCPtr, this, value);
-  }
-
-  public float getM_damping() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_damping_get(swigCPtr, this);
-  }
-
-  public void setM_pad(String value) {
-    gdxBulletJNI.btConeTwistConstraintData_m_pad_set(swigCPtr, this, value);
-  }
-
-  public String getM_pad() {
-    return gdxBulletJNI.btConeTwistConstraintData_m_pad_get(swigCPtr, this);
-  }
-
-  public btConeTwistConstraintData() {
-    this(gdxBulletJNI.new_btConeTwistConstraintData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConeTwistConstraintData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConeTwistConstraintData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConeTwistConstraintData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_typeConstraintData (btTypedConstraintData value) {
+               gdxBulletJNI
+                       .btConeTwistConstraintData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
+       }
+
+       public btTypedConstraintData getM_typeConstraintData () {
+               long cPtr = gdxBulletJNI.btConeTwistConstraintData_m_typeConstraintData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
+       }
+
+       public void setM_rbAFrame (btTransformFloatData value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbAFrame () {
+               long cPtr = gdxBulletJNI.btConeTwistConstraintData_m_rbAFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_rbBFrame (btTransformFloatData value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbBFrame () {
+               long cPtr = gdxBulletJNI.btConeTwistConstraintData_m_rbBFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_swingSpan1 (float value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_swingSpan1_set(swigCPtr, this, value);
+       }
+
+       public float getM_swingSpan1 () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_swingSpan1_get(swigCPtr, this);
+       }
+
+       public void setM_swingSpan2 (float value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_swingSpan2_set(swigCPtr, this, value);
+       }
+
+       public float getM_swingSpan2 () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_swingSpan2_get(swigCPtr, this);
+       }
+
+       public void setM_twistSpan (float value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_twistSpan_set(swigCPtr, this, value);
+       }
+
+       public float getM_twistSpan () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_twistSpan_get(swigCPtr, this);
+       }
+
+       public void setM_limitSoftness (float value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_limitSoftness_set(swigCPtr, this, value);
+       }
+
+       public float getM_limitSoftness () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_limitSoftness_get(swigCPtr, this);
+       }
+
+       public void setM_biasFactor (float value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_biasFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_biasFactor () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_biasFactor_get(swigCPtr, this);
+       }
+
+       public void setM_relaxationFactor (float value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_relaxationFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_relaxationFactor () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_relaxationFactor_get(swigCPtr, this);
+       }
+
+       public void setM_damping (float value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_damping_set(swigCPtr, this, value);
+       }
+
+       public float getM_damping () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_damping_get(swigCPtr, this);
+       }
+
+       public void setM_pad (String value) {
+               gdxBulletJNI.btConeTwistConstraintData_m_pad_set(swigCPtr, this, value);
+       }
+
+       public String getM_pad () {
+               return gdxBulletJNI.btConeTwistConstraintData_m_pad_get(swigCPtr, this);
+       }
+
+       public btConeTwistConstraintData () {
+               this(gdxBulletJNI.new_btConeTwistConstraintData(), true);
+       }
 
 }
index 90e594a..ba52d4d 100644 (file)
@@ -9,8 +9,7 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btConeTwistFlags {
-  public final static int BT_CONETWIST_FLAGS_LIN_CFM = 1;
-  public final static int BT_CONETWIST_FLAGS_LIN_ERP = 2;
-  public final static int BT_CONETWIST_FLAGS_ANG_CFM = 4;
+       public final static int BT_CONETWIST_FLAGS_LIN_CFM = 1;
+       public final static int BT_CONETWIST_FLAGS_LIN_ERP = 2;
+       public final static int BT_CONETWIST_FLAGS_ANG_CFM = 4;
 }
-
index 44795ea..d5bb9f6 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConstraintInfo2 {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConstraintInfo2(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConstraintInfo2 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConstraintInfo2(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setFps(float value) {
-    gdxBulletJNI.btConstraintInfo2_fps_set(swigCPtr, this, value);
-  }
-
-  public float getFps() {
-    return gdxBulletJNI.btConstraintInfo2_fps_get(swigCPtr, this);
-  }
-
-  public void setErp(float value) {
-    gdxBulletJNI.btConstraintInfo2_erp_set(swigCPtr, this, value);
-  }
-
-  public float getErp() {
-    return gdxBulletJNI.btConstraintInfo2_erp_get(swigCPtr, this);
-  }
-
-  public void setM_J1linearAxis(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_m_J1linearAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getM_J1linearAxis() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_m_J1linearAxis_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setM_J1angularAxis(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_m_J1angularAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getM_J1angularAxis() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_m_J1angularAxis_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setM_J2linearAxis(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_m_J2linearAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getM_J2linearAxis() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_m_J2linearAxis_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setM_J2angularAxis(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_m_J2angularAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getM_J2angularAxis() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_m_J2angularAxis_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setRowskip(int value) {
-    gdxBulletJNI.btConstraintInfo2_rowskip_set(swigCPtr, this, value);
-  }
-
-  public int getRowskip() {
-    return gdxBulletJNI.btConstraintInfo2_rowskip_get(swigCPtr, this);
-  }
-
-  public void setM_constraintError(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_m_constraintError_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getM_constraintError() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_m_constraintError_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setCfm(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_cfm_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getCfm() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_cfm_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setM_lowerLimit(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_m_lowerLimit_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getM_lowerLimit() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_m_lowerLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setM_upperLimit(SWIGTYPE_p_float value) {
-    gdxBulletJNI.btConstraintInfo2_m_upperLimit_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_float getM_upperLimit() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_m_upperLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
-  }
-
-  public void setFindex(SWIGTYPE_p_int value) {
-    gdxBulletJNI.btConstraintInfo2_findex_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_int getFindex() {
-    long cPtr = gdxBulletJNI.btConstraintInfo2_findex_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
-  }
-
-  public void setM_numIterations(int value) {
-    gdxBulletJNI.btConstraintInfo2_m_numIterations_set(swigCPtr, this, value);
-  }
-
-  public int getM_numIterations() {
-    return gdxBulletJNI.btConstraintInfo2_m_numIterations_get(swigCPtr, this);
-  }
-
-  public void setM_damping(float value) {
-    gdxBulletJNI.btConstraintInfo2_m_damping_set(swigCPtr, this, value);
-  }
-
-  public float getM_damping() {
-    return gdxBulletJNI.btConstraintInfo2_m_damping_get(swigCPtr, this);
-  }
-
-  public btConstraintInfo2() {
-    this(gdxBulletJNI.new_btConstraintInfo2(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConstraintInfo2 (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConstraintInfo2 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConstraintInfo2(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setFps (float value) {
+               gdxBulletJNI.btConstraintInfo2_fps_set(swigCPtr, this, value);
+       }
+
+       public float getFps () {
+               return gdxBulletJNI.btConstraintInfo2_fps_get(swigCPtr, this);
+       }
+
+       public void setErp (float value) {
+               gdxBulletJNI.btConstraintInfo2_erp_set(swigCPtr, this, value);
+       }
+
+       public float getErp () {
+               return gdxBulletJNI.btConstraintInfo2_erp_get(swigCPtr, this);
+       }
+
+       public void setM_J1linearAxis (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_m_J1linearAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getM_J1linearAxis () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_m_J1linearAxis_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setM_J1angularAxis (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_m_J1angularAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getM_J1angularAxis () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_m_J1angularAxis_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setM_J2linearAxis (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_m_J2linearAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getM_J2linearAxis () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_m_J2linearAxis_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setM_J2angularAxis (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_m_J2angularAxis_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getM_J2angularAxis () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_m_J2angularAxis_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setRowskip (int value) {
+               gdxBulletJNI.btConstraintInfo2_rowskip_set(swigCPtr, this, value);
+       }
+
+       public int getRowskip () {
+               return gdxBulletJNI.btConstraintInfo2_rowskip_get(swigCPtr, this);
+       }
+
+       public void setM_constraintError (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_m_constraintError_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getM_constraintError () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_m_constraintError_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setCfm (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_cfm_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getCfm () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_cfm_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setM_lowerLimit (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_m_lowerLimit_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getM_lowerLimit () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_m_lowerLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setM_upperLimit (SWIGTYPE_p_float value) {
+               gdxBulletJNI.btConstraintInfo2_m_upperLimit_set(swigCPtr, this, SWIGTYPE_p_float.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_float getM_upperLimit () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_m_upperLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_float(cPtr, false);
+       }
+
+       public void setFindex (SWIGTYPE_p_int value) {
+               gdxBulletJNI.btConstraintInfo2_findex_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_int getFindex () {
+               long cPtr = gdxBulletJNI.btConstraintInfo2_findex_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
+       }
+
+       public void setM_numIterations (int value) {
+               gdxBulletJNI.btConstraintInfo2_m_numIterations_set(swigCPtr, this, value);
+       }
+
+       public int getM_numIterations () {
+               return gdxBulletJNI.btConstraintInfo2_m_numIterations_get(swigCPtr, this);
+       }
+
+       public void setM_damping (float value) {
+               gdxBulletJNI.btConstraintInfo2_m_damping_set(swigCPtr, this, value);
+       }
+
+       public float getM_damping () {
+               return gdxBulletJNI.btConstraintInfo2_m_damping_get(swigCPtr, this);
+       }
+
+       public btConstraintInfo2 () {
+               this(gdxBulletJNI.new_btConstraintInfo2(), true);
+       }
 
 }
index 3b8b37f..76eaa2f 100644 (file)
@@ -9,9 +9,8 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btConstraintParams {
-  public final static int BT_CONSTRAINT_ERP = 1;
-  public final static int BT_CONSTRAINT_STOP_ERP = BT_CONSTRAINT_ERP + 1;
-  public final static int BT_CONSTRAINT_CFM = BT_CONSTRAINT_STOP_ERP + 1;
-  public final static int BT_CONSTRAINT_STOP_CFM = BT_CONSTRAINT_CFM + 1;
+       public final static int BT_CONSTRAINT_ERP = 1;
+       public final static int BT_CONSTRAINT_STOP_ERP = BT_CONSTRAINT_ERP + 1;
+       public final static int BT_CONSTRAINT_CFM = BT_CONSTRAINT_STOP_ERP + 1;
+       public final static int BT_CONSTRAINT_STOP_CFM = BT_CONSTRAINT_CFM + 1;
 }
-
index ab4c09b..28f7cd3 100644 (file)
@@ -8,87 +8,83 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConstraintRow {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConstraintRow(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConstraintRow obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConstraintRow(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_normal(float[] value) {
-    gdxBulletJNI.btConstraintRow_m_normal_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_normal() {
-    return gdxBulletJNI.btConstraintRow_m_normal_get(swigCPtr, this);
-  }
-
-  public void setM_rhs(float value) {
-    gdxBulletJNI.btConstraintRow_m_rhs_set(swigCPtr, this, value);
-  }
-
-  public float getM_rhs() {
-    return gdxBulletJNI.btConstraintRow_m_rhs_get(swigCPtr, this);
-  }
-
-  public void setM_jacDiagInv(float value) {
-    gdxBulletJNI.btConstraintRow_m_jacDiagInv_set(swigCPtr, this, value);
-  }
-
-  public float getM_jacDiagInv() {
-    return gdxBulletJNI.btConstraintRow_m_jacDiagInv_get(swigCPtr, this);
-  }
-
-  public void setM_lowerLimit(float value) {
-    gdxBulletJNI.btConstraintRow_m_lowerLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_lowerLimit() {
-    return gdxBulletJNI.btConstraintRow_m_lowerLimit_get(swigCPtr, this);
-  }
-
-  public void setM_upperLimit(float value) {
-    gdxBulletJNI.btConstraintRow_m_upperLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_upperLimit() {
-    return gdxBulletJNI.btConstraintRow_m_upperLimit_get(swigCPtr, this);
-  }
-
-  public void setM_accumImpulse(float value) {
-    gdxBulletJNI.btConstraintRow_m_accumImpulse_set(swigCPtr, this, value);
-  }
-
-  public float getM_accumImpulse() {
-    return gdxBulletJNI.btConstraintRow_m_accumImpulse_get(swigCPtr, this);
-  }
-
-  public btConstraintRow() {
-    this(gdxBulletJNI.new_btConstraintRow(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConstraintRow (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConstraintRow obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConstraintRow(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_normal (float[] value) {
+               gdxBulletJNI.btConstraintRow_m_normal_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_normal () {
+               return gdxBulletJNI.btConstraintRow_m_normal_get(swigCPtr, this);
+       }
+
+       public void setM_rhs (float value) {
+               gdxBulletJNI.btConstraintRow_m_rhs_set(swigCPtr, this, value);
+       }
+
+       public float getM_rhs () {
+               return gdxBulletJNI.btConstraintRow_m_rhs_get(swigCPtr, this);
+       }
+
+       public void setM_jacDiagInv (float value) {
+               gdxBulletJNI.btConstraintRow_m_jacDiagInv_set(swigCPtr, this, value);
+       }
+
+       public float getM_jacDiagInv () {
+               return gdxBulletJNI.btConstraintRow_m_jacDiagInv_get(swigCPtr, this);
+       }
+
+       public void setM_lowerLimit (float value) {
+               gdxBulletJNI.btConstraintRow_m_lowerLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_lowerLimit () {
+               return gdxBulletJNI.btConstraintRow_m_lowerLimit_get(swigCPtr, this);
+       }
+
+       public void setM_upperLimit (float value) {
+               gdxBulletJNI.btConstraintRow_m_upperLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_upperLimit () {
+               return gdxBulletJNI.btConstraintRow_m_upperLimit_get(swigCPtr, this);
+       }
+
+       public void setM_accumImpulse (float value) {
+               gdxBulletJNI.btConstraintRow_m_accumImpulse_set(swigCPtr, this, value);
+       }
+
+       public float getM_accumImpulse () {
+               return gdxBulletJNI.btConstraintRow_m_accumImpulse_get(swigCPtr, this);
+       }
+
+       public btConstraintRow () {
+               this(gdxBulletJNI.new_btConstraintRow(), true);
+       }
 
 }
index 0afb9ad..6a4f0d4 100644 (file)
@@ -8,63 +8,59 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConstraintSetting {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btConstraintSetting(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btConstraintSetting (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btConstraintSetting obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btConstraintSetting obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConstraintSetting(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConstraintSetting(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public btConstraintSetting() {
-    this(gdxBulletJNI.new_btConstraintSetting(), true);
-  }
+       public btConstraintSetting () {
+               this(gdxBulletJNI.new_btConstraintSetting(), true);
+       }
 
-  public void setM_tau(float value) {
-    gdxBulletJNI.btConstraintSetting_m_tau_set(swigCPtr, this, value);
-  }
+       public void setM_tau (float value) {
+               gdxBulletJNI.btConstraintSetting_m_tau_set(swigCPtr, this, value);
+       }
 
-  public float getM_tau() {
-    return gdxBulletJNI.btConstraintSetting_m_tau_get(swigCPtr, this);
-  }
+       public float getM_tau () {
+               return gdxBulletJNI.btConstraintSetting_m_tau_get(swigCPtr, this);
+       }
 
-  public void setM_damping(float value) {
-    gdxBulletJNI.btConstraintSetting_m_damping_set(swigCPtr, this, value);
-  }
+       public void setM_damping (float value) {
+               gdxBulletJNI.btConstraintSetting_m_damping_set(swigCPtr, this, value);
+       }
 
-  public float getM_damping() {
-    return gdxBulletJNI.btConstraintSetting_m_damping_get(swigCPtr, this);
-  }
+       public float getM_damping () {
+               return gdxBulletJNI.btConstraintSetting_m_damping_get(swigCPtr, this);
+       }
 
-  public void setM_impulseClamp(float value) {
-    gdxBulletJNI.btConstraintSetting_m_impulseClamp_set(swigCPtr, this, value);
-  }
+       public void setM_impulseClamp (float value) {
+               gdxBulletJNI.btConstraintSetting_m_impulseClamp_set(swigCPtr, this, value);
+       }
 
-  public float getM_impulseClamp() {
-    return gdxBulletJNI.btConstraintSetting_m_impulseClamp_get(swigCPtr, this);
-  }
+       public float getM_impulseClamp () {
+               return gdxBulletJNI.btConstraintSetting_m_impulseClamp_get(swigCPtr, this);
+       }
 
 }
index f12eb6a..0b061b1 100644 (file)
@@ -8,51 +8,54 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConstraintSolver {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConstraintSolver(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConstraintSolver obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConstraintSolver(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void prepareSolve(int arg0, int arg1) {
-    gdxBulletJNI.btConstraintSolver_prepareSolve(swigCPtr, this, arg0, arg1);
-  }
-
-  public float solveGroup(SWIGTYPE_p_p_btCollisionObject bodies, int numBodies, SWIGTYPE_p_p_btPersistentManifold manifold, int numManifolds, SWIGTYPE_p_p_btTypedConstraint constraints, int numConstraints, btContactSolverInfo info, btIDebugDraw debugDrawer, btStackAlloc stackAlloc, btDispatcher dispatcher) {
-    return gdxBulletJNI.btConstraintSolver_solveGroup(swigCPtr, this, SWIGTYPE_p_p_btCollisionObject.getCPtr(bodies), numBodies, SWIGTYPE_p_p_btPersistentManifold.getCPtr(manifold), numManifolds, SWIGTYPE_p_p_btTypedConstraint.getCPtr(constraints), numConstraints, btContactSolverInfo.getCPtr(info), info, btIDebugDraw.getCPtr(debugDrawer), debugDrawer, btStackAlloc.getCPtr(stackAlloc), stackAlloc, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void allSolved(btContactSolverInfo arg0, btIDebugDraw arg1, btStackAlloc arg2) {
-    gdxBulletJNI.btConstraintSolver_allSolved(swigCPtr, this, btContactSolverInfo.getCPtr(arg0), arg0, btIDebugDraw.getCPtr(arg1), arg1, btStackAlloc.getCPtr(arg2), arg2);
-  }
-
-  public void reset() {
-    gdxBulletJNI.btConstraintSolver_reset(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConstraintSolver (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConstraintSolver obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConstraintSolver(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void prepareSolve (int arg0, int arg1) {
+               gdxBulletJNI.btConstraintSolver_prepareSolve(swigCPtr, this, arg0, arg1);
+       }
+
+       public float solveGroup (SWIGTYPE_p_p_btCollisionObject bodies, int numBodies, SWIGTYPE_p_p_btPersistentManifold manifold,
+               int numManifolds, SWIGTYPE_p_p_btTypedConstraint constraints, int numConstraints, btContactSolverInfo info,
+               btIDebugDraw debugDrawer, btStackAlloc stackAlloc, btDispatcher dispatcher) {
+               return gdxBulletJNI.btConstraintSolver_solveGroup(swigCPtr, this, SWIGTYPE_p_p_btCollisionObject.getCPtr(bodies),
+                       numBodies, SWIGTYPE_p_p_btPersistentManifold.getCPtr(manifold), numManifolds,
+                       SWIGTYPE_p_p_btTypedConstraint.getCPtr(constraints), numConstraints, btContactSolverInfo.getCPtr(info), info,
+                       btIDebugDraw.getCPtr(debugDrawer), debugDrawer, btStackAlloc.getCPtr(stackAlloc), stackAlloc,
+                       btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void allSolved (btContactSolverInfo arg0, btIDebugDraw arg1, btStackAlloc arg2) {
+               gdxBulletJNI.btConstraintSolver_allSolved(swigCPtr, this, btContactSolverInfo.getCPtr(arg0), arg0,
+                       btIDebugDraw.getCPtr(arg1), arg1, btStackAlloc.getCPtr(arg2), arg2);
+       }
+
+       public void reset () {
+               gdxBulletJNI.btConstraintSolver_reset(swigCPtr, this);
+       }
 
 }
index dd96291..779f544 100644 (file)
@@ -8,44 +8,41 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btContactConstraint extends btTypedConstraint {
-  private long swigCPtr;
-
-  protected btContactConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btContactConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btContactConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btContactConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setContactManifold(btPersistentManifold contactManifold) {
-    gdxBulletJNI.btContactConstraint_setContactManifold(swigCPtr, this, btPersistentManifold.getCPtr(contactManifold), contactManifold);
-  }
-
-  public btPersistentManifold getContactManifold() {
-    long cPtr = gdxBulletJNI.btContactConstraint_getContactManifold__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btContactConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btContactConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btContactConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btContactConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setContactManifold (btPersistentManifold contactManifold) {
+               gdxBulletJNI.btContactConstraint_setContactManifold(swigCPtr, this, btPersistentManifold.getCPtr(contactManifold),
+                       contactManifold);
+       }
+
+       public btPersistentManifold getContactManifold () {
+               long cPtr = gdxBulletJNI.btContactConstraint_getContactManifold__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
 
 }
index 9aa96ff..9412a29 100644 (file)
@@ -9,7 +9,6 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btContactManifoldTypes {
-  public final static int MIN_CONTACT_MANIFOLD_TYPE = 1024;
-  public final static int BT_PERSISTENT_MANIFOLD_TYPE = MIN_CONTACT_MANIFOLD_TYPE + 1;
+       public final static int MIN_CONTACT_MANIFOLD_TYPE = 1024;
+       public final static int BT_PERSISTENT_MANIFOLD_TYPE = MIN_CONTACT_MANIFOLD_TYPE + 1;
 }
-
index 320f4d5..a892180 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btContactSolverInfo extends btContactSolverInfoData {
-  private long swigCPtr;
-
-  protected btContactSolverInfo(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btContactSolverInfo_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btContactSolverInfo obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btContactSolverInfo(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btContactSolverInfo() {
-    this(gdxBulletJNI.new_btContactSolverInfo(), true);
-  }
+       private long swigCPtr;
+
+       protected btContactSolverInfo (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btContactSolverInfo_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btContactSolverInfo obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btContactSolverInfo(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btContactSolverInfo () {
+               this(gdxBulletJNI.new_btContactSolverInfo(), true);
+       }
 
 }
index bf1a639..6bee313 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btContactSolverInfoData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btContactSolverInfoData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btContactSolverInfoData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btContactSolverInfoData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_tau(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_tau_set(swigCPtr, this, value);
-  }
-
-  public float getM_tau() {
-    return gdxBulletJNI.btContactSolverInfoData_m_tau_get(swigCPtr, this);
-  }
-
-  public void setM_damping(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_damping_set(swigCPtr, this, value);
-  }
-
-  public float getM_damping() {
-    return gdxBulletJNI.btContactSolverInfoData_m_damping_get(swigCPtr, this);
-  }
-
-  public void setM_friction(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_friction_set(swigCPtr, this, value);
-  }
-
-  public float getM_friction() {
-    return gdxBulletJNI.btContactSolverInfoData_m_friction_get(swigCPtr, this);
-  }
-
-  public void setM_timeStep(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_timeStep_set(swigCPtr, this, value);
-  }
-
-  public float getM_timeStep() {
-    return gdxBulletJNI.btContactSolverInfoData_m_timeStep_get(swigCPtr, this);
-  }
-
-  public void setM_restitution(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_restitution_set(swigCPtr, this, value);
-  }
-
-  public float getM_restitution() {
-    return gdxBulletJNI.btContactSolverInfoData_m_restitution_get(swigCPtr, this);
-  }
-
-  public void setM_numIterations(int value) {
-    gdxBulletJNI.btContactSolverInfoData_m_numIterations_set(swigCPtr, this, value);
-  }
-
-  public int getM_numIterations() {
-    return gdxBulletJNI.btContactSolverInfoData_m_numIterations_get(swigCPtr, this);
-  }
-
-  public void setM_maxErrorReduction(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_maxErrorReduction_set(swigCPtr, this, value);
-  }
-
-  public float getM_maxErrorReduction() {
-    return gdxBulletJNI.btContactSolverInfoData_m_maxErrorReduction_get(swigCPtr, this);
-  }
-
-  public void setM_sor(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_sor_set(swigCPtr, this, value);
-  }
-
-  public float getM_sor() {
-    return gdxBulletJNI.btContactSolverInfoData_m_sor_get(swigCPtr, this);
-  }
-
-  public void setM_erp(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_erp_set(swigCPtr, this, value);
-  }
-
-  public float getM_erp() {
-    return gdxBulletJNI.btContactSolverInfoData_m_erp_get(swigCPtr, this);
-  }
-
-  public void setM_erp2(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_erp2_set(swigCPtr, this, value);
-  }
-
-  public float getM_erp2() {
-    return gdxBulletJNI.btContactSolverInfoData_m_erp2_get(swigCPtr, this);
-  }
-
-  public void setM_globalCfm(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_globalCfm_set(swigCPtr, this, value);
-  }
-
-  public float getM_globalCfm() {
-    return gdxBulletJNI.btContactSolverInfoData_m_globalCfm_get(swigCPtr, this);
-  }
-
-  public void setM_splitImpulse(int value) {
-    gdxBulletJNI.btContactSolverInfoData_m_splitImpulse_set(swigCPtr, this, value);
-  }
-
-  public int getM_splitImpulse() {
-    return gdxBulletJNI.btContactSolverInfoData_m_splitImpulse_get(swigCPtr, this);
-  }
-
-  public void setM_splitImpulsePenetrationThreshold(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_splitImpulsePenetrationThreshold_set(swigCPtr, this, value);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btContactSolverInfoData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btContactSolverInfoData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btContactSolverInfoData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_tau (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_tau_set(swigCPtr, this, value);
+       }
+
+       public float getM_tau () {
+               return gdxBulletJNI.btContactSolverInfoData_m_tau_get(swigCPtr, this);
+       }
+
+       public void setM_damping (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_damping_set(swigCPtr, this, value);
+       }
+
+       public float getM_damping () {
+               return gdxBulletJNI.btContactSolverInfoData_m_damping_get(swigCPtr, this);
+       }
+
+       public void setM_friction (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_friction_set(swigCPtr, this, value);
+       }
+
+       public float getM_friction () {
+               return gdxBulletJNI.btContactSolverInfoData_m_friction_get(swigCPtr, this);
+       }
+
+       public void setM_timeStep (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_timeStep_set(swigCPtr, this, value);
+       }
+
+       public float getM_timeStep () {
+               return gdxBulletJNI.btContactSolverInfoData_m_timeStep_get(swigCPtr, this);
+       }
+
+       public void setM_restitution (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_restitution_set(swigCPtr, this, value);
+       }
+
+       public float getM_restitution () {
+               return gdxBulletJNI.btContactSolverInfoData_m_restitution_get(swigCPtr, this);
+       }
+
+       public void setM_numIterations (int value) {
+               gdxBulletJNI.btContactSolverInfoData_m_numIterations_set(swigCPtr, this, value);
+       }
+
+       public int getM_numIterations () {
+               return gdxBulletJNI.btContactSolverInfoData_m_numIterations_get(swigCPtr, this);
+       }
+
+       public void setM_maxErrorReduction (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_maxErrorReduction_set(swigCPtr, this, value);
+       }
+
+       public float getM_maxErrorReduction () {
+               return gdxBulletJNI.btContactSolverInfoData_m_maxErrorReduction_get(swigCPtr, this);
+       }
+
+       public void setM_sor (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_sor_set(swigCPtr, this, value);
+       }
+
+       public float getM_sor () {
+               return gdxBulletJNI.btContactSolverInfoData_m_sor_get(swigCPtr, this);
+       }
+
+       public void setM_erp (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_erp_set(swigCPtr, this, value);
+       }
+
+       public float getM_erp () {
+               return gdxBulletJNI.btContactSolverInfoData_m_erp_get(swigCPtr, this);
+       }
+
+       public void setM_erp2 (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_erp2_set(swigCPtr, this, value);
+       }
+
+       public float getM_erp2 () {
+               return gdxBulletJNI.btContactSolverInfoData_m_erp2_get(swigCPtr, this);
+       }
+
+       public void setM_globalCfm (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_globalCfm_set(swigCPtr, this, value);
+       }
+
+       public float getM_globalCfm () {
+               return gdxBulletJNI.btContactSolverInfoData_m_globalCfm_get(swigCPtr, this);
+       }
+
+       public void setM_splitImpulse (int value) {
+               gdxBulletJNI.btContactSolverInfoData_m_splitImpulse_set(swigCPtr, this, value);
+       }
+
+       public int getM_splitImpulse () {
+               return gdxBulletJNI.btContactSolverInfoData_m_splitImpulse_get(swigCPtr, this);
+       }
+
+       public void setM_splitImpulsePenetrationThreshold (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_splitImpulsePenetrationThreshold_set(swigCPtr, this, value);
+       }
 
-  public float getM_splitImpulsePenetrationThreshold() {
-    return gdxBulletJNI.btContactSolverInfoData_m_splitImpulsePenetrationThreshold_get(swigCPtr, this);
-  }
+       public float getM_splitImpulsePenetrationThreshold () {
+               return gdxBulletJNI.btContactSolverInfoData_m_splitImpulsePenetrationThreshold_get(swigCPtr, this);
+       }
 
-  public void setM_linearSlop(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_linearSlop_set(swigCPtr, this, value);
-  }
+       public void setM_linearSlop (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_linearSlop_set(swigCPtr, this, value);
+       }
 
-  public float getM_linearSlop() {
-    return gdxBulletJNI.btContactSolverInfoData_m_linearSlop_get(swigCPtr, this);
-  }
+       public float getM_linearSlop () {
+               return gdxBulletJNI.btContactSolverInfoData_m_linearSlop_get(swigCPtr, this);
+       }
 
-  public void setM_warmstartingFactor(float value) {
-    gdxBulletJNI.btContactSolverInfoData_m_warmstartingFactor_set(swigCPtr, this, value);
-  }
+       public void setM_warmstartingFactor (float value) {
+               gdxBulletJNI.btContactSolverInfoData_m_warmstartingFactor_set(swigCPtr, this, value);
+       }
 
-  public float getM_warmstartingFactor() {
-    return gdxBulletJNI.btContactSolverInfoData_m_warmstartingFactor_get(swigCPtr, this);
-  }
+       public float getM_warmstartingFactor () {
+               return gdxBulletJNI.btContactSolverInfoData_m_warmstartingFactor_get(swigCPtr, this);
+       }
 
-  public void setM_solverMode(int value) {
-    gdxBulletJNI.btContactSolverInfoData_m_solverMode_set(swigCPtr, this, value);
-  }
+       public void setM_solverMode (int value) {
+               gdxBulletJNI.btContactSolverInfoData_m_solverMode_set(swigCPtr, this, value);
+       }
 
-  public int getM_solverMode() {
-    return gdxBulletJNI.btContactSolverInfoData_m_solverMode_get(swigCPtr, this);
-  }
+       public int getM_solverMode () {
+               return gdxBulletJNI.btContactSolverInfoData_m_solverMode_get(swigCPtr, this);
+       }
 
-  public void setM_restingContactRestitutionThreshold(int value) {
-    gdxBulletJNI.btContactSolverInfoData_m_restingContactRestitutionThreshold_set(swigCPtr, this, value);
-  }
+       public void setM_restingContactRestitutionThreshold (int value) {
+               gdxBulletJNI.btContactSolverInfoData_m_restingContactRestitutionThreshold_set(swigCPtr, this, value);
+       }
 
-  public int getM_restingContactRestitutionThreshold() {
-    return gdxBulletJNI.btContactSolverInfoData_m_restingContactRestitutionThreshold_get(swigCPtr, this);
-  }
+       public int getM_restingContactRestitutionThreshold () {
+               return gdxBulletJNI.btContactSolverInfoData_m_restingContactRestitutionThreshold_get(swigCPtr, this);
+       }
 
-  public void setM_minimumSolverBatchSize(int value) {
-    gdxBulletJNI.btContactSolverInfoData_m_minimumSolverBatchSize_set(swigCPtr, this, value);
-  }
+       public void setM_minimumSolverBatchSize (int value) {
+               gdxBulletJNI.btContactSolverInfoData_m_minimumSolverBatchSize_set(swigCPtr, this, value);
+       }
 
-  public int getM_minimumSolverBatchSize() {
-    return gdxBulletJNI.btContactSolverInfoData_m_minimumSolverBatchSize_get(swigCPtr, this);
-  }
+       public int getM_minimumSolverBatchSize () {
+               return gdxBulletJNI.btContactSolverInfoData_m_minimumSolverBatchSize_get(swigCPtr, this);
+       }
 
-  public btContactSolverInfoData() {
-    this(gdxBulletJNI.new_btContactSolverInfoData(), true);
-  }
+       public btContactSolverInfoData () {
+               this(gdxBulletJNI.new_btContactSolverInfoData(), true);
+       }
 
 }
index f196af6..cdb2721 100644 (file)
@@ -8,43 +8,43 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btContinuousConvexCollision extends btConvexCast {
-  private long swigCPtr;
-
-  protected btContinuousConvexCollision(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btContinuousConvexCollision_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btContinuousConvexCollision obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btContinuousConvexCollision(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btContinuousConvexCollision(btConvexShape shapeA, btConvexShape shapeB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver penetrationDepthSolver) {
-    this(gdxBulletJNI.new_btContinuousConvexCollision__SWIG_0(btConvexShape.getCPtr(shapeA), shapeA, btConvexShape.getCPtr(shapeB), shapeB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver), btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver), true);
-  }
-
-  public btContinuousConvexCollision(btConvexShape shapeA, btStaticPlaneShape plane) {
-    this(gdxBulletJNI.new_btContinuousConvexCollision__SWIG_1(btConvexShape.getCPtr(shapeA), shapeA, btStaticPlaneShape.getCPtr(plane), plane), true);
-  }
+       private long swigCPtr;
+
+       protected btContinuousConvexCollision (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btContinuousConvexCollision_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btContinuousConvexCollision obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btContinuousConvexCollision(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btContinuousConvexCollision (btConvexShape shapeA, btConvexShape shapeB,
+               SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver penetrationDepthSolver) {
+               this(gdxBulletJNI.new_btContinuousConvexCollision__SWIG_0(btConvexShape.getCPtr(shapeA), shapeA,
+                       btConvexShape.getCPtr(shapeB), shapeB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver),
+                       btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver), true);
+       }
+
+       public btContinuousConvexCollision (btConvexShape shapeA, btStaticPlaneShape plane) {
+               this(gdxBulletJNI.new_btContinuousConvexCollision__SWIG_1(btConvexShape.getCPtr(shapeA), shapeA,
+                       btStaticPlaneShape.getCPtr(plane), plane), true);
+       }
 
 }
index 8c14725..57d5cab 100644 (file)
@@ -8,48 +8,50 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvex2dConvex2dAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btConvex2dConvex2dAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvex2dConvex2dAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvex2dConvex2dAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvex2dConvex2dAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvex2dConvex2dAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
-    this(gdxBulletJNI.new_btConvex2dConvex2dAlgorithm(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver), btConvexPenetrationDepthSolver.getCPtr(pdSolver), pdSolver, numPerturbationIterations, minimumPointsPerturbationThreshold), true);
-  }
-
-  public void setLowLevelOfDetail(boolean useLowLevel) {
-    gdxBulletJNI.btConvex2dConvex2dAlgorithm_setLowLevelOfDetail(swigCPtr, this, useLowLevel);
-  }
-
-  public btPersistentManifold getManifold() {
-    long cPtr = gdxBulletJNI.btConvex2dConvex2dAlgorithm_getManifold(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btConvex2dConvex2dAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvex2dConvex2dAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvex2dConvex2dAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvex2dConvex2dAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvex2dConvex2dAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0,
+               btCollisionObject body1, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver pdSolver,
+               int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
+               this(gdxBulletJNI.new_btConvex2dConvex2dAlgorithm(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver),
+                       btConvexPenetrationDepthSolver.getCPtr(pdSolver), pdSolver, numPerturbationIterations,
+                       minimumPointsPerturbationThreshold), true);
+       }
+
+       public void setLowLevelOfDetail (boolean useLowLevel) {
+               gdxBulletJNI.btConvex2dConvex2dAlgorithm_setLowLevelOfDetail(swigCPtr, this, useLowLevel);
+       }
+
+       public btPersistentManifold getManifold () {
+               long cPtr = gdxBulletJNI.btConvex2dConvex2dAlgorithm_getManifold(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
 
 }
index deb985d..92867f6 100644 (file)
@@ -8,44 +8,40 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvex2dShape extends btConvexShape {
-  private long swigCPtr;
-
-  protected btConvex2dShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvex2dShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvex2dShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvex2dShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvex2dShape(btConvexShape convexChildShape) {
-    this(gdxBulletJNI.new_btConvex2dShape(btConvexShape.getCPtr(convexChildShape), convexChildShape), true);
-  }
-
-  public btConvexShape getChildShape() {
-    long cPtr = gdxBulletJNI.btConvex2dShape_getChildShape__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btConvex2dShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvex2dShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvex2dShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvex2dShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvex2dShape (btConvexShape convexChildShape) {
+               this(gdxBulletJNI.new_btConvex2dShape(btConvexShape.getCPtr(convexChildShape), convexChildShape), true);
+       }
+
+       public btConvexShape getChildShape () {
+               long cPtr = gdxBulletJNI.btConvex2dShape_getChildShape__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
+       }
 
 }
index 970620b..7f2024a 100644 (file)
@@ -8,39 +8,38 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvexCast {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConvexCast(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexCast obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexCast(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public boolean calcTimeOfImpact(btTransform fromA, btTransform toA, btTransform fromB, btTransform toB, SWIGTYPE_p_btConvexCast__CastResult result) {
-    return gdxBulletJNI.btConvexCast_calcTimeOfImpact(swigCPtr, this, btTransform.getCPtr(fromA), fromA, btTransform.getCPtr(toA), toA, btTransform.getCPtr(fromB), fromB, btTransform.getCPtr(toB), toB, SWIGTYPE_p_btConvexCast__CastResult.getCPtr(result));
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConvexCast (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexCast obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexCast(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public boolean calcTimeOfImpact (btTransform fromA, btTransform toA, btTransform fromB, btTransform toB,
+               SWIGTYPE_p_btConvexCast__CastResult result) {
+               return gdxBulletJNI.btConvexCast_calcTimeOfImpact(swigCPtr, this, btTransform.getCPtr(fromA), fromA,
+                       btTransform.getCPtr(toA), toA, btTransform.getCPtr(fromB), fromB, btTransform.getCPtr(toB), toB,
+                       SWIGTYPE_p_btConvexCast__CastResult.getCPtr(result));
+       }
 
 }
index 849f34e..93337b0 100644 (file)
@@ -8,43 +8,41 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvexConcaveCollisionAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btConvexConcaveCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexConcaveCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexConcaveCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexConcaveCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvexConcaveCollisionAlgorithm(btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1, boolean isSwapped) {
-    this(gdxBulletJNI.new_btConvexConcaveCollisionAlgorithm(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, isSwapped), true);
-  }
-
-  public void clearCache() {
-    gdxBulletJNI.btConvexConcaveCollisionAlgorithm_clearCache(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btConvexConcaveCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexConcaveCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexConcaveCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexConcaveCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvexConcaveCollisionAlgorithm (btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0,
+               btCollisionObject body1, boolean isSwapped) {
+               this(gdxBulletJNI.new_btConvexConcaveCollisionAlgorithm(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci,
+                       btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, isSwapped), true);
+       }
+
+       public void clearCache () {
+               gdxBulletJNI.btConvexConcaveCollisionAlgorithm_clearCache(swigCPtr, this);
+       }
 
 }
index b7d4c40..541d72e 100644 (file)
@@ -8,48 +8,50 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvexConvexAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btConvexConvexAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexConvexAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexConvexAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexConvexAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvexConvexAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver pdSolver, int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
-    this(gdxBulletJNI.new_btConvexConvexAlgorithm(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver), btConvexPenetrationDepthSolver.getCPtr(pdSolver), pdSolver, numPerturbationIterations, minimumPointsPerturbationThreshold), true);
-  }
-
-  public void setLowLevelOfDetail(boolean useLowLevel) {
-    gdxBulletJNI.btConvexConvexAlgorithm_setLowLevelOfDetail(swigCPtr, this, useLowLevel);
-  }
-
-  public btPersistentManifold getManifold() {
-    long cPtr = gdxBulletJNI.btConvexConvexAlgorithm_getManifold(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btConvexConvexAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexConvexAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexConvexAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexConvexAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvexConvexAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0,
+               btCollisionObject body1, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver pdSolver,
+               int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
+               this(gdxBulletJNI.new_btConvexConvexAlgorithm(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver),
+                       btConvexPenetrationDepthSolver.getCPtr(pdSolver), pdSolver, numPerturbationIterations,
+                       minimumPointsPerturbationThreshold), true);
+       }
+
+       public void setLowLevelOfDetail (boolean useLowLevel) {
+               gdxBulletJNI.btConvexConvexAlgorithm_setLowLevelOfDetail(swigCPtr, this, useLowLevel);
+       }
+
+       public btPersistentManifold getManifold () {
+               long cPtr = gdxBulletJNI.btConvexConvexAlgorithm_getManifold(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
 
 }
index 5a1128d..4ca24a7 100644 (file)
@@ -8,74 +8,73 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvexHullComputer {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConvexHullComputer(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexHullComputer obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexHullComputer(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setVertices(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
-    gdxBulletJNI.btConvexHullComputer_vertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getVertices() {
-    long cPtr = gdxBulletJNI.btConvexHullComputer_vertices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
-  }
-
-  public void setEdges(SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t value) {
-    gdxBulletJNI.btConvexHullComputer_edges_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t getEdges() {
-    long cPtr = gdxBulletJNI.btConvexHullComputer_edges_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t(cPtr, false);
-  }
-
-  public void setFaces(SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
-    gdxBulletJNI.btConvexHullComputer_faces_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_int_t getFaces() {
-    long cPtr = gdxBulletJNI.btConvexHullComputer_faces_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
-  }
-
-  public float compute(SWIGTYPE_p_float coords, int stride, int count, float shrink, float shrinkClamp) {
-    return gdxBulletJNI.btConvexHullComputer_compute__SWIG_0(swigCPtr, this, SWIGTYPE_p_float.getCPtr(coords), stride, count, shrink, shrinkClamp);
-  }
-
-  public float compute(SWIGTYPE_p_double coords, int stride, int count, float shrink, float shrinkClamp) {
-    return gdxBulletJNI.btConvexHullComputer_compute__SWIG_1(swigCPtr, this, SWIGTYPE_p_double.getCPtr(coords), stride, count, shrink, shrinkClamp);
-  }
-
-  public btConvexHullComputer() {
-    this(gdxBulletJNI.new_btConvexHullComputer(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConvexHullComputer (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexHullComputer obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexHullComputer(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setVertices (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
+               gdxBulletJNI.btConvexHullComputer_vertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getVertices () {
+               long cPtr = gdxBulletJNI.btConvexHullComputer_vertices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
+       }
+
+       public void setEdges (SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t value) {
+               gdxBulletJNI.btConvexHullComputer_edges_set(swigCPtr, this,
+                       SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t getEdges () {
+               long cPtr = gdxBulletJNI.btConvexHullComputer_edges_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btConvexHullComputer__Edge_t(cPtr, false);
+       }
+
+       public void setFaces (SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
+               gdxBulletJNI.btConvexHullComputer_faces_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_int_t getFaces () {
+               long cPtr = gdxBulletJNI.btConvexHullComputer_faces_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
+       }
+
+       public float compute (SWIGTYPE_p_float coords, int stride, int count, float shrink, float shrinkClamp) {
+               return gdxBulletJNI.btConvexHullComputer_compute__SWIG_0(swigCPtr, this, SWIGTYPE_p_float.getCPtr(coords), stride, count,
+                       shrink, shrinkClamp);
+       }
+
+       public float compute (SWIGTYPE_p_double coords, int stride, int count, float shrink, float shrinkClamp) {
+               return gdxBulletJNI.btConvexHullComputer_compute__SWIG_1(swigCPtr, this, SWIGTYPE_p_double.getCPtr(coords), stride, count,
+                       shrink, shrinkClamp);
+       }
+
+       public btConvexHullComputer () {
+               this(gdxBulletJNI.new_btConvexHullComputer(), true);
+       }
 
 }
index 0b6373d..29f78d6 100644 (file)
@@ -9,72 +9,70 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexHullShape extends btPolyhedralConvexAabbCachingShape {
-  private long swigCPtr;
-
-  protected btConvexHullShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexHullShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexHullShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexHullShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvexHullShape(float[] points, int numPoints, int stride) {
-    this(gdxBulletJNI.new_btConvexHullShape__SWIG_0(points, numPoints, stride), true);
-  }
-
-  public btConvexHullShape(float[] points, int numPoints) {
-    this(gdxBulletJNI.new_btConvexHullShape__SWIG_1(points, numPoints), true);
-  }
-
-  public btConvexHullShape(float[] points) {
-    this(gdxBulletJNI.new_btConvexHullShape__SWIG_2(points), true);
-  }
-
-  public btConvexHullShape() {
-    this(gdxBulletJNI.new_btConvexHullShape__SWIG_3(), true);
-  }
-
-  public void addPoint(Vector3 point) {
-    gdxBulletJNI.btConvexHullShape_addPoint(swigCPtr, this, point);
-  }
-
-  public btVector3 getUnscaledPoints() {
-    long cPtr = gdxBulletJNI.btConvexHullShape_getUnscaledPoints__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public btVector3 getPoints() {
-    long cPtr = gdxBulletJNI.btConvexHullShape_getPoints(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public Vector3 getScaledPoint(int i) {
-       return gdxBulletJNI.btConvexHullShape_getScaledPoint(swigCPtr, this, i);
-}
-
-  public int getNumPoints() {
-    return gdxBulletJNI.btConvexHullShape_getNumPoints(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btConvexHullShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexHullShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexHullShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexHullShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvexHullShape (float[] points, int numPoints, int stride) {
+               this(gdxBulletJNI.new_btConvexHullShape__SWIG_0(points, numPoints, stride), true);
+       }
+
+       public btConvexHullShape (float[] points, int numPoints) {
+               this(gdxBulletJNI.new_btConvexHullShape__SWIG_1(points, numPoints), true);
+       }
+
+       public btConvexHullShape (float[] points) {
+               this(gdxBulletJNI.new_btConvexHullShape__SWIG_2(points), true);
+       }
+
+       public btConvexHullShape () {
+               this(gdxBulletJNI.new_btConvexHullShape__SWIG_3(), true);
+       }
+
+       public void addPoint (Vector3 point) {
+               gdxBulletJNI.btConvexHullShape_addPoint(swigCPtr, this, point);
+       }
+
+       public btVector3 getUnscaledPoints () {
+               long cPtr = gdxBulletJNI.btConvexHullShape_getUnscaledPoints__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public btVector3 getPoints () {
+               long cPtr = gdxBulletJNI.btConvexHullShape_getPoints(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public Vector3 getScaledPoint (int i) {
+               return gdxBulletJNI.btConvexHullShape_getScaledPoint(swigCPtr, this, i);
+       }
+
+       public int getNumPoints () {
+               return gdxBulletJNI.btConvexHullShape_getNumPoints(swigCPtr, this);
+       }
 
 }
index 7e110f6..20d9200 100644 (file)
@@ -8,82 +8,79 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvexHullShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConvexHullShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexHullShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexHullShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_convexInternalShapeData(btConvexInternalShapeData value) {
-    gdxBulletJNI.btConvexHullShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value), value);
-  }
-
-  public btConvexInternalShapeData getM_convexInternalShapeData() {
-    long cPtr = gdxBulletJNI.btConvexHullShapeData_m_convexInternalShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
-  }
-
-  public void setM_unscaledPointsFloatPtr(btVector3FloatData value) {
-    gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsFloatPtr_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_unscaledPointsFloatPtr() {
-    long cPtr = gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsFloatPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_unscaledPointsDoublePtr(btVector3DoubleData value) {
-    gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsDoublePtr_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_unscaledPointsDoublePtr() {
-    long cPtr = gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsDoublePtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_numUnscaledPoints(int value) {
-    gdxBulletJNI.btConvexHullShapeData_m_numUnscaledPoints_set(swigCPtr, this, value);
-  }
-
-  public int getM_numUnscaledPoints() {
-    return gdxBulletJNI.btConvexHullShapeData_m_numUnscaledPoints_get(swigCPtr, this);
-  }
-
-  public void setM_padding3(String value) {
-    gdxBulletJNI.btConvexHullShapeData_m_padding3_set(swigCPtr, this, value);
-  }
-
-  public String getM_padding3() {
-    return gdxBulletJNI.btConvexHullShapeData_m_padding3_get(swigCPtr, this);
-  }
-
-  public btConvexHullShapeData() {
-    this(gdxBulletJNI.new_btConvexHullShapeData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConvexHullShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexHullShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexHullShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_convexInternalShapeData (btConvexInternalShapeData value) {
+               gdxBulletJNI.btConvexHullShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value),
+                       value);
+       }
+
+       public btConvexInternalShapeData getM_convexInternalShapeData () {
+               long cPtr = gdxBulletJNI.btConvexHullShapeData_m_convexInternalShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
+       }
+
+       public void setM_unscaledPointsFloatPtr (btVector3FloatData value) {
+               gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsFloatPtr_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_unscaledPointsFloatPtr () {
+               long cPtr = gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsFloatPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_unscaledPointsDoublePtr (btVector3DoubleData value) {
+               gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsDoublePtr_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_unscaledPointsDoublePtr () {
+               long cPtr = gdxBulletJNI.btConvexHullShapeData_m_unscaledPointsDoublePtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_numUnscaledPoints (int value) {
+               gdxBulletJNI.btConvexHullShapeData_m_numUnscaledPoints_set(swigCPtr, this, value);
+       }
+
+       public int getM_numUnscaledPoints () {
+               return gdxBulletJNI.btConvexHullShapeData_m_numUnscaledPoints_get(swigCPtr, this);
+       }
+
+       public void setM_padding3 (String value) {
+               gdxBulletJNI.btConvexHullShapeData_m_padding3_set(swigCPtr, this, value);
+       }
+
+       public String getM_padding3 () {
+               return gdxBulletJNI.btConvexHullShapeData_m_padding3_get(swigCPtr, this);
+       }
+
+       public btConvexHullShapeData () {
+               this(gdxBulletJNI.new_btConvexHullShapeData(), true);
+       }
 
 }
index c23b677..d6f61ce 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvexInternalAabbCachingShape extends btConvexInternalShape {
-  private long swigCPtr;
-
-  protected btConvexInternalAabbCachingShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexInternalAabbCachingShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexInternalAabbCachingShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexInternalAabbCachingShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void recalcLocalAabb() {
-    gdxBulletJNI.btConvexInternalAabbCachingShape_recalcLocalAabb(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btConvexInternalAabbCachingShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexInternalAabbCachingShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexInternalAabbCachingShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexInternalAabbCachingShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void recalcLocalAabb () {
+               gdxBulletJNI.btConvexInternalAabbCachingShape_recalcLocalAabb(swigCPtr, this);
+       }
 
 }
index 3a53044..9fcceea 100644 (file)
@@ -9,66 +9,64 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexInternalShape extends btConvexShape {
-  private long swigCPtr;
-
-  protected btConvexInternalShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexInternalShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexInternalShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexInternalShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public Vector3 getImplicitShapeDimensions() {
-       return gdxBulletJNI.btConvexInternalShape_getImplicitShapeDimensions(swigCPtr, this);
-}
-
-  public void setImplicitShapeDimensions(Vector3 dimensions) {
-    gdxBulletJNI.btConvexInternalShape_setImplicitShapeDimensions(swigCPtr, this, dimensions);
-  }
-
-  public void setSafeMargin(float minDimension, float defaultMarginMultiplier) {
-    gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_0(swigCPtr, this, minDimension, defaultMarginMultiplier);
-  }
-
-  public void setSafeMargin(float minDimension) {
-    gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_1(swigCPtr, this, minDimension);
-  }
-
-  public void setSafeMargin(Vector3 halfExtents, float defaultMarginMultiplier) {
-    gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_2(swigCPtr, this, halfExtents, defaultMarginMultiplier);
-  }
-
-  public void setSafeMargin(Vector3 halfExtents) {
-    gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_3(swigCPtr, this, halfExtents);
-  }
-
-  public Vector3 getLocalScalingNV() {
-       return gdxBulletJNI.btConvexInternalShape_getLocalScalingNV(swigCPtr, this);
-}
-
-  public float getMarginNV() {
-    return gdxBulletJNI.btConvexInternalShape_getMarginNV(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btConvexInternalShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexInternalShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexInternalShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexInternalShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public Vector3 getImplicitShapeDimensions () {
+               return gdxBulletJNI.btConvexInternalShape_getImplicitShapeDimensions(swigCPtr, this);
+       }
+
+       public void setImplicitShapeDimensions (Vector3 dimensions) {
+               gdxBulletJNI.btConvexInternalShape_setImplicitShapeDimensions(swigCPtr, this, dimensions);
+       }
+
+       public void setSafeMargin (float minDimension, float defaultMarginMultiplier) {
+               gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_0(swigCPtr, this, minDimension, defaultMarginMultiplier);
+       }
+
+       public void setSafeMargin (float minDimension) {
+               gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_1(swigCPtr, this, minDimension);
+       }
+
+       public void setSafeMargin (Vector3 halfExtents, float defaultMarginMultiplier) {
+               gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_2(swigCPtr, this, halfExtents, defaultMarginMultiplier);
+       }
+
+       public void setSafeMargin (Vector3 halfExtents) {
+               gdxBulletJNI.btConvexInternalShape_setSafeMargin__SWIG_3(swigCPtr, this, halfExtents);
+       }
+
+       public Vector3 getLocalScalingNV () {
+               return gdxBulletJNI.btConvexInternalShape_getLocalScalingNV(swigCPtr, this);
+       }
+
+       public float getMarginNV () {
+               return gdxBulletJNI.btConvexInternalShape_getMarginNV(swigCPtr, this);
+       }
 
 }
index 2e8fb7d..baf4cdc 100644 (file)
@@ -8,82 +8,79 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btConvexInternalShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConvexInternalShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexInternalShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexInternalShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_collisionShapeData(btCollisionShapeData value) {
-    gdxBulletJNI.btConvexInternalShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
-  }
-
-  public btCollisionShapeData getM_collisionShapeData() {
-    long cPtr = gdxBulletJNI.btConvexInternalShapeData_m_collisionShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
-  }
-
-  public void setM_localScaling(btVector3FloatData value) {
-    gdxBulletJNI.btConvexInternalShapeData_m_localScaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_localScaling() {
-    long cPtr = gdxBulletJNI.btConvexInternalShapeData_m_localScaling_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_implicitShapeDimensions(btVector3FloatData value) {
-    gdxBulletJNI.btConvexInternalShapeData_m_implicitShapeDimensions_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_implicitShapeDimensions() {
-    long cPtr = gdxBulletJNI.btConvexInternalShapeData_m_implicitShapeDimensions_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_collisionMargin(float value) {
-    gdxBulletJNI.btConvexInternalShapeData_m_collisionMargin_set(swigCPtr, this, value);
-  }
-
-  public float getM_collisionMargin() {
-    return gdxBulletJNI.btConvexInternalShapeData_m_collisionMargin_get(swigCPtr, this);
-  }
-
-  public void setM_padding(int value) {
-    gdxBulletJNI.btConvexInternalShapeData_m_padding_set(swigCPtr, this, value);
-  }
-
-  public int getM_padding() {
-    return gdxBulletJNI.btConvexInternalShapeData_m_padding_get(swigCPtr, this);
-  }
-
-  public btConvexInternalShapeData() {
-    this(gdxBulletJNI.new_btConvexInternalShapeData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConvexInternalShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexInternalShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexInternalShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_collisionShapeData (btCollisionShapeData value) {
+               gdxBulletJNI.btConvexInternalShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
+       }
+
+       public btCollisionShapeData getM_collisionShapeData () {
+               long cPtr = gdxBulletJNI.btConvexInternalShapeData_m_collisionShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
+       }
+
+       public void setM_localScaling (btVector3FloatData value) {
+               gdxBulletJNI.btConvexInternalShapeData_m_localScaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_localScaling () {
+               long cPtr = gdxBulletJNI.btConvexInternalShapeData_m_localScaling_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_implicitShapeDimensions (btVector3FloatData value) {
+               gdxBulletJNI.btConvexInternalShapeData_m_implicitShapeDimensions_set(swigCPtr, this, btVector3FloatData.getCPtr(value),
+                       value);
+       }
+
+       public btVector3FloatData getM_implicitShapeDimensions () {
+               long cPtr = gdxBulletJNI.btConvexInternalShapeData_m_implicitShapeDimensions_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_collisionMargin (float value) {
+               gdxBulletJNI.btConvexInternalShapeData_m_collisionMargin_set(swigCPtr, this, value);
+       }
+
+       public float getM_collisionMargin () {
+               return gdxBulletJNI.btConvexInternalShapeData_m_collisionMargin_get(swigCPtr, this);
+       }
+
+       public void setM_padding (int value) {
+               gdxBulletJNI.btConvexInternalShapeData_m_padding_set(swigCPtr, this, value);
+       }
+
+       public int getM_padding () {
+               return gdxBulletJNI.btConvexInternalShapeData_m_padding_get(swigCPtr, this);
+       }
+
+       public btConvexInternalShapeData () {
+               this(gdxBulletJNI.new_btConvexInternalShapeData(), true);
+       }
 
 }
index 3121a17..86dc3ff 100644 (file)
@@ -9,38 +9,40 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexPenetrationDepthSolver {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConvexPenetrationDepthSolver(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexPenetrationDepthSolver obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexPenetrationDepthSolver(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public boolean calcPenDepth(SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexShape convexA, btConvexShape convexB, btTransform transA, btTransform transB, Vector3 v, Vector3 pa, Vector3 pb, btIDebugDraw debugDraw, btStackAlloc stackAlloc) {
-    return gdxBulletJNI.btConvexPenetrationDepthSolver_calcPenDepth(swigCPtr, this, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver), btConvexShape.getCPtr(convexA), convexA, btConvexShape.getCPtr(convexB), convexB, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, v, pa, pb, btIDebugDraw.getCPtr(debugDraw), debugDraw, btStackAlloc.getCPtr(stackAlloc), stackAlloc);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConvexPenetrationDepthSolver (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexPenetrationDepthSolver obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexPenetrationDepthSolver(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public boolean calcPenDepth (SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexShape convexA, btConvexShape convexB,
+               btTransform transA, btTransform transB, Vector3 v, Vector3 pa, Vector3 pb, btIDebugDraw debugDraw, btStackAlloc stackAlloc) {
+               return gdxBulletJNI.btConvexPenetrationDepthSolver_calcPenDepth(swigCPtr, this,
+                       SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver), btConvexShape.getCPtr(convexA), convexA,
+                       btConvexShape.getCPtr(convexB), convexB, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, v,
+                       pa, pb, btIDebugDraw.getCPtr(debugDraw), debugDraw, btStackAlloc.getCPtr(stackAlloc), stackAlloc);
+       }
 
 }
index 11e81f1..fee21b4 100644 (file)
@@ -8,43 +8,48 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
 import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexPlaneCollisionAlgorithm extends btCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btConvexPlaneCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexPlaneCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexPlaneCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexPlaneCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvexPlaneCollisionAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject col0, btCollisionObject col1, boolean isSwapped, int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
-    this(gdxBulletJNI.new_btConvexPlaneCollisionAlgorithm(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(col0), col0, btCollisionObject.getCPtr(col1), col1, isSwapped, numPerturbationIterations, minimumPointsPerturbationThreshold), true);
-  }
-
-  public void collideSingleContact(Quaternion perturbeRot, btCollisionObject body0, btCollisionObject body1, btDispatcherInfo dispatchInfo, btManifoldResult resultOut) {
-    gdxBulletJNI.btConvexPlaneCollisionAlgorithm_collideSingleContact(swigCPtr, this, perturbeRot, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btManifoldResult.getCPtr(resultOut), resultOut);
-  }
+       private long swigCPtr;
+
+       protected btConvexPlaneCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexPlaneCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexPlaneCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexPlaneCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvexPlaneCollisionAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci,
+               btCollisionObject col0, btCollisionObject col1, boolean isSwapped, int numPerturbationIterations,
+               int minimumPointsPerturbationThreshold) {
+               this(gdxBulletJNI.new_btConvexPlaneCollisionAlgorithm(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(col0), col0,
+                       btCollisionObject.getCPtr(col1), col1, isSwapped, numPerturbationIterations, minimumPointsPerturbationThreshold), true);
+       }
+
+       public void collideSingleContact (Quaternion perturbeRot, btCollisionObject body0, btCollisionObject body1,
+               btDispatcherInfo dispatchInfo, btManifoldResult resultOut) {
+               gdxBulletJNI.btConvexPlaneCollisionAlgorithm_collideSingleContact(swigCPtr, this, perturbeRot,
+                       btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1,
+                       btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btManifoldResult.getCPtr(resultOut), resultOut);
+       }
 
 }
index ba81cda..36fdfa0 100644 (file)
@@ -9,71 +9,72 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexPointCloudShape extends btPolyhedralConvexAabbCachingShape {
-  private long swigCPtr;
-
-  protected btConvexPointCloudShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexPointCloudShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexPointCloudShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexPointCloudShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvexPointCloudShape() {
-    this(gdxBulletJNI.new_btConvexPointCloudShape__SWIG_0(), true);
-  }
-
-  public btConvexPointCloudShape(btVector3 points, int numPoints, Vector3 localScaling, boolean computeAabb) {
-    this(gdxBulletJNI.new_btConvexPointCloudShape__SWIG_1(btVector3.getCPtr(points), points, numPoints, localScaling, computeAabb), true);
-  }
-
-  public btConvexPointCloudShape(btVector3 points, int numPoints, Vector3 localScaling) {
-    this(gdxBulletJNI.new_btConvexPointCloudShape__SWIG_2(btVector3.getCPtr(points), points, numPoints, localScaling), true);
-  }
-
-  public void setPoints(btVector3 points, int numPoints, boolean computeAabb, Vector3 localScaling) {
-    gdxBulletJNI.btConvexPointCloudShape_setPoints__SWIG_0(swigCPtr, this, btVector3.getCPtr(points), points, numPoints, computeAabb, localScaling);
-  }
-
-  public void setPoints(btVector3 points, int numPoints, boolean computeAabb) {
-    gdxBulletJNI.btConvexPointCloudShape_setPoints__SWIG_1(swigCPtr, this, btVector3.getCPtr(points), points, numPoints, computeAabb);
-  }
-
-  public void setPoints(btVector3 points, int numPoints) {
-    gdxBulletJNI.btConvexPointCloudShape_setPoints__SWIG_2(swigCPtr, this, btVector3.getCPtr(points), points, numPoints);
-  }
-
-  public btVector3 getUnscaledPoints() {
-    long cPtr = gdxBulletJNI.btConvexPointCloudShape_getUnscaledPoints__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public int getNumPoints() {
-    return gdxBulletJNI.btConvexPointCloudShape_getNumPoints(swigCPtr, this);
-  }
-
-  public Vector3 getScaledPoint(int index) {
-       return gdxBulletJNI.btConvexPointCloudShape_getScaledPoint(swigCPtr, this, index);
-}
+       private long swigCPtr;
+
+       protected btConvexPointCloudShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexPointCloudShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexPointCloudShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexPointCloudShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvexPointCloudShape () {
+               this(gdxBulletJNI.new_btConvexPointCloudShape__SWIG_0(), true);
+       }
+
+       public btConvexPointCloudShape (btVector3 points, int numPoints, Vector3 localScaling, boolean computeAabb) {
+               this(gdxBulletJNI.new_btConvexPointCloudShape__SWIG_1(btVector3.getCPtr(points), points, numPoints, localScaling,
+                       computeAabb), true);
+       }
+
+       public btConvexPointCloudShape (btVector3 points, int numPoints, Vector3 localScaling) {
+               this(gdxBulletJNI.new_btConvexPointCloudShape__SWIG_2(btVector3.getCPtr(points), points, numPoints, localScaling), true);
+       }
+
+       public void setPoints (btVector3 points, int numPoints, boolean computeAabb, Vector3 localScaling) {
+               gdxBulletJNI.btConvexPointCloudShape_setPoints__SWIG_0(swigCPtr, this, btVector3.getCPtr(points), points, numPoints,
+                       computeAabb, localScaling);
+       }
+
+       public void setPoints (btVector3 points, int numPoints, boolean computeAabb) {
+               gdxBulletJNI.btConvexPointCloudShape_setPoints__SWIG_1(swigCPtr, this, btVector3.getCPtr(points), points, numPoints,
+                       computeAabb);
+       }
+
+       public void setPoints (btVector3 points, int numPoints) {
+               gdxBulletJNI.btConvexPointCloudShape_setPoints__SWIG_2(swigCPtr, this, btVector3.getCPtr(points), points, numPoints);
+       }
+
+       public btVector3 getUnscaledPoints () {
+               long cPtr = gdxBulletJNI.btConvexPointCloudShape_getUnscaledPoints__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public int getNumPoints () {
+               return gdxBulletJNI.btConvexPointCloudShape_getNumPoints(swigCPtr, this);
+       }
+
+       public Vector3 getScaledPoint (int index) {
+               return gdxBulletJNI.btConvexPointCloudShape_getScaledPoint(swigCPtr, this, index);
+       }
 
 }
index 4fd8b2b..dd91efb 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexPolyhedron {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConvexPolyhedron(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexPolyhedron obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexPolyhedron(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btConvexPolyhedron() {
-    this(gdxBulletJNI.new_btConvexPolyhedron(), true);
-  }
-
-  public void setM_vertices(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
-    gdxBulletJNI.btConvexPolyhedron_m_vertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getM_vertices() {
-    long cPtr = gdxBulletJNI.btConvexPolyhedron_m_vertices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
-  }
-
-  public void setM_faces(SWIGTYPE_p_btAlignedObjectArrayT_btFace_t value) {
-    gdxBulletJNI.btConvexPolyhedron_m_faces_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btFace_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btFace_t getM_faces() {
-    long cPtr = gdxBulletJNI.btConvexPolyhedron_m_faces_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btFace_t(cPtr, false);
-  }
-
-  public void setM_uniqueEdges(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
-    gdxBulletJNI.btConvexPolyhedron_m_uniqueEdges_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getM_uniqueEdges() {
-    long cPtr = gdxBulletJNI.btConvexPolyhedron_m_uniqueEdges_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
-  }
-
-  public void setM_localCenter(btVector3 value) {
-    gdxBulletJNI.btConvexPolyhedron_m_localCenter_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_localCenter() {
-    long cPtr = gdxBulletJNI.btConvexPolyhedron_m_localCenter_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_extents(btVector3 value) {
-    gdxBulletJNI.btConvexPolyhedron_m_extents_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_extents() {
-    long cPtr = gdxBulletJNI.btConvexPolyhedron_m_extents_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_radius(float value) {
-    gdxBulletJNI.btConvexPolyhedron_m_radius_set(swigCPtr, this, value);
-  }
-
-  public float getM_radius() {
-    return gdxBulletJNI.btConvexPolyhedron_m_radius_get(swigCPtr, this);
-  }
-
-  public void setMC(btVector3 value) {
-    gdxBulletJNI.btConvexPolyhedron_mC_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getMC() {
-    long cPtr = gdxBulletJNI.btConvexPolyhedron_mC_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setME(btVector3 value) {
-    gdxBulletJNI.btConvexPolyhedron_mE_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getME() {
-    long cPtr = gdxBulletJNI.btConvexPolyhedron_mE_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void initialize() {
-    gdxBulletJNI.btConvexPolyhedron_initialize(swigCPtr, this);
-  }
-
-  public boolean testContainment() {
-    return gdxBulletJNI.btConvexPolyhedron_testContainment(swigCPtr, this);
-  }
-
-  public void project(btTransform trans, Vector3 dir, SWIGTYPE_p_float min, SWIGTYPE_p_float max) {
-    gdxBulletJNI.btConvexPolyhedron_project(swigCPtr, this, btTransform.getCPtr(trans), trans, dir, SWIGTYPE_p_float.getCPtr(min), SWIGTYPE_p_float.getCPtr(max));
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConvexPolyhedron (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexPolyhedron obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexPolyhedron(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btConvexPolyhedron () {
+               this(gdxBulletJNI.new_btConvexPolyhedron(), true);
+       }
+
+       public void setM_vertices (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
+               gdxBulletJNI.btConvexPolyhedron_m_vertices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getM_vertices () {
+               long cPtr = gdxBulletJNI.btConvexPolyhedron_m_vertices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
+       }
+
+       public void setM_faces (SWIGTYPE_p_btAlignedObjectArrayT_btFace_t value) {
+               gdxBulletJNI.btConvexPolyhedron_m_faces_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btFace_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btFace_t getM_faces () {
+               long cPtr = gdxBulletJNI.btConvexPolyhedron_m_faces_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btFace_t(cPtr, false);
+       }
+
+       public void setM_uniqueEdges (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t value) {
+               gdxBulletJNI.btConvexPolyhedron_m_uniqueEdges_set(swigCPtr, this,
+                       SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t getM_uniqueEdges () {
+               long cPtr = gdxBulletJNI.btConvexPolyhedron_m_uniqueEdges_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t(cPtr, false);
+       }
+
+       public void setM_localCenter (btVector3 value) {
+               gdxBulletJNI.btConvexPolyhedron_m_localCenter_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_localCenter () {
+               long cPtr = gdxBulletJNI.btConvexPolyhedron_m_localCenter_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_extents (btVector3 value) {
+               gdxBulletJNI.btConvexPolyhedron_m_extents_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_extents () {
+               long cPtr = gdxBulletJNI.btConvexPolyhedron_m_extents_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_radius (float value) {
+               gdxBulletJNI.btConvexPolyhedron_m_radius_set(swigCPtr, this, value);
+       }
+
+       public float getM_radius () {
+               return gdxBulletJNI.btConvexPolyhedron_m_radius_get(swigCPtr, this);
+       }
+
+       public void setMC (btVector3 value) {
+               gdxBulletJNI.btConvexPolyhedron_mC_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getMC () {
+               long cPtr = gdxBulletJNI.btConvexPolyhedron_mC_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setME (btVector3 value) {
+               gdxBulletJNI.btConvexPolyhedron_mE_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getME () {
+               long cPtr = gdxBulletJNI.btConvexPolyhedron_mE_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void initialize () {
+               gdxBulletJNI.btConvexPolyhedron_initialize(swigCPtr, this);
+       }
+
+       public boolean testContainment () {
+               return gdxBulletJNI.btConvexPolyhedron_testContainment(swigCPtr, this);
+       }
+
+       public void project (btTransform trans, Vector3 dir, SWIGTYPE_p_float min, SWIGTYPE_p_float max) {
+               gdxBulletJNI.btConvexPolyhedron_project(swigCPtr, this, btTransform.getCPtr(trans), trans, dir,
+                       SWIGTYPE_p_float.getCPtr(min), SWIGTYPE_p_float.getCPtr(max));
+       }
 
 }
index e0d8fcb..fc55294 100644 (file)
@@ -9,50 +9,50 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexSeparatingDistanceUtil {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btConvexSeparatingDistanceUtil(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexSeparatingDistanceUtil obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexSeparatingDistanceUtil(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btConvexSeparatingDistanceUtil(float boundingRadiusA, float boundingRadiusB) {
-    this(gdxBulletJNI.new_btConvexSeparatingDistanceUtil(boundingRadiusA, boundingRadiusB), true);
-  }
-
-  public float getConservativeSeparatingDistance() {
-    return gdxBulletJNI.btConvexSeparatingDistanceUtil_getConservativeSeparatingDistance(swigCPtr, this);
-  }
-
-  public void updateSeparatingDistance(btTransform transA, btTransform transB) {
-    gdxBulletJNI.btConvexSeparatingDistanceUtil_updateSeparatingDistance(swigCPtr, this, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB);
-  }
-
-  public void initSeparatingDistance(Vector3 separatingVector, float separatingDistance, btTransform transA, btTransform transB) {
-    gdxBulletJNI.btConvexSeparatingDistanceUtil_initSeparatingDistance(swigCPtr, this, separatingVector, separatingDistance, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btConvexSeparatingDistanceUtil (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexSeparatingDistanceUtil obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexSeparatingDistanceUtil(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btConvexSeparatingDistanceUtil (float boundingRadiusA, float boundingRadiusB) {
+               this(gdxBulletJNI.new_btConvexSeparatingDistanceUtil(boundingRadiusA, boundingRadiusB), true);
+       }
+
+       public float getConservativeSeparatingDistance () {
+               return gdxBulletJNI.btConvexSeparatingDistanceUtil_getConservativeSeparatingDistance(swigCPtr, this);
+       }
+
+       public void updateSeparatingDistance (btTransform transA, btTransform transB) {
+               gdxBulletJNI.btConvexSeparatingDistanceUtil_updateSeparatingDistance(swigCPtr, this, btTransform.getCPtr(transA), transA,
+                       btTransform.getCPtr(transB), transB);
+       }
+
+       public void initSeparatingDistance (Vector3 separatingVector, float separatingDistance, btTransform transA, btTransform transB) {
+               gdxBulletJNI.btConvexSeparatingDistanceUtil_initSeparatingDistance(swigCPtr, this, separatingVector, separatingDistance,
+                       btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB);
+       }
 
 }
index dc5ed6f..98e5cb9 100644 (file)
@@ -9,78 +9,78 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexShape extends btCollisionShape {
-  private long swigCPtr;
-
-  protected btConvexShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public Vector3 localGetSupportingVertex(Vector3 vec) {
-       return gdxBulletJNI.btConvexShape_localGetSupportingVertex(swigCPtr, this, vec);
-}
-
-  public Vector3 localGetSupportingVertexWithoutMargin(Vector3 vec) {
-       return gdxBulletJNI.btConvexShape_localGetSupportingVertexWithoutMargin(swigCPtr, this, vec);
-}
-
-  public Vector3 localGetSupportVertexWithoutMarginNonVirtual(Vector3 vec) {
-       return gdxBulletJNI.btConvexShape_localGetSupportVertexWithoutMarginNonVirtual(swigCPtr, this, vec);
-}
-
-  public Vector3 localGetSupportVertexNonVirtual(Vector3 vec) {
-       return gdxBulletJNI.btConvexShape_localGetSupportVertexNonVirtual(swigCPtr, this, vec);
-}
-
-  public float getMarginNonVirtual() {
-    return gdxBulletJNI.btConvexShape_getMarginNonVirtual(swigCPtr, this);
-  }
-
-  public void getAabbNonVirtual(btTransform t, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btConvexShape_getAabbNonVirtual(swigCPtr, this, btTransform.getCPtr(t), t, aabbMin, aabbMax);
-  }
-
-  public void project(btTransform trans, Vector3 dir, SWIGTYPE_p_float min, SWIGTYPE_p_float max) {
-    gdxBulletJNI.btConvexShape_project(swigCPtr, this, btTransform.getCPtr(trans), trans, dir, SWIGTYPE_p_float.getCPtr(min), SWIGTYPE_p_float.getCPtr(max));
-  }
-
-  public void batchedUnitVectorGetSupportingVertexWithoutMargin(btVector3 vectors, btVector3 supportVerticesOut, int numVectors) {
-    gdxBulletJNI.btConvexShape_batchedUnitVectorGetSupportingVertexWithoutMargin(swigCPtr, this, btVector3.getCPtr(vectors), vectors, btVector3.getCPtr(supportVerticesOut), supportVerticesOut, numVectors);
-  }
-
-  public void getAabbSlow(btTransform t, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btConvexShape_getAabbSlow(swigCPtr, this, btTransform.getCPtr(t), t, aabbMin, aabbMax);
-  }
-
-  public int getNumPreferredPenetrationDirections() {
-    return gdxBulletJNI.btConvexShape_getNumPreferredPenetrationDirections(swigCPtr, this);
-  }
-
-  public void getPreferredPenetrationDirection(int index, Vector3 penetrationVector) {
-    gdxBulletJNI.btConvexShape_getPreferredPenetrationDirection(swigCPtr, this, index, penetrationVector);
-  }
+       private long swigCPtr;
+
+       protected btConvexShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public Vector3 localGetSupportingVertex (Vector3 vec) {
+               return gdxBulletJNI.btConvexShape_localGetSupportingVertex(swigCPtr, this, vec);
+       }
+
+       public Vector3 localGetSupportingVertexWithoutMargin (Vector3 vec) {
+               return gdxBulletJNI.btConvexShape_localGetSupportingVertexWithoutMargin(swigCPtr, this, vec);
+       }
+
+       public Vector3 localGetSupportVertexWithoutMarginNonVirtual (Vector3 vec) {
+               return gdxBulletJNI.btConvexShape_localGetSupportVertexWithoutMarginNonVirtual(swigCPtr, this, vec);
+       }
+
+       public Vector3 localGetSupportVertexNonVirtual (Vector3 vec) {
+               return gdxBulletJNI.btConvexShape_localGetSupportVertexNonVirtual(swigCPtr, this, vec);
+       }
+
+       public float getMarginNonVirtual () {
+               return gdxBulletJNI.btConvexShape_getMarginNonVirtual(swigCPtr, this);
+       }
+
+       public void getAabbNonVirtual (btTransform t, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btConvexShape_getAabbNonVirtual(swigCPtr, this, btTransform.getCPtr(t), t, aabbMin, aabbMax);
+       }
+
+       public void project (btTransform trans, Vector3 dir, SWIGTYPE_p_float min, SWIGTYPE_p_float max) {
+               gdxBulletJNI.btConvexShape_project(swigCPtr, this, btTransform.getCPtr(trans), trans, dir, SWIGTYPE_p_float.getCPtr(min),
+                       SWIGTYPE_p_float.getCPtr(max));
+       }
+
+       public void batchedUnitVectorGetSupportingVertexWithoutMargin (btVector3 vectors, btVector3 supportVerticesOut, int numVectors) {
+               gdxBulletJNI.btConvexShape_batchedUnitVectorGetSupportingVertexWithoutMargin(swigCPtr, this, btVector3.getCPtr(vectors),
+                       vectors, btVector3.getCPtr(supportVerticesOut), supportVerticesOut, numVectors);
+       }
+
+       public void getAabbSlow (btTransform t, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btConvexShape_getAabbSlow(swigCPtr, this, btTransform.getCPtr(t), t, aabbMin, aabbMax);
+       }
+
+       public int getNumPreferredPenetrationDirections () {
+               return gdxBulletJNI.btConvexShape_getNumPreferredPenetrationDirections(swigCPtr, this);
+       }
+
+       public void getPreferredPenetrationDirection (int index, Vector3 penetrationVector) {
+               gdxBulletJNI.btConvexShape_getPreferredPenetrationDirection(swigCPtr, this, index, penetrationVector);
+       }
 
 }
index 209eeea..a5d36e0 100644 (file)
@@ -9,71 +9,71 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexTriangleCallback extends btTriangleCallback {
-  private long swigCPtr;
-
-  protected btConvexTriangleCallback(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexTriangleCallback_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexTriangleCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexTriangleCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_triangleCount(int value) {
-    gdxBulletJNI.btConvexTriangleCallback_m_triangleCount_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleCount() {
-    return gdxBulletJNI.btConvexTriangleCallback_m_triangleCount_get(swigCPtr, this);
-  }
-
-  public void setM_manifoldPtr(btPersistentManifold value) {
-    gdxBulletJNI.btConvexTriangleCallback_m_manifoldPtr_set(swigCPtr, this, btPersistentManifold.getCPtr(value), value);
-  }
-
-  public btPersistentManifold getM_manifoldPtr() {
-    long cPtr = gdxBulletJNI.btConvexTriangleCallback_m_manifoldPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
-
-  public btConvexTriangleCallback(btDispatcher dispatcher, btCollisionObject body0, btCollisionObject body1, boolean isSwapped) {
-    this(gdxBulletJNI.new_btConvexTriangleCallback(btDispatcher.getCPtr(dispatcher), dispatcher, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, isSwapped), true);
-  }
-
-  public void setTimeStepAndCounters(float collisionMarginTriangle, btDispatcherInfo dispatchInfo, btManifoldResult resultOut) {
-    gdxBulletJNI.btConvexTriangleCallback_setTimeStepAndCounters(swigCPtr, this, collisionMarginTriangle, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btManifoldResult.getCPtr(resultOut), resultOut);
-  }
-
-  public void clearCache() {
-    gdxBulletJNI.btConvexTriangleCallback_clearCache(swigCPtr, this);
-  }
-
-  public Vector3 getAabbMin() {
-       return gdxBulletJNI.btConvexTriangleCallback_getAabbMin(swigCPtr, this);
-}
-
-  public Vector3 getAabbMax() {
-       return gdxBulletJNI.btConvexTriangleCallback_getAabbMax(swigCPtr, this);
-}
+       private long swigCPtr;
+
+       protected btConvexTriangleCallback (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexTriangleCallback_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexTriangleCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexTriangleCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_triangleCount (int value) {
+               gdxBulletJNI.btConvexTriangleCallback_m_triangleCount_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleCount () {
+               return gdxBulletJNI.btConvexTriangleCallback_m_triangleCount_get(swigCPtr, this);
+       }
+
+       public void setM_manifoldPtr (btPersistentManifold value) {
+               gdxBulletJNI.btConvexTriangleCallback_m_manifoldPtr_set(swigCPtr, this, btPersistentManifold.getCPtr(value), value);
+       }
+
+       public btPersistentManifold getM_manifoldPtr () {
+               long cPtr = gdxBulletJNI.btConvexTriangleCallback_m_manifoldPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
+
+       public btConvexTriangleCallback (btDispatcher dispatcher, btCollisionObject body0, btCollisionObject body1, boolean isSwapped) {
+               this(gdxBulletJNI.new_btConvexTriangleCallback(btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, isSwapped), true);
+       }
+
+       public void setTimeStepAndCounters (float collisionMarginTriangle, btDispatcherInfo dispatchInfo, btManifoldResult resultOut) {
+               gdxBulletJNI.btConvexTriangleCallback_setTimeStepAndCounters(swigCPtr, this, collisionMarginTriangle,
+                       btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btManifoldResult.getCPtr(resultOut), resultOut);
+       }
+
+       public void clearCache () {
+               gdxBulletJNI.btConvexTriangleCallback_clearCache(swigCPtr, this);
+       }
+
+       public Vector3 getAabbMin () {
+               return gdxBulletJNI.btConvexTriangleCallback_getAabbMin(swigCPtr, this);
+       }
+
+       public Vector3 getAabbMax () {
+               return gdxBulletJNI.btConvexTriangleCallback_getAabbMax(swigCPtr, this);
+       }
 
 }
index 6a01f95..7cee956 100644 (file)
@@ -9,51 +9,52 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btConvexTriangleMeshShape extends btPolyhedralConvexAabbCachingShape {
-  private long swigCPtr;
-
-  protected btConvexTriangleMeshShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btConvexTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btConvexTriangleMeshShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btConvexTriangleMeshShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btConvexTriangleMeshShape(btStridingMeshInterface meshInterface, boolean calcAabb) {
-    this(gdxBulletJNI.new_btConvexTriangleMeshShape__SWIG_0(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, calcAabb), true);
-  }
-
-  public btConvexTriangleMeshShape(btStridingMeshInterface meshInterface) {
-    this(gdxBulletJNI.new_btConvexTriangleMeshShape__SWIG_1(btStridingMeshInterface.getCPtr(meshInterface), meshInterface), true);
-  }
-
-  public btStridingMeshInterface getMeshInterface() {
-    long cPtr = gdxBulletJNI.btConvexTriangleMeshShape_getMeshInterface__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btStridingMeshInterface(cPtr, false);
-  }
-
-  public void calculatePrincipalAxisTransform(btTransform principal, Vector3 inertia, SWIGTYPE_p_float volume) {
-    gdxBulletJNI.btConvexTriangleMeshShape_calculatePrincipalAxisTransform(swigCPtr, this, btTransform.getCPtr(principal), principal, inertia, SWIGTYPE_p_float.getCPtr(volume));
-  }
+       private long swigCPtr;
+
+       protected btConvexTriangleMeshShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btConvexTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btConvexTriangleMeshShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btConvexTriangleMeshShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btConvexTriangleMeshShape (btStridingMeshInterface meshInterface, boolean calcAabb) {
+               this(gdxBulletJNI.new_btConvexTriangleMeshShape__SWIG_0(btStridingMeshInterface.getCPtr(meshInterface), meshInterface,
+                       calcAabb), true);
+       }
+
+       public btConvexTriangleMeshShape (btStridingMeshInterface meshInterface) {
+               this(gdxBulletJNI.new_btConvexTriangleMeshShape__SWIG_1(btStridingMeshInterface.getCPtr(meshInterface), meshInterface),
+                       true);
+       }
+
+       public btStridingMeshInterface getMeshInterface () {
+               long cPtr = gdxBulletJNI.btConvexTriangleMeshShape_getMeshInterface__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btStridingMeshInterface(cPtr, false);
+       }
+
+       public void calculatePrincipalAxisTransform (btTransform principal, Vector3 inertia, SWIGTYPE_p_float volume) {
+               gdxBulletJNI.btConvexTriangleMeshShape_calculatePrincipalAxisTransform(swigCPtr, this, btTransform.getCPtr(principal),
+                       principal, inertia, SWIGTYPE_p_float.getCPtr(volume));
+       }
 
 }
index ccbb72b..6d246d2 100644 (file)
@@ -9,54 +9,52 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCylinderShape extends btConvexInternalShape {
-  private long swigCPtr;
-
-  protected btCylinderShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCylinderShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCylinderShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCylinderShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public Vector3 getHalfExtentsWithMargin() {
-       return gdxBulletJNI.btCylinderShape_getHalfExtentsWithMargin(swigCPtr, this);
-}
-
-  public Vector3 getHalfExtentsWithoutMargin() {
-       return gdxBulletJNI.btCylinderShape_getHalfExtentsWithoutMargin(swigCPtr, this);
-}
-
-  public btCylinderShape(Vector3 halfExtents) {
-    this(gdxBulletJNI.new_btCylinderShape(halfExtents), true);
-  }
-
-  public int getUpAxis() {
-    return gdxBulletJNI.btCylinderShape_getUpAxis(swigCPtr, this);
-  }
-
-  public float getRadius() {
-    return gdxBulletJNI.btCylinderShape_getRadius(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btCylinderShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCylinderShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCylinderShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCylinderShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public Vector3 getHalfExtentsWithMargin () {
+               return gdxBulletJNI.btCylinderShape_getHalfExtentsWithMargin(swigCPtr, this);
+       }
+
+       public Vector3 getHalfExtentsWithoutMargin () {
+               return gdxBulletJNI.btCylinderShape_getHalfExtentsWithoutMargin(swigCPtr, this);
+       }
+
+       public btCylinderShape (Vector3 halfExtents) {
+               this(gdxBulletJNI.new_btCylinderShape(halfExtents), true);
+       }
+
+       public int getUpAxis () {
+               return gdxBulletJNI.btCylinderShape_getUpAxis(swigCPtr, this);
+       }
+
+       public float getRadius () {
+               return gdxBulletJNI.btCylinderShape_getRadius(swigCPtr, this);
+       }
 
 }
index fbfef85..77d5b52 100644 (file)
@@ -8,64 +8,61 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btCylinderShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btCylinderShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btCylinderShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btCylinderShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btCylinderShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCylinderShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCylinderShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setM_convexInternalShapeData(btConvexInternalShapeData value) {
-    gdxBulletJNI.btCylinderShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value), value);
-  }
+       public void setM_convexInternalShapeData (btConvexInternalShapeData value) {
+               gdxBulletJNI.btCylinderShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value),
+                       value);
+       }
 
-  public btConvexInternalShapeData getM_convexInternalShapeData() {
-    long cPtr = gdxBulletJNI.btCylinderShapeData_m_convexInternalShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
-  }
+       public btConvexInternalShapeData getM_convexInternalShapeData () {
+               long cPtr = gdxBulletJNI.btCylinderShapeData_m_convexInternalShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
+       }
 
-  public void setM_upAxis(int value) {
-    gdxBulletJNI.btCylinderShapeData_m_upAxis_set(swigCPtr, this, value);
-  }
+       public void setM_upAxis (int value) {
+               gdxBulletJNI.btCylinderShapeData_m_upAxis_set(swigCPtr, this, value);
+       }
 
-  public int getM_upAxis() {
-    return gdxBulletJNI.btCylinderShapeData_m_upAxis_get(swigCPtr, this);
-  }
+       public int getM_upAxis () {
+               return gdxBulletJNI.btCylinderShapeData_m_upAxis_get(swigCPtr, this);
+       }
 
-  public void setM_padding(String value) {
-    gdxBulletJNI.btCylinderShapeData_m_padding_set(swigCPtr, this, value);
-  }
+       public void setM_padding (String value) {
+               gdxBulletJNI.btCylinderShapeData_m_padding_set(swigCPtr, this, value);
+       }
 
-  public String getM_padding() {
-    return gdxBulletJNI.btCylinderShapeData_m_padding_get(swigCPtr, this);
-  }
+       public String getM_padding () {
+               return gdxBulletJNI.btCylinderShapeData_m_padding_get(swigCPtr, this);
+       }
 
-  public btCylinderShapeData() {
-    this(gdxBulletJNI.new_btCylinderShapeData(), true);
-  }
+       public btCylinderShapeData () {
+               this(gdxBulletJNI.new_btCylinderShapeData(), true);
+       }
 
 }
index a69cb87..d5f801a 100644 (file)
@@ -9,38 +9,36 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCylinderShapeX extends btCylinderShape {
-  private long swigCPtr;
-
-  protected btCylinderShapeX(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCylinderShapeX_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCylinderShapeX obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCylinderShapeX(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btCylinderShapeX(Vector3 halfExtents) {
-    this(gdxBulletJNI.new_btCylinderShapeX(halfExtents), true);
-  }
+       private long swigCPtr;
+
+       protected btCylinderShapeX (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCylinderShapeX_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCylinderShapeX obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCylinderShapeX(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btCylinderShapeX (Vector3 halfExtents) {
+               this(gdxBulletJNI.new_btCylinderShapeX(halfExtents), true);
+       }
 
 }
index 35fb5d0..80effe6 100644 (file)
@@ -9,38 +9,36 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btCylinderShapeZ extends btCylinderShape {
-  private long swigCPtr;
-
-  protected btCylinderShapeZ(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btCylinderShapeZ_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btCylinderShapeZ obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btCylinderShapeZ(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btCylinderShapeZ(Vector3 halfExtents) {
-    this(gdxBulletJNI.new_btCylinderShapeZ(halfExtents), true);
-  }
+       private long swigCPtr;
+
+       protected btCylinderShapeZ (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btCylinderShapeZ_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btCylinderShapeZ obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btCylinderShapeZ(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btCylinderShapeZ (Vector3 halfExtents) {
+               this(gdxBulletJNI.new_btCylinderShapeZ(halfExtents), true);
+       }
 
 }
index 695f144..44520a4 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btDbvt {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btDbvt(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDbvt obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDbvt(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_root(btDbvtNode value) {
-    gdxBulletJNI.btDbvt_m_root_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
-  }
-
-  public btDbvtNode getM_root() {
-    long cPtr = gdxBulletJNI.btDbvt_m_root_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
-  }
-
-  public void setM_free(btDbvtNode value) {
-    gdxBulletJNI.btDbvt_m_free_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
-  }
-
-  public btDbvtNode getM_free() {
-    long cPtr = gdxBulletJNI.btDbvt_m_free_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
-  }
-
-  public void setM_lkhd(int value) {
-    gdxBulletJNI.btDbvt_m_lkhd_set(swigCPtr, this, value);
-  }
-
-  public int getM_lkhd() {
-    return gdxBulletJNI.btDbvt_m_lkhd_get(swigCPtr, this);
-  }
-
-  public void setM_leaves(int value) {
-    gdxBulletJNI.btDbvt_m_leaves_set(swigCPtr, this, value);
-  }
-
-  public int getM_leaves() {
-    return gdxBulletJNI.btDbvt_m_leaves_get(swigCPtr, this);
-  }
-
-  public void setM_opath(long value) {
-    gdxBulletJNI.btDbvt_m_opath_set(swigCPtr, this, value);
-  }
-
-  public long getM_opath() {
-    return gdxBulletJNI.btDbvt_m_opath_get(swigCPtr, this);
-  }
-
-  public void setM_stkStack(SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t value) {
-    gdxBulletJNI.btDbvt_m_stkStack_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t getM_stkStack() {
-    long cPtr = gdxBulletJNI.btDbvt_m_stkStack_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t(cPtr, false);
-  }
-
-  public void setM_rayTestStack(SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t value) {
-    gdxBulletJNI.btDbvt_m_rayTestStack_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t getM_rayTestStack() {
-    long cPtr = gdxBulletJNI.btDbvt_m_rayTestStack_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t(cPtr, false);
-  }
-
-  public btDbvt() {
-    this(gdxBulletJNI.new_btDbvt(), true);
-  }
-
-  public void clear() {
-    gdxBulletJNI.btDbvt_clear(swigCPtr, this);
-  }
-
-  public boolean empty() {
-    return gdxBulletJNI.btDbvt_empty(swigCPtr, this);
-  }
-
-  public void optimizeBottomUp() {
-    gdxBulletJNI.btDbvt_optimizeBottomUp(swigCPtr, this);
-  }
-
-  public void optimizeTopDown(int bu_treshold) {
-    gdxBulletJNI.btDbvt_optimizeTopDown__SWIG_0(swigCPtr, this, bu_treshold);
-  }
-
-  public void optimizeTopDown() {
-    gdxBulletJNI.btDbvt_optimizeTopDown__SWIG_1(swigCPtr, this);
-  }
-
-  public void optimizeIncremental(int passes) {
-    gdxBulletJNI.btDbvt_optimizeIncremental(swigCPtr, this, passes);
-  }
-
-  public btDbvtNode insert(btDbvtAabbMm box, SWIGTYPE_p_void data) {
-    long cPtr = gdxBulletJNI.btDbvt_insert(swigCPtr, this, btDbvtAabbMm.getCPtr(box), box, SWIGTYPE_p_void.getCPtr(data));
-    return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
-  }
-
-  public void update(btDbvtNode leaf, int lookahead) {
-    gdxBulletJNI.btDbvt_update__SWIG_0(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, lookahead);
-  }
-
-  public void update(btDbvtNode leaf) {
-    gdxBulletJNI.btDbvt_update__SWIG_1(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf);
-  }
-
-  public void update(btDbvtNode leaf, btDbvtAabbMm volume) {
-    gdxBulletJNI.btDbvt_update__SWIG_2(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume);
-  }
-
-  public boolean update(btDbvtNode leaf, btDbvtAabbMm volume, Vector3 velocity, float margin) {
-    return gdxBulletJNI.btDbvt_update__SWIG_3(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume, velocity, margin);
-  }
-
-  public boolean update(btDbvtNode leaf, btDbvtAabbMm volume, Vector3 velocity) {
-    return gdxBulletJNI.btDbvt_update__SWIG_4(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume, velocity);
-  }
-
-  public boolean update(btDbvtNode leaf, btDbvtAabbMm volume, float margin) {
-    return gdxBulletJNI.btDbvt_update__SWIG_5(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume, margin);
-  }
-
-  public void remove(btDbvtNode leaf) {
-    gdxBulletJNI.btDbvt_remove(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf);
-  }
-
-  public void write(SWIGTYPE_p_btDbvt__IWriter iwriter) {
-    gdxBulletJNI.btDbvt_write(swigCPtr, this, SWIGTYPE_p_btDbvt__IWriter.getCPtr(iwriter));
-  }
-
-  public void clone(btDbvt dest, SWIGTYPE_p_btDbvt__IClone iclone) {
-    gdxBulletJNI.btDbvt_clone__SWIG_0(swigCPtr, this, btDbvt.getCPtr(dest), dest, SWIGTYPE_p_btDbvt__IClone.getCPtr(iclone));
-  }
-
-  public void clone(btDbvt dest) {
-    gdxBulletJNI.btDbvt_clone__SWIG_1(swigCPtr, this, btDbvt.getCPtr(dest), dest);
-  }
-
-  public static int maxdepth(btDbvtNode node) {
-    return gdxBulletJNI.btDbvt_maxdepth(btDbvtNode.getCPtr(node), node);
-  }
-
-  public static int countLeaves(btDbvtNode node) {
-    return gdxBulletJNI.btDbvt_countLeaves(btDbvtNode.getCPtr(node), node);
-  }
-
-  public static void extractLeaves(btDbvtNode node, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t leaves) {
-    gdxBulletJNI.btDbvt_extractLeaves(btDbvtNode.getCPtr(node), node, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.getCPtr(leaves));
-  }
-
-  public static void benchmark() {
-    gdxBulletJNI.btDbvt_benchmark();
-  }
-
-  public static void enumNodes(btDbvtNode root, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_enumNodes(btDbvtNode.getCPtr(root), root, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public static void enumLeaves(btDbvtNode root, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_enumLeaves(btDbvtNode.getCPtr(root), root, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public void collideTT(btDbvtNode root0, btDbvtNode root1, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_collideTT(swigCPtr, this, btDbvtNode.getCPtr(root0), root0, btDbvtNode.getCPtr(root1), root1, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public void collideTTpersistentStack(btDbvtNode root0, btDbvtNode root1, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_collideTTpersistentStack(swigCPtr, this, btDbvtNode.getCPtr(root0), root0, btDbvtNode.getCPtr(root1), root1, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public void collideTV(btDbvtNode root, btDbvtAabbMm volume, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_collideTV(swigCPtr, this, btDbvtNode.getCPtr(root), root, btDbvtAabbMm.getCPtr(volume), volume, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public static void rayTest(btDbvtNode root, Vector3 rayFrom, Vector3 rayTo, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_rayTest(btDbvtNode.getCPtr(root), root, rayFrom, rayTo, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public void rayTestInternal(btDbvtNode root, Vector3 rayFrom, Vector3 rayTo, Vector3 rayDirectionInverse, long[] signs, float lambda_max, Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_rayTestInternal(swigCPtr, this, btDbvtNode.getCPtr(root), root, rayFrom, rayTo, rayDirectionInverse, signs, lambda_max, aabbMin, aabbMax, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public static void collideKDOP(btDbvtNode root, btVector3 normals, float[] offsets, int count, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_collideKDOP(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets, count, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public static void collideOCL(btDbvtNode root, btVector3 normals, float[] offsets, Vector3 sortaxis, int count, SWIGTYPE_p_btDbvt__ICollide policy, boolean fullsort) {
-    gdxBulletJNI.btDbvt_collideOCL__SWIG_0(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets, sortaxis, count, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy), fullsort);
-  }
-
-  public static void collideOCL(btDbvtNode root, btVector3 normals, float[] offsets, Vector3 sortaxis, int count, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_collideOCL__SWIG_1(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets, sortaxis, count, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public static void collideTU(btDbvtNode root, SWIGTYPE_p_btDbvt__ICollide policy) {
-    gdxBulletJNI.btDbvt_collideTU(btDbvtNode.getCPtr(root), root, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
-  }
-
-  public static int nearest(SWIGTYPE_p_int i, SWIGTYPE_p_btDbvt__sStkNPS a, float v, int l, int h) {
-    return gdxBulletJNI.btDbvt_nearest(SWIGTYPE_p_int.getCPtr(i), SWIGTYPE_p_btDbvt__sStkNPS.getCPtr(a), v, l, h);
-  }
-
-  public static int allocate(SWIGTYPE_p_btAlignedObjectArrayT_int_t ifree, SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t stock, SWIGTYPE_p_btDbvt__sStkNPS value) {
-    return gdxBulletJNI.btDbvt_allocate(SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(ifree), SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t.getCPtr(stock), SWIGTYPE_p_btDbvt__sStkNPS.getCPtr(value));
-  }
-
-  public final static int SIMPLE_STACKSIZE = 64;
-  public final static int DOUBLE_STACKSIZE = SIMPLE_STACKSIZE*2;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btDbvt (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDbvt obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDbvt(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_root (btDbvtNode value) {
+               gdxBulletJNI.btDbvt_m_root_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
+       }
+
+       public btDbvtNode getM_root () {
+               long cPtr = gdxBulletJNI.btDbvt_m_root_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
+       }
+
+       public void setM_free (btDbvtNode value) {
+               gdxBulletJNI.btDbvt_m_free_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
+       }
+
+       public btDbvtNode getM_free () {
+               long cPtr = gdxBulletJNI.btDbvt_m_free_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
+       }
+
+       public void setM_lkhd (int value) {
+               gdxBulletJNI.btDbvt_m_lkhd_set(swigCPtr, this, value);
+       }
+
+       public int getM_lkhd () {
+               return gdxBulletJNI.btDbvt_m_lkhd_get(swigCPtr, this);
+       }
+
+       public void setM_leaves (int value) {
+               gdxBulletJNI.btDbvt_m_leaves_set(swigCPtr, this, value);
+       }
+
+       public int getM_leaves () {
+               return gdxBulletJNI.btDbvt_m_leaves_get(swigCPtr, this);
+       }
+
+       public void setM_opath (long value) {
+               gdxBulletJNI.btDbvt_m_opath_set(swigCPtr, this, value);
+       }
+
+       public long getM_opath () {
+               return gdxBulletJNI.btDbvt_m_opath_get(swigCPtr, this);
+       }
+
+       public void setM_stkStack (SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t value) {
+               gdxBulletJNI.btDbvt_m_stkStack_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t getM_stkStack () {
+               long cPtr = gdxBulletJNI.btDbvt_m_stkStack_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNN_t(cPtr, false);
+       }
+
+       public void setM_rayTestStack (SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t value) {
+               gdxBulletJNI
+                       .btDbvt_m_rayTestStack_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t getM_rayTestStack () {
+               long cPtr = gdxBulletJNI.btDbvt_m_rayTestStack_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t(cPtr, false);
+       }
+
+       public btDbvt () {
+               this(gdxBulletJNI.new_btDbvt(), true);
+       }
+
+       public void clear () {
+               gdxBulletJNI.btDbvt_clear(swigCPtr, this);
+       }
+
+       public boolean empty () {
+               return gdxBulletJNI.btDbvt_empty(swigCPtr, this);
+       }
+
+       public void optimizeBottomUp () {
+               gdxBulletJNI.btDbvt_optimizeBottomUp(swigCPtr, this);
+       }
+
+       public void optimizeTopDown (int bu_treshold) {
+               gdxBulletJNI.btDbvt_optimizeTopDown__SWIG_0(swigCPtr, this, bu_treshold);
+       }
+
+       public void optimizeTopDown () {
+               gdxBulletJNI.btDbvt_optimizeTopDown__SWIG_1(swigCPtr, this);
+       }
+
+       public void optimizeIncremental (int passes) {
+               gdxBulletJNI.btDbvt_optimizeIncremental(swigCPtr, this, passes);
+       }
+
+       public btDbvtNode insert (btDbvtAabbMm box, SWIGTYPE_p_void data) {
+               long cPtr = gdxBulletJNI.btDbvt_insert(swigCPtr, this, btDbvtAabbMm.getCPtr(box), box, SWIGTYPE_p_void.getCPtr(data));
+               return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
+       }
+
+       public void update (btDbvtNode leaf, int lookahead) {
+               gdxBulletJNI.btDbvt_update__SWIG_0(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, lookahead);
+       }
+
+       public void update (btDbvtNode leaf) {
+               gdxBulletJNI.btDbvt_update__SWIG_1(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf);
+       }
+
+       public void update (btDbvtNode leaf, btDbvtAabbMm volume) {
+               gdxBulletJNI.btDbvt_update__SWIG_2(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume), volume);
+       }
+
+       public boolean update (btDbvtNode leaf, btDbvtAabbMm volume, Vector3 velocity, float margin) {
+               return gdxBulletJNI.btDbvt_update__SWIG_3(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume),
+                       volume, velocity, margin);
+       }
+
+       public boolean update (btDbvtNode leaf, btDbvtAabbMm volume, Vector3 velocity) {
+               return gdxBulletJNI.btDbvt_update__SWIG_4(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume),
+                       volume, velocity);
+       }
+
+       public boolean update (btDbvtNode leaf, btDbvtAabbMm volume, float margin) {
+               return gdxBulletJNI.btDbvt_update__SWIG_5(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf, btDbvtAabbMm.getCPtr(volume),
+                       volume, margin);
+       }
+
+       public void remove (btDbvtNode leaf) {
+               gdxBulletJNI.btDbvt_remove(swigCPtr, this, btDbvtNode.getCPtr(leaf), leaf);
+       }
+
+       public void write (SWIGTYPE_p_btDbvt__IWriter iwriter) {
+               gdxBulletJNI.btDbvt_write(swigCPtr, this, SWIGTYPE_p_btDbvt__IWriter.getCPtr(iwriter));
+       }
+
+       public void clone (btDbvt dest, SWIGTYPE_p_btDbvt__IClone iclone) {
+               gdxBulletJNI.btDbvt_clone__SWIG_0(swigCPtr, this, btDbvt.getCPtr(dest), dest, SWIGTYPE_p_btDbvt__IClone.getCPtr(iclone));
+       }
+
+       public void clone (btDbvt dest) {
+               gdxBulletJNI.btDbvt_clone__SWIG_1(swigCPtr, this, btDbvt.getCPtr(dest), dest);
+       }
+
+       public static int maxdepth (btDbvtNode node) {
+               return gdxBulletJNI.btDbvt_maxdepth(btDbvtNode.getCPtr(node), node);
+       }
+
+       public static int countLeaves (btDbvtNode node) {
+               return gdxBulletJNI.btDbvt_countLeaves(btDbvtNode.getCPtr(node), node);
+       }
+
+       public static void extractLeaves (btDbvtNode node, SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t leaves) {
+               gdxBulletJNI.btDbvt_extractLeaves(btDbvtNode.getCPtr(node), node,
+                       SWIGTYPE_p_btAlignedObjectArrayT_btDbvtNode_const_p_t.getCPtr(leaves));
+       }
+
+       public static void benchmark () {
+               gdxBulletJNI.btDbvt_benchmark();
+       }
+
+       public static void enumNodes (btDbvtNode root, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_enumNodes(btDbvtNode.getCPtr(root), root, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public static void enumLeaves (btDbvtNode root, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_enumLeaves(btDbvtNode.getCPtr(root), root, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public void collideTT (btDbvtNode root0, btDbvtNode root1, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_collideTT(swigCPtr, this, btDbvtNode.getCPtr(root0), root0, btDbvtNode.getCPtr(root1), root1,
+                       SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public void collideTTpersistentStack (btDbvtNode root0, btDbvtNode root1, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_collideTTpersistentStack(swigCPtr, this, btDbvtNode.getCPtr(root0), root0, btDbvtNode.getCPtr(root1),
+                       root1, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public void collideTV (btDbvtNode root, btDbvtAabbMm volume, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_collideTV(swigCPtr, this, btDbvtNode.getCPtr(root), root, btDbvtAabbMm.getCPtr(volume), volume,
+                       SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public static void rayTest (btDbvtNode root, Vector3 rayFrom, Vector3 rayTo, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_rayTest(btDbvtNode.getCPtr(root), root, rayFrom, rayTo, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public void rayTestInternal (btDbvtNode root, Vector3 rayFrom, Vector3 rayTo, Vector3 rayDirectionInverse, long[] signs,
+               float lambda_max, Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_rayTestInternal(swigCPtr, this, btDbvtNode.getCPtr(root), root, rayFrom, rayTo, rayDirectionInverse,
+                       signs, lambda_max, aabbMin, aabbMax, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public static void collideKDOP (btDbvtNode root, btVector3 normals, float[] offsets, int count,
+               SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_collideKDOP(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets, count,
+                       SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public static void collideOCL (btDbvtNode root, btVector3 normals, float[] offsets, Vector3 sortaxis, int count,
+               SWIGTYPE_p_btDbvt__ICollide policy, boolean fullsort) {
+               gdxBulletJNI.btDbvt_collideOCL__SWIG_0(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets,
+                       sortaxis, count, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy), fullsort);
+       }
+
+       public static void collideOCL (btDbvtNode root, btVector3 normals, float[] offsets, Vector3 sortaxis, int count,
+               SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_collideOCL__SWIG_1(btDbvtNode.getCPtr(root), root, btVector3.getCPtr(normals), normals, offsets,
+                       sortaxis, count, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public static void collideTU (btDbvtNode root, SWIGTYPE_p_btDbvt__ICollide policy) {
+               gdxBulletJNI.btDbvt_collideTU(btDbvtNode.getCPtr(root), root, SWIGTYPE_p_btDbvt__ICollide.getCPtr(policy));
+       }
+
+       public static int nearest (SWIGTYPE_p_int i, SWIGTYPE_p_btDbvt__sStkNPS a, float v, int l, int h) {
+               return gdxBulletJNI.btDbvt_nearest(SWIGTYPE_p_int.getCPtr(i), SWIGTYPE_p_btDbvt__sStkNPS.getCPtr(a), v, l, h);
+       }
+
+       public static int allocate (SWIGTYPE_p_btAlignedObjectArrayT_int_t ifree,
+               SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t stock, SWIGTYPE_p_btDbvt__sStkNPS value) {
+               return gdxBulletJNI.btDbvt_allocate(SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(ifree),
+                       SWIGTYPE_p_btAlignedObjectArrayT_btDbvt__sStkNPS_t.getCPtr(stock), SWIGTYPE_p_btDbvt__sStkNPS.getCPtr(value));
+       }
+
+       public final static int SIMPLE_STACKSIZE = 64;
+       public final static int DOUBLE_STACKSIZE = SIMPLE_STACKSIZE * 2;
 
 }
index bcc8b82..3405ae7 100644 (file)
@@ -9,98 +9,96 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btDbvtAabbMm {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btDbvtAabbMm(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDbvtAabbMm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDbvtAabbMm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public Vector3 Center() {
-       return gdxBulletJNI.btDbvtAabbMm_Center(swigCPtr, this);
-}
-
-  public Vector3 Lengths() {
-       return gdxBulletJNI.btDbvtAabbMm_Lengths(swigCPtr, this);
-}
-
-  public Vector3 Extents() {
-       return gdxBulletJNI.btDbvtAabbMm_Extents(swigCPtr, this);
-}
-
-  public Vector3 Mins() {
-       return gdxBulletJNI.btDbvtAabbMm_Mins(swigCPtr, this);
-}
-
-  public Vector3 Maxs() {
-       return gdxBulletJNI.btDbvtAabbMm_Maxs(swigCPtr, this);
-}
-
-  public static btDbvtAabbMm FromCE(Vector3 c, Vector3 e) {
-    return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromCE(c, e), true);
-  }
-
-  public static btDbvtAabbMm FromCR(Vector3 c, float r) {
-    return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromCR(c, r), true);
-  }
-
-  public static btDbvtAabbMm FromMM(Vector3 mi, Vector3 mx) {
-    return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromMM(mi, mx), true);
-  }
-
-  public static btDbvtAabbMm FromPoints(btVector3 pts, int n) {
-    return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromPoints__SWIG_0(btVector3.getCPtr(pts), pts, n), true);
-  }
-
-  public static btDbvtAabbMm FromPoints(SWIGTYPE_p_p_btVector3 ppts, int n) {
-    return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromPoints__SWIG_1(SWIGTYPE_p_p_btVector3.getCPtr(ppts), n), true);
-  }
-
-  public void Expand(Vector3 e) {
-    gdxBulletJNI.btDbvtAabbMm_Expand(swigCPtr, this, e);
-  }
-
-  public void SignedExpand(Vector3 e) {
-    gdxBulletJNI.btDbvtAabbMm_SignedExpand(swigCPtr, this, e);
-  }
-
-  public boolean Contain(btDbvtAabbMm a) {
-    return gdxBulletJNI.btDbvtAabbMm_Contain(swigCPtr, this, btDbvtAabbMm.getCPtr(a), a);
-  }
-
-  public int Classify(Vector3 n, float o, int s) {
-    return gdxBulletJNI.btDbvtAabbMm_Classify(swigCPtr, this, n, o, s);
-  }
-
-  public float ProjectMinimum(Vector3 v, long signs) {
-    return gdxBulletJNI.btDbvtAabbMm_ProjectMinimum(swigCPtr, this, v, signs);
-  }
-
-  public btDbvtAabbMm() {
-    this(gdxBulletJNI.new_btDbvtAabbMm(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btDbvtAabbMm (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDbvtAabbMm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDbvtAabbMm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public Vector3 Center () {
+               return gdxBulletJNI.btDbvtAabbMm_Center(swigCPtr, this);
+       }
+
+       public Vector3 Lengths () {
+               return gdxBulletJNI.btDbvtAabbMm_Lengths(swigCPtr, this);
+       }
+
+       public Vector3 Extents () {
+               return gdxBulletJNI.btDbvtAabbMm_Extents(swigCPtr, this);
+       }
+
+       public Vector3 Mins () {
+               return gdxBulletJNI.btDbvtAabbMm_Mins(swigCPtr, this);
+       }
+
+       public Vector3 Maxs () {
+               return gdxBulletJNI.btDbvtAabbMm_Maxs(swigCPtr, this);
+       }
+
+       public static btDbvtAabbMm FromCE (Vector3 c, Vector3 e) {
+               return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromCE(c, e), true);
+       }
+
+       public static btDbvtAabbMm FromCR (Vector3 c, float r) {
+               return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromCR(c, r), true);
+       }
+
+       public static btDbvtAabbMm FromMM (Vector3 mi, Vector3 mx) {
+               return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromMM(mi, mx), true);
+       }
+
+       public static btDbvtAabbMm FromPoints (btVector3 pts, int n) {
+               return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromPoints__SWIG_0(btVector3.getCPtr(pts), pts, n), true);
+       }
+
+       public static btDbvtAabbMm FromPoints (SWIGTYPE_p_p_btVector3 ppts, int n) {
+               return new btDbvtAabbMm(gdxBulletJNI.btDbvtAabbMm_FromPoints__SWIG_1(SWIGTYPE_p_p_btVector3.getCPtr(ppts), n), true);
+       }
+
+       public void Expand (Vector3 e) {
+               gdxBulletJNI.btDbvtAabbMm_Expand(swigCPtr, this, e);
+       }
+
+       public void SignedExpand (Vector3 e) {
+               gdxBulletJNI.btDbvtAabbMm_SignedExpand(swigCPtr, this, e);
+       }
+
+       public boolean Contain (btDbvtAabbMm a) {
+               return gdxBulletJNI.btDbvtAabbMm_Contain(swigCPtr, this, btDbvtAabbMm.getCPtr(a), a);
+       }
+
+       public int Classify (Vector3 n, float o, int s) {
+               return gdxBulletJNI.btDbvtAabbMm_Classify(swigCPtr, this, n, o, s);
+       }
+
+       public float ProjectMinimum (Vector3 v, long signs) {
+               return gdxBulletJNI.btDbvtAabbMm_ProjectMinimum(swigCPtr, this, v, signs);
+       }
+
+       public btDbvtAabbMm () {
+               this(gdxBulletJNI.new_btDbvtAabbMm(), true);
+       }
 
 }
index 2c34bfa..c130320 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btDbvtBroadphase extends btBroadphaseInterface {
-  private long swigCPtr;
-
-  protected btDbvtBroadphase(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btDbvtBroadphase_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDbvtBroadphase obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDbvtBroadphase(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_sets(btDbvt value) {
-    gdxBulletJNI.btDbvtBroadphase_m_sets_set(swigCPtr, this, btDbvt.getCPtr(value), value);
-  }
-
-  public btDbvt getM_sets() {
-    long cPtr = gdxBulletJNI.btDbvtBroadphase_m_sets_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvt(cPtr, false);
-  }
-
-  public void setM_stageRoots(SWIGTYPE_p_p_btDbvtProxy value) {
-    gdxBulletJNI.btDbvtBroadphase_m_stageRoots_set(swigCPtr, this, SWIGTYPE_p_p_btDbvtProxy.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_p_btDbvtProxy getM_stageRoots() {
-    long cPtr = gdxBulletJNI.btDbvtBroadphase_m_stageRoots_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_p_btDbvtProxy(cPtr, false);
-  }
-
-  public void setM_paircache(btOverlappingPairCache value) {
-    gdxBulletJNI.btDbvtBroadphase_m_paircache_set(swigCPtr, this, btOverlappingPairCache.getCPtr(value), value);
-  }
-
-  public btOverlappingPairCache getM_paircache() {
-    long cPtr = gdxBulletJNI.btDbvtBroadphase_m_paircache_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
-  }
-
-  public void setM_prediction(float value) {
-    gdxBulletJNI.btDbvtBroadphase_m_prediction_set(swigCPtr, this, value);
-  }
-
-  public float getM_prediction() {
-    return gdxBulletJNI.btDbvtBroadphase_m_prediction_get(swigCPtr, this);
-  }
-
-  public void setM_stageCurrent(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_stageCurrent_set(swigCPtr, this, value);
-  }
-
-  public int getM_stageCurrent() {
-    return gdxBulletJNI.btDbvtBroadphase_m_stageCurrent_get(swigCPtr, this);
-  }
-
-  public void setM_fupdates(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_fupdates_set(swigCPtr, this, value);
-  }
-
-  public int getM_fupdates() {
-    return gdxBulletJNI.btDbvtBroadphase_m_fupdates_get(swigCPtr, this);
-  }
-
-  public void setM_dupdates(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_dupdates_set(swigCPtr, this, value);
-  }
-
-  public int getM_dupdates() {
-    return gdxBulletJNI.btDbvtBroadphase_m_dupdates_get(swigCPtr, this);
-  }
-
-  public void setM_cupdates(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_cupdates_set(swigCPtr, this, value);
-  }
-
-  public int getM_cupdates() {
-    return gdxBulletJNI.btDbvtBroadphase_m_cupdates_get(swigCPtr, this);
-  }
-
-  public void setM_newpairs(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_newpairs_set(swigCPtr, this, value);
-  }
-
-  public int getM_newpairs() {
-    return gdxBulletJNI.btDbvtBroadphase_m_newpairs_get(swigCPtr, this);
-  }
-
-  public void setM_fixedleft(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_fixedleft_set(swigCPtr, this, value);
-  }
-
-  public int getM_fixedleft() {
-    return gdxBulletJNI.btDbvtBroadphase_m_fixedleft_get(swigCPtr, this);
-  }
-
-  public void setM_updates_call(long value) {
-    gdxBulletJNI.btDbvtBroadphase_m_updates_call_set(swigCPtr, this, value);
-  }
-
-  public long getM_updates_call() {
-    return gdxBulletJNI.btDbvtBroadphase_m_updates_call_get(swigCPtr, this);
-  }
-
-  public void setM_updates_done(long value) {
-    gdxBulletJNI.btDbvtBroadphase_m_updates_done_set(swigCPtr, this, value);
-  }
-
-  public long getM_updates_done() {
-    return gdxBulletJNI.btDbvtBroadphase_m_updates_done_get(swigCPtr, this);
-  }
-
-  public void setM_updates_ratio(float value) {
-    gdxBulletJNI.btDbvtBroadphase_m_updates_ratio_set(swigCPtr, this, value);
-  }
-
-  public float getM_updates_ratio() {
-    return gdxBulletJNI.btDbvtBroadphase_m_updates_ratio_get(swigCPtr, this);
-  }
-
-  public void setM_pid(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_pid_set(swigCPtr, this, value);
-  }
-
-  public int getM_pid() {
-    return gdxBulletJNI.btDbvtBroadphase_m_pid_get(swigCPtr, this);
-  }
-
-  public void setM_cid(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_cid_set(swigCPtr, this, value);
-  }
-
-  public int getM_cid() {
-    return gdxBulletJNI.btDbvtBroadphase_m_cid_get(swigCPtr, this);
-  }
-
-  public void setM_gid(int value) {
-    gdxBulletJNI.btDbvtBroadphase_m_gid_set(swigCPtr, this, value);
-  }
-
-  public int getM_gid() {
-    return gdxBulletJNI.btDbvtBroadphase_m_gid_get(swigCPtr, this);
-  }
-
-  public void setM_releasepaircache(boolean value) {
-    gdxBulletJNI.btDbvtBroadphase_m_releasepaircache_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_releasepaircache() {
-    return gdxBulletJNI.btDbvtBroadphase_m_releasepaircache_get(swigCPtr, this);
-  }
-
-  public void setM_deferedcollide(boolean value) {
-    gdxBulletJNI.btDbvtBroadphase_m_deferedcollide_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_deferedcollide() {
-    return gdxBulletJNI.btDbvtBroadphase_m_deferedcollide_get(swigCPtr, this);
-  }
-
-  public void setM_needcleanup(boolean value) {
-    gdxBulletJNI.btDbvtBroadphase_m_needcleanup_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_needcleanup() {
-    return gdxBulletJNI.btDbvtBroadphase_m_needcleanup_get(swigCPtr, this);
-  }
-
-  public btDbvtBroadphase(btOverlappingPairCache paircache) {
-    this(gdxBulletJNI.new_btDbvtBroadphase__SWIG_0(btOverlappingPairCache.getCPtr(paircache), paircache), true);
-  }
-
-  public btDbvtBroadphase() {
-    this(gdxBulletJNI.new_btDbvtBroadphase__SWIG_1(), true);
-  }
-
-  public void collide(btDispatcher dispatcher) {
-    gdxBulletJNI.btDbvtBroadphase_collide(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void optimize() {
-    gdxBulletJNI.btDbvtBroadphase_optimize(swigCPtr, this);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btDbvtBroadphase_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin, aabbMax);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
-    gdxBulletJNI.btDbvtBroadphase_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
-    gdxBulletJNI.btDbvtBroadphase_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback);
-  }
-
-  public btOverlappingPairCache getOverlappingPairCache() {
-    long cPtr = gdxBulletJNI.btDbvtBroadphase_getOverlappingPairCache__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
-  }
-
-  public void performDeferredRemoval(btDispatcher dispatcher) {
-    gdxBulletJNI.btDbvtBroadphase_performDeferredRemoval(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void setVelocityPrediction(float prediction) {
-    gdxBulletJNI.btDbvtBroadphase_setVelocityPrediction(swigCPtr, this, prediction);
-  }
-
-  public float getVelocityPrediction() {
-    return gdxBulletJNI.btDbvtBroadphase_getVelocityPrediction(swigCPtr, this);
-  }
-
-  public void setAabbForceUpdate(btBroadphaseProxy absproxy, Vector3 aabbMin, Vector3 aabbMax, btDispatcher arg3) {
-    gdxBulletJNI.btDbvtBroadphase_setAabbForceUpdate(swigCPtr, this, btBroadphaseProxy.getCPtr(absproxy), absproxy, aabbMin, aabbMax, btDispatcher.getCPtr(arg3), arg3);
-  }
-
-  public static void benchmark(btBroadphaseInterface arg0) {
-    gdxBulletJNI.btDbvtBroadphase_benchmark(btBroadphaseInterface.getCPtr(arg0), arg0);
-  }
-
-  public final static int DYNAMIC_SET = 0;
-  public final static int FIXED_SET = 1;
-  public final static int STAGECOUNT = 2;
+       private long swigCPtr;
+
+       protected btDbvtBroadphase (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btDbvtBroadphase_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDbvtBroadphase obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDbvtBroadphase(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_sets (btDbvt value) {
+               gdxBulletJNI.btDbvtBroadphase_m_sets_set(swigCPtr, this, btDbvt.getCPtr(value), value);
+       }
+
+       public btDbvt getM_sets () {
+               long cPtr = gdxBulletJNI.btDbvtBroadphase_m_sets_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvt(cPtr, false);
+       }
+
+       public void setM_stageRoots (SWIGTYPE_p_p_btDbvtProxy value) {
+               gdxBulletJNI.btDbvtBroadphase_m_stageRoots_set(swigCPtr, this, SWIGTYPE_p_p_btDbvtProxy.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_p_btDbvtProxy getM_stageRoots () {
+               long cPtr = gdxBulletJNI.btDbvtBroadphase_m_stageRoots_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_p_btDbvtProxy(cPtr, false);
+       }
+
+       public void setM_paircache (btOverlappingPairCache value) {
+               gdxBulletJNI.btDbvtBroadphase_m_paircache_set(swigCPtr, this, btOverlappingPairCache.getCPtr(value), value);
+       }
+
+       public btOverlappingPairCache getM_paircache () {
+               long cPtr = gdxBulletJNI.btDbvtBroadphase_m_paircache_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
+       }
+
+       public void setM_prediction (float value) {
+               gdxBulletJNI.btDbvtBroadphase_m_prediction_set(swigCPtr, this, value);
+       }
+
+       public float getM_prediction () {
+               return gdxBulletJNI.btDbvtBroadphase_m_prediction_get(swigCPtr, this);
+       }
+
+       public void setM_stageCurrent (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_stageCurrent_set(swigCPtr, this, value);
+       }
+
+       public int getM_stageCurrent () {
+               return gdxBulletJNI.btDbvtBroadphase_m_stageCurrent_get(swigCPtr, this);
+       }
+
+       public void setM_fupdates (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_fupdates_set(swigCPtr, this, value);
+       }
+
+       public int getM_fupdates () {
+               return gdxBulletJNI.btDbvtBroadphase_m_fupdates_get(swigCPtr, this);
+       }
+
+       public void setM_dupdates (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_dupdates_set(swigCPtr, this, value);
+       }
+
+       public int getM_dupdates () {
+               return gdxBulletJNI.btDbvtBroadphase_m_dupdates_get(swigCPtr, this);
+       }
+
+       public void setM_cupdates (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_cupdates_set(swigCPtr, this, value);
+       }
+
+       public int getM_cupdates () {
+               return gdxBulletJNI.btDbvtBroadphase_m_cupdates_get(swigCPtr, this);
+       }
+
+       public void setM_newpairs (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_newpairs_set(swigCPtr, this, value);
+       }
+
+       public int getM_newpairs () {
+               return gdxBulletJNI.btDbvtBroadphase_m_newpairs_get(swigCPtr, this);
+       }
+
+       public void setM_fixedleft (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_fixedleft_set(swigCPtr, this, value);
+       }
+
+       public int getM_fixedleft () {
+               return gdxBulletJNI.btDbvtBroadphase_m_fixedleft_get(swigCPtr, this);
+       }
+
+       public void setM_updates_call (long value) {
+               gdxBulletJNI.btDbvtBroadphase_m_updates_call_set(swigCPtr, this, value);
+       }
+
+       public long getM_updates_call () {
+               return gdxBulletJNI.btDbvtBroadphase_m_updates_call_get(swigCPtr, this);
+       }
+
+       public void setM_updates_done (long value) {
+               gdxBulletJNI.btDbvtBroadphase_m_updates_done_set(swigCPtr, this, value);
+       }
+
+       public long getM_updates_done () {
+               return gdxBulletJNI.btDbvtBroadphase_m_updates_done_get(swigCPtr, this);
+       }
+
+       public void setM_updates_ratio (float value) {
+               gdxBulletJNI.btDbvtBroadphase_m_updates_ratio_set(swigCPtr, this, value);
+       }
+
+       public float getM_updates_ratio () {
+               return gdxBulletJNI.btDbvtBroadphase_m_updates_ratio_get(swigCPtr, this);
+       }
+
+       public void setM_pid (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_pid_set(swigCPtr, this, value);
+       }
+
+       public int getM_pid () {
+               return gdxBulletJNI.btDbvtBroadphase_m_pid_get(swigCPtr, this);
+       }
+
+       public void setM_cid (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_cid_set(swigCPtr, this, value);
+       }
+
+       public int getM_cid () {
+               return gdxBulletJNI.btDbvtBroadphase_m_cid_get(swigCPtr, this);
+       }
+
+       public void setM_gid (int value) {
+               gdxBulletJNI.btDbvtBroadphase_m_gid_set(swigCPtr, this, value);
+       }
+
+       public int getM_gid () {
+               return gdxBulletJNI.btDbvtBroadphase_m_gid_get(swigCPtr, this);
+       }
+
+       public void setM_releasepaircache (boolean value) {
+               gdxBulletJNI.btDbvtBroadphase_m_releasepaircache_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_releasepaircache () {
+               return gdxBulletJNI.btDbvtBroadphase_m_releasepaircache_get(swigCPtr, this);
+       }
+
+       public void setM_deferedcollide (boolean value) {
+               gdxBulletJNI.btDbvtBroadphase_m_deferedcollide_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_deferedcollide () {
+               return gdxBulletJNI.btDbvtBroadphase_m_deferedcollide_get(swigCPtr, this);
+       }
+
+       public void setM_needcleanup (boolean value) {
+               gdxBulletJNI.btDbvtBroadphase_m_needcleanup_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_needcleanup () {
+               return gdxBulletJNI.btDbvtBroadphase_m_needcleanup_get(swigCPtr, this);
+       }
+
+       public btDbvtBroadphase (btOverlappingPairCache paircache) {
+               this(gdxBulletJNI.new_btDbvtBroadphase__SWIG_0(btOverlappingPairCache.getCPtr(paircache), paircache), true);
+       }
+
+       public btDbvtBroadphase () {
+               this(gdxBulletJNI.new_btDbvtBroadphase__SWIG_1(), true);
+       }
+
+       public void collide (btDispatcher dispatcher) {
+               gdxBulletJNI.btDbvtBroadphase_collide(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void optimize () {
+               gdxBulletJNI.btDbvtBroadphase_optimize(swigCPtr, this);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btDbvtBroadphase_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback),
+                       rayCallback, aabbMin, aabbMax);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
+               gdxBulletJNI.btDbvtBroadphase_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback),
+                       rayCallback, aabbMin);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
+               gdxBulletJNI.btDbvtBroadphase_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback),
+                       rayCallback);
+       }
+
+       public btOverlappingPairCache getOverlappingPairCache () {
+               long cPtr = gdxBulletJNI.btDbvtBroadphase_getOverlappingPairCache__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
+       }
+
+       public void performDeferredRemoval (btDispatcher dispatcher) {
+               gdxBulletJNI.btDbvtBroadphase_performDeferredRemoval(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void setVelocityPrediction (float prediction) {
+               gdxBulletJNI.btDbvtBroadphase_setVelocityPrediction(swigCPtr, this, prediction);
+       }
+
+       public float getVelocityPrediction () {
+               return gdxBulletJNI.btDbvtBroadphase_getVelocityPrediction(swigCPtr, this);
+       }
+
+       public void setAabbForceUpdate (btBroadphaseProxy absproxy, Vector3 aabbMin, Vector3 aabbMax, btDispatcher arg3) {
+               gdxBulletJNI.btDbvtBroadphase_setAabbForceUpdate(swigCPtr, this, btBroadphaseProxy.getCPtr(absproxy), absproxy, aabbMin,
+                       aabbMax, btDispatcher.getCPtr(arg3), arg3);
+       }
+
+       public static void benchmark (btBroadphaseInterface arg0) {
+               gdxBulletJNI.btDbvtBroadphase_benchmark(btBroadphaseInterface.getCPtr(arg0), arg0);
+       }
+
+       public final static int DYNAMIC_SET = 0;
+       public final static int FIXED_SET = 1;
+       public final static int STAGECOUNT = 2;
 
 }
index a4f51a0..7cab228 100644 (file)
@@ -8,65 +8,61 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btDbvtNode {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btDbvtNode(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btDbvtNode (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btDbvtNode obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btDbvtNode obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDbvtNode(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDbvtNode(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setVolume(btDbvtAabbMm value) {
-    gdxBulletJNI.btDbvtNode_volume_set(swigCPtr, this, btDbvtAabbMm.getCPtr(value), value);
-  }
+       public void setVolume (btDbvtAabbMm value) {
+               gdxBulletJNI.btDbvtNode_volume_set(swigCPtr, this, btDbvtAabbMm.getCPtr(value), value);
+       }
 
-  public btDbvtAabbMm getVolume() {
-    long cPtr = gdxBulletJNI.btDbvtNode_volume_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvtAabbMm(cPtr, false);
-  }
+       public btDbvtAabbMm getVolume () {
+               long cPtr = gdxBulletJNI.btDbvtNode_volume_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvtAabbMm(cPtr, false);
+       }
 
-  public void setParent(btDbvtNode value) {
-    gdxBulletJNI.btDbvtNode_parent_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
-  }
+       public void setParent (btDbvtNode value) {
+               gdxBulletJNI.btDbvtNode_parent_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
+       }
 
-  public btDbvtNode getParent() {
-    long cPtr = gdxBulletJNI.btDbvtNode_parent_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
-  }
+       public btDbvtNode getParent () {
+               long cPtr = gdxBulletJNI.btDbvtNode_parent_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
+       }
 
-  public boolean isleaf() {
-    return gdxBulletJNI.btDbvtNode_isleaf(swigCPtr, this);
-  }
+       public boolean isleaf () {
+               return gdxBulletJNI.btDbvtNode_isleaf(swigCPtr, this);
+       }
 
-  public boolean isinternal() {
-    return gdxBulletJNI.btDbvtNode_isinternal(swigCPtr, this);
-  }
+       public boolean isinternal () {
+               return gdxBulletJNI.btDbvtNode_isinternal(swigCPtr, this);
+       }
 
-  public btDbvtNode() {
-    this(gdxBulletJNI.new_btDbvtNode(), true);
-  }
+       public btDbvtNode () {
+               this(gdxBulletJNI.new_btDbvtNode(), true);
+       }
 
 }
index ff8240e..4e61ce3 100644 (file)
@@ -9,64 +9,64 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btDbvtProxy extends btBroadphaseProxy {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btDbvtProxy(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btDbvtProxy_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btDbvtProxy (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btDbvtProxy_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btDbvtProxy obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btDbvtProxy obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDbvtProxy(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDbvtProxy(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public void setLeaf(btDbvtNode value) {
-    gdxBulletJNI.btDbvtProxy_leaf_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
-  }
+       public void setLeaf (btDbvtNode value) {
+               gdxBulletJNI.btDbvtProxy_leaf_set(swigCPtr, this, btDbvtNode.getCPtr(value), value);
+       }
 
-  public btDbvtNode getLeaf() {
-    long cPtr = gdxBulletJNI.btDbvtProxy_leaf_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
-  }
+       public btDbvtNode getLeaf () {
+               long cPtr = gdxBulletJNI.btDbvtProxy_leaf_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btDbvtNode(cPtr, false);
+       }
 
-  public void setLinks(SWIGTYPE_p_p_btDbvtProxy value) {
-    gdxBulletJNI.btDbvtProxy_links_set(swigCPtr, this, SWIGTYPE_p_p_btDbvtProxy.getCPtr(value));
-  }
+       public void setLinks (SWIGTYPE_p_p_btDbvtProxy value) {
+               gdxBulletJNI.btDbvtProxy_links_set(swigCPtr, this, SWIGTYPE_p_p_btDbvtProxy.getCPtr(value));
+       }
 
-  public SWIGTYPE_p_p_btDbvtProxy getLinks() {
-    long cPtr = gdxBulletJNI.btDbvtProxy_links_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_p_btDbvtProxy(cPtr, false);
-  }
+       public SWIGTYPE_p_p_btDbvtProxy getLinks () {
+               long cPtr = gdxBulletJNI.btDbvtProxy_links_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_p_btDbvtProxy(cPtr, false);
+       }
 
-  public void setStage(int value) {
-    gdxBulletJNI.btDbvtProxy_stage_set(swigCPtr, this, value);
-  }
+       public void setStage (int value) {
+               gdxBulletJNI.btDbvtProxy_stage_set(swigCPtr, this, value);
+       }
 
-  public int getStage() {
-    return gdxBulletJNI.btDbvtProxy_stage_get(swigCPtr, this);
-  }
+       public int getStage () {
+               return gdxBulletJNI.btDbvtProxy_stage_get(swigCPtr, this);
+       }
 
-  public btDbvtProxy(Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_void userPtr, short collisionFilterGroup, short collisionFilterMask) {
-    this(gdxBulletJNI.new_btDbvtProxy(aabbMin, aabbMax, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup, collisionFilterMask), true);
-  }
+       public btDbvtProxy (Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_void userPtr, short collisionFilterGroup,
+               short collisionFilterMask) {
+               this(gdxBulletJNI.new_btDbvtProxy(aabbMin, aabbMax, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup,
+                       collisionFilterMask), true);
+       }
 
 }
index 95485ed..1bb640e 100644 (file)
@@ -8,72 +8,73 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btDefaultCollisionConfiguration extends btCollisionConfiguration {
-  private long swigCPtr;
-
-  protected btDefaultCollisionConfiguration(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btDefaultCollisionConfiguration_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDefaultCollisionConfiguration obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDefaultCollisionConfiguration(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo constructionInfo) {
-    this(gdxBulletJNI.new_btDefaultCollisionConfiguration__SWIG_0(btDefaultCollisionConstructionInfo.getCPtr(constructionInfo), constructionInfo), true);
-  }
-
-  public btDefaultCollisionConfiguration() {
-    this(gdxBulletJNI.new_btDefaultCollisionConfiguration__SWIG_1(), true);
-  }
-
-  public btVoronoiSimplexSolver getSimplexSolver() {
-    long cPtr = gdxBulletJNI.btDefaultCollisionConfiguration_getSimplexSolver(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVoronoiSimplexSolver(cPtr, false);
-  }
-
-  public void setConvexConvexMultipointIterations(int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
-    gdxBulletJNI.btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_0(swigCPtr, this, numPerturbationIterations, minimumPointsPerturbationThreshold);
-  }
-
-  public void setConvexConvexMultipointIterations(int numPerturbationIterations) {
-    gdxBulletJNI.btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_1(swigCPtr, this, numPerturbationIterations);
-  }
-
-  public void setConvexConvexMultipointIterations() {
-    gdxBulletJNI.btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_2(swigCPtr, this);
-  }
-
-  public void setPlaneConvexMultipointIterations(int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
-    gdxBulletJNI.btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_0(swigCPtr, this, numPerturbationIterations, minimumPointsPerturbationThreshold);
-  }
-
-  public void setPlaneConvexMultipointIterations(int numPerturbationIterations) {
-    gdxBulletJNI.btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_1(swigCPtr, this, numPerturbationIterations);
-  }
-
-  public void setPlaneConvexMultipointIterations() {
-    gdxBulletJNI.btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_2(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btDefaultCollisionConfiguration (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btDefaultCollisionConfiguration_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDefaultCollisionConfiguration obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDefaultCollisionConfiguration(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btDefaultCollisionConfiguration (btDefaultCollisionConstructionInfo constructionInfo) {
+               this(gdxBulletJNI.new_btDefaultCollisionConfiguration__SWIG_0(btDefaultCollisionConstructionInfo.getCPtr(constructionInfo),
+                       constructionInfo), true);
+       }
+
+       public btDefaultCollisionConfiguration () {
+               this(gdxBulletJNI.new_btDefaultCollisionConfiguration__SWIG_1(), true);
+       }
+
+       public btVoronoiSimplexSolver getSimplexSolver () {
+               long cPtr = gdxBulletJNI.btDefaultCollisionConfiguration_getSimplexSolver(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVoronoiSimplexSolver(cPtr, false);
+       }
+
+       public void setConvexConvexMultipointIterations (int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
+               gdxBulletJNI.btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_0(swigCPtr, this,
+                       numPerturbationIterations, minimumPointsPerturbationThreshold);
+       }
+
+       public void setConvexConvexMultipointIterations (int numPerturbationIterations) {
+               gdxBulletJNI.btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_1(swigCPtr, this,
+                       numPerturbationIterations);
+       }
+
+       public void setConvexConvexMultipointIterations () {
+               gdxBulletJNI.btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_2(swigCPtr, this);
+       }
+
+       public void setPlaneConvexMultipointIterations (int numPerturbationIterations, int minimumPointsPerturbationThreshold) {
+               gdxBulletJNI.btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_0(swigCPtr, this,
+                       numPerturbationIterations, minimumPointsPerturbationThreshold);
+       }
+
+       public void setPlaneConvexMultipointIterations (int numPerturbationIterations) {
+               gdxBulletJNI.btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_1(swigCPtr, this,
+                       numPerturbationIterations);
+       }
+
+       public void setPlaneConvexMultipointIterations () {
+               gdxBulletJNI.btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_2(swigCPtr, this);
+       }
 
 }
index 4394b6f..937ffc0 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btDefaultCollisionConstructionInfo {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btDefaultCollisionConstructionInfo(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDefaultCollisionConstructionInfo obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDefaultCollisionConstructionInfo(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_stackAlloc(btStackAlloc value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_stackAlloc_set(swigCPtr, this, btStackAlloc.getCPtr(value), value);
-  }
-
-  public btStackAlloc getM_stackAlloc() {
-    long cPtr = gdxBulletJNI.btDefaultCollisionConstructionInfo_m_stackAlloc_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
-  }
-
-  public void setM_persistentManifoldPool(btPoolAllocator value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_persistentManifoldPool_set(swigCPtr, this, btPoolAllocator.getCPtr(value), value);
-  }
-
-  public btPoolAllocator getM_persistentManifoldPool() {
-    long cPtr = gdxBulletJNI.btDefaultCollisionConstructionInfo_m_persistentManifoldPool_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
-  }
-
-  public void setM_collisionAlgorithmPool(btPoolAllocator value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_set(swigCPtr, this, btPoolAllocator.getCPtr(value), value);
-  }
-
-  public btPoolAllocator getM_collisionAlgorithmPool() {
-    long cPtr = gdxBulletJNI.btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
-  }
-
-  public void setM_defaultMaxPersistentManifoldPoolSize(int value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_defaultMaxPersistentManifoldPoolSize() {
-    return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_get(swigCPtr, this);
-  }
-
-  public void setM_defaultMaxCollisionAlgorithmPoolSize(int value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_defaultMaxCollisionAlgorithmPoolSize() {
-    return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_get(swigCPtr, this);
-  }
-
-  public void setM_customCollisionAlgorithmMaxElementSize(int value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_customCollisionAlgorithmMaxElementSize() {
-    return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_get(swigCPtr, this);
-  }
-
-  public void setM_defaultStackAllocatorSize(int value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_defaultStackAllocatorSize() {
-    return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_get(swigCPtr, this);
-  }
-
-  public void setM_useEpaPenetrationAlgorithm(int value) {
-    gdxBulletJNI.btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_set(swigCPtr, this, value);
-  }
-
-  public int getM_useEpaPenetrationAlgorithm() {
-    return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_get(swigCPtr, this);
-  }
-
-  public btDefaultCollisionConstructionInfo() {
-    this(gdxBulletJNI.new_btDefaultCollisionConstructionInfo(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btDefaultCollisionConstructionInfo (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDefaultCollisionConstructionInfo obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDefaultCollisionConstructionInfo(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_stackAlloc (btStackAlloc value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_stackAlloc_set(swigCPtr, this, btStackAlloc.getCPtr(value), value);
+       }
+
+       public btStackAlloc getM_stackAlloc () {
+               long cPtr = gdxBulletJNI.btDefaultCollisionConstructionInfo_m_stackAlloc_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
+       }
+
+       public void setM_persistentManifoldPool (btPoolAllocator value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_persistentManifoldPool_set(swigCPtr, this,
+                       btPoolAllocator.getCPtr(value), value);
+       }
+
+       public btPoolAllocator getM_persistentManifoldPool () {
+               long cPtr = gdxBulletJNI.btDefaultCollisionConstructionInfo_m_persistentManifoldPool_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
+       }
+
+       public void setM_collisionAlgorithmPool (btPoolAllocator value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_set(swigCPtr, this,
+                       btPoolAllocator.getCPtr(value), value);
+       }
+
+       public btPoolAllocator getM_collisionAlgorithmPool () {
+               long cPtr = gdxBulletJNI.btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
+       }
+
+       public void setM_defaultMaxPersistentManifoldPoolSize (int value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_defaultMaxPersistentManifoldPoolSize () {
+               return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_get(swigCPtr, this);
+       }
+
+       public void setM_defaultMaxCollisionAlgorithmPoolSize (int value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_defaultMaxCollisionAlgorithmPoolSize () {
+               return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_get(swigCPtr, this);
+       }
+
+       public void setM_customCollisionAlgorithmMaxElementSize (int value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_customCollisionAlgorithmMaxElementSize () {
+               return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_get(swigCPtr, this);
+       }
+
+       public void setM_defaultStackAllocatorSize (int value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_defaultStackAllocatorSize () {
+               return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_get(swigCPtr, this);
+       }
+
+       public void setM_useEpaPenetrationAlgorithm (int value) {
+               gdxBulletJNI.btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_set(swigCPtr, this, value);
+       }
+
+       public int getM_useEpaPenetrationAlgorithm () {
+               return gdxBulletJNI.btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_get(swigCPtr, this);
+       }
+
+       public btDefaultCollisionConstructionInfo () {
+               this(gdxBulletJNI.new_btDefaultCollisionConstructionInfo(), true);
+       }
 
 }
index 897abf6..3874af5 100644 (file)
@@ -8,95 +8,92 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btDefaultMotionState extends btMotionState {
-  private long swigCPtr;
-
-  protected btDefaultMotionState(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btDefaultMotionState_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDefaultMotionState obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDefaultMotionState(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_graphicsWorldTrans(btTransform value) {
-    gdxBulletJNI.btDefaultMotionState_m_graphicsWorldTrans_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_graphicsWorldTrans() {
-    long cPtr = gdxBulletJNI.btDefaultMotionState_m_graphicsWorldTrans_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_centerOfMassOffset(btTransform value) {
-    gdxBulletJNI.btDefaultMotionState_m_centerOfMassOffset_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_centerOfMassOffset() {
-    long cPtr = gdxBulletJNI.btDefaultMotionState_m_centerOfMassOffset_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_startWorldTrans(btTransform value) {
-    gdxBulletJNI.btDefaultMotionState_m_startWorldTrans_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_startWorldTrans() {
-    long cPtr = gdxBulletJNI.btDefaultMotionState_m_startWorldTrans_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_userPointer(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btDefaultMotionState_m_userPointer_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_userPointer() {
-    long cPtr = gdxBulletJNI.btDefaultMotionState_m_userPointer_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public btDefaultMotionState(btTransform startTrans, btTransform centerOfMassOffset) {
-    this(gdxBulletJNI.new_btDefaultMotionState__SWIG_0(btTransform.getCPtr(startTrans), startTrans, btTransform.getCPtr(centerOfMassOffset), centerOfMassOffset), true);
-  }
-
-  public btDefaultMotionState(btTransform startTrans) {
-    this(gdxBulletJNI.new_btDefaultMotionState__SWIG_1(btTransform.getCPtr(startTrans), startTrans), true);
-  }
-
-  public btDefaultMotionState() {
-    this(gdxBulletJNI.new_btDefaultMotionState__SWIG_2(), true);
-  }
-
-  public void getGraphicsWorldTrans(btTransform out) {
-    gdxBulletJNI.btDefaultMotionState_getGraphicsWorldTrans(swigCPtr, this, btTransform.getCPtr(out), out);
-  }
-
-  public void getCenterOfMassOffset(btTransform out) {
-    gdxBulletJNI.btDefaultMotionState_getCenterOfMassOffset(swigCPtr, this, btTransform.getCPtr(out), out);
-  }
-
-  public void getStartWorldTrans(btTransform out) {
-    gdxBulletJNI.btDefaultMotionState_getStartWorldTrans(swigCPtr, this, btTransform.getCPtr(out), out);
-  }
+       private long swigCPtr;
+
+       protected btDefaultMotionState (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btDefaultMotionState_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDefaultMotionState obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDefaultMotionState(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_graphicsWorldTrans (btTransform value) {
+               gdxBulletJNI.btDefaultMotionState_m_graphicsWorldTrans_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_graphicsWorldTrans () {
+               long cPtr = gdxBulletJNI.btDefaultMotionState_m_graphicsWorldTrans_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_centerOfMassOffset (btTransform value) {
+               gdxBulletJNI.btDefaultMotionState_m_centerOfMassOffset_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_centerOfMassOffset () {
+               long cPtr = gdxBulletJNI.btDefaultMotionState_m_centerOfMassOffset_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_startWorldTrans (btTransform value) {
+               gdxBulletJNI.btDefaultMotionState_m_startWorldTrans_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_startWorldTrans () {
+               long cPtr = gdxBulletJNI.btDefaultMotionState_m_startWorldTrans_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_userPointer (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btDefaultMotionState_m_userPointer_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_userPointer () {
+               long cPtr = gdxBulletJNI.btDefaultMotionState_m_userPointer_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public btDefaultMotionState (btTransform startTrans, btTransform centerOfMassOffset) {
+               this(gdxBulletJNI.new_btDefaultMotionState__SWIG_0(btTransform.getCPtr(startTrans), startTrans,
+                       btTransform.getCPtr(centerOfMassOffset), centerOfMassOffset), true);
+       }
+
+       public btDefaultMotionState (btTransform startTrans) {
+               this(gdxBulletJNI.new_btDefaultMotionState__SWIG_1(btTransform.getCPtr(startTrans), startTrans), true);
+       }
+
+       public btDefaultMotionState () {
+               this(gdxBulletJNI.new_btDefaultMotionState__SWIG_2(), true);
+       }
+
+       public void getGraphicsWorldTrans (btTransform out) {
+               gdxBulletJNI.btDefaultMotionState_getGraphicsWorldTrans(swigCPtr, this, btTransform.getCPtr(out), out);
+       }
+
+       public void getCenterOfMassOffset (btTransform out) {
+               gdxBulletJNI.btDefaultMotionState_getCenterOfMassOffset(swigCPtr, this, btTransform.getCPtr(out), out);
+       }
+
+       public void getStartWorldTrans (btTransform out) {
+               gdxBulletJNI.btDefaultMotionState_getStartWorldTrans(swigCPtr, this, btTransform.getCPtr(out), out);
+       }
 
 }
index 0abc586..b4dc947 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btDiscreteDynamicsWorld extends btDynamicsWorld {
-  private long swigCPtr;
-
-  protected btDiscreteDynamicsWorld(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btDiscreteDynamicsWorld_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDiscreteDynamicsWorld obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDiscreteDynamicsWorld(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btDiscreteDynamicsWorld(btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration) {
-    this(gdxBulletJNI.new_btDiscreteDynamicsWorld(btDispatcher.getCPtr(dispatcher), dispatcher, btBroadphaseInterface.getCPtr(pairCache), pairCache, btConstraintSolver.getCPtr(constraintSolver), constraintSolver, btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
-  }
-
-  public int stepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep) {
-    return gdxBulletJNI.btDiscreteDynamicsWorld_stepSimulation__SWIG_0(swigCPtr, this, timeStep, maxSubSteps, fixedTimeStep);
-  }
-
-  public int stepSimulation(float timeStep, int maxSubSteps) {
-    return gdxBulletJNI.btDiscreteDynamicsWorld_stepSimulation__SWIG_1(swigCPtr, this, timeStep, maxSubSteps);
-  }
-
-  public int stepSimulation(float timeStep) {
-    return gdxBulletJNI.btDiscreteDynamicsWorld_stepSimulation__SWIG_2(swigCPtr, this, timeStep);
-  }
-
-  public void synchronizeSingleMotionState(btRigidBody body) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_synchronizeSingleMotionState(swigCPtr, this, btRigidBody.getCPtr(body), body);
-  }
-
-  public void addConstraint(btTypedConstraint constraint, boolean disableCollisionsBetweenLinkedBodies) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_addConstraint__SWIG_0(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint, disableCollisionsBetweenLinkedBodies);
-  }
-
-  public void addConstraint(btTypedConstraint constraint) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_addConstraint__SWIG_1(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint);
-  }
-
-  public btSimulationIslandManager getSimulationIslandManager() {
-    long cPtr = gdxBulletJNI.btDiscreteDynamicsWorld_getSimulationIslandManager__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btSimulationIslandManager(cPtr, false);
-  }
-
-  public btCollisionWorld getCollisionWorld() {
-    long cPtr = gdxBulletJNI.btDiscreteDynamicsWorld_getCollisionWorld(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionWorld(cPtr, false);
-  }
-
-  public void addCollisionObject(btCollisionObject collisionObject, short collisionFilterGroup, short collisionFilterMask) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_addCollisionObject__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(collisionObject), collisionObject, collisionFilterGroup, collisionFilterMask);
-  }
-
-  public void addCollisionObject(btCollisionObject collisionObject, short collisionFilterGroup) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_addCollisionObject__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(collisionObject), collisionObject, collisionFilterGroup);
-  }
-
-  public void addCollisionObject(btCollisionObject collisionObject) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_addCollisionObject__SWIG_2(swigCPtr, this, btCollisionObject.getCPtr(collisionObject), collisionObject);
-  }
-
-  public void addRigidBody(btRigidBody body) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, this, btRigidBody.getCPtr(body), body);
-  }
-
-  public void addRigidBody(btRigidBody body, short group, short mask) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, this, btRigidBody.getCPtr(body), body, group, mask);
-  }
-
-  public void debugDrawConstraint(btTypedConstraint constraint) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_debugDrawConstraint(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint);
-  }
-
-  public btTypedConstraint getConstraint(int index) {
-    long cPtr = gdxBulletJNI.btDiscreteDynamicsWorld_getConstraint__SWIG_0(swigCPtr, this, index);
-    return (cPtr == 0) ? null : new btTypedConstraint(cPtr, false);
-  }
-
-  public void applyGravity() {
-    gdxBulletJNI.btDiscreteDynamicsWorld_applyGravity(swigCPtr, this);
-  }
-
-  public void setNumTasks(int numTasks) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_setNumTasks(swigCPtr, this, numTasks);
-  }
-
-  public void updateVehicles(float timeStep) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_updateVehicles(swigCPtr, this, timeStep);
-  }
-
-  public void setSynchronizeAllMotionStates(boolean synchronizeAll) {
-    gdxBulletJNI.btDiscreteDynamicsWorld_setSynchronizeAllMotionStates(swigCPtr, this, synchronizeAll);
-  }
-
-  public boolean getSynchronizeAllMotionStates() {
-    return gdxBulletJNI.btDiscreteDynamicsWorld_getSynchronizeAllMotionStates(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btDiscreteDynamicsWorld (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btDiscreteDynamicsWorld_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDiscreteDynamicsWorld obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDiscreteDynamicsWorld(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btDiscreteDynamicsWorld (btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver,
+               btCollisionConfiguration collisionConfiguration) {
+               this(gdxBulletJNI.new_btDiscreteDynamicsWorld(btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btBroadphaseInterface.getCPtr(pairCache), pairCache, btConstraintSolver.getCPtr(constraintSolver), constraintSolver,
+                       btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
+       }
+
+       public int stepSimulation (float timeStep, int maxSubSteps, float fixedTimeStep) {
+               return gdxBulletJNI.btDiscreteDynamicsWorld_stepSimulation__SWIG_0(swigCPtr, this, timeStep, maxSubSteps, fixedTimeStep);
+       }
+
+       public int stepSimulation (float timeStep, int maxSubSteps) {
+               return gdxBulletJNI.btDiscreteDynamicsWorld_stepSimulation__SWIG_1(swigCPtr, this, timeStep, maxSubSteps);
+       }
+
+       public int stepSimulation (float timeStep) {
+               return gdxBulletJNI.btDiscreteDynamicsWorld_stepSimulation__SWIG_2(swigCPtr, this, timeStep);
+       }
+
+       public void synchronizeSingleMotionState (btRigidBody body) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_synchronizeSingleMotionState(swigCPtr, this, btRigidBody.getCPtr(body), body);
+       }
+
+       public void addConstraint (btTypedConstraint constraint, boolean disableCollisionsBetweenLinkedBodies) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_addConstraint__SWIG_0(swigCPtr, this, btTypedConstraint.getCPtr(constraint),
+                       constraint, disableCollisionsBetweenLinkedBodies);
+       }
+
+       public void addConstraint (btTypedConstraint constraint) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_addConstraint__SWIG_1(swigCPtr, this, btTypedConstraint.getCPtr(constraint),
+                       constraint);
+       }
+
+       public btSimulationIslandManager getSimulationIslandManager () {
+               long cPtr = gdxBulletJNI.btDiscreteDynamicsWorld_getSimulationIslandManager__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btSimulationIslandManager(cPtr, false);
+       }
+
+       public btCollisionWorld getCollisionWorld () {
+               long cPtr = gdxBulletJNI.btDiscreteDynamicsWorld_getCollisionWorld(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionWorld(cPtr, false);
+       }
+
+       public void addCollisionObject (btCollisionObject collisionObject, short collisionFilterGroup, short collisionFilterMask) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_addCollisionObject__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
+                       collisionObject, collisionFilterGroup, collisionFilterMask);
+       }
+
+       public void addCollisionObject (btCollisionObject collisionObject, short collisionFilterGroup) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_addCollisionObject__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
+                       collisionObject, collisionFilterGroup);
+       }
+
+       public void addCollisionObject (btCollisionObject collisionObject) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_addCollisionObject__SWIG_2(swigCPtr, this, btCollisionObject.getCPtr(collisionObject),
+                       collisionObject);
+       }
+
+       public void addRigidBody (btRigidBody body) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, this, btRigidBody.getCPtr(body), body);
+       }
+
+       public void addRigidBody (btRigidBody body, short group, short mask) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, this, btRigidBody.getCPtr(body), body, group, mask);
+       }
+
+       public void debugDrawConstraint (btTypedConstraint constraint) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_debugDrawConstraint(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint);
+       }
+
+       public btTypedConstraint getConstraint (int index) {
+               long cPtr = gdxBulletJNI.btDiscreteDynamicsWorld_getConstraint__SWIG_0(swigCPtr, this, index);
+               return (cPtr == 0) ? null : new btTypedConstraint(cPtr, false);
+       }
+
+       public void applyGravity () {
+               gdxBulletJNI.btDiscreteDynamicsWorld_applyGravity(swigCPtr, this);
+       }
+
+       public void setNumTasks (int numTasks) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_setNumTasks(swigCPtr, this, numTasks);
+       }
+
+       public void updateVehicles (float timeStep) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_updateVehicles(swigCPtr, this, timeStep);
+       }
+
+       public void setSynchronizeAllMotionStates (boolean synchronizeAll) {
+               gdxBulletJNI.btDiscreteDynamicsWorld_setSynchronizeAllMotionStates(swigCPtr, this, synchronizeAll);
+       }
+
+       public boolean getSynchronizeAllMotionStates () {
+               return gdxBulletJNI.btDiscreteDynamicsWorld_getSynchronizeAllMotionStates(swigCPtr, this);
+       }
 
 }
index 9f20c4c..46a22ab 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btDispatcher {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btDispatcher(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDispatcher obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDispatcher(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btCollisionAlgorithm findAlgorithm(btCollisionObject body0, btCollisionObject body1, btPersistentManifold sharedManifold) {
-    long cPtr = gdxBulletJNI.btDispatcher_findAlgorithm__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, btPersistentManifold.getCPtr(sharedManifold), sharedManifold);
-    return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
-  }
-
-  public btCollisionAlgorithm findAlgorithm(btCollisionObject body0, btCollisionObject body1) {
-    long cPtr = gdxBulletJNI.btDispatcher_findAlgorithm__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1);
-    return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
-  }
-
-  public btPersistentManifold getNewManifold(SWIGTYPE_p_void body0, SWIGTYPE_p_void body1) {
-    long cPtr = gdxBulletJNI.btDispatcher_getNewManifold(swigCPtr, this, SWIGTYPE_p_void.getCPtr(body0), SWIGTYPE_p_void.getCPtr(body1));
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
-
-  public void releaseManifold(btPersistentManifold manifold) {
-    gdxBulletJNI.btDispatcher_releaseManifold(swigCPtr, this, btPersistentManifold.getCPtr(manifold), manifold);
-  }
-
-  public void clearManifold(btPersistentManifold manifold) {
-    gdxBulletJNI.btDispatcher_clearManifold(swigCPtr, this, btPersistentManifold.getCPtr(manifold), manifold);
-  }
-
-  public boolean needsCollision(btCollisionObject body0, btCollisionObject body1) {
-    return gdxBulletJNI.btDispatcher_needsCollision(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1);
-  }
-
-  public boolean needsResponse(btCollisionObject body0, btCollisionObject body1) {
-    return gdxBulletJNI.btDispatcher_needsResponse(swigCPtr, this, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1);
-  }
-
-  public void dispatchAllCollisionPairs(btOverlappingPairCache pairCache, btDispatcherInfo dispatchInfo, btDispatcher dispatcher) {
-    gdxBulletJNI.btDispatcher_dispatchAllCollisionPairs(swigCPtr, this, btOverlappingPairCache.getCPtr(pairCache), pairCache, btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public int getNumManifolds() {
-    return gdxBulletJNI.btDispatcher_getNumManifolds(swigCPtr, this);
-  }
-
-  public btPersistentManifold getManifoldByIndexInternal(int index) {
-    long cPtr = gdxBulletJNI.btDispatcher_getManifoldByIndexInternal(swigCPtr, this, index);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
-
-  public SWIGTYPE_p_p_btPersistentManifold getInternalManifoldPointer() {
-    long cPtr = gdxBulletJNI.btDispatcher_getInternalManifoldPointer(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_p_btPersistentManifold(cPtr, false);
-  }
-
-  public btPoolAllocator getInternalManifoldPool() {
-    long cPtr = gdxBulletJNI.btDispatcher_getInternalManifoldPool__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
-  }
-
-  public SWIGTYPE_p_void allocateCollisionAlgorithm(int size) {
-    long cPtr = gdxBulletJNI.btDispatcher_allocateCollisionAlgorithm(swigCPtr, this, size);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void freeCollisionAlgorithm(SWIGTYPE_p_void ptr) {
-    gdxBulletJNI.btDispatcher_freeCollisionAlgorithm(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btDispatcher (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDispatcher obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDispatcher(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btCollisionAlgorithm findAlgorithm (btCollisionObject body0, btCollisionObject body1,
+               btPersistentManifold sharedManifold) {
+               long cPtr = gdxBulletJNI.btDispatcher_findAlgorithm__SWIG_0(swigCPtr, this, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1, btPersistentManifold.getCPtr(sharedManifold), sharedManifold);
+               return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
+       }
+
+       public btCollisionAlgorithm findAlgorithm (btCollisionObject body0, btCollisionObject body1) {
+               long cPtr = gdxBulletJNI.btDispatcher_findAlgorithm__SWIG_1(swigCPtr, this, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1);
+               return (cPtr == 0) ? null : new btCollisionAlgorithm(cPtr, false);
+       }
+
+       public btPersistentManifold getNewManifold (SWIGTYPE_p_void body0, SWIGTYPE_p_void body1) {
+               long cPtr = gdxBulletJNI.btDispatcher_getNewManifold(swigCPtr, this, SWIGTYPE_p_void.getCPtr(body0),
+                       SWIGTYPE_p_void.getCPtr(body1));
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
+
+       public void releaseManifold (btPersistentManifold manifold) {
+               gdxBulletJNI.btDispatcher_releaseManifold(swigCPtr, this, btPersistentManifold.getCPtr(manifold), manifold);
+       }
+
+       public void clearManifold (btPersistentManifold manifold) {
+               gdxBulletJNI.btDispatcher_clearManifold(swigCPtr, this, btPersistentManifold.getCPtr(manifold), manifold);
+       }
+
+       public boolean needsCollision (btCollisionObject body0, btCollisionObject body1) {
+               return gdxBulletJNI.btDispatcher_needsCollision(swigCPtr, this, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1);
+       }
+
+       public boolean needsResponse (btCollisionObject body0, btCollisionObject body1) {
+               return gdxBulletJNI.btDispatcher_needsResponse(swigCPtr, this, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1);
+       }
+
+       public void dispatchAllCollisionPairs (btOverlappingPairCache pairCache, btDispatcherInfo dispatchInfo, btDispatcher dispatcher) {
+               gdxBulletJNI.btDispatcher_dispatchAllCollisionPairs(swigCPtr, this, btOverlappingPairCache.getCPtr(pairCache), pairCache,
+                       btDispatcherInfo.getCPtr(dispatchInfo), dispatchInfo, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public int getNumManifolds () {
+               return gdxBulletJNI.btDispatcher_getNumManifolds(swigCPtr, this);
+       }
+
+       public btPersistentManifold getManifoldByIndexInternal (int index) {
+               long cPtr = gdxBulletJNI.btDispatcher_getManifoldByIndexInternal(swigCPtr, this, index);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
+
+       public SWIGTYPE_p_p_btPersistentManifold getInternalManifoldPointer () {
+               long cPtr = gdxBulletJNI.btDispatcher_getInternalManifoldPointer(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_p_btPersistentManifold(cPtr, false);
+       }
+
+       public btPoolAllocator getInternalManifoldPool () {
+               long cPtr = gdxBulletJNI.btDispatcher_getInternalManifoldPool__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPoolAllocator(cPtr, false);
+       }
+
+       public SWIGTYPE_p_void allocateCollisionAlgorithm (int size) {
+               long cPtr = gdxBulletJNI.btDispatcher_allocateCollisionAlgorithm(swigCPtr, this, size);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void freeCollisionAlgorithm (SWIGTYPE_p_void ptr) {
+               gdxBulletJNI.btDispatcher_freeCollisionAlgorithm(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
+       }
 
 }
index 7802695..cdff18c 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btDispatcherInfo {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btDispatcherInfo(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDispatcherInfo obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDispatcherInfo(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btDispatcherInfo() {
-    this(gdxBulletJNI.new_btDispatcherInfo(), true);
-  }
-
-  public void setM_timeStep(float value) {
-    gdxBulletJNI.btDispatcherInfo_m_timeStep_set(swigCPtr, this, value);
-  }
-
-  public float getM_timeStep() {
-    return gdxBulletJNI.btDispatcherInfo_m_timeStep_get(swigCPtr, this);
-  }
-
-  public void setM_stepCount(int value) {
-    gdxBulletJNI.btDispatcherInfo_m_stepCount_set(swigCPtr, this, value);
-  }
-
-  public int getM_stepCount() {
-    return gdxBulletJNI.btDispatcherInfo_m_stepCount_get(swigCPtr, this);
-  }
-
-  public void setM_dispatchFunc(int value) {
-    gdxBulletJNI.btDispatcherInfo_m_dispatchFunc_set(swigCPtr, this, value);
-  }
-
-  public int getM_dispatchFunc() {
-    return gdxBulletJNI.btDispatcherInfo_m_dispatchFunc_get(swigCPtr, this);
-  }
-
-  public void setM_timeOfImpact(float value) {
-    gdxBulletJNI.btDispatcherInfo_m_timeOfImpact_set(swigCPtr, this, value);
-  }
-
-  public float getM_timeOfImpact() {
-    return gdxBulletJNI.btDispatcherInfo_m_timeOfImpact_get(swigCPtr, this);
-  }
-
-  public void setM_useContinuous(boolean value) {
-    gdxBulletJNI.btDispatcherInfo_m_useContinuous_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_useContinuous() {
-    return gdxBulletJNI.btDispatcherInfo_m_useContinuous_get(swigCPtr, this);
-  }
-
-  public void setM_debugDraw(btIDebugDraw value) {
-    gdxBulletJNI.btDispatcherInfo_m_debugDraw_set(swigCPtr, this, btIDebugDraw.getCPtr(value), value);
-  }
-
-  public btIDebugDraw getM_debugDraw() {
-    long cPtr = gdxBulletJNI.btDispatcherInfo_m_debugDraw_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btIDebugDraw(cPtr, false);
-  }
-
-  public void setM_enableSatConvex(boolean value) {
-    gdxBulletJNI.btDispatcherInfo_m_enableSatConvex_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_enableSatConvex() {
-    return gdxBulletJNI.btDispatcherInfo_m_enableSatConvex_get(swigCPtr, this);
-  }
-
-  public void setM_enableSPU(boolean value) {
-    gdxBulletJNI.btDispatcherInfo_m_enableSPU_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_enableSPU() {
-    return gdxBulletJNI.btDispatcherInfo_m_enableSPU_get(swigCPtr, this);
-  }
-
-  public void setM_useEpa(boolean value) {
-    gdxBulletJNI.btDispatcherInfo_m_useEpa_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_useEpa() {
-    return gdxBulletJNI.btDispatcherInfo_m_useEpa_get(swigCPtr, this);
-  }
-
-  public void setM_allowedCcdPenetration(float value) {
-    gdxBulletJNI.btDispatcherInfo_m_allowedCcdPenetration_set(swigCPtr, this, value);
-  }
-
-  public float getM_allowedCcdPenetration() {
-    return gdxBulletJNI.btDispatcherInfo_m_allowedCcdPenetration_get(swigCPtr, this);
-  }
-
-  public void setM_useConvexConservativeDistanceUtil(boolean value) {
-    gdxBulletJNI.btDispatcherInfo_m_useConvexConservativeDistanceUtil_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_useConvexConservativeDistanceUtil() {
-    return gdxBulletJNI.btDispatcherInfo_m_useConvexConservativeDistanceUtil_get(swigCPtr, this);
-  }
-
-  public void setM_convexConservativeDistanceThreshold(float value) {
-    gdxBulletJNI.btDispatcherInfo_m_convexConservativeDistanceThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_convexConservativeDistanceThreshold() {
-    return gdxBulletJNI.btDispatcherInfo_m_convexConservativeDistanceThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_stackAllocator(btStackAlloc value) {
-    gdxBulletJNI.btDispatcherInfo_m_stackAllocator_set(swigCPtr, this, btStackAlloc.getCPtr(value), value);
-  }
-
-  public btStackAlloc getM_stackAllocator() {
-    long cPtr = gdxBulletJNI.btDispatcherInfo_m_stackAllocator_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
-  }
-
-  public final static class DispatchFunc {
-    public final static int DISPATCH_DISCRETE = 1;
-    public final static int DISPATCH_CONTINUOUS = DISPATCH_DISCRETE + 1;
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btDispatcherInfo (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDispatcherInfo obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDispatcherInfo(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btDispatcherInfo () {
+               this(gdxBulletJNI.new_btDispatcherInfo(), true);
+       }
+
+       public void setM_timeStep (float value) {
+               gdxBulletJNI.btDispatcherInfo_m_timeStep_set(swigCPtr, this, value);
+       }
+
+       public float getM_timeStep () {
+               return gdxBulletJNI.btDispatcherInfo_m_timeStep_get(swigCPtr, this);
+       }
+
+       public void setM_stepCount (int value) {
+               gdxBulletJNI.btDispatcherInfo_m_stepCount_set(swigCPtr, this, value);
+       }
+
+       public int getM_stepCount () {
+               return gdxBulletJNI.btDispatcherInfo_m_stepCount_get(swigCPtr, this);
+       }
+
+       public void setM_dispatchFunc (int value) {
+               gdxBulletJNI.btDispatcherInfo_m_dispatchFunc_set(swigCPtr, this, value);
+       }
+
+       public int getM_dispatchFunc () {
+               return gdxBulletJNI.btDispatcherInfo_m_dispatchFunc_get(swigCPtr, this);
+       }
+
+       public void setM_timeOfImpact (float value) {
+               gdxBulletJNI.btDispatcherInfo_m_timeOfImpact_set(swigCPtr, this, value);
+       }
+
+       public float getM_timeOfImpact () {
+               return gdxBulletJNI.btDispatcherInfo_m_timeOfImpact_get(swigCPtr, this);
+       }
+
+       public void setM_useContinuous (boolean value) {
+               gdxBulletJNI.btDispatcherInfo_m_useContinuous_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_useContinuous () {
+               return gdxBulletJNI.btDispatcherInfo_m_useContinuous_get(swigCPtr, this);
+       }
+
+       public void setM_debugDraw (btIDebugDraw value) {
+               gdxBulletJNI.btDispatcherInfo_m_debugDraw_set(swigCPtr, this, btIDebugDraw.getCPtr(value), value);
+       }
+
+       public btIDebugDraw getM_debugDraw () {
+               long cPtr = gdxBulletJNI.btDispatcherInfo_m_debugDraw_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btIDebugDraw(cPtr, false);
+       }
+
+       public void setM_enableSatConvex (boolean value) {
+               gdxBulletJNI.btDispatcherInfo_m_enableSatConvex_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_enableSatConvex () {
+               return gdxBulletJNI.btDispatcherInfo_m_enableSatConvex_get(swigCPtr, this);
+       }
+
+       public void setM_enableSPU (boolean value) {
+               gdxBulletJNI.btDispatcherInfo_m_enableSPU_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_enableSPU () {
+               return gdxBulletJNI.btDispatcherInfo_m_enableSPU_get(swigCPtr, this);
+       }
+
+       public void setM_useEpa (boolean value) {
+               gdxBulletJNI.btDispatcherInfo_m_useEpa_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_useEpa () {
+               return gdxBulletJNI.btDispatcherInfo_m_useEpa_get(swigCPtr, this);
+       }
+
+       public void setM_allowedCcdPenetration (float value) {
+               gdxBulletJNI.btDispatcherInfo_m_allowedCcdPenetration_set(swigCPtr, this, value);
+       }
+
+       public float getM_allowedCcdPenetration () {
+               return gdxBulletJNI.btDispatcherInfo_m_allowedCcdPenetration_get(swigCPtr, this);
+       }
+
+       public void setM_useConvexConservativeDistanceUtil (boolean value) {
+               gdxBulletJNI.btDispatcherInfo_m_useConvexConservativeDistanceUtil_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_useConvexConservativeDistanceUtil () {
+               return gdxBulletJNI.btDispatcherInfo_m_useConvexConservativeDistanceUtil_get(swigCPtr, this);
+       }
+
+       public void setM_convexConservativeDistanceThreshold (float value) {
+               gdxBulletJNI.btDispatcherInfo_m_convexConservativeDistanceThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_convexConservativeDistanceThreshold () {
+               return gdxBulletJNI.btDispatcherInfo_m_convexConservativeDistanceThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_stackAllocator (btStackAlloc value) {
+               gdxBulletJNI.btDispatcherInfo_m_stackAllocator_set(swigCPtr, this, btStackAlloc.getCPtr(value), value);
+       }
+
+       public btStackAlloc getM_stackAllocator () {
+               long cPtr = gdxBulletJNI.btDispatcherInfo_m_stackAllocator_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btStackAlloc(cPtr, false);
+       }
+
+       public final static class DispatchFunc {
+               public final static int DISPATCH_DISCRETE = 1;
+               public final static int DISPATCH_CONTINUOUS = DISPATCH_DISCRETE + 1;
+       }
 
 }
index 7a00670..8fc8b52 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btDynamicsWorld extends btCollisionWorld {
-  private long swigCPtr;
-
-  protected btDynamicsWorld(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btDynamicsWorld_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btDynamicsWorld obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btDynamicsWorld(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public int stepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep) {
-    return gdxBulletJNI.btDynamicsWorld_stepSimulation__SWIG_0(swigCPtr, this, timeStep, maxSubSteps, fixedTimeStep);
-  }
-
-  public int stepSimulation(float timeStep, int maxSubSteps) {
-    return gdxBulletJNI.btDynamicsWorld_stepSimulation__SWIG_1(swigCPtr, this, timeStep, maxSubSteps);
-  }
-
-  public int stepSimulation(float timeStep) {
-    return gdxBulletJNI.btDynamicsWorld_stepSimulation__SWIG_2(swigCPtr, this, timeStep);
-  }
-
-  public void addConstraint(btTypedConstraint constraint, boolean disableCollisionsBetweenLinkedBodies) {
-    gdxBulletJNI.btDynamicsWorld_addConstraint__SWIG_0(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint, disableCollisionsBetweenLinkedBodies);
-  }
-
-  public void addConstraint(btTypedConstraint constraint) {
-    gdxBulletJNI.btDynamicsWorld_addConstraint__SWIG_1(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint);
-  }
-
-  public void removeConstraint(btTypedConstraint constraint) {
-    gdxBulletJNI.btDynamicsWorld_removeConstraint(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint);
-  }
-
-  public void addAction(btActionInterface action) {
-    gdxBulletJNI.btDynamicsWorld_addAction(swigCPtr, this, btActionInterface.getCPtr(action), action);
-  }
-
-  public void removeAction(btActionInterface action) {
-    gdxBulletJNI.btDynamicsWorld_removeAction(swigCPtr, this, btActionInterface.getCPtr(action), action);
-  }
-
-  public void setGravity(Vector3 gravity) {
-    gdxBulletJNI.btDynamicsWorld_setGravity(swigCPtr, this, gravity);
-  }
-
-  public Vector3 getGravity() {
-       return gdxBulletJNI.btDynamicsWorld_getGravity(swigCPtr, this);
-}
-
-  public void synchronizeMotionStates() {
-    gdxBulletJNI.btDynamicsWorld_synchronizeMotionStates(swigCPtr, this);
-  }
-
-  public void addRigidBody(btRigidBody body) {
-    gdxBulletJNI.btDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, this, btRigidBody.getCPtr(body), body);
-  }
-
-  public void addRigidBody(btRigidBody body, short group, short mask) {
-    gdxBulletJNI.btDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, this, btRigidBody.getCPtr(body), body, group, mask);
-  }
-
-  public void removeRigidBody(btRigidBody body) {
-    gdxBulletJNI.btDynamicsWorld_removeRigidBody(swigCPtr, this, btRigidBody.getCPtr(body), body);
-  }
-
-  public void setConstraintSolver(btConstraintSolver solver) {
-    gdxBulletJNI.btDynamicsWorld_setConstraintSolver(swigCPtr, this, btConstraintSolver.getCPtr(solver), solver);
-  }
-
-  public btConstraintSolver getConstraintSolver() {
-    long cPtr = gdxBulletJNI.btDynamicsWorld_getConstraintSolver(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConstraintSolver(cPtr, false);
-  }
-
-  public int getNumConstraints() {
-    return gdxBulletJNI.btDynamicsWorld_getNumConstraints(swigCPtr, this);
-  }
-
-  public btTypedConstraint getConstraint(int index) {
-    long cPtr = gdxBulletJNI.btDynamicsWorld_getConstraint__SWIG_0(swigCPtr, this, index);
-    return (cPtr == 0) ? null : new btTypedConstraint(cPtr, false);
-  }
-
-  public int getWorldType() {
-    return gdxBulletJNI.btDynamicsWorld_getWorldType(swigCPtr, this);
-  }
-
-  public void clearForces() {
-    gdxBulletJNI.btDynamicsWorld_clearForces(swigCPtr, this);
-  }
-
-  public void setInternalTickCallback(SWIGTYPE_p_f_p_btDynamicsWorld_float__void cb, SWIGTYPE_p_void worldUserInfo, boolean isPreTick) {
-    gdxBulletJNI.btDynamicsWorld_setInternalTickCallback__SWIG_0(swigCPtr, this, SWIGTYPE_p_f_p_btDynamicsWorld_float__void.getCPtr(cb), SWIGTYPE_p_void.getCPtr(worldUserInfo), isPreTick);
-  }
-
-  public void setInternalTickCallback(SWIGTYPE_p_f_p_btDynamicsWorld_float__void cb, SWIGTYPE_p_void worldUserInfo) {
-    gdxBulletJNI.btDynamicsWorld_setInternalTickCallback__SWIG_1(swigCPtr, this, SWIGTYPE_p_f_p_btDynamicsWorld_float__void.getCPtr(cb), SWIGTYPE_p_void.getCPtr(worldUserInfo));
-  }
-
-  public void setInternalTickCallback(SWIGTYPE_p_f_p_btDynamicsWorld_float__void cb) {
-    gdxBulletJNI.btDynamicsWorld_setInternalTickCallback__SWIG_2(swigCPtr, this, SWIGTYPE_p_f_p_btDynamicsWorld_float__void.getCPtr(cb));
-  }
-
-  public void setWorldUserInfo(SWIGTYPE_p_void worldUserInfo) {
-    gdxBulletJNI.btDynamicsWorld_setWorldUserInfo(swigCPtr, this, SWIGTYPE_p_void.getCPtr(worldUserInfo));
-  }
-
-  public SWIGTYPE_p_void getWorldUserInfo() {
-    long cPtr = gdxBulletJNI.btDynamicsWorld_getWorldUserInfo(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public btContactSolverInfo getSolverInfo() {
-    return new btContactSolverInfo(gdxBulletJNI.btDynamicsWorld_getSolverInfo(swigCPtr, this), false);
-  }
-
-  public void addVehicle(btActionInterface vehicle) {
-    gdxBulletJNI.btDynamicsWorld_addVehicle(swigCPtr, this, btActionInterface.getCPtr(vehicle), vehicle);
-  }
-
-  public void removeVehicle(btActionInterface vehicle) {
-    gdxBulletJNI.btDynamicsWorld_removeVehicle(swigCPtr, this, btActionInterface.getCPtr(vehicle), vehicle);
-  }
-
-  public void addCharacter(btActionInterface character) {
-    gdxBulletJNI.btDynamicsWorld_addCharacter(swigCPtr, this, btActionInterface.getCPtr(character), character);
-  }
-
-  public void removeCharacter(btActionInterface character) {
-    gdxBulletJNI.btDynamicsWorld_removeCharacter(swigCPtr, this, btActionInterface.getCPtr(character), character);
-  }
+       private long swigCPtr;
+
+       protected btDynamicsWorld (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btDynamicsWorld_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btDynamicsWorld obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btDynamicsWorld(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public int stepSimulation (float timeStep, int maxSubSteps, float fixedTimeStep) {
+               return gdxBulletJNI.btDynamicsWorld_stepSimulation__SWIG_0(swigCPtr, this, timeStep, maxSubSteps, fixedTimeStep);
+       }
+
+       public int stepSimulation (float timeStep, int maxSubSteps) {
+               return gdxBulletJNI.btDynamicsWorld_stepSimulation__SWIG_1(swigCPtr, this, timeStep, maxSubSteps);
+       }
+
+       public int stepSimulation (float timeStep) {
+               return gdxBulletJNI.btDynamicsWorld_stepSimulation__SWIG_2(swigCPtr, this, timeStep);
+       }
+
+       public void addConstraint (btTypedConstraint constraint, boolean disableCollisionsBetweenLinkedBodies) {
+               gdxBulletJNI.btDynamicsWorld_addConstraint__SWIG_0(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint,
+                       disableCollisionsBetweenLinkedBodies);
+       }
+
+       public void addConstraint (btTypedConstraint constraint) {
+               gdxBulletJNI.btDynamicsWorld_addConstraint__SWIG_1(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint);
+       }
+
+       public void removeConstraint (btTypedConstraint constraint) {
+               gdxBulletJNI.btDynamicsWorld_removeConstraint(swigCPtr, this, btTypedConstraint.getCPtr(constraint), constraint);
+       }
+
+       public void addAction (btActionInterface action) {
+               gdxBulletJNI.btDynamicsWorld_addAction(swigCPtr, this, btActionInterface.getCPtr(action), action);
+       }
+
+       public void removeAction (btActionInterface action) {
+               gdxBulletJNI.btDynamicsWorld_removeAction(swigCPtr, this, btActionInterface.getCPtr(action), action);
+       }
+
+       public void setGravity (Vector3 gravity) {
+               gdxBulletJNI.btDynamicsWorld_setGravity(swigCPtr, this, gravity);
+       }
+
+       public Vector3 getGravity () {
+               return gdxBulletJNI.btDynamicsWorld_getGravity(swigCPtr, this);
+       }
+
+       public void synchronizeMotionStates () {
+               gdxBulletJNI.btDynamicsWorld_synchronizeMotionStates(swigCPtr, this);
+       }
+
+       public void addRigidBody (btRigidBody body) {
+               gdxBulletJNI.btDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, this, btRigidBody.getCPtr(body), body);
+       }
+
+       public void addRigidBody (btRigidBody body, short group, short mask) {
+               gdxBulletJNI.btDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, this, btRigidBody.getCPtr(body), body, group, mask);
+       }
+
+       public void removeRigidBody (btRigidBody body) {
+               gdxBulletJNI.btDynamicsWorld_removeRigidBody(swigCPtr, this, btRigidBody.getCPtr(body), body);
+       }
+
+       public void setConstraintSolver (btConstraintSolver solver) {
+               gdxBulletJNI.btDynamicsWorld_setConstraintSolver(swigCPtr, this, btConstraintSolver.getCPtr(solver), solver);
+       }
+
+       public btConstraintSolver getConstraintSolver () {
+               long cPtr = gdxBulletJNI.btDynamicsWorld_getConstraintSolver(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConstraintSolver(cPtr, false);
+       }
+
+       public int getNumConstraints () {
+               return gdxBulletJNI.btDynamicsWorld_getNumConstraints(swigCPtr, this);
+       }
+
+       public btTypedConstraint getConstraint (int index) {
+               long cPtr = gdxBulletJNI.btDynamicsWorld_getConstraint__SWIG_0(swigCPtr, this, index);
+               return (cPtr == 0) ? null : new btTypedConstraint(cPtr, false);
+       }
+
+       public int getWorldType () {
+               return gdxBulletJNI.btDynamicsWorld_getWorldType(swigCPtr, this);
+       }
+
+       public void clearForces () {
+               gdxBulletJNI.btDynamicsWorld_clearForces(swigCPtr, this);
+       }
+
+       public void setInternalTickCallback (SWIGTYPE_p_f_p_btDynamicsWorld_float__void cb, SWIGTYPE_p_void worldUserInfo,
+               boolean isPreTick) {
+               gdxBulletJNI.btDynamicsWorld_setInternalTickCallback__SWIG_0(swigCPtr, this,
+                       SWIGTYPE_p_f_p_btDynamicsWorld_float__void.getCPtr(cb), SWIGTYPE_p_void.getCPtr(worldUserInfo), isPreTick);
+       }
+
+       public void setInternalTickCallback (SWIGTYPE_p_f_p_btDynamicsWorld_float__void cb, SWIGTYPE_p_void worldUserInfo) {
+               gdxBulletJNI.btDynamicsWorld_setInternalTickCallback__SWIG_1(swigCPtr, this,
+                       SWIGTYPE_p_f_p_btDynamicsWorld_float__void.getCPtr(cb), SWIGTYPE_p_void.getCPtr(worldUserInfo));
+       }
+
+       public void setInternalTickCallback (SWIGTYPE_p_f_p_btDynamicsWorld_float__void cb) {
+               gdxBulletJNI.btDynamicsWorld_setInternalTickCallback__SWIG_2(swigCPtr, this,
+                       SWIGTYPE_p_f_p_btDynamicsWorld_float__void.getCPtr(cb));
+       }
+
+       public void setWorldUserInfo (SWIGTYPE_p_void worldUserInfo) {
+               gdxBulletJNI.btDynamicsWorld_setWorldUserInfo(swigCPtr, this, SWIGTYPE_p_void.getCPtr(worldUserInfo));
+       }
+
+       public SWIGTYPE_p_void getWorldUserInfo () {
+               long cPtr = gdxBulletJNI.btDynamicsWorld_getWorldUserInfo(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public btContactSolverInfo getSolverInfo () {
+               return new btContactSolverInfo(gdxBulletJNI.btDynamicsWorld_getSolverInfo(swigCPtr, this), false);
+       }
+
+       public void addVehicle (btActionInterface vehicle) {
+               gdxBulletJNI.btDynamicsWorld_addVehicle(swigCPtr, this, btActionInterface.getCPtr(vehicle), vehicle);
+       }
+
+       public void removeVehicle (btActionInterface vehicle) {
+               gdxBulletJNI.btDynamicsWorld_removeVehicle(swigCPtr, this, btActionInterface.getCPtr(vehicle), vehicle);
+       }
+
+       public void addCharacter (btActionInterface character) {
+               gdxBulletJNI.btDynamicsWorld_addCharacter(swigCPtr, this, btActionInterface.getCPtr(character), character);
+       }
+
+       public void removeCharacter (btActionInterface character) {
+               gdxBulletJNI.btDynamicsWorld_removeCharacter(swigCPtr, this, btActionInterface.getCPtr(character), character);
+       }
 
 }
index 31bc5d6..4129624 100644 (file)
@@ -9,9 +9,8 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btDynamicsWorldType {
-  public final static int BT_SIMPLE_DYNAMICS_WORLD = 1;
-  public final static int BT_DISCRETE_DYNAMICS_WORLD = 2;
-  public final static int BT_CONTINUOUS_DYNAMICS_WORLD = 3;
-  public final static int BT_SOFT_RIGID_DYNAMICS_WORLD = 4;
+       public final static int BT_SIMPLE_DYNAMICS_WORLD = 1;
+       public final static int BT_DISCRETE_DYNAMICS_WORLD = 2;
+       public final static int BT_CONTINUOUS_DYNAMICS_WORLD = 3;
+       public final static int BT_SOFT_RIGID_DYNAMICS_WORLD = 4;
 }
-
index eddb218..195b13c 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btElement {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btElement(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btElement obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btElement(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_id(int value) {
-    gdxBulletJNI.btElement_m_id_set(swigCPtr, this, value);
-  }
-
-  public int getM_id() {
-    return gdxBulletJNI.btElement_m_id_get(swigCPtr, this);
-  }
-
-  public void setM_sz(int value) {
-    gdxBulletJNI.btElement_m_sz_set(swigCPtr, this, value);
-  }
-
-  public int getM_sz() {
-    return gdxBulletJNI.btElement_m_sz_get(swigCPtr, this);
-  }
-
-  public btElement() {
-    this(gdxBulletJNI.new_btElement(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btElement (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btElement obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btElement(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_id (int value) {
+               gdxBulletJNI.btElement_m_id_set(swigCPtr, this, value);
+       }
+
+       public int getM_id () {
+               return gdxBulletJNI.btElement_m_id_get(swigCPtr, this);
+       }
+
+       public void setM_sz (int value) {
+               gdxBulletJNI.btElement_m_sz_set(swigCPtr, this, value);
+       }
+
+       public int getM_sz () {
+               return gdxBulletJNI.btElement_m_sz_get(swigCPtr, this);
+       }
+
+       public btElement () {
+               this(gdxBulletJNI.new_btElement(), true);
+       }
 
 }
index d82b53a..2f345e4 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btEmptyAlgorithm extends btCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btEmptyAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btEmptyAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btEmptyAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btEmptyAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btEmptyAlgorithm(btCollisionAlgorithmConstructionInfo ci) {
-    this(gdxBulletJNI.new_btEmptyAlgorithm(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
-  }
+       private long swigCPtr;
+
+       protected btEmptyAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btEmptyAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btEmptyAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btEmptyAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btEmptyAlgorithm (btCollisionAlgorithmConstructionInfo ci) {
+               this(gdxBulletJNI.new_btEmptyAlgorithm(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
+       }
 
 }
index 6d5c454..7e62eaa 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btEmptyShape extends btConcaveShape {
-  private long swigCPtr;
-
-  protected btEmptyShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btEmptyShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btEmptyShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btEmptyShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btEmptyShape() {
-    this(gdxBulletJNI.new_btEmptyShape(), true);
-  }
+       private long swigCPtr;
+
+       protected btEmptyShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btEmptyShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btEmptyShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btEmptyShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btEmptyShape () {
+               this(gdxBulletJNI.new_btEmptyShape(), true);
+       }
 
 }
index 25b88dd..ab58679 100644 (file)
@@ -8,56 +8,52 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btFace {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btFace(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btFace obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btFace(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_indices(SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
-    gdxBulletJNI.btFace_m_indices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_int_t getM_indices() {
-    long cPtr = gdxBulletJNI.btFace_m_indices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
-  }
-
-  public void setM_plane(float[] value) {
-    gdxBulletJNI.btFace_m_plane_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_plane() {
-    return gdxBulletJNI.btFace_m_plane_get(swigCPtr, this);
-  }
-
-  public btFace() {
-    this(gdxBulletJNI.new_btFace(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btFace (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btFace obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btFace(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_indices (SWIGTYPE_p_btAlignedObjectArrayT_int_t value) {
+               gdxBulletJNI.btFace_m_indices_set(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_int_t.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_int_t getM_indices () {
+               long cPtr = gdxBulletJNI.btFace_m_indices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_btAlignedObjectArrayT_int_t(cPtr, false);
+       }
+
+       public void setM_plane (float[] value) {
+               gdxBulletJNI.btFace_m_plane_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_plane () {
+               return gdxBulletJNI.btFace_m_plane_get(swigCPtr, this);
+       }
+
+       public btFace () {
+               this(gdxBulletJNI.new_btFace(), true);
+       }
 
 }
index 44ee9e0..465deba 100644 (file)
@@ -8,73 +8,69 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btGEN_Link {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btGEN_Link(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGEN_Link obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGEN_Link(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btGEN_Link() {
-    this(gdxBulletJNI.new_btGEN_Link__SWIG_0(), true);
-  }
-
-  public btGEN_Link(btGEN_Link next, btGEN_Link prev) {
-    this(gdxBulletJNI.new_btGEN_Link__SWIG_1(btGEN_Link.getCPtr(next), next, btGEN_Link.getCPtr(prev), prev), true);
-  }
-
-  public btGEN_Link getNext() {
-    long cPtr = gdxBulletJNI.btGEN_Link_getNext(swigCPtr, this);
-    return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
-  }
-
-  public btGEN_Link getPrev() {
-    long cPtr = gdxBulletJNI.btGEN_Link_getPrev(swigCPtr, this);
-    return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
-  }
-
-  public boolean isHead() {
-    return gdxBulletJNI.btGEN_Link_isHead(swigCPtr, this);
-  }
-
-  public boolean isTail() {
-    return gdxBulletJNI.btGEN_Link_isTail(swigCPtr, this);
-  }
-
-  public void insertBefore(btGEN_Link link) {
-    gdxBulletJNI.btGEN_Link_insertBefore(swigCPtr, this, btGEN_Link.getCPtr(link), link);
-  }
-
-  public void insertAfter(btGEN_Link link) {
-    gdxBulletJNI.btGEN_Link_insertAfter(swigCPtr, this, btGEN_Link.getCPtr(link), link);
-  }
-
-  public void remove() {
-    gdxBulletJNI.btGEN_Link_remove(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btGEN_Link (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGEN_Link obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGEN_Link(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btGEN_Link () {
+               this(gdxBulletJNI.new_btGEN_Link__SWIG_0(), true);
+       }
+
+       public btGEN_Link (btGEN_Link next, btGEN_Link prev) {
+               this(gdxBulletJNI.new_btGEN_Link__SWIG_1(btGEN_Link.getCPtr(next), next, btGEN_Link.getCPtr(prev), prev), true);
+       }
+
+       public btGEN_Link getNext () {
+               long cPtr = gdxBulletJNI.btGEN_Link_getNext(swigCPtr, this);
+               return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
+       }
+
+       public btGEN_Link getPrev () {
+               long cPtr = gdxBulletJNI.btGEN_Link_getPrev(swigCPtr, this);
+               return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
+       }
+
+       public boolean isHead () {
+               return gdxBulletJNI.btGEN_Link_isHead(swigCPtr, this);
+       }
+
+       public boolean isTail () {
+               return gdxBulletJNI.btGEN_Link_isTail(swigCPtr, this);
+       }
+
+       public void insertBefore (btGEN_Link link) {
+               gdxBulletJNI.btGEN_Link_insertBefore(swigCPtr, this, btGEN_Link.getCPtr(link), link);
+       }
+
+       public void insertAfter (btGEN_Link link) {
+               gdxBulletJNI.btGEN_Link_insertAfter(swigCPtr, this, btGEN_Link.getCPtr(link), link);
+       }
+
+       public void remove () {
+               gdxBulletJNI.btGEN_Link_remove(swigCPtr, this);
+       }
 
 }
index 0bd1fda..d5f2251 100644 (file)
@@ -8,57 +8,53 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btGEN_List {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btGEN_List(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGEN_List obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGEN_List(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btGEN_List() {
-    this(gdxBulletJNI.new_btGEN_List(), true);
-  }
-
-  public btGEN_Link getHead() {
-    long cPtr = gdxBulletJNI.btGEN_List_getHead(swigCPtr, this);
-    return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
-  }
-
-  public btGEN_Link getTail() {
-    long cPtr = gdxBulletJNI.btGEN_List_getTail(swigCPtr, this);
-    return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
-  }
-
-  public void addHead(btGEN_Link link) {
-    gdxBulletJNI.btGEN_List_addHead(swigCPtr, this, btGEN_Link.getCPtr(link), link);
-  }
-
-  public void addTail(btGEN_Link link) {
-    gdxBulletJNI.btGEN_List_addTail(swigCPtr, this, btGEN_Link.getCPtr(link), link);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btGEN_List (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGEN_List obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGEN_List(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btGEN_List () {
+               this(gdxBulletJNI.new_btGEN_List(), true);
+       }
+
+       public btGEN_Link getHead () {
+               long cPtr = gdxBulletJNI.btGEN_List_getHead(swigCPtr, this);
+               return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
+       }
+
+       public btGEN_Link getTail () {
+               long cPtr = gdxBulletJNI.btGEN_List_getTail(swigCPtr, this);
+               return (cPtr == 0) ? null : new btGEN_Link(cPtr, false);
+       }
+
+       public void addHead (btGEN_Link link) {
+               gdxBulletJNI.btGEN_List_addHead(swigCPtr, this, btGEN_Link.getCPtr(link), link);
+       }
+
+       public void addTail (btGEN_Link link) {
+               gdxBulletJNI.btGEN_List_addTail(swigCPtr, this, btGEN_Link.getCPtr(link), link);
+       }
 
 }
index a83fa0d..9018322 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btGeneric6DofConstraint extends btTypedConstraint {
-  private long swigCPtr;
-
-  protected btGeneric6DofConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btGeneric6DofConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGeneric6DofConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGeneric6DofConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_useSolveConstraintObsolete(boolean value) {
-    gdxBulletJNI.btGeneric6DofConstraint_m_useSolveConstraintObsolete_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_useSolveConstraintObsolete() {
-    return gdxBulletJNI.btGeneric6DofConstraint_m_useSolveConstraintObsolete_get(swigCPtr, this);
-  }
-
-  public btGeneric6DofConstraint(btRigidBody rbA, btRigidBody rbB, btTransform frameInA, btTransform frameInB, boolean useLinearReferenceFrameA) {
-    this(gdxBulletJNI.new_btGeneric6DofConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInA), frameInA, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameA), true);
-  }
-
-  public btGeneric6DofConstraint(btRigidBody rbB, btTransform frameInB, boolean useLinearReferenceFrameB) {
-    this(gdxBulletJNI.new_btGeneric6DofConstraint__SWIG_1(btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameB), true);
-  }
-
-  public void calculateTransforms(btTransform transA, btTransform transB) {
-    gdxBulletJNI.btGeneric6DofConstraint_calculateTransforms__SWIG_0(swigCPtr, this, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB);
-  }
-
-  public void calculateTransforms() {
-    gdxBulletJNI.btGeneric6DofConstraint_calculateTransforms__SWIG_1(swigCPtr, this);
-  }
-
-  public btTransform getCalculatedTransformA() {
-    return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getCalculatedTransformA(swigCPtr, this), false);
-  }
-
-  public btTransform getCalculatedTransformB() {
-    return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getCalculatedTransformB(swigCPtr, this), false);
-  }
-
-  public btTransform getFrameOffsetA() {
-    return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getFrameOffsetA__SWIG_0(swigCPtr, this), false);
-  }
-
-  public btTransform getFrameOffsetB() {
-    return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getFrameOffsetB__SWIG_0(swigCPtr, this), false);
-  }
-
-  public void getInfo1NonVirtual(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
-    gdxBulletJNI.btGeneric6DofConstraint_getInfo1NonVirtual(swigCPtr, this, SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
-  }
-
-  public void getInfo2NonVirtual(btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 linVelA, Vector3 linVelB, Vector3 angVelA, Vector3 angVelB) {
-    gdxBulletJNI.btGeneric6DofConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, linVelA, linVelB, angVelA, angVelB);
-  }
-
-  public void updateRHS(float timeStep) {
-    gdxBulletJNI.btGeneric6DofConstraint_updateRHS(swigCPtr, this, timeStep);
-  }
-
-  public Vector3 getAxis(int axis_index) {
-       return gdxBulletJNI.btGeneric6DofConstraint_getAxis(swigCPtr, this, axis_index);
-}
-
-  public float getAngle(int axis_index) {
-    return gdxBulletJNI.btGeneric6DofConstraint_getAngle(swigCPtr, this, axis_index);
-  }
-
-  public float getRelativePivotPosition(int axis_index) {
-    return gdxBulletJNI.btGeneric6DofConstraint_getRelativePivotPosition(swigCPtr, this, axis_index);
-  }
-
-  public void setFrames(btTransform frameA, btTransform frameB) {
-    gdxBulletJNI.btGeneric6DofConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA, btTransform.getCPtr(frameB), frameB);
-  }
-
-  public boolean testAngularLimitMotor(int axis_index) {
-    return gdxBulletJNI.btGeneric6DofConstraint_testAngularLimitMotor(swigCPtr, this, axis_index);
-  }
-
-  public void setLinearLowerLimit(Vector3 linearLower) {
-    gdxBulletJNI.btGeneric6DofConstraint_setLinearLowerLimit(swigCPtr, this, linearLower);
-  }
-
-  public void getLinearLowerLimit(Vector3 linearLower) {
-    gdxBulletJNI.btGeneric6DofConstraint_getLinearLowerLimit(swigCPtr, this, linearLower);
-  }
-
-  public void setLinearUpperLimit(Vector3 linearUpper) {
-    gdxBulletJNI.btGeneric6DofConstraint_setLinearUpperLimit(swigCPtr, this, linearUpper);
-  }
-
-  public void getLinearUpperLimit(Vector3 linearUpper) {
-    gdxBulletJNI.btGeneric6DofConstraint_getLinearUpperLimit(swigCPtr, this, linearUpper);
-  }
-
-  public void setAngularLowerLimit(Vector3 angularLower) {
-    gdxBulletJNI.btGeneric6DofConstraint_setAngularLowerLimit(swigCPtr, this, angularLower);
-  }
-
-  public void getAngularLowerLimit(Vector3 angularLower) {
-    gdxBulletJNI.btGeneric6DofConstraint_getAngularLowerLimit(swigCPtr, this, angularLower);
-  }
-
-  public void setAngularUpperLimit(Vector3 angularUpper) {
-    gdxBulletJNI.btGeneric6DofConstraint_setAngularUpperLimit(swigCPtr, this, angularUpper);
-  }
-
-  public void getAngularUpperLimit(Vector3 angularUpper) {
-    gdxBulletJNI.btGeneric6DofConstraint_getAngularUpperLimit(swigCPtr, this, angularUpper);
-  }
-
-  public btRotationalLimitMotor getRotationalLimitMotor(int index) {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraint_getRotationalLimitMotor(swigCPtr, this, index);
-    return (cPtr == 0) ? null : new btRotationalLimitMotor(cPtr, false);
-  }
-
-  public btTranslationalLimitMotor getTranslationalLimitMotor() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraint_getTranslationalLimitMotor(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTranslationalLimitMotor(cPtr, false);
-  }
-
-  public void setLimit(int axis, float lo, float hi) {
-    gdxBulletJNI.btGeneric6DofConstraint_setLimit(swigCPtr, this, axis, lo, hi);
-  }
-
-  public boolean isLimited(int limitIndex) {
-    return gdxBulletJNI.btGeneric6DofConstraint_isLimited(swigCPtr, this, limitIndex);
-  }
-
-  public void calcAnchorPos() {
-    gdxBulletJNI.btGeneric6DofConstraint_calcAnchorPos(swigCPtr, this);
-  }
-
-  public int get_limit_motor_info2(btRotationalLimitMotor limot, btTransform transA, btTransform transB, Vector3 linVelA, Vector3 linVelB, Vector3 angVelA, Vector3 angVelB, btConstraintInfo2 info, int row, Vector3 ax1, int rotational, int rotAllowed) {
-    return gdxBulletJNI.btGeneric6DofConstraint_get_limit_motor_info2__SWIG_0(swigCPtr, this, btRotationalLimitMotor.getCPtr(limot), limot, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, linVelA, linVelB, angVelA, angVelB, btConstraintInfo2.getCPtr(info), info, row, ax1, rotational, rotAllowed);
-  }
-
-  public int get_limit_motor_info2(btRotationalLimitMotor limot, btTransform transA, btTransform transB, Vector3 linVelA, Vector3 linVelB, Vector3 angVelA, Vector3 angVelB, btConstraintInfo2 info, int row, Vector3 ax1, int rotational) {
-    return gdxBulletJNI.btGeneric6DofConstraint_get_limit_motor_info2__SWIG_1(swigCPtr, this, btRotationalLimitMotor.getCPtr(limot), limot, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, linVelA, linVelB, angVelA, angVelB, btConstraintInfo2.getCPtr(info), info, row, ax1, rotational);
-  }
-
-  public boolean getUseFrameOffset() {
-    return gdxBulletJNI.btGeneric6DofConstraint_getUseFrameOffset(swigCPtr, this);
-  }
-
-  public void setUseFrameOffset(boolean frameOffsetOnOff) {
-    gdxBulletJNI.btGeneric6DofConstraint_setUseFrameOffset(swigCPtr, this, frameOffsetOnOff);
-  }
-
-  public void setParam(int num, float value, int axis) {
-    gdxBulletJNI.btGeneric6DofConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
-  }
-
-  public void setParam(int num, float value) {
-    gdxBulletJNI.btGeneric6DofConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
-  }
-
-  public float getParam(int num, int axis) {
-    return gdxBulletJNI.btGeneric6DofConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
-  }
-
-  public float getParam(int num) {
-    return gdxBulletJNI.btGeneric6DofConstraint_getParam__SWIG_1(swigCPtr, this, num);
-  }
-
-  public void setAxis(Vector3 axis1, Vector3 axis2) {
-    gdxBulletJNI.btGeneric6DofConstraint_setAxis(swigCPtr, this, axis1, axis2);
-  }
+       private long swigCPtr;
+
+       protected btGeneric6DofConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btGeneric6DofConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGeneric6DofConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGeneric6DofConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_useSolveConstraintObsolete (boolean value) {
+               gdxBulletJNI.btGeneric6DofConstraint_m_useSolveConstraintObsolete_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_useSolveConstraintObsolete () {
+               return gdxBulletJNI.btGeneric6DofConstraint_m_useSolveConstraintObsolete_get(swigCPtr, this);
+       }
+
+       public btGeneric6DofConstraint (btRigidBody rbA, btRigidBody rbB, btTransform frameInA, btTransform frameInB,
+               boolean useLinearReferenceFrameA) {
+               this(gdxBulletJNI.new_btGeneric6DofConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB,
+                       btTransform.getCPtr(frameInA), frameInA, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameA), true);
+       }
+
+       public btGeneric6DofConstraint (btRigidBody rbB, btTransform frameInB, boolean useLinearReferenceFrameB) {
+               this(gdxBulletJNI.new_btGeneric6DofConstraint__SWIG_1(btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInB),
+                       frameInB, useLinearReferenceFrameB), true);
+       }
+
+       public void calculateTransforms (btTransform transA, btTransform transB) {
+               gdxBulletJNI.btGeneric6DofConstraint_calculateTransforms__SWIG_0(swigCPtr, this, btTransform.getCPtr(transA), transA,
+                       btTransform.getCPtr(transB), transB);
+       }
+
+       public void calculateTransforms () {
+               gdxBulletJNI.btGeneric6DofConstraint_calculateTransforms__SWIG_1(swigCPtr, this);
+       }
+
+       public btTransform getCalculatedTransformA () {
+               return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getCalculatedTransformA(swigCPtr, this), false);
+       }
+
+       public btTransform getCalculatedTransformB () {
+               return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getCalculatedTransformB(swigCPtr, this), false);
+       }
+
+       public btTransform getFrameOffsetA () {
+               return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getFrameOffsetA__SWIG_0(swigCPtr, this), false);
+       }
+
+       public btTransform getFrameOffsetB () {
+               return new btTransform(gdxBulletJNI.btGeneric6DofConstraint_getFrameOffsetB__SWIG_0(swigCPtr, this), false);
+       }
+
+       public void getInfo1NonVirtual (SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
+               gdxBulletJNI.btGeneric6DofConstraint_getInfo1NonVirtual(swigCPtr, this,
+                       SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
+       }
+
+       public void getInfo2NonVirtual (btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 linVelA,
+               Vector3 linVelB, Vector3 angVelA, Vector3 angVelB) {
+               gdxBulletJNI.btGeneric6DofConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info,
+                       btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, linVelA, linVelB, angVelA, angVelB);
+       }
+
+       public void updateRHS (float timeStep) {
+               gdxBulletJNI.btGeneric6DofConstraint_updateRHS(swigCPtr, this, timeStep);
+       }
+
+       public Vector3 getAxis (int axis_index) {
+               return gdxBulletJNI.btGeneric6DofConstraint_getAxis(swigCPtr, this, axis_index);
+       }
+
+       public float getAngle (int axis_index) {
+               return gdxBulletJNI.btGeneric6DofConstraint_getAngle(swigCPtr, this, axis_index);
+       }
+
+       public float getRelativePivotPosition (int axis_index) {
+               return gdxBulletJNI.btGeneric6DofConstraint_getRelativePivotPosition(swigCPtr, this, axis_index);
+       }
+
+       public void setFrames (btTransform frameA, btTransform frameB) {
+               gdxBulletJNI.btGeneric6DofConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA,
+                       btTransform.getCPtr(frameB), frameB);
+       }
+
+       public boolean testAngularLimitMotor (int axis_index) {
+               return gdxBulletJNI.btGeneric6DofConstraint_testAngularLimitMotor(swigCPtr, this, axis_index);
+       }
+
+       public void setLinearLowerLimit (Vector3 linearLower) {
+               gdxBulletJNI.btGeneric6DofConstraint_setLinearLowerLimit(swigCPtr, this, linearLower);
+       }
+
+       public void getLinearLowerLimit (Vector3 linearLower) {
+               gdxBulletJNI.btGeneric6DofConstraint_getLinearLowerLimit(swigCPtr, this, linearLower);
+       }
+
+       public void setLinearUpperLimit (Vector3 linearUpper) {
+               gdxBulletJNI.btGeneric6DofConstraint_setLinearUpperLimit(swigCPtr, this, linearUpper);
+       }
+
+       public void getLinearUpperLimit (Vector3 linearUpper) {
+               gdxBulletJNI.btGeneric6DofConstraint_getLinearUpperLimit(swigCPtr, this, linearUpper);
+       }
+
+       public void setAngularLowerLimit (Vector3 angularLower) {
+               gdxBulletJNI.btGeneric6DofConstraint_setAngularLowerLimit(swigCPtr, this, angularLower);
+       }
+
+       public void getAngularLowerLimit (Vector3 angularLower) {
+               gdxBulletJNI.btGeneric6DofConstraint_getAngularLowerLimit(swigCPtr, this, angularLower);
+       }
+
+       public void setAngularUpperLimit (Vector3 angularUpper) {
+               gdxBulletJNI.btGeneric6DofConstraint_setAngularUpperLimit(swigCPtr, this, angularUpper);
+       }
+
+       public void getAngularUpperLimit (Vector3 angularUpper) {
+               gdxBulletJNI.btGeneric6DofConstraint_getAngularUpperLimit(swigCPtr, this, angularUpper);
+       }
+
+       public btRotationalLimitMotor getRotationalLimitMotor (int index) {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraint_getRotationalLimitMotor(swigCPtr, this, index);
+               return (cPtr == 0) ? null : new btRotationalLimitMotor(cPtr, false);
+       }
+
+       public btTranslationalLimitMotor getTranslationalLimitMotor () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraint_getTranslationalLimitMotor(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTranslationalLimitMotor(cPtr, false);
+       }
+
+       public void setLimit (int axis, float lo, float hi) {
+               gdxBulletJNI.btGeneric6DofConstraint_setLimit(swigCPtr, this, axis, lo, hi);
+       }
+
+       public boolean isLimited (int limitIndex) {
+               return gdxBulletJNI.btGeneric6DofConstraint_isLimited(swigCPtr, this, limitIndex);
+       }
+
+       public void calcAnchorPos () {
+               gdxBulletJNI.btGeneric6DofConstraint_calcAnchorPos(swigCPtr, this);
+       }
+
+       public int get_limit_motor_info2 (btRotationalLimitMotor limot, btTransform transA, btTransform transB, Vector3 linVelA,
+               Vector3 linVelB, Vector3 angVelA, Vector3 angVelB, btConstraintInfo2 info, int row, Vector3 ax1, int rotational,
+               int rotAllowed) {
+               return gdxBulletJNI.btGeneric6DofConstraint_get_limit_motor_info2__SWIG_0(swigCPtr, this,
+                       btRotationalLimitMotor.getCPtr(limot), limot, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB,
+                       linVelA, linVelB, angVelA, angVelB, btConstraintInfo2.getCPtr(info), info, row, ax1, rotational, rotAllowed);
+       }
+
+       public int get_limit_motor_info2 (btRotationalLimitMotor limot, btTransform transA, btTransform transB, Vector3 linVelA,
+               Vector3 linVelB, Vector3 angVelA, Vector3 angVelB, btConstraintInfo2 info, int row, Vector3 ax1, int rotational) {
+               return gdxBulletJNI.btGeneric6DofConstraint_get_limit_motor_info2__SWIG_1(swigCPtr, this,
+                       btRotationalLimitMotor.getCPtr(limot), limot, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB,
+                       linVelA, linVelB, angVelA, angVelB, btConstraintInfo2.getCPtr(info), info, row, ax1, rotational);
+       }
+
+       public boolean getUseFrameOffset () {
+               return gdxBulletJNI.btGeneric6DofConstraint_getUseFrameOffset(swigCPtr, this);
+       }
+
+       public void setUseFrameOffset (boolean frameOffsetOnOff) {
+               gdxBulletJNI.btGeneric6DofConstraint_setUseFrameOffset(swigCPtr, this, frameOffsetOnOff);
+       }
+
+       public void setParam (int num, float value, int axis) {
+               gdxBulletJNI.btGeneric6DofConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
+       }
+
+       public void setParam (int num, float value) {
+               gdxBulletJNI.btGeneric6DofConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
+       }
+
+       public float getParam (int num, int axis) {
+               return gdxBulletJNI.btGeneric6DofConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
+       }
+
+       public float getParam (int num) {
+               return gdxBulletJNI.btGeneric6DofConstraint_getParam__SWIG_1(swigCPtr, this, num);
+       }
+
+       public void setAxis (Vector3 axis1, Vector3 axis2) {
+               gdxBulletJNI.btGeneric6DofConstraint_setAxis(swigCPtr, this, axis1, axis2);
+       }
 
 }
index 67ca250..ee86c50 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btGeneric6DofConstraintData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btGeneric6DofConstraintData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGeneric6DofConstraintData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGeneric6DofConstraintData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_typeConstraintData(btTypedConstraintData value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
-  }
-
-  public btTypedConstraintData getM_typeConstraintData() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_typeConstraintData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
-  }
-
-  public void setM_rbAFrame(btTransformFloatData value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbAFrame() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_rbAFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_rbBFrame(btTransformFloatData value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbBFrame() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_rbBFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_linearUpperLimit(btVector3FloatData value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_linearUpperLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_linearUpperLimit() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_linearUpperLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_linearLowerLimit(btVector3FloatData value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_linearLowerLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_linearLowerLimit() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_linearLowerLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_angularUpperLimit(btVector3FloatData value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_angularUpperLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_angularUpperLimit() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_angularUpperLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_angularLowerLimit(btVector3FloatData value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_angularLowerLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_angularLowerLimit() {
-    long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_angularLowerLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_useLinearReferenceFrameA(int value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_useLinearReferenceFrameA_set(swigCPtr, this, value);
-  }
-
-  public int getM_useLinearReferenceFrameA() {
-    return gdxBulletJNI.btGeneric6DofConstraintData_m_useLinearReferenceFrameA_get(swigCPtr, this);
-  }
-
-  public void setM_useOffsetForConstraintFrame(int value) {
-    gdxBulletJNI.btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_set(swigCPtr, this, value);
-  }
-
-  public int getM_useOffsetForConstraintFrame() {
-    return gdxBulletJNI.btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_get(swigCPtr, this);
-  }
-
-  public btGeneric6DofConstraintData() {
-    this(gdxBulletJNI.new_btGeneric6DofConstraintData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btGeneric6DofConstraintData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGeneric6DofConstraintData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGeneric6DofConstraintData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_typeConstraintData (btTypedConstraintData value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value),
+                       value);
+       }
+
+       public btTypedConstraintData getM_typeConstraintData () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_typeConstraintData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
+       }
+
+       public void setM_rbAFrame (btTransformFloatData value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbAFrame () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_rbAFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_rbBFrame (btTransformFloatData value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbBFrame () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_rbBFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_linearUpperLimit (btVector3FloatData value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_linearUpperLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_linearUpperLimit () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_linearUpperLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_linearLowerLimit (btVector3FloatData value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_linearLowerLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_linearLowerLimit () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_linearLowerLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_angularUpperLimit (btVector3FloatData value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_angularUpperLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_angularUpperLimit () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_angularUpperLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_angularLowerLimit (btVector3FloatData value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_angularLowerLimit_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_angularLowerLimit () {
+               long cPtr = gdxBulletJNI.btGeneric6DofConstraintData_m_angularLowerLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_useLinearReferenceFrameA (int value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_useLinearReferenceFrameA_set(swigCPtr, this, value);
+       }
+
+       public int getM_useLinearReferenceFrameA () {
+               return gdxBulletJNI.btGeneric6DofConstraintData_m_useLinearReferenceFrameA_get(swigCPtr, this);
+       }
+
+       public void setM_useOffsetForConstraintFrame (int value) {
+               gdxBulletJNI.btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_set(swigCPtr, this, value);
+       }
+
+       public int getM_useOffsetForConstraintFrame () {
+               return gdxBulletJNI.btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_get(swigCPtr, this);
+       }
+
+       public btGeneric6DofConstraintData () {
+               this(gdxBulletJNI.new_btGeneric6DofConstraintData(), true);
+       }
 
 }
index 2d726da..9ecc019 100644 (file)
@@ -9,70 +9,71 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btGeneric6DofSpringConstraint extends btGeneric6DofConstraint {
-  private long swigCPtr;
-
-  protected btGeneric6DofSpringConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btGeneric6DofSpringConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGeneric6DofSpringConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGeneric6DofSpringConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btGeneric6DofSpringConstraint(btRigidBody rbA, btRigidBody rbB, btTransform frameInA, btTransform frameInB, boolean useLinearReferenceFrameA) {
-    this(gdxBulletJNI.new_btGeneric6DofSpringConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInA), frameInA, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameA), true);
-  }
-
-  public btGeneric6DofSpringConstraint(btRigidBody rbB, btTransform frameInB, boolean useLinearReferenceFrameB) {
-    this(gdxBulletJNI.new_btGeneric6DofSpringConstraint__SWIG_1(btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameB), true);
-  }
-
-  public void enableSpring(int index, boolean onOff) {
-    gdxBulletJNI.btGeneric6DofSpringConstraint_enableSpring(swigCPtr, this, index, onOff);
-  }
-
-  public void setStiffness(int index, float stiffness) {
-    gdxBulletJNI.btGeneric6DofSpringConstraint_setStiffness(swigCPtr, this, index, stiffness);
-  }
-
-  public void setDamping(int index, float damping) {
-    gdxBulletJNI.btGeneric6DofSpringConstraint_setDamping(swigCPtr, this, index, damping);
-  }
-
-  public void setEquilibriumPoint() {
-    gdxBulletJNI.btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_0(swigCPtr, this);
-  }
-
-  public void setEquilibriumPoint(int index) {
-    gdxBulletJNI.btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_1(swigCPtr, this, index);
-  }
-
-  public void setEquilibriumPoint(int index, float val) {
-    gdxBulletJNI.btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_2(swigCPtr, this, index, val);
-  }
-
-  public void setAxis(Vector3 axis1, Vector3 axis2) {
-    gdxBulletJNI.btGeneric6DofSpringConstraint_setAxis(swigCPtr, this, axis1, axis2);
-  }
+       private long swigCPtr;
+
+       protected btGeneric6DofSpringConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btGeneric6DofSpringConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGeneric6DofSpringConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGeneric6DofSpringConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btGeneric6DofSpringConstraint (btRigidBody rbA, btRigidBody rbB, btTransform frameInA, btTransform frameInB,
+               boolean useLinearReferenceFrameA) {
+               this(gdxBulletJNI.new_btGeneric6DofSpringConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB,
+                       btTransform.getCPtr(frameInA), frameInA, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameA), true);
+       }
+
+       public btGeneric6DofSpringConstraint (btRigidBody rbB, btTransform frameInB, boolean useLinearReferenceFrameB) {
+               this(gdxBulletJNI.new_btGeneric6DofSpringConstraint__SWIG_1(btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInB),
+                       frameInB, useLinearReferenceFrameB), true);
+       }
+
+       public void enableSpring (int index, boolean onOff) {
+               gdxBulletJNI.btGeneric6DofSpringConstraint_enableSpring(swigCPtr, this, index, onOff);
+       }
+
+       public void setStiffness (int index, float stiffness) {
+               gdxBulletJNI.btGeneric6DofSpringConstraint_setStiffness(swigCPtr, this, index, stiffness);
+       }
+
+       public void setDamping (int index, float damping) {
+               gdxBulletJNI.btGeneric6DofSpringConstraint_setDamping(swigCPtr, this, index, damping);
+       }
+
+       public void setEquilibriumPoint () {
+               gdxBulletJNI.btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_0(swigCPtr, this);
+       }
+
+       public void setEquilibriumPoint (int index) {
+               gdxBulletJNI.btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_1(swigCPtr, this, index);
+       }
+
+       public void setEquilibriumPoint (int index, float val) {
+               gdxBulletJNI.btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_2(swigCPtr, this, index, val);
+       }
+
+       public void setAxis (Vector3 axis1, Vector3 axis2) {
+               gdxBulletJNI.btGeneric6DofSpringConstraint_setAxis(swigCPtr, this, axis1, axis2);
+       }
 
 }
index 255e893..3848e04 100644 (file)
@@ -8,80 +8,77 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btGeneric6DofSpringConstraintData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btGeneric6DofSpringConstraintData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGeneric6DofSpringConstraintData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGeneric6DofSpringConstraintData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_6dofData(btGeneric6DofConstraintData value) {
-    gdxBulletJNI.btGeneric6DofSpringConstraintData_m_6dofData_set(swigCPtr, this, btGeneric6DofConstraintData.getCPtr(value), value);
-  }
-
-  public btGeneric6DofConstraintData getM_6dofData() {
-    long cPtr = gdxBulletJNI.btGeneric6DofSpringConstraintData_m_6dofData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btGeneric6DofConstraintData(cPtr, false);
-  }
-
-  public void setM_springEnabled(int[] value) {
-    gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springEnabled_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_springEnabled() {
-    return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springEnabled_get(swigCPtr, this);
-  }
-
-  public void setM_equilibriumPoint(float[] value) {
-    gdxBulletJNI.btGeneric6DofSpringConstraintData_m_equilibriumPoint_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_equilibriumPoint() {
-    return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_equilibriumPoint_get(swigCPtr, this);
-  }
-
-  public void setM_springStiffness(float[] value) {
-    gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springStiffness_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_springStiffness() {
-    return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springStiffness_get(swigCPtr, this);
-  }
-
-  public void setM_springDamping(float[] value) {
-    gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springDamping_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_springDamping() {
-    return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springDamping_get(swigCPtr, this);
-  }
-
-  public btGeneric6DofSpringConstraintData() {
-    this(gdxBulletJNI.new_btGeneric6DofSpringConstraintData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btGeneric6DofSpringConstraintData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGeneric6DofSpringConstraintData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGeneric6DofSpringConstraintData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_6dofData (btGeneric6DofConstraintData value) {
+               gdxBulletJNI.btGeneric6DofSpringConstraintData_m_6dofData_set(swigCPtr, this, btGeneric6DofConstraintData.getCPtr(value),
+                       value);
+       }
+
+       public btGeneric6DofConstraintData getM_6dofData () {
+               long cPtr = gdxBulletJNI.btGeneric6DofSpringConstraintData_m_6dofData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btGeneric6DofConstraintData(cPtr, false);
+       }
+
+       public void setM_springEnabled (int[] value) {
+               gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springEnabled_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_springEnabled () {
+               return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springEnabled_get(swigCPtr, this);
+       }
+
+       public void setM_equilibriumPoint (float[] value) {
+               gdxBulletJNI.btGeneric6DofSpringConstraintData_m_equilibriumPoint_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_equilibriumPoint () {
+               return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_equilibriumPoint_get(swigCPtr, this);
+       }
+
+       public void setM_springStiffness (float[] value) {
+               gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springStiffness_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_springStiffness () {
+               return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springStiffness_get(swigCPtr, this);
+       }
+
+       public void setM_springDamping (float[] value) {
+               gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springDamping_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_springDamping () {
+               return gdxBulletJNI.btGeneric6DofSpringConstraintData_m_springDamping_get(swigCPtr, this);
+       }
+
+       public btGeneric6DofSpringConstraintData () {
+               this(gdxBulletJNI.new_btGeneric6DofSpringConstraintData(), true);
+       }
 
 }
index 950677c..d5e41d3 100644 (file)
@@ -9,58 +9,66 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btGeometryUtil {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btGeometryUtil(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btGeometryUtil (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btGeometryUtil obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btGeometryUtil obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGeometryUtil(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGeometryUtil(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public static void getPlaneEquationsFromVertices(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t vertices, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t planeEquationsOut) {
-    gdxBulletJNI.btGeometryUtil_getPlaneEquationsFromVertices(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(vertices), SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(planeEquationsOut));
-  }
+       public static void getPlaneEquationsFromVertices (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t vertices,
+               SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t planeEquationsOut) {
+               gdxBulletJNI.btGeometryUtil_getPlaneEquationsFromVertices(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(vertices),
+                       SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(planeEquationsOut));
+       }
 
-  public static void getVerticesFromPlaneEquations(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t planeEquations, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t verticesOut) {
-    gdxBulletJNI.btGeometryUtil_getVerticesFromPlaneEquations(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(planeEquations), SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(verticesOut));
-  }
+       public static void getVerticesFromPlaneEquations (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t planeEquations,
+               SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t verticesOut) {
+               gdxBulletJNI.btGeometryUtil_getVerticesFromPlaneEquations(
+                       SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(planeEquations),
+                       SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(verticesOut));
+       }
 
-  public static boolean isInside(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t vertices, Vector3 planeNormal, float margin) {
-    return gdxBulletJNI.btGeometryUtil_isInside(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(vertices), planeNormal, margin);
-  }
+       public static boolean isInside (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t vertices, Vector3 planeNormal, float margin) {
+               return gdxBulletJNI.btGeometryUtil_isInside(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(vertices), planeNormal,
+                       margin);
+       }
 
-  public static boolean isPointInsidePlanes(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t planeEquations, Vector3 point, float margin) {
-    return gdxBulletJNI.btGeometryUtil_isPointInsidePlanes(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(planeEquations), point, margin);
-  }
+       public static boolean isPointInsidePlanes (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t planeEquations, Vector3 point,
+               float margin) {
+               return gdxBulletJNI.btGeometryUtil_isPointInsidePlanes(
+                       SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(planeEquations), point, margin);
+       }
 
-  public static boolean areVerticesBehindPlane(Vector3 planeNormal, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t vertices, float margin) {
-    return gdxBulletJNI.btGeometryUtil_areVerticesBehindPlane(planeNormal, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(vertices), margin);
-  }
+       public static boolean areVerticesBehindPlane (Vector3 planeNormal, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t vertices,
+               float margin) {
+               return gdxBulletJNI.btGeometryUtil_areVerticesBehindPlane(planeNormal,
+                       SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(vertices), margin);
+       }
 
-  public btGeometryUtil() {
-    this(gdxBulletJNI.new_btGeometryUtil(), true);
-  }
+       public btGeometryUtil () {
+               this(gdxBulletJNI.new_btGeometryUtil(), true);
+       }
 
 }
index 02b5910..a649463 100644 (file)
@@ -9,84 +9,93 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btGhostObject extends btCollisionObject {
-  private long swigCPtr;
-
-  protected btGhostObject(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btGhostObject_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGhostObject obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGhostObject(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btGhostObject() {
-    this(gdxBulletJNI.new_btGhostObject(), true);
-  }
-
-  public void convexSweepTest(btConvexShape castShape, btTransform convexFromWorld, btTransform convexToWorld, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback, float allowedCcdPenetration) {
-    gdxBulletJNI.btGhostObject_convexSweepTest__SWIG_0(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, btTransform.getCPtr(convexFromWorld), convexFromWorld, btTransform.getCPtr(convexToWorld), convexToWorld, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback), allowedCcdPenetration);
-  }
-
-  public void convexSweepTest(btConvexShape castShape, btTransform convexFromWorld, btTransform convexToWorld, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback) {
-    gdxBulletJNI.btGhostObject_convexSweepTest__SWIG_1(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape, btTransform.getCPtr(convexFromWorld), convexFromWorld, btTransform.getCPtr(convexToWorld), convexToWorld, SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback));
-  }
-
-  public void rayTest(Vector3 rayFromWorld, Vector3 rayToWorld, SWIGTYPE_p_btCollisionWorld__RayResultCallback resultCallback) {
-    gdxBulletJNI.btGhostObject_rayTest(swigCPtr, this, rayFromWorld, rayToWorld, SWIGTYPE_p_btCollisionWorld__RayResultCallback.getCPtr(resultCallback));
-  }
-
-  public void addOverlappingObjectInternal(btBroadphaseProxy otherProxy, btBroadphaseProxy thisProxy) {
-    gdxBulletJNI.btGhostObject_addOverlappingObjectInternal__SWIG_0(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
-  }
-
-  public void addOverlappingObjectInternal(btBroadphaseProxy otherProxy) {
-    gdxBulletJNI.btGhostObject_addOverlappingObjectInternal__SWIG_1(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy);
-  }
-
-  public void removeOverlappingObjectInternal(btBroadphaseProxy otherProxy, btDispatcher dispatcher, btBroadphaseProxy thisProxy) {
-    gdxBulletJNI.btGhostObject_removeOverlappingObjectInternal__SWIG_0(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher, btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
-  }
-
-  public void removeOverlappingObjectInternal(btBroadphaseProxy otherProxy, btDispatcher dispatcher) {
-    gdxBulletJNI.btGhostObject_removeOverlappingObjectInternal__SWIG_1(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public int getNumOverlappingObjects() {
-    return gdxBulletJNI.btGhostObject_getNumOverlappingObjects(swigCPtr, this);
-  }
-
-  public btCollisionObject getOverlappingObject(int index) {
-    long cPtr = gdxBulletJNI.btGhostObject_getOverlappingObject__SWIG_0(swigCPtr, this, index);
-    return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
-  }
-
-  public btCollisionObjectArray getOverlappingPairs() {
-    return new btCollisionObjectArray(gdxBulletJNI.btGhostObject_getOverlappingPairs__SWIG_0(swigCPtr, this), false);
-  }
-
-  public static btGhostObject upcast(btCollisionObject colObj) {
-    long cPtr = gdxBulletJNI.btGhostObject_upcast__SWIG_0(btCollisionObject.getCPtr(colObj), colObj);
-    return (cPtr == 0) ? null : new btGhostObject(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btGhostObject (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btGhostObject_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGhostObject obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGhostObject(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btGhostObject () {
+               this(gdxBulletJNI.new_btGhostObject(), true);
+       }
+
+       public void convexSweepTest (btConvexShape castShape, btTransform convexFromWorld, btTransform convexToWorld,
+               SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback, float allowedCcdPenetration) {
+               gdxBulletJNI.btGhostObject_convexSweepTest__SWIG_0(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape,
+                       btTransform.getCPtr(convexFromWorld), convexFromWorld, btTransform.getCPtr(convexToWorld), convexToWorld,
+                       SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback), allowedCcdPenetration);
+       }
+
+       public void convexSweepTest (btConvexShape castShape, btTransform convexFromWorld, btTransform convexToWorld,
+               SWIGTYPE_p_btCollisionWorld__ConvexResultCallback resultCallback) {
+               gdxBulletJNI.btGhostObject_convexSweepTest__SWIG_1(swigCPtr, this, btConvexShape.getCPtr(castShape), castShape,
+                       btTransform.getCPtr(convexFromWorld), convexFromWorld, btTransform.getCPtr(convexToWorld), convexToWorld,
+                       SWIGTYPE_p_btCollisionWorld__ConvexResultCallback.getCPtr(resultCallback));
+       }
+
+       public void rayTest (Vector3 rayFromWorld, Vector3 rayToWorld, SWIGTYPE_p_btCollisionWorld__RayResultCallback resultCallback) {
+               gdxBulletJNI.btGhostObject_rayTest(swigCPtr, this, rayFromWorld, rayToWorld,
+                       SWIGTYPE_p_btCollisionWorld__RayResultCallback.getCPtr(resultCallback));
+       }
+
+       public void addOverlappingObjectInternal (btBroadphaseProxy otherProxy, btBroadphaseProxy thisProxy) {
+               gdxBulletJNI.btGhostObject_addOverlappingObjectInternal__SWIG_0(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy),
+                       otherProxy, btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
+       }
+
+       public void addOverlappingObjectInternal (btBroadphaseProxy otherProxy) {
+               gdxBulletJNI.btGhostObject_addOverlappingObjectInternal__SWIG_1(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy),
+                       otherProxy);
+       }
+
+       public void removeOverlappingObjectInternal (btBroadphaseProxy otherProxy, btDispatcher dispatcher, btBroadphaseProxy thisProxy) {
+               gdxBulletJNI.btGhostObject_removeOverlappingObjectInternal__SWIG_0(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy),
+                       otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher, btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
+       }
+
+       public void removeOverlappingObjectInternal (btBroadphaseProxy otherProxy, btDispatcher dispatcher) {
+               gdxBulletJNI.btGhostObject_removeOverlappingObjectInternal__SWIG_1(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy),
+                       otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public int getNumOverlappingObjects () {
+               return gdxBulletJNI.btGhostObject_getNumOverlappingObjects(swigCPtr, this);
+       }
+
+       public btCollisionObject getOverlappingObject (int index) {
+               long cPtr = gdxBulletJNI.btGhostObject_getOverlappingObject__SWIG_0(swigCPtr, this, index);
+               return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
+       }
+
+       public btCollisionObjectArray getOverlappingPairs () {
+               return new btCollisionObjectArray(gdxBulletJNI.btGhostObject_getOverlappingPairs__SWIG_0(swigCPtr, this), false);
+       }
+
+       public static btGhostObject upcast (btCollisionObject colObj) {
+               long cPtr = gdxBulletJNI.btGhostObject_upcast__SWIG_0(btCollisionObject.getCPtr(colObj), colObj);
+               return (cPtr == 0) ? null : new btGhostObject(cPtr, false);
+       }
 
 }
index dffdc37..818c978 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btGhostPairCallback extends btOverlappingPairCallback {
-  private long swigCPtr;
-
-  protected btGhostPairCallback(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btGhostPairCallback_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGhostPairCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGhostPairCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btGhostPairCallback() {
-    this(gdxBulletJNI.new_btGhostPairCallback(), true);
-  }
+       private long swigCPtr;
+
+       protected btGhostPairCallback (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btGhostPairCallback_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGhostPairCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGhostPairCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btGhostPairCallback () {
+               this(gdxBulletJNI.new_btGhostPairCallback(), true);
+       }
 
 }
index 8d67562..70021a8 100644 (file)
@@ -8,39 +8,36 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btGjkConvexCast extends btConvexCast {
-  private long swigCPtr;
-
-  protected btGjkConvexCast(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btGjkConvexCast_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGjkConvexCast obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGjkConvexCast(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btGjkConvexCast(btConvexShape convexA, btConvexShape convexB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver) {
-    this(gdxBulletJNI.new_btGjkConvexCast(btConvexShape.getCPtr(convexA), convexA, btConvexShape.getCPtr(convexB), convexB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver)), true);
-  }
+       private long swigCPtr;
+
+       protected btGjkConvexCast (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btGjkConvexCast_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGjkConvexCast obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGjkConvexCast(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btGjkConvexCast (btConvexShape convexA, btConvexShape convexB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver) {
+               this(gdxBulletJNI.new_btGjkConvexCast(btConvexShape.getCPtr(convexA), convexA, btConvexShape.getCPtr(convexB), convexB,
+                       SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver)), true);
+       }
 
 }
index 566d573..6b0ea02 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btGjkEpaPenetrationDepthSolver extends btConvexPenetrationDepthSolver {
-  private long swigCPtr;
-
-  protected btGjkEpaPenetrationDepthSolver(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btGjkEpaPenetrationDepthSolver_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGjkEpaPenetrationDepthSolver obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGjkEpaPenetrationDepthSolver(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btGjkEpaPenetrationDepthSolver() {
-    this(gdxBulletJNI.new_btGjkEpaPenetrationDepthSolver(), true);
-  }
+       private long swigCPtr;
+
+       protected btGjkEpaPenetrationDepthSolver (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btGjkEpaPenetrationDepthSolver_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGjkEpaPenetrationDepthSolver obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGjkEpaPenetrationDepthSolver(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btGjkEpaPenetrationDepthSolver () {
+               this(gdxBulletJNI.new_btGjkEpaPenetrationDepthSolver(), true);
+       }
 
 }
index 47caefb..89e9b51 100644 (file)
@@ -9,62 +9,74 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btGjkEpaSolver2 {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btGjkEpaSolver2(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btGjkEpaSolver2 (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btGjkEpaSolver2 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btGjkEpaSolver2 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGjkEpaSolver2(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGjkEpaSolver2(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public static int StackSizeRequirement() {
-    return gdxBulletJNI.btGjkEpaSolver2_StackSizeRequirement();
-  }
+       public static int StackSizeRequirement () {
+               return gdxBulletJNI.btGjkEpaSolver2_StackSizeRequirement();
+       }
 
-  public static boolean Distance(btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1, Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
-    return gdxBulletJNI.btGjkEpaSolver2_Distance(btConvexShape.getCPtr(shape0), shape0, btTransform.getCPtr(wtrs0), wtrs0, btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess, SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
-  }
+       public static boolean Distance (btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1,
+               Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
+               return gdxBulletJNI.btGjkEpaSolver2_Distance(btConvexShape.getCPtr(shape0), shape0, btTransform.getCPtr(wtrs0), wtrs0,
+                       btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess,
+                       SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
+       }
 
-  public static boolean Penetration(btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1, Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results, boolean usemargins) {
-    return gdxBulletJNI.btGjkEpaSolver2_Penetration__SWIG_0(btConvexShape.getCPtr(shape0), shape0, btTransform.getCPtr(wtrs0), wtrs0, btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess, SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results), usemargins);
-  }
+       public static boolean Penetration (btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1,
+               Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results, boolean usemargins) {
+               return gdxBulletJNI.btGjkEpaSolver2_Penetration__SWIG_0(btConvexShape.getCPtr(shape0), shape0, btTransform.getCPtr(wtrs0),
+                       wtrs0, btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess,
+                       SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results), usemargins);
+       }
 
-  public static boolean Penetration(btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1, Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
-    return gdxBulletJNI.btGjkEpaSolver2_Penetration__SWIG_1(btConvexShape.getCPtr(shape0), shape0, btTransform.getCPtr(wtrs0), wtrs0, btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess, SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
-  }
+       public static boolean Penetration (btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1,
+               Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
+               return gdxBulletJNI.btGjkEpaSolver2_Penetration__SWIG_1(btConvexShape.getCPtr(shape0), shape0, btTransform.getCPtr(wtrs0),
+                       wtrs0, btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess,
+                       SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
+       }
 
-  public static float SignedDistance(Vector3 position, float margin, btConvexShape shape, btTransform wtrs, SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
-    return gdxBulletJNI.btGjkEpaSolver2_SignedDistance__SWIG_0(position, margin, btConvexShape.getCPtr(shape), shape, btTransform.getCPtr(wtrs), wtrs, SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
-  }
+       public static float SignedDistance (Vector3 position, float margin, btConvexShape shape, btTransform wtrs,
+               SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
+               return gdxBulletJNI.btGjkEpaSolver2_SignedDistance__SWIG_0(position, margin, btConvexShape.getCPtr(shape), shape,
+                       btTransform.getCPtr(wtrs), wtrs, SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
+       }
 
-  public static boolean SignedDistance(btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1, Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
-    return gdxBulletJNI.btGjkEpaSolver2_SignedDistance__SWIG_1(btConvexShape.getCPtr(shape0), shape0, btTransform.getCPtr(wtrs0), wtrs0, btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess, SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
-  }
+       public static boolean SignedDistance (btConvexShape shape0, btTransform wtrs0, btConvexShape shape1, btTransform wtrs1,
+               Vector3 guess, SWIGTYPE_p_btGjkEpaSolver2__sResults results) {
+               return gdxBulletJNI.btGjkEpaSolver2_SignedDistance__SWIG_1(btConvexShape.getCPtr(shape0), shape0,
+                       btTransform.getCPtr(wtrs0), wtrs0, btConvexShape.getCPtr(shape1), shape1, btTransform.getCPtr(wtrs1), wtrs1, guess,
+                       SWIGTYPE_p_btGjkEpaSolver2__sResults.getCPtr(results));
+       }
 
-  public btGjkEpaSolver2() {
-    this(gdxBulletJNI.new_btGjkEpaSolver2(), true);
-  }
+       public btGjkEpaSolver2 () {
+               this(gdxBulletJNI.new_btGjkEpaSolver2(), true);
+       }
 
 }
index 106fe9d..955bcf0 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btGjkPairDetector {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btGjkPairDetector(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btGjkPairDetector obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btGjkPairDetector(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_lastUsedMethod(int value) {
-    gdxBulletJNI.btGjkPairDetector_m_lastUsedMethod_set(swigCPtr, this, value);
-  }
-
-  public int getM_lastUsedMethod() {
-    return gdxBulletJNI.btGjkPairDetector_m_lastUsedMethod_get(swigCPtr, this);
-  }
-
-  public void setM_curIter(int value) {
-    gdxBulletJNI.btGjkPairDetector_m_curIter_set(swigCPtr, this, value);
-  }
-
-  public int getM_curIter() {
-    return gdxBulletJNI.btGjkPairDetector_m_curIter_get(swigCPtr, this);
-  }
-
-  public void setM_degenerateSimplex(int value) {
-    gdxBulletJNI.btGjkPairDetector_m_degenerateSimplex_set(swigCPtr, this, value);
-  }
-
-  public int getM_degenerateSimplex() {
-    return gdxBulletJNI.btGjkPairDetector_m_degenerateSimplex_get(swigCPtr, this);
-  }
-
-  public void setM_catchDegeneracies(int value) {
-    gdxBulletJNI.btGjkPairDetector_m_catchDegeneracies_set(swigCPtr, this, value);
-  }
-
-  public int getM_catchDegeneracies() {
-    return gdxBulletJNI.btGjkPairDetector_m_catchDegeneracies_get(swigCPtr, this);
-  }
-
-  public btGjkPairDetector(btConvexShape objectA, btConvexShape objectB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver penetrationDepthSolver) {
-    this(gdxBulletJNI.new_btGjkPairDetector__SWIG_0(btConvexShape.getCPtr(objectA), objectA, btConvexShape.getCPtr(objectB), objectB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver), btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver), true);
-  }
-
-  public btGjkPairDetector(btConvexShape objectA, btConvexShape objectB, int shapeTypeA, int shapeTypeB, float marginA, float marginB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver penetrationDepthSolver) {
-    this(gdxBulletJNI.new_btGjkPairDetector__SWIG_1(btConvexShape.getCPtr(objectA), objectA, btConvexShape.getCPtr(objectB), objectB, shapeTypeA, shapeTypeB, marginA, marginB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver), btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver), true);
-  }
-
-  public void getClosestPoints(ClosestPointInput input, Result output, btIDebugDraw debugDraw, boolean swapResults) {
-    gdxBulletJNI.btGjkPairDetector_getClosestPoints__SWIG_0(swigCPtr, this, ClosestPointInput.getCPtr(input), input, Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw, swapResults);
-  }
-
-  public void getClosestPoints(ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
-    gdxBulletJNI.btGjkPairDetector_getClosestPoints__SWIG_1(swigCPtr, this, ClosestPointInput.getCPtr(input), input, Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
-  }
-
-  public void getClosestPointsNonVirtual(ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
-    gdxBulletJNI.btGjkPairDetector_getClosestPointsNonVirtual(swigCPtr, this, ClosestPointInput.getCPtr(input), input, Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
-  }
-
-  public void setMinkowskiA(btConvexShape minkA) {
-    gdxBulletJNI.btGjkPairDetector_setMinkowskiA(swigCPtr, this, btConvexShape.getCPtr(minkA), minkA);
-  }
-
-  public void setMinkowskiB(btConvexShape minkB) {
-    gdxBulletJNI.btGjkPairDetector_setMinkowskiB(swigCPtr, this, btConvexShape.getCPtr(minkB), minkB);
-  }
-
-  public void setCachedSeperatingAxis(Vector3 seperatingAxis) {
-    gdxBulletJNI.btGjkPairDetector_setCachedSeperatingAxis(swigCPtr, this, seperatingAxis);
-  }
-
-  public Vector3 getCachedSeparatingAxis() {
-       return gdxBulletJNI.btGjkPairDetector_getCachedSeparatingAxis(swigCPtr, this);
-}
-
-  public float getCachedSeparatingDistance() {
-    return gdxBulletJNI.btGjkPairDetector_getCachedSeparatingDistance(swigCPtr, this);
-  }
-
-  public void setPenetrationDepthSolver(btConvexPenetrationDepthSolver penetrationDepthSolver) {
-    gdxBulletJNI.btGjkPairDetector_setPenetrationDepthSolver(swigCPtr, this, btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver);
-  }
-
-  public void setIgnoreMargin(boolean ignoreMargin) {
-    gdxBulletJNI.btGjkPairDetector_setIgnoreMargin(swigCPtr, this, ignoreMargin);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btGjkPairDetector (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btGjkPairDetector obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btGjkPairDetector(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_lastUsedMethod (int value) {
+               gdxBulletJNI.btGjkPairDetector_m_lastUsedMethod_set(swigCPtr, this, value);
+       }
+
+       public int getM_lastUsedMethod () {
+               return gdxBulletJNI.btGjkPairDetector_m_lastUsedMethod_get(swigCPtr, this);
+       }
+
+       public void setM_curIter (int value) {
+               gdxBulletJNI.btGjkPairDetector_m_curIter_set(swigCPtr, this, value);
+       }
+
+       public int getM_curIter () {
+               return gdxBulletJNI.btGjkPairDetector_m_curIter_get(swigCPtr, this);
+       }
+
+       public void setM_degenerateSimplex (int value) {
+               gdxBulletJNI.btGjkPairDetector_m_degenerateSimplex_set(swigCPtr, this, value);
+       }
+
+       public int getM_degenerateSimplex () {
+               return gdxBulletJNI.btGjkPairDetector_m_degenerateSimplex_get(swigCPtr, this);
+       }
+
+       public void setM_catchDegeneracies (int value) {
+               gdxBulletJNI.btGjkPairDetector_m_catchDegeneracies_set(swigCPtr, this, value);
+       }
+
+       public int getM_catchDegeneracies () {
+               return gdxBulletJNI.btGjkPairDetector_m_catchDegeneracies_get(swigCPtr, this);
+       }
+
+       public btGjkPairDetector (btConvexShape objectA, btConvexShape objectB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver,
+               btConvexPenetrationDepthSolver penetrationDepthSolver) {
+               this(gdxBulletJNI.new_btGjkPairDetector__SWIG_0(btConvexShape.getCPtr(objectA), objectA, btConvexShape.getCPtr(objectB),
+                       objectB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver),
+                       btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver), true);
+       }
+
+       public btGjkPairDetector (btConvexShape objectA, btConvexShape objectB, int shapeTypeA, int shapeTypeB, float marginA,
+               float marginB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver, btConvexPenetrationDepthSolver penetrationDepthSolver) {
+               this(gdxBulletJNI.new_btGjkPairDetector__SWIG_1(btConvexShape.getCPtr(objectA), objectA, btConvexShape.getCPtr(objectB),
+                       objectB, shapeTypeA, shapeTypeB, marginA, marginB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver),
+                       btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver), true);
+       }
+
+       public void getClosestPoints (ClosestPointInput input, Result output, btIDebugDraw debugDraw, boolean swapResults) {
+               gdxBulletJNI.btGjkPairDetector_getClosestPoints__SWIG_0(swigCPtr, this, ClosestPointInput.getCPtr(input), input,
+                       Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw, swapResults);
+       }
+
+       public void getClosestPoints (ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
+               gdxBulletJNI.btGjkPairDetector_getClosestPoints__SWIG_1(swigCPtr, this, ClosestPointInput.getCPtr(input), input,
+                       Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
+       }
+
+       public void getClosestPointsNonVirtual (ClosestPointInput input, Result output, btIDebugDraw debugDraw) {
+               gdxBulletJNI.btGjkPairDetector_getClosestPointsNonVirtual(swigCPtr, this, ClosestPointInput.getCPtr(input), input,
+                       Result.getCPtr(output), output, btIDebugDraw.getCPtr(debugDraw), debugDraw);
+       }
+
+       public void setMinkowskiA (btConvexShape minkA) {
+               gdxBulletJNI.btGjkPairDetector_setMinkowskiA(swigCPtr, this, btConvexShape.getCPtr(minkA), minkA);
+       }
+
+       public void setMinkowskiB (btConvexShape minkB) {
+               gdxBulletJNI.btGjkPairDetector_setMinkowskiB(swigCPtr, this, btConvexShape.getCPtr(minkB), minkB);
+       }
+
+       public void setCachedSeperatingAxis (Vector3 seperatingAxis) {
+               gdxBulletJNI.btGjkPairDetector_setCachedSeperatingAxis(swigCPtr, this, seperatingAxis);
+       }
+
+       public Vector3 getCachedSeparatingAxis () {
+               return gdxBulletJNI.btGjkPairDetector_getCachedSeparatingAxis(swigCPtr, this);
+       }
+
+       public float getCachedSeparatingDistance () {
+               return gdxBulletJNI.btGjkPairDetector_getCachedSeparatingDistance(swigCPtr, this);
+       }
+
+       public void setPenetrationDepthSolver (btConvexPenetrationDepthSolver penetrationDepthSolver) {
+               gdxBulletJNI.btGjkPairDetector_setPenetrationDepthSolver(swigCPtr, this,
+                       btConvexPenetrationDepthSolver.getCPtr(penetrationDepthSolver), penetrationDepthSolver);
+       }
+
+       public void setIgnoreMargin (boolean ignoreMargin) {
+               gdxBulletJNI.btGjkPairDetector_setIgnoreMargin(swigCPtr, this, ignoreMargin);
+       }
 
 }
index ac0ae59..f3e1d54 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btHashInt {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btHashInt(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHashInt obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHashInt(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btHashInt(int uid) {
-    this(gdxBulletJNI.new_btHashInt(uid), true);
-  }
-
-  public int getUid1() {
-    return gdxBulletJNI.btHashInt_getUid1(swigCPtr, this);
-  }
-
-  public void setUid1(int uid) {
-    gdxBulletJNI.btHashInt_setUid1(swigCPtr, this, uid);
-  }
-
-  public boolean equals(btHashInt other) {
-    return gdxBulletJNI.btHashInt_equals(swigCPtr, this, btHashInt.getCPtr(other), other);
-  }
-
-  public long getHash() {
-    return gdxBulletJNI.btHashInt_getHash(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btHashInt (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHashInt obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHashInt(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btHashInt (int uid) {
+               this(gdxBulletJNI.new_btHashInt(uid), true);
+       }
+
+       public int getUid1 () {
+               return gdxBulletJNI.btHashInt_getUid1(swigCPtr, this);
+       }
+
+       public void setUid1 (int uid) {
+               gdxBulletJNI.btHashInt_setUid1(swigCPtr, this, uid);
+       }
+
+       public boolean equals (btHashInt other) {
+               return gdxBulletJNI.btHashInt_equals(swigCPtr, this, btHashInt.getCPtr(other), other);
+       }
+
+       public long getHash () {
+               return gdxBulletJNI.btHashInt_getHash(swigCPtr, this);
+       }
 
 }
index fbf9ab1..fbdba79 100644 (file)
@@ -8,52 +8,48 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btHashPtr {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btHashPtr(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHashPtr obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHashPtr(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btHashPtr(SWIGTYPE_p_void ptr) {
-    this(gdxBulletJNI.new_btHashPtr(SWIGTYPE_p_void.getCPtr(ptr)), true);
-  }
-
-  public SWIGTYPE_p_void getPointer() {
-    long cPtr = gdxBulletJNI.btHashPtr_getPointer(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public boolean equals(btHashPtr other) {
-    return gdxBulletJNI.btHashPtr_equals(swigCPtr, this, btHashPtr.getCPtr(other), other);
-  }
-
-  public long getHash() {
-    return gdxBulletJNI.btHashPtr_getHash(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btHashPtr (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHashPtr obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHashPtr(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btHashPtr (SWIGTYPE_p_void ptr) {
+               this(gdxBulletJNI.new_btHashPtr(SWIGTYPE_p_void.getCPtr(ptr)), true);
+       }
+
+       public SWIGTYPE_p_void getPointer () {
+               long cPtr = gdxBulletJNI.btHashPtr_getPointer(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public boolean equals (btHashPtr other) {
+               return gdxBulletJNI.btHashPtr_equals(swigCPtr, this, btHashPtr.getCPtr(other), other);
+       }
+
+       public long getHash () {
+               return gdxBulletJNI.btHashPtr_getHash(swigCPtr, this);
+       }
 
 }
index a925df5..e576d2a 100644 (file)
@@ -8,67 +8,63 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btHashString {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btHashString(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHashString obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHashString(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_string(String value) {
-    gdxBulletJNI.btHashString_m_string_set(swigCPtr, this, value);
-  }
-
-  public String getM_string() {
-    return gdxBulletJNI.btHashString_m_string_get(swigCPtr, this);
-  }
-
-  public void setM_hash(long value) {
-    gdxBulletJNI.btHashString_m_hash_set(swigCPtr, this, value);
-  }
-
-  public long getM_hash() {
-    return gdxBulletJNI.btHashString_m_hash_get(swigCPtr, this);
-  }
-
-  public long getHash() {
-    return gdxBulletJNI.btHashString_getHash(swigCPtr, this);
-  }
-
-  public btHashString(String name) {
-    this(gdxBulletJNI.new_btHashString(name), true);
-  }
-
-  public int portableStringCompare(String src, String dst) {
-    return gdxBulletJNI.btHashString_portableStringCompare(swigCPtr, this, src, dst);
-  }
-
-  public boolean equals(btHashString other) {
-    return gdxBulletJNI.btHashString_equals(swigCPtr, this, btHashString.getCPtr(other), other);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btHashString (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHashString obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHashString(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_string (String value) {
+               gdxBulletJNI.btHashString_m_string_set(swigCPtr, this, value);
+       }
+
+       public String getM_string () {
+               return gdxBulletJNI.btHashString_m_string_get(swigCPtr, this);
+       }
+
+       public void setM_hash (long value) {
+               gdxBulletJNI.btHashString_m_hash_set(swigCPtr, this, value);
+       }
+
+       public long getM_hash () {
+               return gdxBulletJNI.btHashString_m_hash_get(swigCPtr, this);
+       }
+
+       public long getHash () {
+               return gdxBulletJNI.btHashString_getHash(swigCPtr, this);
+       }
+
+       public btHashString (String name) {
+               this(gdxBulletJNI.new_btHashString(name), true);
+       }
+
+       public int portableStringCompare (String src, String dst) {
+               return gdxBulletJNI.btHashString_portableStringCompare(swigCPtr, this, src, dst);
+       }
+
+       public boolean equals (btHashString other) {
+               return gdxBulletJNI.btHashString_equals(swigCPtr, this, btHashString.getCPtr(other), other);
+       }
 
 }
index 13ff916..9586587 100644 (file)
@@ -8,61 +8,59 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btHashedOverlappingPairCache extends btOverlappingPairCache {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btHashedOverlappingPairCache(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btHashedOverlappingPairCache_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btHashedOverlappingPairCache (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btHashedOverlappingPairCache_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btHashedOverlappingPairCache obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btHashedOverlappingPairCache obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHashedOverlappingPairCache(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHashedOverlappingPairCache(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public btHashedOverlappingPairCache() {
-    this(gdxBulletJNI.new_btHashedOverlappingPairCache(), true);
-  }
+       public btHashedOverlappingPairCache () {
+               this(gdxBulletJNI.new_btHashedOverlappingPairCache(), true);
+       }
 
-  public boolean needsBroadphaseCollision(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    return gdxBulletJNI.btHashedOverlappingPairCache_needsBroadphaseCollision(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
-  }
+       public boolean needsBroadphaseCollision (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               return gdxBulletJNI.btHashedOverlappingPairCache_needsBroadphaseCollision(swigCPtr, this,
+                       btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
+       }
 
-  public btBroadphasePair getOverlappingPairArrayPtr() {
-    long cPtr = gdxBulletJNI.btHashedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
-  }
+       public btBroadphasePair getOverlappingPairArrayPtr () {
+               long cPtr = gdxBulletJNI.btHashedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
+       }
 
-  public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t getOverlappingPairArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t(gdxBulletJNI.btHashedOverlappingPairCache_getOverlappingPairArray__SWIG_0(swigCPtr, this), false);
-  }
+       public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t getOverlappingPairArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t(
+                       gdxBulletJNI.btHashedOverlappingPairCache_getOverlappingPairArray__SWIG_0(swigCPtr, this), false);
+       }
 
-  public int GetCount() {
-    return gdxBulletJNI.btHashedOverlappingPairCache_GetCount(swigCPtr, this);
-  }
+       public int GetCount () {
+               return gdxBulletJNI.btHashedOverlappingPairCache_GetCount(swigCPtr, this);
+       }
 
-  public btOverlapFilterCallback getOverlapFilterCallback() {
-    long cPtr = gdxBulletJNI.btHashedOverlappingPairCache_getOverlapFilterCallback(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlapFilterCallback(cPtr, false);
-  }
+       public btOverlapFilterCallback getOverlapFilterCallback () {
+               long cPtr = gdxBulletJNI.btHashedOverlappingPairCache_getOverlapFilterCallback(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlapFilterCallback(cPtr, false);
+       }
 
 }
index a73b284..de8481e 100644 (file)
@@ -8,51 +8,52 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btHeightfieldTerrainShape extends btConcaveShape {
-  private long swigCPtr;
-
-  protected btHeightfieldTerrainShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btHeightfieldTerrainShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHeightfieldTerrainShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHeightfieldTerrainShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, SWIGTYPE_p_void heightfieldData, float heightScale, float minHeight, float maxHeight, int upAxis, int heightDataType, boolean flipQuadEdges) {
-    this(gdxBulletJNI.new_btHeightfieldTerrainShape__SWIG_0(heightStickWidth, heightStickLength, SWIGTYPE_p_void.getCPtr(heightfieldData), heightScale, minHeight, maxHeight, upAxis, heightDataType, flipQuadEdges), true);
-  }
-
-  public btHeightfieldTerrainShape(int heightStickWidth, int heightStickLength, SWIGTYPE_p_void heightfieldData, float maxHeight, int upAxis, boolean useFloatData, boolean flipQuadEdges) {
-    this(gdxBulletJNI.new_btHeightfieldTerrainShape__SWIG_1(heightStickWidth, heightStickLength, SWIGTYPE_p_void.getCPtr(heightfieldData), maxHeight, upAxis, useFloatData, flipQuadEdges), true);
-  }
-
-  public void setUseDiamondSubdivision(boolean useDiamondSubdivision) {
-    gdxBulletJNI.btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_0(swigCPtr, this, useDiamondSubdivision);
-  }
-
-  public void setUseDiamondSubdivision() {
-    gdxBulletJNI.btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_1(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btHeightfieldTerrainShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btHeightfieldTerrainShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHeightfieldTerrainShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHeightfieldTerrainShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btHeightfieldTerrainShape (int heightStickWidth, int heightStickLength, SWIGTYPE_p_void heightfieldData,
+               float heightScale, float minHeight, float maxHeight, int upAxis, int heightDataType, boolean flipQuadEdges) {
+               this(gdxBulletJNI.new_btHeightfieldTerrainShape__SWIG_0(heightStickWidth, heightStickLength,
+                       SWIGTYPE_p_void.getCPtr(heightfieldData), heightScale, minHeight, maxHeight, upAxis, heightDataType, flipQuadEdges),
+                       true);
+       }
+
+       public btHeightfieldTerrainShape (int heightStickWidth, int heightStickLength, SWIGTYPE_p_void heightfieldData,
+               float maxHeight, int upAxis, boolean useFloatData, boolean flipQuadEdges) {
+               this(gdxBulletJNI.new_btHeightfieldTerrainShape__SWIG_1(heightStickWidth, heightStickLength,
+                       SWIGTYPE_p_void.getCPtr(heightfieldData), maxHeight, upAxis, useFloatData, flipQuadEdges), true);
+       }
+
+       public void setUseDiamondSubdivision (boolean useDiamondSubdivision) {
+               gdxBulletJNI.btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_0(swigCPtr, this, useDiamondSubdivision);
+       }
+
+       public void setUseDiamondSubdivision () {
+               gdxBulletJNI.btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_1(swigCPtr, this);
+       }
 
 }
index 086b91f..0b8be2f 100644 (file)
@@ -9,70 +9,69 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btHinge2Constraint extends btGeneric6DofSpringConstraint {
-  private long swigCPtr;
-
-  protected btHinge2Constraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btHinge2Constraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHinge2Constraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHinge2Constraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btHinge2Constraint(btRigidBody rbA, btRigidBody rbB, Vector3 anchor, Vector3 axis1, Vector3 axis2) {
-    this(gdxBulletJNI.new_btHinge2Constraint(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, anchor, axis1, axis2), true);
-  }
-
-  public Vector3 getAnchor() {
-       return gdxBulletJNI.btHinge2Constraint_getAnchor(swigCPtr, this);
-}
-
-  public Vector3 getAnchor2() {
-       return gdxBulletJNI.btHinge2Constraint_getAnchor2(swigCPtr, this);
-}
-
-  public Vector3 getAxis1() {
-       return gdxBulletJNI.btHinge2Constraint_getAxis1(swigCPtr, this);
-}
-
-  public Vector3 getAxis2() {
-       return gdxBulletJNI.btHinge2Constraint_getAxis2(swigCPtr, this);
-}
-
-  public float getAngle1() {
-    return gdxBulletJNI.btHinge2Constraint_getAngle1(swigCPtr, this);
-  }
-
-  public float getAngle2() {
-    return gdxBulletJNI.btHinge2Constraint_getAngle2(swigCPtr, this);
-  }
-
-  public void setUpperLimit(float ang1max) {
-    gdxBulletJNI.btHinge2Constraint_setUpperLimit(swigCPtr, this, ang1max);
-  }
-
-  public void setLowerLimit(float ang1min) {
-    gdxBulletJNI.btHinge2Constraint_setLowerLimit(swigCPtr, this, ang1min);
-  }
+       private long swigCPtr;
+
+       protected btHinge2Constraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btHinge2Constraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHinge2Constraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHinge2Constraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btHinge2Constraint (btRigidBody rbA, btRigidBody rbB, Vector3 anchor, Vector3 axis1, Vector3 axis2) {
+               this(gdxBulletJNI
+                       .new_btHinge2Constraint(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, anchor, axis1, axis2), true);
+       }
+
+       public Vector3 getAnchor () {
+               return gdxBulletJNI.btHinge2Constraint_getAnchor(swigCPtr, this);
+       }
+
+       public Vector3 getAnchor2 () {
+               return gdxBulletJNI.btHinge2Constraint_getAnchor2(swigCPtr, this);
+       }
+
+       public Vector3 getAxis1 () {
+               return gdxBulletJNI.btHinge2Constraint_getAxis1(swigCPtr, this);
+       }
+
+       public Vector3 getAxis2 () {
+               return gdxBulletJNI.btHinge2Constraint_getAxis2(swigCPtr, this);
+       }
+
+       public float getAngle1 () {
+               return gdxBulletJNI.btHinge2Constraint_getAngle1(swigCPtr, this);
+       }
+
+       public float getAngle2 () {
+               return gdxBulletJNI.btHinge2Constraint_getAngle2(swigCPtr, this);
+       }
+
+       public void setUpperLimit (float ang1max) {
+               gdxBulletJNI.btHinge2Constraint_setUpperLimit(swigCPtr, this, ang1max);
+       }
+
+       public void setLowerLimit (float ang1min) {
+               gdxBulletJNI.btHinge2Constraint_setLowerLimit(swigCPtr, this, ang1min);
+       }
 
 }
index 26fe2da..e4fa14c 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
 import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Vector3;
 
 public class btHingeConstraint extends btTypedConstraint {
-  private long swigCPtr;
-
-  protected btHingeConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btHingeConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHingeConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHingeConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB, boolean useReferenceFrameA) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, pivotInA, pivotInB, axisInA, axisInB, useReferenceFrameA), true);
-  }
-
-  public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA, Vector3 axisInB) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, pivotInA, pivotInB, axisInA, axisInB), true);
-  }
-
-  public btHingeConstraint(btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA, boolean useReferenceFrameA) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_2(btRigidBody.getCPtr(rbA), rbA, pivotInA, axisInA, useReferenceFrameA), true);
-  }
-
-  public btHingeConstraint(btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_3(btRigidBody.getCPtr(rbA), rbA, pivotInA, axisInA), true);
-  }
-
-  public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, btTransform rbAFrame, btTransform rbBFrame, boolean useReferenceFrameA) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_4(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(rbAFrame), rbAFrame, btTransform.getCPtr(rbBFrame), rbBFrame, useReferenceFrameA), true);
-  }
-
-  public btHingeConstraint(btRigidBody rbA, btRigidBody rbB, btTransform rbAFrame, btTransform rbBFrame) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_5(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(rbAFrame), rbAFrame, btTransform.getCPtr(rbBFrame), rbBFrame), true);
-  }
-
-  public btHingeConstraint(btRigidBody rbA, btTransform rbAFrame, boolean useReferenceFrameA) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_6(btRigidBody.getCPtr(rbA), rbA, btTransform.getCPtr(rbAFrame), rbAFrame, useReferenceFrameA), true);
-  }
-
-  public btHingeConstraint(btRigidBody rbA, btTransform rbAFrame) {
-    this(gdxBulletJNI.new_btHingeConstraint__SWIG_7(btRigidBody.getCPtr(rbA), rbA, btTransform.getCPtr(rbAFrame), rbAFrame), true);
-  }
-
-  public void getInfo1NonVirtual(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
-    gdxBulletJNI.btHingeConstraint_getInfo1NonVirtual(swigCPtr, this, SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
-  }
-
-  public void getInfo2NonVirtual(btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 angVelA, Vector3 angVelB) {
-    gdxBulletJNI.btHingeConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, angVelA, angVelB);
-  }
-
-  public void getInfo2Internal(btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 angVelA, Vector3 angVelB) {
-    gdxBulletJNI.btHingeConstraint_getInfo2Internal(swigCPtr, this, btConstraintInfo2.getCPtr(info), info, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, angVelA, angVelB);
-  }
-
-  public void getInfo2InternalUsingFrameOffset(btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 angVelA, Vector3 angVelB) {
-    gdxBulletJNI.btHingeConstraint_getInfo2InternalUsingFrameOffset(swigCPtr, this, btConstraintInfo2.getCPtr(info), info, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, angVelA, angVelB);
-  }
-
-  public void updateRHS(float timeStep) {
-    gdxBulletJNI.btHingeConstraint_updateRHS(swigCPtr, this, timeStep);
-  }
-
-  public btRigidBody getRigidBodyA() {
-    return new btRigidBody(gdxBulletJNI.btHingeConstraint_getRigidBodyA__SWIG_0(swigCPtr, this), false);
-  }
-
-  public btRigidBody getRigidBodyB() {
-    return new btRigidBody(gdxBulletJNI.btHingeConstraint_getRigidBodyB__SWIG_0(swigCPtr, this), false);
-  }
-
-  public btTransform getFrameOffsetA() {
-    return new btTransform(gdxBulletJNI.btHingeConstraint_getFrameOffsetA(swigCPtr, this), false);
-  }
-
-  public btTransform getFrameOffsetB() {
-    return new btTransform(gdxBulletJNI.btHingeConstraint_getFrameOffsetB(swigCPtr, this), false);
-  }
-
-  public void setFrames(btTransform frameA, btTransform frameB) {
-    gdxBulletJNI.btHingeConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA, btTransform.getCPtr(frameB), frameB);
-  }
-
-  public void setAngularOnly(boolean angularOnly) {
-    gdxBulletJNI.btHingeConstraint_setAngularOnly(swigCPtr, this, angularOnly);
-  }
-
-  public void enableAngularMotor(boolean enableMotor, float targetVelocity, float maxMotorImpulse) {
-    gdxBulletJNI.btHingeConstraint_enableAngularMotor(swigCPtr, this, enableMotor, targetVelocity, maxMotorImpulse);
-  }
-
-  public void enableMotor(boolean enableMotor) {
-    gdxBulletJNI.btHingeConstraint_enableMotor(swigCPtr, this, enableMotor);
-  }
-
-  public void setMaxMotorImpulse(float maxMotorImpulse) {
-    gdxBulletJNI.btHingeConstraint_setMaxMotorImpulse(swigCPtr, this, maxMotorImpulse);
-  }
-
-  public void setMotorTarget(Quaternion qAinB, float dt) {
-    gdxBulletJNI.btHingeConstraint_setMotorTarget__SWIG_0(swigCPtr, this, qAinB, dt);
-  }
-
-  public void setMotorTarget(float targetAngle, float dt) {
-    gdxBulletJNI.btHingeConstraint_setMotorTarget__SWIG_1(swigCPtr, this, targetAngle, dt);
-  }
-
-  public void setLimit(float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
-    gdxBulletJNI.btHingeConstraint_setLimit__SWIG_0(swigCPtr, this, low, high, _softness, _biasFactor, _relaxationFactor);
-  }
-
-  public void setLimit(float low, float high, float _softness, float _biasFactor) {
-    gdxBulletJNI.btHingeConstraint_setLimit__SWIG_1(swigCPtr, this, low, high, _softness, _biasFactor);
-  }
-
-  public void setLimit(float low, float high, float _softness) {
-    gdxBulletJNI.btHingeConstraint_setLimit__SWIG_2(swigCPtr, this, low, high, _softness);
-  }
-
-  public void setLimit(float low, float high) {
-    gdxBulletJNI.btHingeConstraint_setLimit__SWIG_3(swigCPtr, this, low, high);
-  }
-
-  public void setAxis(Vector3 axisInA) {
-    gdxBulletJNI.btHingeConstraint_setAxis(swigCPtr, this, axisInA);
-  }
-
-  public float getLowerLimit() {
-    return gdxBulletJNI.btHingeConstraint_getLowerLimit(swigCPtr, this);
-  }
-
-  public float getUpperLimit() {
-    return gdxBulletJNI.btHingeConstraint_getUpperLimit(swigCPtr, this);
-  }
-
-  public float getHingeAngle() {
-    return gdxBulletJNI.btHingeConstraint_getHingeAngle__SWIG_0(swigCPtr, this);
-  }
-
-  public float getHingeAngle(btTransform transA, btTransform transB) {
-    return gdxBulletJNI.btHingeConstraint_getHingeAngle__SWIG_1(swigCPtr, this, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB);
-  }
-
-  public void testLimit(btTransform transA, btTransform transB) {
-    gdxBulletJNI.btHingeConstraint_testLimit(swigCPtr, this, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB);
-  }
-
-  public btTransform getAFrame() {
-    return new btTransform(gdxBulletJNI.btHingeConstraint_getAFrame__SWIG_0(swigCPtr, this), false);
-  }
-
-  public btTransform getBFrame() {
-    return new btTransform(gdxBulletJNI.btHingeConstraint_getBFrame__SWIG_0(swigCPtr, this), false);
-  }
-
-  public int getSolveLimit() {
-    return gdxBulletJNI.btHingeConstraint_getSolveLimit(swigCPtr, this);
-  }
-
-  public float getLimitSign() {
-    return gdxBulletJNI.btHingeConstraint_getLimitSign(swigCPtr, this);
-  }
-
-  public boolean getAngularOnly() {
-    return gdxBulletJNI.btHingeConstraint_getAngularOnly(swigCPtr, this);
-  }
-
-  public boolean getEnableAngularMotor() {
-    return gdxBulletJNI.btHingeConstraint_getEnableAngularMotor(swigCPtr, this);
-  }
-
-  public float getMotorTargetVelosity() {
-    return gdxBulletJNI.btHingeConstraint_getMotorTargetVelosity(swigCPtr, this);
-  }
-
-  public float getMaxMotorImpulse() {
-    return gdxBulletJNI.btHingeConstraint_getMaxMotorImpulse(swigCPtr, this);
-  }
-
-  public boolean getUseFrameOffset() {
-    return gdxBulletJNI.btHingeConstraint_getUseFrameOffset(swigCPtr, this);
-  }
-
-  public void setUseFrameOffset(boolean frameOffsetOnOff) {
-    gdxBulletJNI.btHingeConstraint_setUseFrameOffset(swigCPtr, this, frameOffsetOnOff);
-  }
-
-  public void setParam(int num, float value, int axis) {
-    gdxBulletJNI.btHingeConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
-  }
-
-  public void setParam(int num, float value) {
-    gdxBulletJNI.btHingeConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
-  }
-
-  public float getParam(int num, int axis) {
-    return gdxBulletJNI.btHingeConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
-  }
-
-  public float getParam(int num) {
-    return gdxBulletJNI.btHingeConstraint_getParam__SWIG_1(swigCPtr, this, num);
-  }
+       private long swigCPtr;
+
+       protected btHingeConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btHingeConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHingeConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHingeConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btHingeConstraint (btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA,
+               Vector3 axisInB, boolean useReferenceFrameA) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, pivotInA,
+                       pivotInB, axisInA, axisInB, useReferenceFrameA), true);
+       }
+
+       public btHingeConstraint (btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB, Vector3 axisInA,
+               Vector3 axisInB) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, pivotInA,
+                       pivotInB, axisInA, axisInB), true);
+       }
+
+       public btHingeConstraint (btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA, boolean useReferenceFrameA) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_2(btRigidBody.getCPtr(rbA), rbA, pivotInA, axisInA, useReferenceFrameA), true);
+       }
+
+       public btHingeConstraint (btRigidBody rbA, Vector3 pivotInA, Vector3 axisInA) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_3(btRigidBody.getCPtr(rbA), rbA, pivotInA, axisInA), true);
+       }
+
+       public btHingeConstraint (btRigidBody rbA, btRigidBody rbB, btTransform rbAFrame, btTransform rbBFrame,
+               boolean useReferenceFrameA) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_4(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB,
+                       btTransform.getCPtr(rbAFrame), rbAFrame, btTransform.getCPtr(rbBFrame), rbBFrame, useReferenceFrameA), true);
+       }
+
+       public btHingeConstraint (btRigidBody rbA, btRigidBody rbB, btTransform rbAFrame, btTransform rbBFrame) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_5(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB,
+                       btTransform.getCPtr(rbAFrame), rbAFrame, btTransform.getCPtr(rbBFrame), rbBFrame), true);
+       }
+
+       public btHingeConstraint (btRigidBody rbA, btTransform rbAFrame, boolean useReferenceFrameA) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_6(btRigidBody.getCPtr(rbA), rbA, btTransform.getCPtr(rbAFrame), rbAFrame,
+                       useReferenceFrameA), true);
+       }
+
+       public btHingeConstraint (btRigidBody rbA, btTransform rbAFrame) {
+               this(gdxBulletJNI.new_btHingeConstraint__SWIG_7(btRigidBody.getCPtr(rbA), rbA, btTransform.getCPtr(rbAFrame), rbAFrame),
+                       true);
+       }
+
+       public void getInfo1NonVirtual (SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
+               gdxBulletJNI.btHingeConstraint_getInfo1NonVirtual(swigCPtr, this,
+                       SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
+       }
+
+       public void getInfo2NonVirtual (btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 angVelA,
+               Vector3 angVelB) {
+               gdxBulletJNI.btHingeConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info,
+                       btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, angVelA, angVelB);
+       }
+
+       public void getInfo2Internal (btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 angVelA, Vector3 angVelB) {
+               gdxBulletJNI.btHingeConstraint_getInfo2Internal(swigCPtr, this, btConstraintInfo2.getCPtr(info), info,
+                       btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, angVelA, angVelB);
+       }
+
+       public void getInfo2InternalUsingFrameOffset (btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 angVelA,
+               Vector3 angVelB) {
+               gdxBulletJNI.btHingeConstraint_getInfo2InternalUsingFrameOffset(swigCPtr, this, btConstraintInfo2.getCPtr(info), info,
+                       btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, angVelA, angVelB);
+       }
+
+       public void updateRHS (float timeStep) {
+               gdxBulletJNI.btHingeConstraint_updateRHS(swigCPtr, this, timeStep);
+       }
+
+       public btRigidBody getRigidBodyA () {
+               return new btRigidBody(gdxBulletJNI.btHingeConstraint_getRigidBodyA__SWIG_0(swigCPtr, this), false);
+       }
+
+       public btRigidBody getRigidBodyB () {
+               return new btRigidBody(gdxBulletJNI.btHingeConstraint_getRigidBodyB__SWIG_0(swigCPtr, this), false);
+       }
+
+       public btTransform getFrameOffsetA () {
+               return new btTransform(gdxBulletJNI.btHingeConstraint_getFrameOffsetA(swigCPtr, this), false);
+       }
+
+       public btTransform getFrameOffsetB () {
+               return new btTransform(gdxBulletJNI.btHingeConstraint_getFrameOffsetB(swigCPtr, this), false);
+       }
+
+       public void setFrames (btTransform frameA, btTransform frameB) {
+               gdxBulletJNI.btHingeConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA, btTransform.getCPtr(frameB),
+                       frameB);
+       }
+
+       public void setAngularOnly (boolean angularOnly) {
+               gdxBulletJNI.btHingeConstraint_setAngularOnly(swigCPtr, this, angularOnly);
+       }
+
+       public void enableAngularMotor (boolean enableMotor, float targetVelocity, float maxMotorImpulse) {
+               gdxBulletJNI.btHingeConstraint_enableAngularMotor(swigCPtr, this, enableMotor, targetVelocity, maxMotorImpulse);
+       }
+
+       public void enableMotor (boolean enableMotor) {
+               gdxBulletJNI.btHingeConstraint_enableMotor(swigCPtr, this, enableMotor);
+       }
+
+       public void setMaxMotorImpulse (float maxMotorImpulse) {
+               gdxBulletJNI.btHingeConstraint_setMaxMotorImpulse(swigCPtr, this, maxMotorImpulse);
+       }
+
+       public void setMotorTarget (Quaternion qAinB, float dt) {
+               gdxBulletJNI.btHingeConstraint_setMotorTarget__SWIG_0(swigCPtr, this, qAinB, dt);
+       }
+
+       public void setMotorTarget (float targetAngle, float dt) {
+               gdxBulletJNI.btHingeConstraint_setMotorTarget__SWIG_1(swigCPtr, this, targetAngle, dt);
+       }
+
+       public void setLimit (float low, float high, float _softness, float _biasFactor, float _relaxationFactor) {
+               gdxBulletJNI.btHingeConstraint_setLimit__SWIG_0(swigCPtr, this, low, high, _softness, _biasFactor, _relaxationFactor);
+       }
+
+       public void setLimit (float low, float high, float _softness, float _biasFactor) {
+               gdxBulletJNI.btHingeConstraint_setLimit__SWIG_1(swigCPtr, this, low, high, _softness, _biasFactor);
+       }
+
+       public void setLimit (float low, float high, float _softness) {
+               gdxBulletJNI.btHingeConstraint_setLimit__SWIG_2(swigCPtr, this, low, high, _softness);
+       }
+
+       public void setLimit (float low, float high) {
+               gdxBulletJNI.btHingeConstraint_setLimit__SWIG_3(swigCPtr, this, low, high);
+       }
+
+       public void setAxis (Vector3 axisInA) {
+               gdxBulletJNI.btHingeConstraint_setAxis(swigCPtr, this, axisInA);
+       }
+
+       public float getLowerLimit () {
+               return gdxBulletJNI.btHingeConstraint_getLowerLimit(swigCPtr, this);
+       }
+
+       public float getUpperLimit () {
+               return gdxBulletJNI.btHingeConstraint_getUpperLimit(swigCPtr, this);
+       }
+
+       public float getHingeAngle () {
+               return gdxBulletJNI.btHingeConstraint_getHingeAngle__SWIG_0(swigCPtr, this);
+       }
+
+       public float getHingeAngle (btTransform transA, btTransform transB) {
+               return gdxBulletJNI.btHingeConstraint_getHingeAngle__SWIG_1(swigCPtr, this, btTransform.getCPtr(transA), transA,
+                       btTransform.getCPtr(transB), transB);
+       }
+
+       public void testLimit (btTransform transA, btTransform transB) {
+               gdxBulletJNI.btHingeConstraint_testLimit(swigCPtr, this, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB),
+                       transB);
+       }
+
+       public btTransform getAFrame () {
+               return new btTransform(gdxBulletJNI.btHingeConstraint_getAFrame__SWIG_0(swigCPtr, this), false);
+       }
+
+       public btTransform getBFrame () {
+               return new btTransform(gdxBulletJNI.btHingeConstraint_getBFrame__SWIG_0(swigCPtr, this), false);
+       }
+
+       public int getSolveLimit () {
+               return gdxBulletJNI.btHingeConstraint_getSolveLimit(swigCPtr, this);
+       }
+
+       public float getLimitSign () {
+               return gdxBulletJNI.btHingeConstraint_getLimitSign(swigCPtr, this);
+       }
+
+       public boolean getAngularOnly () {
+               return gdxBulletJNI.btHingeConstraint_getAngularOnly(swigCPtr, this);
+       }
+
+       public boolean getEnableAngularMotor () {
+               return gdxBulletJNI.btHingeConstraint_getEnableAngularMotor(swigCPtr, this);
+       }
+
+       public float getMotorTargetVelosity () {
+               return gdxBulletJNI.btHingeConstraint_getMotorTargetVelosity(swigCPtr, this);
+       }
+
+       public float getMaxMotorImpulse () {
+               return gdxBulletJNI.btHingeConstraint_getMaxMotorImpulse(swigCPtr, this);
+       }
+
+       public boolean getUseFrameOffset () {
+               return gdxBulletJNI.btHingeConstraint_getUseFrameOffset(swigCPtr, this);
+       }
+
+       public void setUseFrameOffset (boolean frameOffsetOnOff) {
+               gdxBulletJNI.btHingeConstraint_setUseFrameOffset(swigCPtr, this, frameOffsetOnOff);
+       }
+
+       public void setParam (int num, float value, int axis) {
+               gdxBulletJNI.btHingeConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
+       }
+
+       public void setParam (int num, float value) {
+               gdxBulletJNI.btHingeConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
+       }
+
+       public float getParam (int num, int axis) {
+               return gdxBulletJNI.btHingeConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
+       }
+
+       public float getParam (int num) {
+               return gdxBulletJNI.btHingeConstraint_getParam__SWIG_1(swigCPtr, this, num);
+       }
 
 }
index 3bdc219..04790bc 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btHingeConstraintDoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btHingeConstraintDoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHingeConstraintDoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHingeConstraintDoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_typeConstraintData(btTypedConstraintData value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
-  }
-
-  public btTypedConstraintData getM_typeConstraintData() {
-    long cPtr = gdxBulletJNI.btHingeConstraintDoubleData_m_typeConstraintData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
-  }
-
-  public void setM_rbAFrame(btTransformDoubleData value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_rbAFrame_set(swigCPtr, this, btTransformDoubleData.getCPtr(value), value);
-  }
-
-  public btTransformDoubleData getM_rbAFrame() {
-    long cPtr = gdxBulletJNI.btHingeConstraintDoubleData_m_rbAFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
-  }
-
-  public void setM_rbBFrame(btTransformDoubleData value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_rbBFrame_set(swigCPtr, this, btTransformDoubleData.getCPtr(value), value);
-  }
-
-  public btTransformDoubleData getM_rbBFrame() {
-    long cPtr = gdxBulletJNI.btHingeConstraintDoubleData_m_rbBFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
-  }
-
-  public void setM_useReferenceFrameA(int value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_useReferenceFrameA_set(swigCPtr, this, value);
-  }
-
-  public int getM_useReferenceFrameA() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_useReferenceFrameA_get(swigCPtr, this);
-  }
-
-  public void setM_angularOnly(int value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_angularOnly_set(swigCPtr, this, value);
-  }
-
-  public int getM_angularOnly() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_angularOnly_get(swigCPtr, this);
-  }
-
-  public void setM_enableAngularMotor(int value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_enableAngularMotor_set(swigCPtr, this, value);
-  }
-
-  public int getM_enableAngularMotor() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_enableAngularMotor_get(swigCPtr, this);
-  }
-
-  public void setM_motorTargetVelocity(float value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_motorTargetVelocity_set(swigCPtr, this, value);
-  }
-
-  public float getM_motorTargetVelocity() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_motorTargetVelocity_get(swigCPtr, this);
-  }
-
-  public void setM_maxMotorImpulse(float value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_maxMotorImpulse_set(swigCPtr, this, value);
-  }
-
-  public float getM_maxMotorImpulse() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_maxMotorImpulse_get(swigCPtr, this);
-  }
-
-  public void setM_lowerLimit(float value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_lowerLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_lowerLimit() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_lowerLimit_get(swigCPtr, this);
-  }
-
-  public void setM_upperLimit(float value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_upperLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_upperLimit() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_upperLimit_get(swigCPtr, this);
-  }
-
-  public void setM_limitSoftness(float value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_limitSoftness_set(swigCPtr, this, value);
-  }
-
-  public float getM_limitSoftness() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_limitSoftness_get(swigCPtr, this);
-  }
-
-  public void setM_biasFactor(float value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_biasFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_biasFactor() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_biasFactor_get(swigCPtr, this);
-  }
-
-  public void setM_relaxationFactor(float value) {
-    gdxBulletJNI.btHingeConstraintDoubleData_m_relaxationFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_relaxationFactor() {
-    return gdxBulletJNI.btHingeConstraintDoubleData_m_relaxationFactor_get(swigCPtr, this);
-  }
-
-  public btHingeConstraintDoubleData() {
-    this(gdxBulletJNI.new_btHingeConstraintDoubleData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btHingeConstraintDoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHingeConstraintDoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHingeConstraintDoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_typeConstraintData (btTypedConstraintData value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value),
+                       value);
+       }
+
+       public btTypedConstraintData getM_typeConstraintData () {
+               long cPtr = gdxBulletJNI.btHingeConstraintDoubleData_m_typeConstraintData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
+       }
+
+       public void setM_rbAFrame (btTransformDoubleData value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_rbAFrame_set(swigCPtr, this, btTransformDoubleData.getCPtr(value), value);
+       }
+
+       public btTransformDoubleData getM_rbAFrame () {
+               long cPtr = gdxBulletJNI.btHingeConstraintDoubleData_m_rbAFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
+       }
+
+       public void setM_rbBFrame (btTransformDoubleData value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_rbBFrame_set(swigCPtr, this, btTransformDoubleData.getCPtr(value), value);
+       }
+
+       public btTransformDoubleData getM_rbBFrame () {
+               long cPtr = gdxBulletJNI.btHingeConstraintDoubleData_m_rbBFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformDoubleData(cPtr, false);
+       }
+
+       public void setM_useReferenceFrameA (int value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_useReferenceFrameA_set(swigCPtr, this, value);
+       }
+
+       public int getM_useReferenceFrameA () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_useReferenceFrameA_get(swigCPtr, this);
+       }
+
+       public void setM_angularOnly (int value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_angularOnly_set(swigCPtr, this, value);
+       }
+
+       public int getM_angularOnly () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_angularOnly_get(swigCPtr, this);
+       }
+
+       public void setM_enableAngularMotor (int value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_enableAngularMotor_set(swigCPtr, this, value);
+       }
+
+       public int getM_enableAngularMotor () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_enableAngularMotor_get(swigCPtr, this);
+       }
+
+       public void setM_motorTargetVelocity (float value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_motorTargetVelocity_set(swigCPtr, this, value);
+       }
+
+       public float getM_motorTargetVelocity () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_motorTargetVelocity_get(swigCPtr, this);
+       }
+
+       public void setM_maxMotorImpulse (float value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_maxMotorImpulse_set(swigCPtr, this, value);
+       }
+
+       public float getM_maxMotorImpulse () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_maxMotorImpulse_get(swigCPtr, this);
+       }
+
+       public void setM_lowerLimit (float value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_lowerLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_lowerLimit () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_lowerLimit_get(swigCPtr, this);
+       }
+
+       public void setM_upperLimit (float value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_upperLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_upperLimit () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_upperLimit_get(swigCPtr, this);
+       }
+
+       public void setM_limitSoftness (float value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_limitSoftness_set(swigCPtr, this, value);
+       }
+
+       public float getM_limitSoftness () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_limitSoftness_get(swigCPtr, this);
+       }
+
+       public void setM_biasFactor (float value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_biasFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_biasFactor () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_biasFactor_get(swigCPtr, this);
+       }
+
+       public void setM_relaxationFactor (float value) {
+               gdxBulletJNI.btHingeConstraintDoubleData_m_relaxationFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_relaxationFactor () {
+               return gdxBulletJNI.btHingeConstraintDoubleData_m_relaxationFactor_get(swigCPtr, this);
+       }
+
+       public btHingeConstraintDoubleData () {
+               this(gdxBulletJNI.new_btHingeConstraintDoubleData(), true);
+       }
 
 }
index d3106d2..a7e8884 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btHingeConstraintFloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btHingeConstraintFloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btHingeConstraintFloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btHingeConstraintFloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_typeConstraintData(btTypedConstraintData value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
-  }
-
-  public btTypedConstraintData getM_typeConstraintData() {
-    long cPtr = gdxBulletJNI.btHingeConstraintFloatData_m_typeConstraintData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
-  }
-
-  public void setM_rbAFrame(btTransformFloatData value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbAFrame() {
-    long cPtr = gdxBulletJNI.btHingeConstraintFloatData_m_rbAFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_rbBFrame(btTransformFloatData value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbBFrame() {
-    long cPtr = gdxBulletJNI.btHingeConstraintFloatData_m_rbBFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_useReferenceFrameA(int value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_useReferenceFrameA_set(swigCPtr, this, value);
-  }
-
-  public int getM_useReferenceFrameA() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_useReferenceFrameA_get(swigCPtr, this);
-  }
-
-  public void setM_angularOnly(int value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_angularOnly_set(swigCPtr, this, value);
-  }
-
-  public int getM_angularOnly() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_angularOnly_get(swigCPtr, this);
-  }
-
-  public void setM_enableAngularMotor(int value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_enableAngularMotor_set(swigCPtr, this, value);
-  }
-
-  public int getM_enableAngularMotor() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_enableAngularMotor_get(swigCPtr, this);
-  }
-
-  public void setM_motorTargetVelocity(float value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_motorTargetVelocity_set(swigCPtr, this, value);
-  }
-
-  public float getM_motorTargetVelocity() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_motorTargetVelocity_get(swigCPtr, this);
-  }
-
-  public void setM_maxMotorImpulse(float value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_maxMotorImpulse_set(swigCPtr, this, value);
-  }
-
-  public float getM_maxMotorImpulse() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_maxMotorImpulse_get(swigCPtr, this);
-  }
-
-  public void setM_lowerLimit(float value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_lowerLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_lowerLimit() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_lowerLimit_get(swigCPtr, this);
-  }
-
-  public void setM_upperLimit(float value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_upperLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_upperLimit() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_upperLimit_get(swigCPtr, this);
-  }
-
-  public void setM_limitSoftness(float value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_limitSoftness_set(swigCPtr, this, value);
-  }
-
-  public float getM_limitSoftness() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_limitSoftness_get(swigCPtr, this);
-  }
-
-  public void setM_biasFactor(float value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_biasFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_biasFactor() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_biasFactor_get(swigCPtr, this);
-  }
-
-  public void setM_relaxationFactor(float value) {
-    gdxBulletJNI.btHingeConstraintFloatData_m_relaxationFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_relaxationFactor() {
-    return gdxBulletJNI.btHingeConstraintFloatData_m_relaxationFactor_get(swigCPtr, this);
-  }
-
-  public btHingeConstraintFloatData() {
-    this(gdxBulletJNI.new_btHingeConstraintFloatData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btHingeConstraintFloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btHingeConstraintFloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btHingeConstraintFloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_typeConstraintData (btTypedConstraintData value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value),
+                       value);
+       }
+
+       public btTypedConstraintData getM_typeConstraintData () {
+               long cPtr = gdxBulletJNI.btHingeConstraintFloatData_m_typeConstraintData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
+       }
+
+       public void setM_rbAFrame (btTransformFloatData value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbAFrame () {
+               long cPtr = gdxBulletJNI.btHingeConstraintFloatData_m_rbAFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_rbBFrame (btTransformFloatData value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbBFrame () {
+               long cPtr = gdxBulletJNI.btHingeConstraintFloatData_m_rbBFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_useReferenceFrameA (int value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_useReferenceFrameA_set(swigCPtr, this, value);
+       }
+
+       public int getM_useReferenceFrameA () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_useReferenceFrameA_get(swigCPtr, this);
+       }
+
+       public void setM_angularOnly (int value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_angularOnly_set(swigCPtr, this, value);
+       }
+
+       public int getM_angularOnly () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_angularOnly_get(swigCPtr, this);
+       }
+
+       public void setM_enableAngularMotor (int value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_enableAngularMotor_set(swigCPtr, this, value);
+       }
+
+       public int getM_enableAngularMotor () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_enableAngularMotor_get(swigCPtr, this);
+       }
+
+       public void setM_motorTargetVelocity (float value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_motorTargetVelocity_set(swigCPtr, this, value);
+       }
+
+       public float getM_motorTargetVelocity () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_motorTargetVelocity_get(swigCPtr, this);
+       }
+
+       public void setM_maxMotorImpulse (float value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_maxMotorImpulse_set(swigCPtr, this, value);
+       }
+
+       public float getM_maxMotorImpulse () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_maxMotorImpulse_get(swigCPtr, this);
+       }
+
+       public void setM_lowerLimit (float value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_lowerLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_lowerLimit () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_lowerLimit_get(swigCPtr, this);
+       }
+
+       public void setM_upperLimit (float value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_upperLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_upperLimit () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_upperLimit_get(swigCPtr, this);
+       }
+
+       public void setM_limitSoftness (float value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_limitSoftness_set(swigCPtr, this, value);
+       }
+
+       public float getM_limitSoftness () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_limitSoftness_get(swigCPtr, this);
+       }
+
+       public void setM_biasFactor (float value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_biasFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_biasFactor () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_biasFactor_get(swigCPtr, this);
+       }
+
+       public void setM_relaxationFactor (float value) {
+               gdxBulletJNI.btHingeConstraintFloatData_m_relaxationFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_relaxationFactor () {
+               return gdxBulletJNI.btHingeConstraintFloatData_m_relaxationFactor_get(swigCPtr, this);
+       }
+
+       public btHingeConstraintFloatData () {
+               this(gdxBulletJNI.new_btHingeConstraintFloatData(), true);
+       }
 
 }
index 7321bbc..f3a0419 100644 (file)
@@ -9,8 +9,7 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btHingeFlags {
-  public final static int BT_HINGE_FLAGS_CFM_STOP = 1;
-  public final static int BT_HINGE_FLAGS_ERP_STOP = 2;
-  public final static int BT_HINGE_FLAGS_CFM_NORM = 4;
+       public final static int BT_HINGE_FLAGS_CFM_STOP = 1;
+       public final static int BT_HINGE_FLAGS_ERP_STOP = 2;
+       public final static int BT_HINGE_FLAGS_CFM_NORM = 4;
 }
-
index 2ece046..fbfb17a 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btIDebugDraw {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btIDebugDraw(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btIDebugDraw obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btIDebugDraw(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  protected void swigDirectorDisconnect() {
-    swigCMemOwn = false;
-    delete();
-  }
-
-  public void swigReleaseOwnership() {
-    swigCMemOwn = false;
-    gdxBulletJNI.btIDebugDraw_change_ownership(this, swigCPtr, false);
-  }
-
-  public void swigTakeOwnership() {
-    swigCMemOwn = true;
-    gdxBulletJNI.btIDebugDraw_change_ownership(this, swigCPtr, true);
-  }
-
-  public void drawLine(Vector3 from, Vector3 to, Vector3 color) {
-    gdxBulletJNI.btIDebugDraw_drawLine__SWIG_0(swigCPtr, this, from, to, color);
-  }
-
-  public void drawLine(Vector3 from, Vector3 to, Vector3 fromColor, Vector3 toColor) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawLine__SWIG_1(swigCPtr, this, from, to, fromColor, toColor); else gdxBulletJNI.btIDebugDraw_drawLineSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, from, to, fromColor, toColor);
-  }
-
-  public void drawSphere(float radius, btTransform transform, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawSphere__SWIG_0(swigCPtr, this, radius, btTransform.getCPtr(transform), transform, color); else gdxBulletJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, radius, btTransform.getCPtr(transform), transform, color);
-  }
-
-  public void drawSphere(Vector3 p, float radius, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawSphere__SWIG_1(swigCPtr, this, p, radius, color); else gdxBulletJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, p, radius, color);
-  }
-
-  public void drawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color, float alpha) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawTriangle__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5, color, alpha); else gdxBulletJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5, color, alpha);
-  }
-
-  public void drawTriangle(Vector3 v0, Vector3 v1, Vector3 v2, Vector3 color, float arg4) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawTriangle__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4); else gdxBulletJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4);
-  }
-
-  public void drawContactPoint(Vector3 PointOnB, Vector3 normalOnB, float distance, int lifeTime, Vector3 color) {
-    gdxBulletJNI.btIDebugDraw_drawContactPoint(swigCPtr, this, PointOnB, normalOnB, distance, lifeTime, color);
-  }
-
-  public void reportErrorWarning(String warningString) {
-    gdxBulletJNI.btIDebugDraw_reportErrorWarning(swigCPtr, this, warningString);
-  }
-
-  public void draw3dText(Vector3 location, String textString) {
-    gdxBulletJNI.btIDebugDraw_draw3dText(swigCPtr, this, location, textString);
-  }
-
-  public void setDebugMode(int debugMode) {
-    gdxBulletJNI.btIDebugDraw_setDebugMode(swigCPtr, this, debugMode);
-  }
-
-  public int getDebugMode() {
-    return gdxBulletJNI.btIDebugDraw_getDebugMode(swigCPtr, this);
-  }
-
-  public void drawAabb(Vector3 from, Vector3 to, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawAabb(swigCPtr, this, from, to, color); else gdxBulletJNI.btIDebugDraw_drawAabbSwigExplicitbtIDebugDraw(swigCPtr, this, from, to, color);
-  }
-
-  public void drawTransform(btTransform transform, float orthoLen) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawTransform(swigCPtr, this, btTransform.getCPtr(transform), transform, orthoLen); else gdxBulletJNI.btIDebugDraw_drawTransformSwigExplicitbtIDebugDraw(swigCPtr, this, btTransform.getCPtr(transform), transform, orthoLen);
-  }
-
-  public void drawArc(Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect, float stepDegrees) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawArc__SWIG_0(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect, stepDegrees); else gdxBulletJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect, stepDegrees);
-  }
-
-  public void drawArc(Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawArc__SWIG_1(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect); else gdxBulletJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect);
-  }
-
-  public void drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color, float stepDegrees) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawSpherePatch__SWIG_0(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees); else gdxBulletJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees);
-  }
-
-  public void drawSpherePatch(Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawSpherePatch__SWIG_1(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color); else gdxBulletJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs, color);
-  }
-
-  public void drawBox(Vector3 bbMin, Vector3 bbMax, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawBox__SWIG_0(swigCPtr, this, bbMin, bbMax, color); else gdxBulletJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, bbMin, bbMax, color);
-  }
-
-  public void drawBox(Vector3 bbMin, Vector3 bbMax, btTransform trans, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawBox__SWIG_1(swigCPtr, this, bbMin, bbMax, btTransform.getCPtr(trans), trans, color); else gdxBulletJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, bbMin, bbMax, btTransform.getCPtr(trans), trans, color);
-  }
-
-  public void drawCapsule(float radius, float halfHeight, int upAxis, btTransform transform, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawCapsule(swigCPtr, this, radius, halfHeight, upAxis, btTransform.getCPtr(transform), transform, color); else gdxBulletJNI.btIDebugDraw_drawCapsuleSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, btTransform.getCPtr(transform), transform, color);
-  }
-
-  public void drawCylinder(float radius, float halfHeight, int upAxis, btTransform transform, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawCylinder(swigCPtr, this, radius, halfHeight, upAxis, btTransform.getCPtr(transform), transform, color); else gdxBulletJNI.btIDebugDraw_drawCylinderSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis, btTransform.getCPtr(transform), transform, color);
-  }
-
-  public void drawCone(float radius, float height, int upAxis, btTransform transform, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawCone(swigCPtr, this, radius, height, upAxis, btTransform.getCPtr(transform), transform, color); else gdxBulletJNI.btIDebugDraw_drawConeSwigExplicitbtIDebugDraw(swigCPtr, this, radius, height, upAxis, btTransform.getCPtr(transform), transform, color);
-  }
-
-  public void drawPlane(Vector3 planeNormal, float planeConst, btTransform transform, Vector3 color) {
-    if (getClass() == btIDebugDraw.class) gdxBulletJNI.btIDebugDraw_drawPlane(swigCPtr, this, planeNormal, planeConst, btTransform.getCPtr(transform), transform, color); else gdxBulletJNI.btIDebugDraw_drawPlaneSwigExplicitbtIDebugDraw(swigCPtr, this, planeNormal, planeConst, btTransform.getCPtr(transform), transform, color);
-  }
-
-  public btIDebugDraw() {
-    this(gdxBulletJNI.new_btIDebugDraw(), true);
-    gdxBulletJNI.btIDebugDraw_director_connect(this, swigCPtr, swigCMemOwn, true);
-  }
-
-  public final static class DebugDrawModes {
-    public final static int DBG_NoDebug = 0;
-    public final static int DBG_DrawWireframe = 1;
-    public final static int DBG_DrawAabb = 2;
-    public final static int DBG_DrawFeaturesText = 4;
-    public final static int DBG_DrawContactPoints = 8;
-    public final static int DBG_NoDeactivation = 16;
-    public final static int DBG_NoHelpText = 32;
-    public final static int DBG_DrawText = 64;
-    public final static int DBG_ProfileTimings = 128;
-    public final static int DBG_EnableSatComparison = 256;
-    public final static int DBG_DisableBulletLCP = 512;
-    public final static int DBG_EnableCCD = 1024;
-    public final static int DBG_DrawConstraints = (1 << 11);
-    public final static int DBG_DrawConstraintLimits = (1 << 12);
-    public final static int DBG_FastWireframe = (1 << 13);
-    public final static int DBG_DrawNormals = (1 << 14);
-    public final static int DBG_MAX_DEBUG_DRAW_MODE = DBG_DrawNormals + 1;
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btIDebugDraw (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btIDebugDraw obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btIDebugDraw(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       protected void swigDirectorDisconnect () {
+               swigCMemOwn = false;
+               delete();
+       }
+
+       public void swigReleaseOwnership () {
+               swigCMemOwn = false;
+               gdxBulletJNI.btIDebugDraw_change_ownership(this, swigCPtr, false);
+       }
+
+       public void swigTakeOwnership () {
+               swigCMemOwn = true;
+               gdxBulletJNI.btIDebugDraw_change_ownership(this, swigCPtr, true);
+       }
+
+       public void drawLine (Vector3 from, Vector3 to, Vector3 color) {
+               gdxBulletJNI.btIDebugDraw_drawLine__SWIG_0(swigCPtr, this, from, to, color);
+       }
+
+       public void drawLine (Vector3 from, Vector3 to, Vector3 fromColor, Vector3 toColor) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawLine__SWIG_1(swigCPtr, this, from, to, fromColor, toColor);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawLineSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, from, to, fromColor, toColor);
+       }
+
+       public void drawSphere (float radius, btTransform transform, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawSphere__SWIG_0(swigCPtr, this, radius, btTransform.getCPtr(transform), transform, color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, radius,
+                               btTransform.getCPtr(transform), transform, color);
+       }
+
+       public void drawSphere (Vector3 p, float radius, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawSphere__SWIG_1(swigCPtr, this, p, radius, color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, p, radius, color);
+       }
+
+       public void drawTriangle (Vector3 v0, Vector3 v1, Vector3 v2, Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color,
+               float alpha) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawTriangle__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5, color, alpha);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, v0, v1, v2, arg3, arg4, arg5,
+                               color, alpha);
+       }
+
+       public void drawTriangle (Vector3 v0, Vector3 v1, Vector3 v2, Vector3 color, float arg4) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawTriangle__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, v0, v1, v2, color, arg4);
+       }
+
+       public void drawContactPoint (Vector3 PointOnB, Vector3 normalOnB, float distance, int lifeTime, Vector3 color) {
+               gdxBulletJNI.btIDebugDraw_drawContactPoint(swigCPtr, this, PointOnB, normalOnB, distance, lifeTime, color);
+       }
+
+       public void reportErrorWarning (String warningString) {
+               gdxBulletJNI.btIDebugDraw_reportErrorWarning(swigCPtr, this, warningString);
+       }
+
+       public void draw3dText (Vector3 location, String textString) {
+               gdxBulletJNI.btIDebugDraw_draw3dText(swigCPtr, this, location, textString);
+       }
+
+       public void setDebugMode (int debugMode) {
+               gdxBulletJNI.btIDebugDraw_setDebugMode(swigCPtr, this, debugMode);
+       }
+
+       public int getDebugMode () {
+               return gdxBulletJNI.btIDebugDraw_getDebugMode(swigCPtr, this);
+       }
+
+       public void drawAabb (Vector3 from, Vector3 to, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawAabb(swigCPtr, this, from, to, color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawAabbSwigExplicitbtIDebugDraw(swigCPtr, this, from, to, color);
+       }
+
+       public void drawTransform (btTransform transform, float orthoLen) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawTransform(swigCPtr, this, btTransform.getCPtr(transform), transform, orthoLen);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawTransformSwigExplicitbtIDebugDraw(swigCPtr, this, btTransform.getCPtr(transform),
+                               transform, orthoLen);
+       }
+
+       public void drawArc (Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle,
+               float maxAngle, Vector3 color, boolean drawSect, float stepDegrees) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawArc__SWIG_0(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle,
+                               color, drawSect, stepDegrees);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, normal, axis, radiusA,
+                               radiusB, minAngle, maxAngle, color, drawSect, stepDegrees);
+       }
+
+       public void drawArc (Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle,
+               float maxAngle, Vector3 color, boolean drawSect) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawArc__SWIG_1(swigCPtr, this, center, normal, axis, radiusA, radiusB, minAngle, maxAngle,
+                               color, drawSect);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, normal, axis, radiusA,
+                               radiusB, minAngle, maxAngle, color, drawSect);
+       }
+
+       public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
+               float maxPs, Vector3 color, float stepDegrees) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawSpherePatch__SWIG_0(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
+                               color, stepDegrees);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, center, up, axis, radius,
+                               minTh, maxTh, minPs, maxPs, color, stepDegrees);
+       }
+
+       public void drawSpherePatch (Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs,
+               float maxPs, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawSpherePatch__SWIG_1(swigCPtr, this, center, up, axis, radius, minTh, maxTh, minPs, maxPs,
+                               color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, center, up, axis, radius,
+                               minTh, maxTh, minPs, maxPs, color);
+       }
+
+       public void drawBox (Vector3 bbMin, Vector3 bbMax, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawBox__SWIG_0(swigCPtr, this, bbMin, bbMax, color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_0(swigCPtr, this, bbMin, bbMax, color);
+       }
+
+       public void drawBox (Vector3 bbMin, Vector3 bbMax, btTransform trans, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawBox__SWIG_1(swigCPtr, this, bbMin, bbMax, btTransform.getCPtr(trans), trans, color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_1(swigCPtr, this, bbMin, bbMax,
+                               btTransform.getCPtr(trans), trans, color);
+       }
+
+       public void drawCapsule (float radius, float halfHeight, int upAxis, btTransform transform, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawCapsule(swigCPtr, this, radius, halfHeight, upAxis, btTransform.getCPtr(transform),
+                               transform, color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawCapsuleSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis,
+                               btTransform.getCPtr(transform), transform, color);
+       }
+
+       public void drawCylinder (float radius, float halfHeight, int upAxis, btTransform transform, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawCylinder(swigCPtr, this, radius, halfHeight, upAxis, btTransform.getCPtr(transform),
+                               transform, color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawCylinderSwigExplicitbtIDebugDraw(swigCPtr, this, radius, halfHeight, upAxis,
+                               btTransform.getCPtr(transform), transform, color);
+       }
+
+       public void drawCone (float radius, float height, int upAxis, btTransform transform, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawCone(swigCPtr, this, radius, height, upAxis, btTransform.getCPtr(transform), transform,
+                               color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawConeSwigExplicitbtIDebugDraw(swigCPtr, this, radius, height, upAxis,
+                               btTransform.getCPtr(transform), transform, color);
+       }
+
+       public void drawPlane (Vector3 planeNormal, float planeConst, btTransform transform, Vector3 color) {
+               if (getClass() == btIDebugDraw.class)
+                       gdxBulletJNI.btIDebugDraw_drawPlane(swigCPtr, this, planeNormal, planeConst, btTransform.getCPtr(transform), transform,
+                               color);
+               else
+                       gdxBulletJNI.btIDebugDraw_drawPlaneSwigExplicitbtIDebugDraw(swigCPtr, this, planeNormal, planeConst,
+                               btTransform.getCPtr(transform), transform, color);
+       }
+
+       public btIDebugDraw () {
+               this(gdxBulletJNI.new_btIDebugDraw(), true);
+               gdxBulletJNI.btIDebugDraw_director_connect(this, swigCPtr, swigCMemOwn, true);
+       }
+
+       public final static class DebugDrawModes {
+               public final static int DBG_NoDebug = 0;
+               public final static int DBG_DrawWireframe = 1;
+               public final static int DBG_DrawAabb = 2;
+               public final static int DBG_DrawFeaturesText = 4;
+               public final static int DBG_DrawContactPoints = 8;
+               public final static int DBG_NoDeactivation = 16;
+               public final static int DBG_NoHelpText = 32;
+               public final static int DBG_DrawText = 64;
+               public final static int DBG_ProfileTimings = 128;
+               public final static int DBG_EnableSatComparison = 256;
+               public final static int DBG_DisableBulletLCP = 512;
+               public final static int DBG_EnableCCD = 1024;
+               public final static int DBG_DrawConstraints = (1 << 11);
+               public final static int DBG_DrawConstraintLimits = (1 << 12);
+               public final static int DBG_FastWireframe = (1 << 13);
+               public final static int DBG_DrawNormals = (1 << 14);
+               public final static int DBG_MAX_DEBUG_DRAW_MODE = DBG_DrawNormals + 1;
+       }
 
 }
index b021436..9c96a29 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btIndexedMesh {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btIndexedMesh(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btIndexedMesh obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btIndexedMesh(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_numTriangles(int value) {
-    gdxBulletJNI.btIndexedMesh_m_numTriangles_set(swigCPtr, this, value);
-  }
-
-  public int getM_numTriangles() {
-    return gdxBulletJNI.btIndexedMesh_m_numTriangles_get(swigCPtr, this);
-  }
-
-  public void setM_triangleIndexBase(SWIGTYPE_p_unsigned_char value) {
-    gdxBulletJNI.btIndexedMesh_m_triangleIndexBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_unsigned_char getM_triangleIndexBase() {
-    long cPtr = gdxBulletJNI.btIndexedMesh_m_triangleIndexBase_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
-  }
-
-  public void setM_triangleIndexStride(int value) {
-    gdxBulletJNI.btIndexedMesh_m_triangleIndexStride_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleIndexStride() {
-    return gdxBulletJNI.btIndexedMesh_m_triangleIndexStride_get(swigCPtr, this);
-  }
-
-  public void setM_numVertices(int value) {
-    gdxBulletJNI.btIndexedMesh_m_numVertices_set(swigCPtr, this, value);
-  }
-
-  public int getM_numVertices() {
-    return gdxBulletJNI.btIndexedMesh_m_numVertices_get(swigCPtr, this);
-  }
-
-  public void setM_vertexBase(SWIGTYPE_p_unsigned_char value) {
-    gdxBulletJNI.btIndexedMesh_m_vertexBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_unsigned_char getM_vertexBase() {
-    long cPtr = gdxBulletJNI.btIndexedMesh_m_vertexBase_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
-  }
-
-  public void setM_vertexStride(int value) {
-    gdxBulletJNI.btIndexedMesh_m_vertexStride_set(swigCPtr, this, value);
-  }
-
-  public int getM_vertexStride() {
-    return gdxBulletJNI.btIndexedMesh_m_vertexStride_get(swigCPtr, this);
-  }
-
-  public void setM_indexType(int value) {
-    gdxBulletJNI.btIndexedMesh_m_indexType_set(swigCPtr, this, value);
-  }
-
-  public int getM_indexType() {
-    return gdxBulletJNI.btIndexedMesh_m_indexType_get(swigCPtr, this);
-  }
-
-  public void setM_vertexType(int value) {
-    gdxBulletJNI.btIndexedMesh_m_vertexType_set(swigCPtr, this, value);
-  }
-
-  public int getM_vertexType() {
-    return gdxBulletJNI.btIndexedMesh_m_vertexType_get(swigCPtr, this);
-  }
-
-  public btIndexedMesh() {
-    this(gdxBulletJNI.new_btIndexedMesh(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btIndexedMesh (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btIndexedMesh obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btIndexedMesh(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_numTriangles (int value) {
+               gdxBulletJNI.btIndexedMesh_m_numTriangles_set(swigCPtr, this, value);
+       }
+
+       public int getM_numTriangles () {
+               return gdxBulletJNI.btIndexedMesh_m_numTriangles_get(swigCPtr, this);
+       }
+
+       public void setM_triangleIndexBase (SWIGTYPE_p_unsigned_char value) {
+               gdxBulletJNI.btIndexedMesh_m_triangleIndexBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_unsigned_char getM_triangleIndexBase () {
+               long cPtr = gdxBulletJNI.btIndexedMesh_m_triangleIndexBase_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+       }
+
+       public void setM_triangleIndexStride (int value) {
+               gdxBulletJNI.btIndexedMesh_m_triangleIndexStride_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleIndexStride () {
+               return gdxBulletJNI.btIndexedMesh_m_triangleIndexStride_get(swigCPtr, this);
+       }
+
+       public void setM_numVertices (int value) {
+               gdxBulletJNI.btIndexedMesh_m_numVertices_set(swigCPtr, this, value);
+       }
+
+       public int getM_numVertices () {
+               return gdxBulletJNI.btIndexedMesh_m_numVertices_get(swigCPtr, this);
+       }
+
+       public void setM_vertexBase (SWIGTYPE_p_unsigned_char value) {
+               gdxBulletJNI.btIndexedMesh_m_vertexBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_unsigned_char getM_vertexBase () {
+               long cPtr = gdxBulletJNI.btIndexedMesh_m_vertexBase_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+       }
+
+       public void setM_vertexStride (int value) {
+               gdxBulletJNI.btIndexedMesh_m_vertexStride_set(swigCPtr, this, value);
+       }
+
+       public int getM_vertexStride () {
+               return gdxBulletJNI.btIndexedMesh_m_vertexStride_get(swigCPtr, this);
+       }
+
+       public void setM_indexType (int value) {
+               gdxBulletJNI.btIndexedMesh_m_indexType_set(swigCPtr, this, value);
+       }
+
+       public int getM_indexType () {
+               return gdxBulletJNI.btIndexedMesh_m_indexType_get(swigCPtr, this);
+       }
+
+       public void setM_vertexType (int value) {
+               gdxBulletJNI.btIndexedMesh_m_vertexType_set(swigCPtr, this, value);
+       }
+
+       public int getM_vertexType () {
+               return gdxBulletJNI.btIndexedMesh_m_vertexType_get(swigCPtr, this);
+       }
+
+       public btIndexedMesh () {
+               this(gdxBulletJNI.new_btIndexedMesh(), true);
+       }
 
 }
index 1d800ef..497c39d 100644 (file)
@@ -8,47 +8,43 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btIntIndexData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btIntIndexData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btIntIndexData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btIntIndexData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_value(int value) {
-    gdxBulletJNI.btIntIndexData_m_value_set(swigCPtr, this, value);
-  }
-
-  public int getM_value() {
-    return gdxBulletJNI.btIntIndexData_m_value_get(swigCPtr, this);
-  }
-
-  public btIntIndexData() {
-    this(gdxBulletJNI.new_btIntIndexData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btIntIndexData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btIntIndexData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btIntIndexData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_value (int value) {
+               gdxBulletJNI.btIntIndexData_m_value_set(swigCPtr, this, value);
+       }
+
+       public int getM_value () {
+               return gdxBulletJNI.btIntIndexData_m_value_get(swigCPtr, this);
+       }
+
+       public btIntIndexData () {
+               this(gdxBulletJNI.new_btIntIndexData(), true);
+       }
 
 }
index f7cc51b..e8f720e 100644 (file)
@@ -9,8 +9,7 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btInternalEdgeAdjustFlags {
-  public final static int BT_TRIANGLE_CONVEX_BACKFACE_MODE = 1;
-  public final static int BT_TRIANGLE_CONCAVE_DOUBLE_SIDED = 2;
-  public final static int BT_TRIANGLE_CONVEX_DOUBLE_SIDED = 4;
+       public final static int BT_TRIANGLE_CONVEX_BACKFACE_MODE = 1;
+       public final static int BT_TRIANGLE_CONCAVE_DOUBLE_SIDED = 2;
+       public final static int BT_TRIANGLE_CONVEX_DOUBLE_SIDED = 4;
 }
-
index df35bf9..d72c2ca 100644 (file)
@@ -8,39 +8,36 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btInternalTriangleIndexCallback {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btInternalTriangleIndexCallback(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btInternalTriangleIndexCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btInternalTriangleIndexCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void internalProcessTriangleIndex(btVector3 triangle, int partId, int triangleIndex) {
-    gdxBulletJNI.btInternalTriangleIndexCallback_internalProcessTriangleIndex(swigCPtr, this, btVector3.getCPtr(triangle), triangle, partId, triangleIndex);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btInternalTriangleIndexCallback (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btInternalTriangleIndexCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btInternalTriangleIndexCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void internalProcessTriangleIndex (btVector3 triangle, int partId, int triangleIndex) {
+               gdxBulletJNI.btInternalTriangleIndexCallback_internalProcessTriangleIndex(swigCPtr, this, btVector3.getCPtr(triangle),
+                       triangle, partId, triangleIndex);
+       }
 
 }
index ba93e69..d75eeb2 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
 import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Vector3;
 
 public class btJacobianEntry {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btJacobianEntry(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btJacobianEntry obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btJacobianEntry(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btJacobianEntry() {
-    this(gdxBulletJNI.new_btJacobianEntry__SWIG_0(), true);
-  }
-
-  public btJacobianEntry(Matrix3 world2A, Matrix3 world2B, Vector3 rel_pos1, Vector3 rel_pos2, Vector3 jointAxis, Vector3 inertiaInvA, float massInvA, Vector3 inertiaInvB, float massInvB) {
-    this(gdxBulletJNI.new_btJacobianEntry__SWIG_1(world2A, world2B, rel_pos1, rel_pos2, jointAxis, inertiaInvA, massInvA, inertiaInvB, massInvB), true);
-  }
-
-  public btJacobianEntry(Vector3 jointAxis, Matrix3 world2A, Matrix3 world2B, Vector3 inertiaInvA, Vector3 inertiaInvB) {
-    this(gdxBulletJNI.new_btJacobianEntry__SWIG_2(jointAxis, world2A, world2B, inertiaInvA, inertiaInvB), true);
-  }
-
-  public btJacobianEntry(Vector3 axisInA, Vector3 axisInB, Vector3 inertiaInvA, Vector3 inertiaInvB) {
-    this(gdxBulletJNI.new_btJacobianEntry__SWIG_3(axisInA, axisInB, inertiaInvA, inertiaInvB), true);
-  }
-
-  public btJacobianEntry(Matrix3 world2A, Vector3 rel_pos1, Vector3 rel_pos2, Vector3 jointAxis, Vector3 inertiaInvA, float massInvA) {
-    this(gdxBulletJNI.new_btJacobianEntry__SWIG_4(world2A, rel_pos1, rel_pos2, jointAxis, inertiaInvA, massInvA), true);
-  }
-
-  public float getDiagonal() {
-    return gdxBulletJNI.btJacobianEntry_getDiagonal(swigCPtr, this);
-  }
-
-  public float getNonDiagonal(btJacobianEntry jacB, float massInvA) {
-    return gdxBulletJNI.btJacobianEntry_getNonDiagonal__SWIG_0(swigCPtr, this, btJacobianEntry.getCPtr(jacB), jacB, massInvA);
-  }
-
-  public float getNonDiagonal(btJacobianEntry jacB, float massInvA, float massInvB) {
-    return gdxBulletJNI.btJacobianEntry_getNonDiagonal__SWIG_1(swigCPtr, this, btJacobianEntry.getCPtr(jacB), jacB, massInvA, massInvB);
-  }
-
-  public float getRelativeVelocity(Vector3 linvelA, Vector3 angvelA, Vector3 linvelB, Vector3 angvelB) {
-    return gdxBulletJNI.btJacobianEntry_getRelativeVelocity(swigCPtr, this, linvelA, angvelA, linvelB, angvelB);
-  }
-
-  public void setM_linearJointAxis(btVector3 value) {
-    gdxBulletJNI.btJacobianEntry_m_linearJointAxis_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_linearJointAxis() {
-    long cPtr = gdxBulletJNI.btJacobianEntry_m_linearJointAxis_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_aJ(btVector3 value) {
-    gdxBulletJNI.btJacobianEntry_m_aJ_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_aJ() {
-    long cPtr = gdxBulletJNI.btJacobianEntry_m_aJ_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_bJ(btVector3 value) {
-    gdxBulletJNI.btJacobianEntry_m_bJ_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_bJ() {
-    long cPtr = gdxBulletJNI.btJacobianEntry_m_bJ_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_0MinvJt(btVector3 value) {
-    gdxBulletJNI.btJacobianEntry_m_0MinvJt_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_0MinvJt() {
-    long cPtr = gdxBulletJNI.btJacobianEntry_m_0MinvJt_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_1MinvJt(btVector3 value) {
-    gdxBulletJNI.btJacobianEntry_m_1MinvJt_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_1MinvJt() {
-    long cPtr = gdxBulletJNI.btJacobianEntry_m_1MinvJt_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_Adiag(float value) {
-    gdxBulletJNI.btJacobianEntry_m_Adiag_set(swigCPtr, this, value);
-  }
-
-  public float getM_Adiag() {
-    return gdxBulletJNI.btJacobianEntry_m_Adiag_get(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btJacobianEntry (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btJacobianEntry obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btJacobianEntry(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btJacobianEntry () {
+               this(gdxBulletJNI.new_btJacobianEntry__SWIG_0(), true);
+       }
+
+       public btJacobianEntry (Matrix3 world2A, Matrix3 world2B, Vector3 rel_pos1, Vector3 rel_pos2, Vector3 jointAxis,
+               Vector3 inertiaInvA, float massInvA, Vector3 inertiaInvB, float massInvB) {
+               this(gdxBulletJNI.new_btJacobianEntry__SWIG_1(world2A, world2B, rel_pos1, rel_pos2, jointAxis, inertiaInvA, massInvA,
+                       inertiaInvB, massInvB), true);
+       }
+
+       public btJacobianEntry (Vector3 jointAxis, Matrix3 world2A, Matrix3 world2B, Vector3 inertiaInvA, Vector3 inertiaInvB) {
+               this(gdxBulletJNI.new_btJacobianEntry__SWIG_2(jointAxis, world2A, world2B, inertiaInvA, inertiaInvB), true);
+       }
+
+       public btJacobianEntry (Vector3 axisInA, Vector3 axisInB, Vector3 inertiaInvA, Vector3 inertiaInvB) {
+               this(gdxBulletJNI.new_btJacobianEntry__SWIG_3(axisInA, axisInB, inertiaInvA, inertiaInvB), true);
+       }
+
+       public btJacobianEntry (Matrix3 world2A, Vector3 rel_pos1, Vector3 rel_pos2, Vector3 jointAxis, Vector3 inertiaInvA,
+               float massInvA) {
+               this(gdxBulletJNI.new_btJacobianEntry__SWIG_4(world2A, rel_pos1, rel_pos2, jointAxis, inertiaInvA, massInvA), true);
+       }
+
+       public float getDiagonal () {
+               return gdxBulletJNI.btJacobianEntry_getDiagonal(swigCPtr, this);
+       }
+
+       public float getNonDiagonal (btJacobianEntry jacB, float massInvA) {
+               return gdxBulletJNI.btJacobianEntry_getNonDiagonal__SWIG_0(swigCPtr, this, btJacobianEntry.getCPtr(jacB), jacB, massInvA);
+       }
+
+       public float getNonDiagonal (btJacobianEntry jacB, float massInvA, float massInvB) {
+               return gdxBulletJNI.btJacobianEntry_getNonDiagonal__SWIG_1(swigCPtr, this, btJacobianEntry.getCPtr(jacB), jacB, massInvA,
+                       massInvB);
+       }
+
+       public float getRelativeVelocity (Vector3 linvelA, Vector3 angvelA, Vector3 linvelB, Vector3 angvelB) {
+               return gdxBulletJNI.btJacobianEntry_getRelativeVelocity(swigCPtr, this, linvelA, angvelA, linvelB, angvelB);
+       }
+
+       public void setM_linearJointAxis (btVector3 value) {
+               gdxBulletJNI.btJacobianEntry_m_linearJointAxis_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_linearJointAxis () {
+               long cPtr = gdxBulletJNI.btJacobianEntry_m_linearJointAxis_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_aJ (btVector3 value) {
+               gdxBulletJNI.btJacobianEntry_m_aJ_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_aJ () {
+               long cPtr = gdxBulletJNI.btJacobianEntry_m_aJ_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_bJ (btVector3 value) {
+               gdxBulletJNI.btJacobianEntry_m_bJ_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_bJ () {
+               long cPtr = gdxBulletJNI.btJacobianEntry_m_bJ_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_0MinvJt (btVector3 value) {
+               gdxBulletJNI.btJacobianEntry_m_0MinvJt_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_0MinvJt () {
+               long cPtr = gdxBulletJNI.btJacobianEntry_m_0MinvJt_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_1MinvJt (btVector3 value) {
+               gdxBulletJNI.btJacobianEntry_m_1MinvJt_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_1MinvJt () {
+               long cPtr = gdxBulletJNI.btJacobianEntry_m_1MinvJt_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_Adiag (float value) {
+               gdxBulletJNI.btJacobianEntry_m_Adiag_set(swigCPtr, this, value);
+       }
+
+       public float getM_Adiag () {
+               return gdxBulletJNI.btJacobianEntry_m_Adiag_get(swigCPtr, this);
+       }
 
 }
index e82c0b6..9476f58 100644 (file)
@@ -8,84 +8,83 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btKinematicCharacterController extends btCharacterControllerInterface {
-  private long swigCPtr;
-
-  protected btKinematicCharacterController(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btKinematicCharacterController_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btKinematicCharacterController obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btKinematicCharacterController(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btKinematicCharacterController(btPairCachingGhostObject ghostObject, btConvexShape convexShape, float stepHeight, int upAxis) {
-    this(gdxBulletJNI.new_btKinematicCharacterController__SWIG_0(btPairCachingGhostObject.getCPtr(ghostObject), ghostObject, btConvexShape.getCPtr(convexShape), convexShape, stepHeight, upAxis), true);
-  }
-
-  public btKinematicCharacterController(btPairCachingGhostObject ghostObject, btConvexShape convexShape, float stepHeight) {
-    this(gdxBulletJNI.new_btKinematicCharacterController__SWIG_1(btPairCachingGhostObject.getCPtr(ghostObject), ghostObject, btConvexShape.getCPtr(convexShape), convexShape, stepHeight), true);
-  }
-
-  public void setUpAxis(int axis) {
-    gdxBulletJNI.btKinematicCharacterController_setUpAxis(swigCPtr, this, axis);
-  }
-
-  public void setFallSpeed(float fallSpeed) {
-    gdxBulletJNI.btKinematicCharacterController_setFallSpeed(swigCPtr, this, fallSpeed);
-  }
-
-  public void setJumpSpeed(float jumpSpeed) {
-    gdxBulletJNI.btKinematicCharacterController_setJumpSpeed(swigCPtr, this, jumpSpeed);
-  }
-
-  public void setMaxJumpHeight(float maxJumpHeight) {
-    gdxBulletJNI.btKinematicCharacterController_setMaxJumpHeight(swigCPtr, this, maxJumpHeight);
-  }
-
-  public void setGravity(float gravity) {
-    gdxBulletJNI.btKinematicCharacterController_setGravity(swigCPtr, this, gravity);
-  }
-
-  public float getGravity() {
-    return gdxBulletJNI.btKinematicCharacterController_getGravity(swigCPtr, this);
-  }
-
-  public void setMaxSlope(float slopeRadians) {
-    gdxBulletJNI.btKinematicCharacterController_setMaxSlope(swigCPtr, this, slopeRadians);
-  }
-
-  public float getMaxSlope() {
-    return gdxBulletJNI.btKinematicCharacterController_getMaxSlope(swigCPtr, this);
-  }
-
-  public btPairCachingGhostObject getGhostObject() {
-    long cPtr = gdxBulletJNI.btKinematicCharacterController_getGhostObject(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPairCachingGhostObject(cPtr, false);
-  }
-
-  public void setUseGhostSweepTest(boolean useGhostObjectSweepTest) {
-    gdxBulletJNI.btKinematicCharacterController_setUseGhostSweepTest(swigCPtr, this, useGhostObjectSweepTest);
-  }
+       private long swigCPtr;
+
+       protected btKinematicCharacterController (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btKinematicCharacterController_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btKinematicCharacterController obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btKinematicCharacterController(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btKinematicCharacterController (btPairCachingGhostObject ghostObject, btConvexShape convexShape, float stepHeight,
+               int upAxis) {
+               this(gdxBulletJNI.new_btKinematicCharacterController__SWIG_0(btPairCachingGhostObject.getCPtr(ghostObject), ghostObject,
+                       btConvexShape.getCPtr(convexShape), convexShape, stepHeight, upAxis), true);
+       }
+
+       public btKinematicCharacterController (btPairCachingGhostObject ghostObject, btConvexShape convexShape, float stepHeight) {
+               this(gdxBulletJNI.new_btKinematicCharacterController__SWIG_1(btPairCachingGhostObject.getCPtr(ghostObject), ghostObject,
+                       btConvexShape.getCPtr(convexShape), convexShape, stepHeight), true);
+       }
+
+       public void setUpAxis (int axis) {
+               gdxBulletJNI.btKinematicCharacterController_setUpAxis(swigCPtr, this, axis);
+       }
+
+       public void setFallSpeed (float fallSpeed) {
+               gdxBulletJNI.btKinematicCharacterController_setFallSpeed(swigCPtr, this, fallSpeed);
+       }
+
+       public void setJumpSpeed (float jumpSpeed) {
+               gdxBulletJNI.btKinematicCharacterController_setJumpSpeed(swigCPtr, this, jumpSpeed);
+       }
+
+       public void setMaxJumpHeight (float maxJumpHeight) {
+               gdxBulletJNI.btKinematicCharacterController_setMaxJumpHeight(swigCPtr, this, maxJumpHeight);
+       }
+
+       public void setGravity (float gravity) {
+               gdxBulletJNI.btKinematicCharacterController_setGravity(swigCPtr, this, gravity);
+       }
+
+       public float getGravity () {
+               return gdxBulletJNI.btKinematicCharacterController_getGravity(swigCPtr, this);
+       }
+
+       public void setMaxSlope (float slopeRadians) {
+               gdxBulletJNI.btKinematicCharacterController_setMaxSlope(swigCPtr, this, slopeRadians);
+       }
+
+       public float getMaxSlope () {
+               return gdxBulletJNI.btKinematicCharacterController_getMaxSlope(swigCPtr, this);
+       }
+
+       public btPairCachingGhostObject getGhostObject () {
+               long cPtr = gdxBulletJNI.btKinematicCharacterController_getGhostObject(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPairCachingGhostObject(cPtr, false);
+       }
+
+       public void setUseGhostSweepTest (boolean useGhostObjectSweepTest) {
+               gdxBulletJNI.btKinematicCharacterController_setUseGhostSweepTest(swigCPtr, this, useGhostObjectSweepTest);
+       }
 
 }
index f221bfe..6089837 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btManifoldPoint {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btManifoldPoint(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btManifoldPoint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btManifoldPoint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btManifoldPoint() {
-    this(gdxBulletJNI.new_btManifoldPoint__SWIG_0(), true);
-  }
-
-  public btManifoldPoint(Vector3 pointA, Vector3 pointB, Vector3 normal, float distance) {
-    this(gdxBulletJNI.new_btManifoldPoint__SWIG_1(pointA, pointB, normal, distance), true);
-  }
-
-  public void setM_localPointA(btVector3 value) {
-    gdxBulletJNI.btManifoldPoint_m_localPointA_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_localPointA() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_localPointA_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_localPointB(btVector3 value) {
-    gdxBulletJNI.btManifoldPoint_m_localPointB_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_localPointB() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_localPointB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_positionWorldOnB(btVector3 value) {
-    gdxBulletJNI.btManifoldPoint_m_positionWorldOnB_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_positionWorldOnB() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_positionWorldOnB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_positionWorldOnA(btVector3 value) {
-    gdxBulletJNI.btManifoldPoint_m_positionWorldOnA_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_positionWorldOnA() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_positionWorldOnA_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_normalWorldOnB(btVector3 value) {
-    gdxBulletJNI.btManifoldPoint_m_normalWorldOnB_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_normalWorldOnB() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_normalWorldOnB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_distance1(float value) {
-    gdxBulletJNI.btManifoldPoint_m_distance1_set(swigCPtr, this, value);
-  }
-
-  public float getM_distance1() {
-    return gdxBulletJNI.btManifoldPoint_m_distance1_get(swigCPtr, this);
-  }
-
-  public void setM_combinedFriction(float value) {
-    gdxBulletJNI.btManifoldPoint_m_combinedFriction_set(swigCPtr, this, value);
-  }
-
-  public float getM_combinedFriction() {
-    return gdxBulletJNI.btManifoldPoint_m_combinedFriction_get(swigCPtr, this);
-  }
-
-  public void setM_combinedRestitution(float value) {
-    gdxBulletJNI.btManifoldPoint_m_combinedRestitution_set(swigCPtr, this, value);
-  }
-
-  public float getM_combinedRestitution() {
-    return gdxBulletJNI.btManifoldPoint_m_combinedRestitution_get(swigCPtr, this);
-  }
-
-  public void setM_partId0(int value) {
-    gdxBulletJNI.btManifoldPoint_m_partId0_set(swigCPtr, this, value);
-  }
-
-  public int getM_partId0() {
-    return gdxBulletJNI.btManifoldPoint_m_partId0_get(swigCPtr, this);
-  }
-
-  public void setM_partId1(int value) {
-    gdxBulletJNI.btManifoldPoint_m_partId1_set(swigCPtr, this, value);
-  }
-
-  public int getM_partId1() {
-    return gdxBulletJNI.btManifoldPoint_m_partId1_get(swigCPtr, this);
-  }
-
-  public void setM_index0(int value) {
-    gdxBulletJNI.btManifoldPoint_m_index0_set(swigCPtr, this, value);
-  }
-
-  public int getM_index0() {
-    return gdxBulletJNI.btManifoldPoint_m_index0_get(swigCPtr, this);
-  }
-
-  public void setM_index1(int value) {
-    gdxBulletJNI.btManifoldPoint_m_index1_set(swigCPtr, this, value);
-  }
-
-  public int getM_index1() {
-    return gdxBulletJNI.btManifoldPoint_m_index1_get(swigCPtr, this);
-  }
-
-  public void setM_userPersistentData(SWIGTYPE_p_void value) {
-    gdxBulletJNI.btManifoldPoint_m_userPersistentData_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_void getM_userPersistentData() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_userPersistentData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setM_appliedImpulse(float value) {
-    gdxBulletJNI.btManifoldPoint_m_appliedImpulse_set(swigCPtr, this, value);
-  }
-
-  public float getM_appliedImpulse() {
-    return gdxBulletJNI.btManifoldPoint_m_appliedImpulse_get(swigCPtr, this);
-  }
-
-  public void setM_lateralFrictionInitialized(boolean value) {
-    gdxBulletJNI.btManifoldPoint_m_lateralFrictionInitialized_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_lateralFrictionInitialized() {
-    return gdxBulletJNI.btManifoldPoint_m_lateralFrictionInitialized_get(swigCPtr, this);
-  }
-
-  public void setM_appliedImpulseLateral1(float value) {
-    gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral1_set(swigCPtr, this, value);
-  }
-
-  public float getM_appliedImpulseLateral1() {
-    return gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral1_get(swigCPtr, this);
-  }
-
-  public void setM_appliedImpulseLateral2(float value) {
-    gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral2_set(swigCPtr, this, value);
-  }
-
-  public float getM_appliedImpulseLateral2() {
-    return gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral2_get(swigCPtr, this);
-  }
-
-  public void setM_contactMotion1(float value) {
-    gdxBulletJNI.btManifoldPoint_m_contactMotion1_set(swigCPtr, this, value);
-  }
-
-  public float getM_contactMotion1() {
-    return gdxBulletJNI.btManifoldPoint_m_contactMotion1_get(swigCPtr, this);
-  }
-
-  public void setM_contactMotion2(float value) {
-    gdxBulletJNI.btManifoldPoint_m_contactMotion2_set(swigCPtr, this, value);
-  }
-
-  public float getM_contactMotion2() {
-    return gdxBulletJNI.btManifoldPoint_m_contactMotion2_get(swigCPtr, this);
-  }
-
-  public void setM_contactCFM1(float value) {
-    gdxBulletJNI.btManifoldPoint_m_contactCFM1_set(swigCPtr, this, value);
-  }
-
-  public float getM_contactCFM1() {
-    return gdxBulletJNI.btManifoldPoint_m_contactCFM1_get(swigCPtr, this);
-  }
-
-  public void setM_contactCFM2(float value) {
-    gdxBulletJNI.btManifoldPoint_m_contactCFM2_set(swigCPtr, this, value);
-  }
-
-  public float getM_contactCFM2() {
-    return gdxBulletJNI.btManifoldPoint_m_contactCFM2_get(swigCPtr, this);
-  }
-
-  public void setM_lifeTime(int value) {
-    gdxBulletJNI.btManifoldPoint_m_lifeTime_set(swigCPtr, this, value);
-  }
-
-  public int getM_lifeTime() {
-    return gdxBulletJNI.btManifoldPoint_m_lifeTime_get(swigCPtr, this);
-  }
-
-  public void setM_lateralFrictionDir1(btVector3 value) {
-    gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir1_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_lateralFrictionDir1() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir1_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_lateralFrictionDir2(btVector3 value) {
-    gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir2_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_lateralFrictionDir2() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir2_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setMConstraintRow(btConstraintRow value) {
-    gdxBulletJNI.btManifoldPoint_mConstraintRow_set(swigCPtr, this, btConstraintRow.getCPtr(value), value);
-  }
-
-  public btConstraintRow getMConstraintRow() {
-    long cPtr = gdxBulletJNI.btManifoldPoint_mConstraintRow_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConstraintRow(cPtr, false);
-  }
-
-  public float getDistance() {
-    return gdxBulletJNI.btManifoldPoint_getDistance(swigCPtr, this);
-  }
-
-  public int getLifeTime() {
-    return gdxBulletJNI.btManifoldPoint_getLifeTime(swigCPtr, this);
-  }
-
-  public Vector3 getPositionWorldOnA() {
-       return gdxBulletJNI.btManifoldPoint_getPositionWorldOnA(swigCPtr, this);
-}
-
-  public Vector3 getPositionWorldOnB() {
-       return gdxBulletJNI.btManifoldPoint_getPositionWorldOnB(swigCPtr, this);
-}
-
-  public void setDistance(float dist) {
-    gdxBulletJNI.btManifoldPoint_setDistance(swigCPtr, this, dist);
-  }
-
-  public float getAppliedImpulse() {
-    return gdxBulletJNI.btManifoldPoint_getAppliedImpulse(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btManifoldPoint (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btManifoldPoint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btManifoldPoint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btManifoldPoint () {
+               this(gdxBulletJNI.new_btManifoldPoint__SWIG_0(), true);
+       }
+
+       public btManifoldPoint (Vector3 pointA, Vector3 pointB, Vector3 normal, float distance) {
+               this(gdxBulletJNI.new_btManifoldPoint__SWIG_1(pointA, pointB, normal, distance), true);
+       }
+
+       public void setM_localPointA (btVector3 value) {
+               gdxBulletJNI.btManifoldPoint_m_localPointA_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_localPointA () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_localPointA_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_localPointB (btVector3 value) {
+               gdxBulletJNI.btManifoldPoint_m_localPointB_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_localPointB () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_localPointB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_positionWorldOnB (btVector3 value) {
+               gdxBulletJNI.btManifoldPoint_m_positionWorldOnB_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_positionWorldOnB () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_positionWorldOnB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_positionWorldOnA (btVector3 value) {
+               gdxBulletJNI.btManifoldPoint_m_positionWorldOnA_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_positionWorldOnA () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_positionWorldOnA_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_normalWorldOnB (btVector3 value) {
+               gdxBulletJNI.btManifoldPoint_m_normalWorldOnB_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_normalWorldOnB () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_normalWorldOnB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_distance1 (float value) {
+               gdxBulletJNI.btManifoldPoint_m_distance1_set(swigCPtr, this, value);
+       }
+
+       public float getM_distance1 () {
+               return gdxBulletJNI.btManifoldPoint_m_distance1_get(swigCPtr, this);
+       }
+
+       public void setM_combinedFriction (float value) {
+               gdxBulletJNI.btManifoldPoint_m_combinedFriction_set(swigCPtr, this, value);
+       }
+
+       public float getM_combinedFriction () {
+               return gdxBulletJNI.btManifoldPoint_m_combinedFriction_get(swigCPtr, this);
+       }
+
+       public void setM_combinedRestitution (float value) {
+               gdxBulletJNI.btManifoldPoint_m_combinedRestitution_set(swigCPtr, this, value);
+       }
+
+       public float getM_combinedRestitution () {
+               return gdxBulletJNI.btManifoldPoint_m_combinedRestitution_get(swigCPtr, this);
+       }
+
+       public void setM_partId0 (int value) {
+               gdxBulletJNI.btManifoldPoint_m_partId0_set(swigCPtr, this, value);
+       }
+
+       public int getM_partId0 () {
+               return gdxBulletJNI.btManifoldPoint_m_partId0_get(swigCPtr, this);
+       }
+
+       public void setM_partId1 (int value) {
+               gdxBulletJNI.btManifoldPoint_m_partId1_set(swigCPtr, this, value);
+       }
+
+       public int getM_partId1 () {
+               return gdxBulletJNI.btManifoldPoint_m_partId1_get(swigCPtr, this);
+       }
+
+       public void setM_index0 (int value) {
+               gdxBulletJNI.btManifoldPoint_m_index0_set(swigCPtr, this, value);
+       }
+
+       public int getM_index0 () {
+               return gdxBulletJNI.btManifoldPoint_m_index0_get(swigCPtr, this);
+       }
+
+       public void setM_index1 (int value) {
+               gdxBulletJNI.btManifoldPoint_m_index1_set(swigCPtr, this, value);
+       }
+
+       public int getM_index1 () {
+               return gdxBulletJNI.btManifoldPoint_m_index1_get(swigCPtr, this);
+       }
+
+       public void setM_userPersistentData (SWIGTYPE_p_void value) {
+               gdxBulletJNI.btManifoldPoint_m_userPersistentData_set(swigCPtr, this, SWIGTYPE_p_void.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_void getM_userPersistentData () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_userPersistentData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setM_appliedImpulse (float value) {
+               gdxBulletJNI.btManifoldPoint_m_appliedImpulse_set(swigCPtr, this, value);
+       }
+
+       public float getM_appliedImpulse () {
+               return gdxBulletJNI.btManifoldPoint_m_appliedImpulse_get(swigCPtr, this);
+       }
+
+       public void setM_lateralFrictionInitialized (boolean value) {
+               gdxBulletJNI.btManifoldPoint_m_lateralFrictionInitialized_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_lateralFrictionInitialized () {
+               return gdxBulletJNI.btManifoldPoint_m_lateralFrictionInitialized_get(swigCPtr, this);
+       }
+
+       public void setM_appliedImpulseLateral1 (float value) {
+               gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral1_set(swigCPtr, this, value);
+       }
+
+       public float getM_appliedImpulseLateral1 () {
+               return gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral1_get(swigCPtr, this);
+       }
+
+       public void setM_appliedImpulseLateral2 (float value) {
+               gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral2_set(swigCPtr, this, value);
+       }
+
+       public float getM_appliedImpulseLateral2 () {
+               return gdxBulletJNI.btManifoldPoint_m_appliedImpulseLateral2_get(swigCPtr, this);
+       }
+
+       public void setM_contactMotion1 (float value) {
+               gdxBulletJNI.btManifoldPoint_m_contactMotion1_set(swigCPtr, this, value);
+       }
+
+       public float getM_contactMotion1 () {
+               return gdxBulletJNI.btManifoldPoint_m_contactMotion1_get(swigCPtr, this);
+       }
+
+       public void setM_contactMotion2 (float value) {
+               gdxBulletJNI.btManifoldPoint_m_contactMotion2_set(swigCPtr, this, value);
+       }
+
+       public float getM_contactMotion2 () {
+               return gdxBulletJNI.btManifoldPoint_m_contactMotion2_get(swigCPtr, this);
+       }
+
+       public void setM_contactCFM1 (float value) {
+               gdxBulletJNI.btManifoldPoint_m_contactCFM1_set(swigCPtr, this, value);
+       }
+
+       public float getM_contactCFM1 () {
+               return gdxBulletJNI.btManifoldPoint_m_contactCFM1_get(swigCPtr, this);
+       }
+
+       public void setM_contactCFM2 (float value) {
+               gdxBulletJNI.btManifoldPoint_m_contactCFM2_set(swigCPtr, this, value);
+       }
+
+       public float getM_contactCFM2 () {
+               return gdxBulletJNI.btManifoldPoint_m_contactCFM2_get(swigCPtr, this);
+       }
+
+       public void setM_lifeTime (int value) {
+               gdxBulletJNI.btManifoldPoint_m_lifeTime_set(swigCPtr, this, value);
+       }
+
+       public int getM_lifeTime () {
+               return gdxBulletJNI.btManifoldPoint_m_lifeTime_get(swigCPtr, this);
+       }
+
+       public void setM_lateralFrictionDir1 (btVector3 value) {
+               gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir1_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_lateralFrictionDir1 () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir1_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_lateralFrictionDir2 (btVector3 value) {
+               gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir2_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_lateralFrictionDir2 () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_m_lateralFrictionDir2_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setMConstraintRow (btConstraintRow value) {
+               gdxBulletJNI.btManifoldPoint_mConstraintRow_set(swigCPtr, this, btConstraintRow.getCPtr(value), value);
+       }
+
+       public btConstraintRow getMConstraintRow () {
+               long cPtr = gdxBulletJNI.btManifoldPoint_mConstraintRow_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConstraintRow(cPtr, false);
+       }
+
+       public float getDistance () {
+               return gdxBulletJNI.btManifoldPoint_getDistance(swigCPtr, this);
+       }
+
+       public int getLifeTime () {
+               return gdxBulletJNI.btManifoldPoint_getLifeTime(swigCPtr, this);
+       }
+
+       public Vector3 getPositionWorldOnA () {
+               return gdxBulletJNI.btManifoldPoint_getPositionWorldOnA(swigCPtr, this);
+       }
+
+       public Vector3 getPositionWorldOnB () {
+               return gdxBulletJNI.btManifoldPoint_getPositionWorldOnB(swigCPtr, this);
+       }
+
+       public void setDistance (float dist) {
+               gdxBulletJNI.btManifoldPoint_setDistance(swigCPtr, this, dist);
+       }
+
+       public float getAppliedImpulse () {
+               return gdxBulletJNI.btManifoldPoint_getAppliedImpulse(swigCPtr, this);
+       }
 
 }
index 5a9e5c3..ef76b8d 100644 (file)
@@ -9,77 +9,76 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btManifoldResult {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btManifoldResult(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btManifoldResult obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btManifoldResult(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btManifoldResult() {
-    this(gdxBulletJNI.new_btManifoldResult__SWIG_0(), true);
-  }
-
-  public btManifoldResult(btCollisionObject body0, btCollisionObject body1) {
-    this(gdxBulletJNI.new_btManifoldResult__SWIG_1(btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1), true);
-  }
-
-  public void setPersistentManifold(btPersistentManifold manifoldPtr) {
-    gdxBulletJNI.btManifoldResult_setPersistentManifold(swigCPtr, this, btPersistentManifold.getCPtr(manifoldPtr), manifoldPtr);
-  }
-
-  public btPersistentManifold getPersistentManifold() {
-    long cPtr = gdxBulletJNI.btManifoldResult_getPersistentManifold__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
-  }
-
-  public void setShapeIdentifiersA(int partId0, int index0) {
-    gdxBulletJNI.btManifoldResult_setShapeIdentifiersA(swigCPtr, this, partId0, index0);
-  }
-
-  public void setShapeIdentifiersB(int partId1, int index1) {
-    gdxBulletJNI.btManifoldResult_setShapeIdentifiersB(swigCPtr, this, partId1, index1);
-  }
-
-  public void addContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) {
-    gdxBulletJNI.btManifoldResult_addContactPoint(swigCPtr, this, normalOnBInWorld, pointInWorld, depth);
-  }
-
-  public void refreshContactPoints() {
-    gdxBulletJNI.btManifoldResult_refreshContactPoints(swigCPtr, this);
-  }
-
-  public btCollisionObject getBody0Internal() {
-    long cPtr = gdxBulletJNI.btManifoldResult_getBody0Internal(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
-  }
-
-  public btCollisionObject getBody1Internal() {
-    long cPtr = gdxBulletJNI.btManifoldResult_getBody1Internal(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btManifoldResult (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btManifoldResult obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btManifoldResult(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btManifoldResult () {
+               this(gdxBulletJNI.new_btManifoldResult__SWIG_0(), true);
+       }
+
+       public btManifoldResult (btCollisionObject body0, btCollisionObject body1) {
+               this(gdxBulletJNI.new_btManifoldResult__SWIG_1(btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1),
+                       body1), true);
+       }
+
+       public void setPersistentManifold (btPersistentManifold manifoldPtr) {
+               gdxBulletJNI.btManifoldResult_setPersistentManifold(swigCPtr, this, btPersistentManifold.getCPtr(manifoldPtr), manifoldPtr);
+       }
+
+       public btPersistentManifold getPersistentManifold () {
+               long cPtr = gdxBulletJNI.btManifoldResult_getPersistentManifold__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPersistentManifold(cPtr, false);
+       }
+
+       public void setShapeIdentifiersA (int partId0, int index0) {
+               gdxBulletJNI.btManifoldResult_setShapeIdentifiersA(swigCPtr, this, partId0, index0);
+       }
+
+       public void setShapeIdentifiersB (int partId1, int index1) {
+               gdxBulletJNI.btManifoldResult_setShapeIdentifiersB(swigCPtr, this, partId1, index1);
+       }
+
+       public void addContactPoint (Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) {
+               gdxBulletJNI.btManifoldResult_addContactPoint(swigCPtr, this, normalOnBInWorld, pointInWorld, depth);
+       }
+
+       public void refreshContactPoints () {
+               gdxBulletJNI.btManifoldResult_refreshContactPoints(swigCPtr, this);
+       }
+
+       public btCollisionObject getBody0Internal () {
+               long cPtr = gdxBulletJNI.btManifoldResult_getBody0Internal(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
+       }
+
+       public btCollisionObject getBody1Internal () {
+               long cPtr = gdxBulletJNI.btManifoldResult_getBody1Internal(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionObject(cPtr, false);
+       }
 
 }
index 4bc6a07..a7bd4ee 100644 (file)
@@ -8,67 +8,63 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btMaterial {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btMaterial(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMaterial obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMaterial(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_friction(float value) {
-    gdxBulletJNI.btMaterial_m_friction_set(swigCPtr, this, value);
-  }
-
-  public float getM_friction() {
-    return gdxBulletJNI.btMaterial_m_friction_get(swigCPtr, this);
-  }
-
-  public void setM_restitution(float value) {
-    gdxBulletJNI.btMaterial_m_restitution_set(swigCPtr, this, value);
-  }
-
-  public float getM_restitution() {
-    return gdxBulletJNI.btMaterial_m_restitution_get(swigCPtr, this);
-  }
-
-  public void setPad(int[] value) {
-    gdxBulletJNI.btMaterial_pad_set(swigCPtr, this, value);
-  }
-
-  public int[] getPad() {
-    return gdxBulletJNI.btMaterial_pad_get(swigCPtr, this);
-  }
-
-  public btMaterial() {
-    this(gdxBulletJNI.new_btMaterial__SWIG_0(), true);
-  }
-
-  public btMaterial(float fric, float rest) {
-    this(gdxBulletJNI.new_btMaterial__SWIG_1(fric, rest), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btMaterial (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMaterial obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMaterial(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_friction (float value) {
+               gdxBulletJNI.btMaterial_m_friction_set(swigCPtr, this, value);
+       }
+
+       public float getM_friction () {
+               return gdxBulletJNI.btMaterial_m_friction_get(swigCPtr, this);
+       }
+
+       public void setM_restitution (float value) {
+               gdxBulletJNI.btMaterial_m_restitution_set(swigCPtr, this, value);
+       }
+
+       public float getM_restitution () {
+               return gdxBulletJNI.btMaterial_m_restitution_get(swigCPtr, this);
+       }
+
+       public void setPad (int[] value) {
+               gdxBulletJNI.btMaterial_pad_set(swigCPtr, this, value);
+       }
+
+       public int[] getPad () {
+               return gdxBulletJNI.btMaterial_pad_get(swigCPtr, this);
+       }
+
+       public btMaterial () {
+               this(gdxBulletJNI.new_btMaterial__SWIG_0(), true);
+       }
+
+       public btMaterial (float fric, float rest) {
+               this(gdxBulletJNI.new_btMaterial__SWIG_1(fric, rest), true);
+       }
 
 }
index d12c57b..b7dc2fa 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btMaterialProperties {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btMaterialProperties(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMaterialProperties obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMaterialProperties(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_numMaterials(int value) {
-    gdxBulletJNI.btMaterialProperties_m_numMaterials_set(swigCPtr, this, value);
-  }
-
-  public int getM_numMaterials() {
-    return gdxBulletJNI.btMaterialProperties_m_numMaterials_get(swigCPtr, this);
-  }
-
-  public void setM_materialBase(SWIGTYPE_p_unsigned_char value) {
-    gdxBulletJNI.btMaterialProperties_m_materialBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_unsigned_char getM_materialBase() {
-    long cPtr = gdxBulletJNI.btMaterialProperties_m_materialBase_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
-  }
-
-  public void setM_materialStride(int value) {
-    gdxBulletJNI.btMaterialProperties_m_materialStride_set(swigCPtr, this, value);
-  }
-
-  public int getM_materialStride() {
-    return gdxBulletJNI.btMaterialProperties_m_materialStride_get(swigCPtr, this);
-  }
-
-  public void setM_materialType(int value) {
-    gdxBulletJNI.btMaterialProperties_m_materialType_set(swigCPtr, this, value);
-  }
-
-  public int getM_materialType() {
-    return gdxBulletJNI.btMaterialProperties_m_materialType_get(swigCPtr, this);
-  }
-
-  public void setM_numTriangles(int value) {
-    gdxBulletJNI.btMaterialProperties_m_numTriangles_set(swigCPtr, this, value);
-  }
-
-  public int getM_numTriangles() {
-    return gdxBulletJNI.btMaterialProperties_m_numTriangles_get(swigCPtr, this);
-  }
-
-  public void setM_triangleMaterialsBase(SWIGTYPE_p_unsigned_char value) {
-    gdxBulletJNI.btMaterialProperties_m_triangleMaterialsBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_unsigned_char getM_triangleMaterialsBase() {
-    long cPtr = gdxBulletJNI.btMaterialProperties_m_triangleMaterialsBase_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
-  }
-
-  public void setM_triangleMaterialStride(int value) {
-    gdxBulletJNI.btMaterialProperties_m_triangleMaterialStride_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleMaterialStride() {
-    return gdxBulletJNI.btMaterialProperties_m_triangleMaterialStride_get(swigCPtr, this);
-  }
-
-  public void setM_triangleType(int value) {
-    gdxBulletJNI.btMaterialProperties_m_triangleType_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleType() {
-    return gdxBulletJNI.btMaterialProperties_m_triangleType_get(swigCPtr, this);
-  }
-
-  public btMaterialProperties() {
-    this(gdxBulletJNI.new_btMaterialProperties(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btMaterialProperties (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMaterialProperties obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMaterialProperties(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_numMaterials (int value) {
+               gdxBulletJNI.btMaterialProperties_m_numMaterials_set(swigCPtr, this, value);
+       }
+
+       public int getM_numMaterials () {
+               return gdxBulletJNI.btMaterialProperties_m_numMaterials_get(swigCPtr, this);
+       }
+
+       public void setM_materialBase (SWIGTYPE_p_unsigned_char value) {
+               gdxBulletJNI.btMaterialProperties_m_materialBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_unsigned_char getM_materialBase () {
+               long cPtr = gdxBulletJNI.btMaterialProperties_m_materialBase_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+       }
+
+       public void setM_materialStride (int value) {
+               gdxBulletJNI.btMaterialProperties_m_materialStride_set(swigCPtr, this, value);
+       }
+
+       public int getM_materialStride () {
+               return gdxBulletJNI.btMaterialProperties_m_materialStride_get(swigCPtr, this);
+       }
+
+       public void setM_materialType (int value) {
+               gdxBulletJNI.btMaterialProperties_m_materialType_set(swigCPtr, this, value);
+       }
+
+       public int getM_materialType () {
+               return gdxBulletJNI.btMaterialProperties_m_materialType_get(swigCPtr, this);
+       }
+
+       public void setM_numTriangles (int value) {
+               gdxBulletJNI.btMaterialProperties_m_numTriangles_set(swigCPtr, this, value);
+       }
+
+       public int getM_numTriangles () {
+               return gdxBulletJNI.btMaterialProperties_m_numTriangles_get(swigCPtr, this);
+       }
+
+       public void setM_triangleMaterialsBase (SWIGTYPE_p_unsigned_char value) {
+               gdxBulletJNI.btMaterialProperties_m_triangleMaterialsBase_set(swigCPtr, this, SWIGTYPE_p_unsigned_char.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_unsigned_char getM_triangleMaterialsBase () {
+               long cPtr = gdxBulletJNI.btMaterialProperties_m_triangleMaterialsBase_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+       }
+
+       public void setM_triangleMaterialStride (int value) {
+               gdxBulletJNI.btMaterialProperties_m_triangleMaterialStride_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleMaterialStride () {
+               return gdxBulletJNI.btMaterialProperties_m_triangleMaterialStride_get(swigCPtr, this);
+       }
+
+       public void setM_triangleType (int value) {
+               gdxBulletJNI.btMaterialProperties_m_triangleType_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleType () {
+               return gdxBulletJNI.btMaterialProperties_m_triangleType_get(swigCPtr, this);
+       }
+
+       public btMaterialProperties () {
+               this(gdxBulletJNI.new_btMaterialProperties(), true);
+       }
 
 }
index aeb9169..f54e8e6 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btMeshPartData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btMeshPartData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMeshPartData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMeshPartData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_vertices3f(btVector3FloatData value) {
-    gdxBulletJNI.btMeshPartData_m_vertices3f_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_vertices3f() {
-    long cPtr = gdxBulletJNI.btMeshPartData_m_vertices3f_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_vertices3d(btVector3DoubleData value) {
-    gdxBulletJNI.btMeshPartData_m_vertices3d_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_vertices3d() {
-    long cPtr = gdxBulletJNI.btMeshPartData_m_vertices3d_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_indices32(btIntIndexData value) {
-    gdxBulletJNI.btMeshPartData_m_indices32_set(swigCPtr, this, btIntIndexData.getCPtr(value), value);
-  }
-
-  public btIntIndexData getM_indices32() {
-    long cPtr = gdxBulletJNI.btMeshPartData_m_indices32_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btIntIndexData(cPtr, false);
-  }
-
-  public void setM_3indices16(btShortIntIndexTripletData value) {
-    gdxBulletJNI.btMeshPartData_m_3indices16_set(swigCPtr, this, btShortIntIndexTripletData.getCPtr(value), value);
-  }
-
-  public btShortIntIndexTripletData getM_3indices16() {
-    long cPtr = gdxBulletJNI.btMeshPartData_m_3indices16_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btShortIntIndexTripletData(cPtr, false);
-  }
-
-  public void setM_3indices8(btCharIndexTripletData value) {
-    gdxBulletJNI.btMeshPartData_m_3indices8_set(swigCPtr, this, btCharIndexTripletData.getCPtr(value), value);
-  }
-
-  public btCharIndexTripletData getM_3indices8() {
-    long cPtr = gdxBulletJNI.btMeshPartData_m_3indices8_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCharIndexTripletData(cPtr, false);
-  }
-
-  public void setM_indices16(btShortIntIndexData value) {
-    gdxBulletJNI.btMeshPartData_m_indices16_set(swigCPtr, this, btShortIntIndexData.getCPtr(value), value);
-  }
-
-  public btShortIntIndexData getM_indices16() {
-    long cPtr = gdxBulletJNI.btMeshPartData_m_indices16_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btShortIntIndexData(cPtr, false);
-  }
-
-  public void setM_numTriangles(int value) {
-    gdxBulletJNI.btMeshPartData_m_numTriangles_set(swigCPtr, this, value);
-  }
-
-  public int getM_numTriangles() {
-    return gdxBulletJNI.btMeshPartData_m_numTriangles_get(swigCPtr, this);
-  }
-
-  public void setM_numVertices(int value) {
-    gdxBulletJNI.btMeshPartData_m_numVertices_set(swigCPtr, this, value);
-  }
-
-  public int getM_numVertices() {
-    return gdxBulletJNI.btMeshPartData_m_numVertices_get(swigCPtr, this);
-  }
-
-  public btMeshPartData() {
-    this(gdxBulletJNI.new_btMeshPartData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btMeshPartData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMeshPartData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMeshPartData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_vertices3f (btVector3FloatData value) {
+               gdxBulletJNI.btMeshPartData_m_vertices3f_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_vertices3f () {
+               long cPtr = gdxBulletJNI.btMeshPartData_m_vertices3f_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_vertices3d (btVector3DoubleData value) {
+               gdxBulletJNI.btMeshPartData_m_vertices3d_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_vertices3d () {
+               long cPtr = gdxBulletJNI.btMeshPartData_m_vertices3d_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_indices32 (btIntIndexData value) {
+               gdxBulletJNI.btMeshPartData_m_indices32_set(swigCPtr, this, btIntIndexData.getCPtr(value), value);
+       }
+
+       public btIntIndexData getM_indices32 () {
+               long cPtr = gdxBulletJNI.btMeshPartData_m_indices32_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btIntIndexData(cPtr, false);
+       }
+
+       public void setM_3indices16 (btShortIntIndexTripletData value) {
+               gdxBulletJNI.btMeshPartData_m_3indices16_set(swigCPtr, this, btShortIntIndexTripletData.getCPtr(value), value);
+       }
+
+       public btShortIntIndexTripletData getM_3indices16 () {
+               long cPtr = gdxBulletJNI.btMeshPartData_m_3indices16_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btShortIntIndexTripletData(cPtr, false);
+       }
+
+       public void setM_3indices8 (btCharIndexTripletData value) {
+               gdxBulletJNI.btMeshPartData_m_3indices8_set(swigCPtr, this, btCharIndexTripletData.getCPtr(value), value);
+       }
+
+       public btCharIndexTripletData getM_3indices8 () {
+               long cPtr = gdxBulletJNI.btMeshPartData_m_3indices8_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCharIndexTripletData(cPtr, false);
+       }
+
+       public void setM_indices16 (btShortIntIndexData value) {
+               gdxBulletJNI.btMeshPartData_m_indices16_set(swigCPtr, this, btShortIntIndexData.getCPtr(value), value);
+       }
+
+       public btShortIntIndexData getM_indices16 () {
+               long cPtr = gdxBulletJNI.btMeshPartData_m_indices16_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btShortIntIndexData(cPtr, false);
+       }
+
+       public void setM_numTriangles (int value) {
+               gdxBulletJNI.btMeshPartData_m_numTriangles_set(swigCPtr, this, value);
+       }
+
+       public int getM_numTriangles () {
+               return gdxBulletJNI.btMeshPartData_m_numTriangles_get(swigCPtr, this);
+       }
+
+       public void setM_numVertices (int value) {
+               gdxBulletJNI.btMeshPartData_m_numVertices_set(swigCPtr, this, value);
+       }
+
+       public int getM_numVertices () {
+               return gdxBulletJNI.btMeshPartData_m_numVertices_get(swigCPtr, this);
+       }
+
+       public btMeshPartData () {
+               this(gdxBulletJNI.new_btMeshPartData(), true);
+       }
 
 }
index 9d543e2..d1c2646 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btMinkowskiPenetrationDepthSolver extends btConvexPenetrationDepthSolver {
-  private long swigCPtr;
-
-  protected btMinkowskiPenetrationDepthSolver(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btMinkowskiPenetrationDepthSolver_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMinkowskiPenetrationDepthSolver obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMinkowskiPenetrationDepthSolver(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btMinkowskiPenetrationDepthSolver() {
-    this(gdxBulletJNI.new_btMinkowskiPenetrationDepthSolver(), true);
-  }
+       private long swigCPtr;
+
+       protected btMinkowskiPenetrationDepthSolver (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btMinkowskiPenetrationDepthSolver_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMinkowskiPenetrationDepthSolver obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMinkowskiPenetrationDepthSolver(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btMinkowskiPenetrationDepthSolver () {
+               this(gdxBulletJNI.new_btMinkowskiPenetrationDepthSolver(), true);
+       }
 
 }
index 106c02f..eb83f31 100644 (file)
@@ -8,65 +8,62 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btMinkowskiSumShape extends btConvexInternalShape {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btMinkowskiSumShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btMinkowskiSumShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btMinkowskiSumShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btMinkowskiSumShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btMinkowskiSumShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btMinkowskiSumShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMinkowskiSumShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMinkowskiSumShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public btMinkowskiSumShape(btConvexShape shapeA, btConvexShape shapeB) {
-    this(gdxBulletJNI.new_btMinkowskiSumShape(btConvexShape.getCPtr(shapeA), shapeA, btConvexShape.getCPtr(shapeB), shapeB), true);
-  }
+       public btMinkowskiSumShape (btConvexShape shapeA, btConvexShape shapeB) {
+               this(gdxBulletJNI.new_btMinkowskiSumShape(btConvexShape.getCPtr(shapeA), shapeA, btConvexShape.getCPtr(shapeB), shapeB),
+                       true);
+       }
 
-  public void setTransformA(btTransform transA) {
-    gdxBulletJNI.btMinkowskiSumShape_setTransformA(swigCPtr, this, btTransform.getCPtr(transA), transA);
-  }
+       public void setTransformA (btTransform transA) {
+               gdxBulletJNI.btMinkowskiSumShape_setTransformA(swigCPtr, this, btTransform.getCPtr(transA), transA);
+       }
 
-  public void setTransformB(btTransform transB) {
-    gdxBulletJNI.btMinkowskiSumShape_setTransformB(swigCPtr, this, btTransform.getCPtr(transB), transB);
-  }
+       public void setTransformB (btTransform transB) {
+               gdxBulletJNI.btMinkowskiSumShape_setTransformB(swigCPtr, this, btTransform.getCPtr(transB), transB);
+       }
 
-  public btTransform getTransformA() {
-    return new btTransform(gdxBulletJNI.btMinkowskiSumShape_getTransformA(swigCPtr, this), false);
-  }
+       public btTransform getTransformA () {
+               return new btTransform(gdxBulletJNI.btMinkowskiSumShape_getTransformA(swigCPtr, this), false);
+       }
 
-  public btTransform GetTransformB() {
-    return new btTransform(gdxBulletJNI.btMinkowskiSumShape_GetTransformB(swigCPtr, this), false);
-  }
+       public btTransform GetTransformB () {
+               return new btTransform(gdxBulletJNI.btMinkowskiSumShape_GetTransformB(swigCPtr, this), false);
+       }
 
-  public btConvexShape getShapeA() {
-    long cPtr = gdxBulletJNI.btMinkowskiSumShape_getShapeA(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
-  }
+       public btConvexShape getShapeA () {
+               long cPtr = gdxBulletJNI.btMinkowskiSumShape_getShapeA(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
+       }
 
-  public btConvexShape getShapeB() {
-    long cPtr = gdxBulletJNI.btMinkowskiSumShape_getShapeB(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
-  }
+       public btConvexShape getShapeB () {
+               long cPtr = gdxBulletJNI.btMinkowskiSumShape_getShapeB(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
+       }
 
 }
index 0b1b719..98da816 100644 (file)
@@ -8,53 +8,48 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btMotionState {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btMotionState(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMotionState obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMotionState(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-
-  public static btMotionState newDerivedObject(long swigCPtr, boolean owner) {
-    if (swigCPtr == 0) {
-      return null;
-    }
-    
-    // There's currently just one implementation.
-    return new btDefaultMotionState(swigCPtr, owner);
-  }
-
-  public void getWorldTransform(btTransform worldTrans) {
-    gdxBulletJNI.btMotionState_getWorldTransform(swigCPtr, this, btTransform.getCPtr(worldTrans), worldTrans);
-  }
-
-  public void setWorldTransform(btTransform worldTrans) {
-    gdxBulletJNI.btMotionState_setWorldTransform(swigCPtr, this, btTransform.getCPtr(worldTrans), worldTrans);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btMotionState (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMotionState obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMotionState(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public static btMotionState newDerivedObject (long swigCPtr, boolean owner) {
+               if (swigCPtr == 0) {
+                       return null;
+               }
+
+               // There's currently just one implementation.
+               return new btDefaultMotionState(swigCPtr, owner);
+       }
+
+       public void getWorldTransform (btTransform worldTrans) {
+               gdxBulletJNI.btMotionState_getWorldTransform(swigCPtr, this, btTransform.getCPtr(worldTrans), worldTrans);
+       }
+
+       public void setWorldTransform (btTransform worldTrans) {
+               gdxBulletJNI.btMotionState_setWorldTransform(swigCPtr, this, btTransform.getCPtr(worldTrans), worldTrans);
+       }
 
 }
index 78ae221..570e679 100644 (file)
@@ -9,71 +9,78 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btMultiSapBroadphase extends btBroadphaseInterface {
-  private long swigCPtr;
-
-  protected btMultiSapBroadphase(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btMultiSapBroadphase_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMultiSapBroadphase obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMultiSapBroadphase(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t getBroadphaseArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t(gdxBulletJNI.btMultiSapBroadphase_getBroadphaseArray__SWIG_0(swigCPtr, this), false);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btMultiSapBroadphase_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin, aabbMax);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
-    gdxBulletJNI.btMultiSapBroadphase_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
-    gdxBulletJNI.btMultiSapBroadphase_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback);
-  }
-
-  public void addToChildBroadphase(SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy parentMultiSapProxy, btBroadphaseProxy childProxy, btBroadphaseInterface childBroadphase) {
-    gdxBulletJNI.btMultiSapBroadphase_addToChildBroadphase(swigCPtr, this, SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy.getCPtr(parentMultiSapProxy), btBroadphaseProxy.getCPtr(childProxy), childProxy, btBroadphaseInterface.getCPtr(childBroadphase), childBroadphase);
-  }
-
-  public boolean testAabbOverlap(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    return gdxBulletJNI.btMultiSapBroadphase_testAabbOverlap(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
-  }
-
-  public btOverlappingPairCache getOverlappingPairCache() {
-    long cPtr = gdxBulletJNI.btMultiSapBroadphase_getOverlappingPairCache__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
-  }
-
-  public void buildTree(Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
-    gdxBulletJNI.btMultiSapBroadphase_buildTree(swigCPtr, this, bvhAabbMin, bvhAabbMax);
-  }
-
-  public void quicksort(SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t a, int lo, int hi) {
-    gdxBulletJNI.btMultiSapBroadphase_quicksort(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t.getCPtr(a), lo, hi);
-  }
+       private long swigCPtr;
+
+       protected btMultiSapBroadphase (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btMultiSapBroadphase_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMultiSapBroadphase obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMultiSapBroadphase(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t getBroadphaseArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphaseInterface_p_t(
+                       gdxBulletJNI.btMultiSapBroadphase_getBroadphaseArray__SWIG_0(swigCPtr, this), false);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btMultiSapBroadphase_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin, aabbMax);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
+               gdxBulletJNI.btMultiSapBroadphase_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
+               gdxBulletJNI.btMultiSapBroadphase_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback);
+       }
+
+       public void addToChildBroadphase (SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy parentMultiSapProxy,
+               btBroadphaseProxy childProxy, btBroadphaseInterface childBroadphase) {
+               gdxBulletJNI.btMultiSapBroadphase_addToChildBroadphase(swigCPtr, this,
+                       SWIGTYPE_p_btMultiSapBroadphase__btMultiSapProxy.getCPtr(parentMultiSapProxy), btBroadphaseProxy.getCPtr(childProxy),
+                       childProxy, btBroadphaseInterface.getCPtr(childBroadphase), childBroadphase);
+       }
+
+       public boolean testAabbOverlap (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               return gdxBulletJNI.btMultiSapBroadphase_testAabbOverlap(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0,
+                       btBroadphaseProxy.getCPtr(proxy1), proxy1);
+       }
+
+       public btOverlappingPairCache getOverlappingPairCache () {
+               long cPtr = gdxBulletJNI.btMultiSapBroadphase_getOverlappingPairCache__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
+       }
+
+       public void buildTree (Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
+               gdxBulletJNI.btMultiSapBroadphase_buildTree(swigCPtr, this, bvhAabbMin, bvhAabbMax);
+       }
+
+       public void quicksort (SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t a, int lo, int hi) {
+               gdxBulletJNI.btMultiSapBroadphase_quicksort(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t.getCPtr(a),
+                       lo, hi);
+       }
 
 }
index 84ada4e..d5893b8 100644 (file)
@@ -9,50 +9,48 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btMultiSphereShape extends btConvexInternalAabbCachingShape {
-  private long swigCPtr;
-
-  protected btMultiSphereShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btMultiSphereShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMultiSphereShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMultiSphereShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btMultiSphereShape(btVector3 positions, float[] radi, int numSpheres) {
-    this(gdxBulletJNI.new_btMultiSphereShape(btVector3.getCPtr(positions), positions, radi, numSpheres), true);
-  }
-
-  public int getSphereCount() {
-    return gdxBulletJNI.btMultiSphereShape_getSphereCount(swigCPtr, this);
-  }
-
-  public Vector3 getSpherePosition(int index) {
-       return gdxBulletJNI.btMultiSphereShape_getSpherePosition(swigCPtr, this, index);
-}
-
-  public float getSphereRadius(int index) {
-    return gdxBulletJNI.btMultiSphereShape_getSphereRadius(swigCPtr, this, index);
-  }
+       private long swigCPtr;
+
+       protected btMultiSphereShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btMultiSphereShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMultiSphereShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMultiSphereShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btMultiSphereShape (btVector3 positions, float[] radi, int numSpheres) {
+               this(gdxBulletJNI.new_btMultiSphereShape(btVector3.getCPtr(positions), positions, radi, numSpheres), true);
+       }
+
+       public int getSphereCount () {
+               return gdxBulletJNI.btMultiSphereShape_getSphereCount(swigCPtr, this);
+       }
+
+       public Vector3 getSpherePosition (int index) {
+               return gdxBulletJNI.btMultiSphereShape_getSpherePosition(swigCPtr, this, index);
+       }
+
+       public float getSphereRadius (int index) {
+               return gdxBulletJNI.btMultiSphereShape_getSphereRadius(swigCPtr, this, index);
+       }
 
 }
index 985fee6..0a43f74 100644 (file)
@@ -8,73 +8,70 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btMultiSphereShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btMultiSphereShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMultiSphereShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMultiSphereShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_convexInternalShapeData(btConvexInternalShapeData value) {
-    gdxBulletJNI.btMultiSphereShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value), value);
-  }
-
-  public btConvexInternalShapeData getM_convexInternalShapeData() {
-    long cPtr = gdxBulletJNI.btMultiSphereShapeData_m_convexInternalShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
-  }
-
-  public void setM_localPositionArrayPtr(btPositionAndRadius value) {
-    gdxBulletJNI.btMultiSphereShapeData_m_localPositionArrayPtr_set(swigCPtr, this, btPositionAndRadius.getCPtr(value), value);
-  }
-
-  public btPositionAndRadius getM_localPositionArrayPtr() {
-    long cPtr = gdxBulletJNI.btMultiSphereShapeData_m_localPositionArrayPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btPositionAndRadius(cPtr, false);
-  }
-
-  public void setM_localPositionArraySize(int value) {
-    gdxBulletJNI.btMultiSphereShapeData_m_localPositionArraySize_set(swigCPtr, this, value);
-  }
-
-  public int getM_localPositionArraySize() {
-    return gdxBulletJNI.btMultiSphereShapeData_m_localPositionArraySize_get(swigCPtr, this);
-  }
-
-  public void setM_padding(String value) {
-    gdxBulletJNI.btMultiSphereShapeData_m_padding_set(swigCPtr, this, value);
-  }
-
-  public String getM_padding() {
-    return gdxBulletJNI.btMultiSphereShapeData_m_padding_get(swigCPtr, this);
-  }
-
-  public btMultiSphereShapeData() {
-    this(gdxBulletJNI.new_btMultiSphereShapeData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btMultiSphereShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMultiSphereShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMultiSphereShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_convexInternalShapeData (btConvexInternalShapeData value) {
+               gdxBulletJNI.btMultiSphereShapeData_m_convexInternalShapeData_set(swigCPtr, this, btConvexInternalShapeData.getCPtr(value),
+                       value);
+       }
+
+       public btConvexInternalShapeData getM_convexInternalShapeData () {
+               long cPtr = gdxBulletJNI.btMultiSphereShapeData_m_convexInternalShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexInternalShapeData(cPtr, false);
+       }
+
+       public void setM_localPositionArrayPtr (btPositionAndRadius value) {
+               gdxBulletJNI.btMultiSphereShapeData_m_localPositionArrayPtr_set(swigCPtr, this, btPositionAndRadius.getCPtr(value), value);
+       }
+
+       public btPositionAndRadius getM_localPositionArrayPtr () {
+               long cPtr = gdxBulletJNI.btMultiSphereShapeData_m_localPositionArrayPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btPositionAndRadius(cPtr, false);
+       }
+
+       public void setM_localPositionArraySize (int value) {
+               gdxBulletJNI.btMultiSphereShapeData_m_localPositionArraySize_set(swigCPtr, this, value);
+       }
+
+       public int getM_localPositionArraySize () {
+               return gdxBulletJNI.btMultiSphereShapeData_m_localPositionArraySize_get(swigCPtr, this);
+       }
+
+       public void setM_padding (String value) {
+               gdxBulletJNI.btMultiSphereShapeData_m_padding_set(swigCPtr, this, value);
+       }
+
+       public String getM_padding () {
+               return gdxBulletJNI.btMultiSphereShapeData_m_padding_get(swigCPtr, this);
+       }
+
+       public btMultiSphereShapeData () {
+               this(gdxBulletJNI.new_btMultiSphereShapeData(), true);
+       }
 
 }
index b05ae15..8b7350d 100644 (file)
@@ -9,55 +9,60 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btMultimaterialTriangleMeshShape extends btBvhTriangleMeshShape {
-  private long swigCPtr;
-
-  protected btMultimaterialTriangleMeshShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btMultimaterialTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btMultimaterialTriangleMeshShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btMultimaterialTriangleMeshShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btMultimaterialTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, boolean buildBvh) {
-    this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_0(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression, buildBvh), true);
-  }
-
-  public btMultimaterialTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression) {
-    this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_1(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression), true);
-  }
-
-  public btMultimaterialTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax, boolean buildBvh) {
-    this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_2(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh), true);
-  }
-
-  public btMultimaterialTriangleMeshShape(btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
-    this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_3(btStridingMeshInterface.getCPtr(meshInterface), meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax), true);
-  }
-
-  public btMaterial getMaterialProperties(int partID, int triIndex) {
-    long cPtr = gdxBulletJNI.btMultimaterialTriangleMeshShape_getMaterialProperties(swigCPtr, this, partID, triIndex);
-    return (cPtr == 0) ? null : new btMaterial(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btMultimaterialTriangleMeshShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btMultimaterialTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btMultimaterialTriangleMeshShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btMultimaterialTriangleMeshShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btMultimaterialTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression,
+               boolean buildBvh) {
+               this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_0(btStridingMeshInterface.getCPtr(meshInterface),
+                       meshInterface, useQuantizedAabbCompression, buildBvh), true);
+       }
+
+       public btMultimaterialTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression) {
+               this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_1(btStridingMeshInterface.getCPtr(meshInterface),
+                       meshInterface, useQuantizedAabbCompression), true);
+       }
+
+       public btMultimaterialTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression,
+               Vector3 bvhAabbMin, Vector3 bvhAabbMax, boolean buildBvh) {
+               this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_2(btStridingMeshInterface.getCPtr(meshInterface),
+                       meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax, buildBvh), true);
+       }
+
+       public btMultimaterialTriangleMeshShape (btStridingMeshInterface meshInterface, boolean useQuantizedAabbCompression,
+               Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
+               this(gdxBulletJNI.new_btMultimaterialTriangleMeshShape__SWIG_3(btStridingMeshInterface.getCPtr(meshInterface),
+                       meshInterface, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax), true);
+       }
+
+       public btMaterial getMaterialProperties (int partID, int triIndex) {
+               long cPtr = gdxBulletJNI.btMultimaterialTriangleMeshShape_getMaterialProperties(swigCPtr, this, partID, triIndex);
+               return (cPtr == 0) ? null : new btMaterial(cPtr, false);
+       }
 
 }
index b00ffde..96a83a1 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btNodeOverlapCallback {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btNodeOverlapCallback(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btNodeOverlapCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btNodeOverlapCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void processNode(int subPart, int triangleIndex) {
-    gdxBulletJNI.btNodeOverlapCallback_processNode(swigCPtr, this, subPart, triangleIndex);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btNodeOverlapCallback (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btNodeOverlapCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btNodeOverlapCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void processNode (int subPart, int triangleIndex) {
+               gdxBulletJNI.btNodeOverlapCallback_processNode(swigCPtr, this, subPart, triangleIndex);
+       }
 
 }
index f8983a1..7e510aa 100644 (file)
@@ -8,44 +8,40 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btNullPairCache extends btOverlappingPairCache {
-  private long swigCPtr;
-
-  protected btNullPairCache(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btNullPairCache_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btNullPairCache obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btNullPairCache(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btBroadphasePair getOverlappingPairArrayPtr() {
-    long cPtr = gdxBulletJNI.btNullPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
-  }
-
-  public btNullPairCache() {
-    this(gdxBulletJNI.new_btNullPairCache(), true);
-  }
+       private long swigCPtr;
+
+       protected btNullPairCache (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btNullPairCache_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btNullPairCache obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btNullPairCache(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btBroadphasePair getOverlappingPairArrayPtr () {
+               long cPtr = gdxBulletJNI.btNullPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
+       }
+
+       public btNullPairCache () {
+               this(gdxBulletJNI.new_btNullPairCache(), true);
+       }
 
 }
index 4f7d6fa..c2da386 100644 (file)
@@ -9,63 +9,68 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btOptimizedBvh extends btQuantizedBvh {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btOptimizedBvh(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btOptimizedBvh_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btOptimizedBvh (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btOptimizedBvh_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btOptimizedBvh obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btOptimizedBvh obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOptimizedBvh(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOptimizedBvh(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public btOptimizedBvh() {
-    this(gdxBulletJNI.new_btOptimizedBvh(), true);
-  }
+       public btOptimizedBvh () {
+               this(gdxBulletJNI.new_btOptimizedBvh(), true);
+       }
 
-  public void build(btStridingMeshInterface triangles, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
-    gdxBulletJNI.btOptimizedBvh_build(swigCPtr, this, btStridingMeshInterface.getCPtr(triangles), triangles, useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax);
-  }
+       public void build (btStridingMeshInterface triangles, boolean useQuantizedAabbCompression, Vector3 bvhAabbMin,
+               Vector3 bvhAabbMax) {
+               gdxBulletJNI.btOptimizedBvh_build(swigCPtr, this, btStridingMeshInterface.getCPtr(triangles), triangles,
+                       useQuantizedAabbCompression, bvhAabbMin, bvhAabbMax);
+       }
 
-  public void refit(btStridingMeshInterface triangles, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btOptimizedBvh_refit(swigCPtr, this, btStridingMeshInterface.getCPtr(triangles), triangles, aabbMin, aabbMax);
-  }
+       public void refit (btStridingMeshInterface triangles, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btOptimizedBvh_refit(swigCPtr, this, btStridingMeshInterface.getCPtr(triangles), triangles, aabbMin, aabbMax);
+       }
 
-  public void refitPartial(btStridingMeshInterface triangles, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btOptimizedBvh_refitPartial(swigCPtr, this, btStridingMeshInterface.getCPtr(triangles), triangles, aabbMin, aabbMax);
-  }
+       public void refitPartial (btStridingMeshInterface triangles, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btOptimizedBvh_refitPartial(swigCPtr, this, btStridingMeshInterface.getCPtr(triangles), triangles, aabbMin,
+                       aabbMax);
+       }
 
-  public void updateBvhNodes(btStridingMeshInterface meshInterface, int firstNode, int endNode, int index) {
-    gdxBulletJNI.btOptimizedBvh_updateBvhNodes(swigCPtr, this, btStridingMeshInterface.getCPtr(meshInterface), meshInterface, firstNode, endNode, index);
-  }
+       public void updateBvhNodes (btStridingMeshInterface meshInterface, int firstNode, int endNode, int index) {
+               gdxBulletJNI.btOptimizedBvh_updateBvhNodes(swigCPtr, this, btStridingMeshInterface.getCPtr(meshInterface), meshInterface,
+                       firstNode, endNode, index);
+       }
 
-  public boolean serializeInPlace(SWIGTYPE_p_void o_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) {
-    return gdxBulletJNI.btOptimizedBvh_serializeInPlace(swigCPtr, this, SWIGTYPE_p_void.getCPtr(o_alignedDataBuffer), i_dataBufferSize, i_swapEndian);
-  }
+       public boolean serializeInPlace (SWIGTYPE_p_void o_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) {
+               return gdxBulletJNI.btOptimizedBvh_serializeInPlace(swigCPtr, this, SWIGTYPE_p_void.getCPtr(o_alignedDataBuffer),
+                       i_dataBufferSize, i_swapEndian);
+       }
 
-  public static btOptimizedBvh deSerializeInPlace(SWIGTYPE_p_void i_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) {
-    long cPtr = gdxBulletJNI.btOptimizedBvh_deSerializeInPlace(SWIGTYPE_p_void.getCPtr(i_alignedDataBuffer), i_dataBufferSize, i_swapEndian);
-    return (cPtr == 0) ? null : new btOptimizedBvh(cPtr, false);
-  }
+       public static btOptimizedBvh deSerializeInPlace (SWIGTYPE_p_void i_alignedDataBuffer, long i_dataBufferSize,
+               boolean i_swapEndian) {
+               long cPtr = gdxBulletJNI.btOptimizedBvh_deSerializeInPlace(SWIGTYPE_p_void.getCPtr(i_alignedDataBuffer), i_dataBufferSize,
+                       i_swapEndian);
+               return (cPtr == 0) ? null : new btOptimizedBvh(cPtr, false);
+       }
 
 }
index 279b099..1257f5d 100644 (file)
@@ -8,89 +8,85 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btOptimizedBvhNode {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btOptimizedBvhNode(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btOptimizedBvhNode obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOptimizedBvhNode(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_aabbMinOrg(btVector3 value) {
-    gdxBulletJNI.btOptimizedBvhNode_m_aabbMinOrg_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_aabbMinOrg() {
-    long cPtr = gdxBulletJNI.btOptimizedBvhNode_m_aabbMinOrg_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_aabbMaxOrg(btVector3 value) {
-    gdxBulletJNI.btOptimizedBvhNode_m_aabbMaxOrg_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_aabbMaxOrg() {
-    long cPtr = gdxBulletJNI.btOptimizedBvhNode_m_aabbMaxOrg_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_escapeIndex(int value) {
-    gdxBulletJNI.btOptimizedBvhNode_m_escapeIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_escapeIndex() {
-    return gdxBulletJNI.btOptimizedBvhNode_m_escapeIndex_get(swigCPtr, this);
-  }
-
-  public void setM_subPart(int value) {
-    gdxBulletJNI.btOptimizedBvhNode_m_subPart_set(swigCPtr, this, value);
-  }
-
-  public int getM_subPart() {
-    return gdxBulletJNI.btOptimizedBvhNode_m_subPart_get(swigCPtr, this);
-  }
-
-  public void setM_triangleIndex(int value) {
-    gdxBulletJNI.btOptimizedBvhNode_m_triangleIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleIndex() {
-    return gdxBulletJNI.btOptimizedBvhNode_m_triangleIndex_get(swigCPtr, this);
-  }
-
-  public void setM_padding(String value) {
-    gdxBulletJNI.btOptimizedBvhNode_m_padding_set(swigCPtr, this, value);
-  }
-
-  public String getM_padding() {
-    return gdxBulletJNI.btOptimizedBvhNode_m_padding_get(swigCPtr, this);
-  }
-
-  public btOptimizedBvhNode() {
-    this(gdxBulletJNI.new_btOptimizedBvhNode(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btOptimizedBvhNode (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btOptimizedBvhNode obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOptimizedBvhNode(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_aabbMinOrg (btVector3 value) {
+               gdxBulletJNI.btOptimizedBvhNode_m_aabbMinOrg_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_aabbMinOrg () {
+               long cPtr = gdxBulletJNI.btOptimizedBvhNode_m_aabbMinOrg_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_aabbMaxOrg (btVector3 value) {
+               gdxBulletJNI.btOptimizedBvhNode_m_aabbMaxOrg_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_aabbMaxOrg () {
+               long cPtr = gdxBulletJNI.btOptimizedBvhNode_m_aabbMaxOrg_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_escapeIndex (int value) {
+               gdxBulletJNI.btOptimizedBvhNode_m_escapeIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_escapeIndex () {
+               return gdxBulletJNI.btOptimizedBvhNode_m_escapeIndex_get(swigCPtr, this);
+       }
+
+       public void setM_subPart (int value) {
+               gdxBulletJNI.btOptimizedBvhNode_m_subPart_set(swigCPtr, this, value);
+       }
+
+       public int getM_subPart () {
+               return gdxBulletJNI.btOptimizedBvhNode_m_subPart_get(swigCPtr, this);
+       }
+
+       public void setM_triangleIndex (int value) {
+               gdxBulletJNI.btOptimizedBvhNode_m_triangleIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleIndex () {
+               return gdxBulletJNI.btOptimizedBvhNode_m_triangleIndex_get(swigCPtr, this);
+       }
+
+       public void setM_padding (String value) {
+               gdxBulletJNI.btOptimizedBvhNode_m_padding_set(swigCPtr, this, value);
+       }
+
+       public String getM_padding () {
+               return gdxBulletJNI.btOptimizedBvhNode_m_padding_get(swigCPtr, this);
+       }
+
+       public btOptimizedBvhNode () {
+               this(gdxBulletJNI.new_btOptimizedBvhNode(), true);
+       }
 
 }
index fab27b2..0050a0a 100644 (file)
@@ -8,89 +8,85 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btOptimizedBvhNodeDoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btOptimizedBvhNodeDoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btOptimizedBvhNodeDoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOptimizedBvhNodeDoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_aabbMinOrg(btVector3DoubleData value) {
-    gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMinOrg_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_aabbMinOrg() {
-    long cPtr = gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMinOrg_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_aabbMaxOrg(btVector3DoubleData value) {
-    gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_aabbMaxOrg() {
-    long cPtr = gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_escapeIndex(int value) {
-    gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_escapeIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_escapeIndex() {
-    return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_escapeIndex_get(swigCPtr, this);
-  }
-
-  public void setM_subPart(int value) {
-    gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_subPart_set(swigCPtr, this, value);
-  }
-
-  public int getM_subPart() {
-    return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_subPart_get(swigCPtr, this);
-  }
-
-  public void setM_triangleIndex(int value) {
-    gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_triangleIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleIndex() {
-    return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_triangleIndex_get(swigCPtr, this);
-  }
-
-  public void setM_pad(String value) {
-    gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_pad_set(swigCPtr, this, value);
-  }
-
-  public String getM_pad() {
-    return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_pad_get(swigCPtr, this);
-  }
-
-  public btOptimizedBvhNodeDoubleData() {
-    this(gdxBulletJNI.new_btOptimizedBvhNodeDoubleData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btOptimizedBvhNodeDoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btOptimizedBvhNodeDoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOptimizedBvhNodeDoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_aabbMinOrg (btVector3DoubleData value) {
+               gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMinOrg_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_aabbMinOrg () {
+               long cPtr = gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMinOrg_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_aabbMaxOrg (btVector3DoubleData value) {
+               gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_aabbMaxOrg () {
+               long cPtr = gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_escapeIndex (int value) {
+               gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_escapeIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_escapeIndex () {
+               return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_escapeIndex_get(swigCPtr, this);
+       }
+
+       public void setM_subPart (int value) {
+               gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_subPart_set(swigCPtr, this, value);
+       }
+
+       public int getM_subPart () {
+               return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_subPart_get(swigCPtr, this);
+       }
+
+       public void setM_triangleIndex (int value) {
+               gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_triangleIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleIndex () {
+               return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_triangleIndex_get(swigCPtr, this);
+       }
+
+       public void setM_pad (String value) {
+               gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_pad_set(swigCPtr, this, value);
+       }
+
+       public String getM_pad () {
+               return gdxBulletJNI.btOptimizedBvhNodeDoubleData_m_pad_get(swigCPtr, this);
+       }
+
+       public btOptimizedBvhNodeDoubleData () {
+               this(gdxBulletJNI.new_btOptimizedBvhNodeDoubleData(), true);
+       }
 
 }
index 4c2e407..3350107 100644 (file)
@@ -8,89 +8,85 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btOptimizedBvhNodeFloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btOptimizedBvhNodeFloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btOptimizedBvhNodeFloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOptimizedBvhNodeFloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_aabbMinOrg(btVector3FloatData value) {
-    gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMinOrg_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_aabbMinOrg() {
-    long cPtr = gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMinOrg_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_aabbMaxOrg(btVector3FloatData value) {
-    gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMaxOrg_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_aabbMaxOrg() {
-    long cPtr = gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMaxOrg_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_escapeIndex(int value) {
-    gdxBulletJNI.btOptimizedBvhNodeFloatData_m_escapeIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_escapeIndex() {
-    return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_escapeIndex_get(swigCPtr, this);
-  }
-
-  public void setM_subPart(int value) {
-    gdxBulletJNI.btOptimizedBvhNodeFloatData_m_subPart_set(swigCPtr, this, value);
-  }
-
-  public int getM_subPart() {
-    return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_subPart_get(swigCPtr, this);
-  }
-
-  public void setM_triangleIndex(int value) {
-    gdxBulletJNI.btOptimizedBvhNodeFloatData_m_triangleIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleIndex() {
-    return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_triangleIndex_get(swigCPtr, this);
-  }
-
-  public void setM_pad(String value) {
-    gdxBulletJNI.btOptimizedBvhNodeFloatData_m_pad_set(swigCPtr, this, value);
-  }
-
-  public String getM_pad() {
-    return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_pad_get(swigCPtr, this);
-  }
-
-  public btOptimizedBvhNodeFloatData() {
-    this(gdxBulletJNI.new_btOptimizedBvhNodeFloatData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btOptimizedBvhNodeFloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btOptimizedBvhNodeFloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOptimizedBvhNodeFloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_aabbMinOrg (btVector3FloatData value) {
+               gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMinOrg_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_aabbMinOrg () {
+               long cPtr = gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMinOrg_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_aabbMaxOrg (btVector3FloatData value) {
+               gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMaxOrg_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_aabbMaxOrg () {
+               long cPtr = gdxBulletJNI.btOptimizedBvhNodeFloatData_m_aabbMaxOrg_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_escapeIndex (int value) {
+               gdxBulletJNI.btOptimizedBvhNodeFloatData_m_escapeIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_escapeIndex () {
+               return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_escapeIndex_get(swigCPtr, this);
+       }
+
+       public void setM_subPart (int value) {
+               gdxBulletJNI.btOptimizedBvhNodeFloatData_m_subPart_set(swigCPtr, this, value);
+       }
+
+       public int getM_subPart () {
+               return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_subPart_get(swigCPtr, this);
+       }
+
+       public void setM_triangleIndex (int value) {
+               gdxBulletJNI.btOptimizedBvhNodeFloatData_m_triangleIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleIndex () {
+               return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_triangleIndex_get(swigCPtr, this);
+       }
+
+       public void setM_pad (String value) {
+               gdxBulletJNI.btOptimizedBvhNodeFloatData_m_pad_set(swigCPtr, this, value);
+       }
+
+       public String getM_pad () {
+               return gdxBulletJNI.btOptimizedBvhNodeFloatData_m_pad_get(swigCPtr, this);
+       }
+
+       public btOptimizedBvhNodeFloatData () {
+               this(gdxBulletJNI.new_btOptimizedBvhNodeFloatData(), true);
+       }
 
 }
index d424010..e9f98dc 100644 (file)
@@ -8,39 +8,35 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btOverlapCallback {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btOverlapCallback(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btOverlapCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOverlapCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public boolean processOverlap(btBroadphasePair pair) {
-    return gdxBulletJNI.btOverlapCallback_processOverlap(swigCPtr, this, btBroadphasePair.getCPtr(pair), pair);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btOverlapCallback (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btOverlapCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOverlapCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public boolean processOverlap (btBroadphasePair pair) {
+               return gdxBulletJNI.btOverlapCallback_processOverlap(swigCPtr, this, btBroadphasePair.getCPtr(pair), pair);
+       }
 
 }
index c5d9033..d0eab6a 100644 (file)
@@ -8,39 +8,36 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btOverlapFilterCallback {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btOverlapFilterCallback(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btOverlapFilterCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOverlapFilterCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public boolean needBroadphaseCollision(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    return gdxBulletJNI.btOverlapFilterCallback_needBroadphaseCollision(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btOverlapFilterCallback (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btOverlapFilterCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOverlapFilterCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public boolean needBroadphaseCollision (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               return gdxBulletJNI.btOverlapFilterCallback_needBroadphaseCollision(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0),
+                       proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
+       }
 
 }
index f9b8fd3..865c9f8 100644 (file)
@@ -8,81 +8,84 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btOverlappingPairCache extends btOverlappingPairCallback {
-  private long swigCPtr;
-
-  protected btOverlappingPairCache(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btOverlappingPairCache_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btOverlappingPairCache obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOverlappingPairCache(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btBroadphasePair getOverlappingPairArrayPtr() {
-    long cPtr = gdxBulletJNI.btOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t getOverlappingPairArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t(gdxBulletJNI.btOverlappingPairCache_getOverlappingPairArray(swigCPtr, this), false);
-  }
-
-  public void cleanOverlappingPair(btBroadphasePair pair, btDispatcher dispatcher) {
-    gdxBulletJNI.btOverlappingPairCache_cleanOverlappingPair(swigCPtr, this, btBroadphasePair.getCPtr(pair), pair, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public int getNumOverlappingPairs() {
-    return gdxBulletJNI.btOverlappingPairCache_getNumOverlappingPairs(swigCPtr, this);
-  }
-
-  public void cleanProxyFromPairs(btBroadphaseProxy proxy, btDispatcher dispatcher) {
-    gdxBulletJNI.btOverlappingPairCache_cleanProxyFromPairs(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void setOverlapFilterCallback(btOverlapFilterCallback callback) {
-    gdxBulletJNI.btOverlappingPairCache_setOverlapFilterCallback(swigCPtr, this, btOverlapFilterCallback.getCPtr(callback), callback);
-  }
-
-  public void processAllOverlappingPairs(btOverlapCallback arg0, btDispatcher dispatcher) {
-    gdxBulletJNI.btOverlappingPairCache_processAllOverlappingPairs(swigCPtr, this, btOverlapCallback.getCPtr(arg0), arg0, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public btBroadphasePair findPair(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    long cPtr = gdxBulletJNI.btOverlappingPairCache_findPair(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
-    return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
-  }
-
-  public boolean hasDeferredRemoval() {
-    return gdxBulletJNI.btOverlappingPairCache_hasDeferredRemoval(swigCPtr, this);
-  }
-
-  public void setInternalGhostPairCallback(btOverlappingPairCallback ghostPairCallback) {
-    gdxBulletJNI.btOverlappingPairCache_setInternalGhostPairCallback(swigCPtr, this, btOverlappingPairCallback.getCPtr(ghostPairCallback), ghostPairCallback);
-  }
-
-  public void sortOverlappingPairs(btDispatcher dispatcher) {
-    gdxBulletJNI.btOverlappingPairCache_sortOverlappingPairs(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
+       private long swigCPtr;
+
+       protected btOverlappingPairCache (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btOverlappingPairCache_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btOverlappingPairCache obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOverlappingPairCache(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btBroadphasePair getOverlappingPairArrayPtr () {
+               long cPtr = gdxBulletJNI.btOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t getOverlappingPairArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t(gdxBulletJNI.btOverlappingPairCache_getOverlappingPairArray(
+                       swigCPtr, this), false);
+       }
+
+       public void cleanOverlappingPair (btBroadphasePair pair, btDispatcher dispatcher) {
+               gdxBulletJNI.btOverlappingPairCache_cleanOverlappingPair(swigCPtr, this, btBroadphasePair.getCPtr(pair), pair,
+                       btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public int getNumOverlappingPairs () {
+               return gdxBulletJNI.btOverlappingPairCache_getNumOverlappingPairs(swigCPtr, this);
+       }
+
+       public void cleanProxyFromPairs (btBroadphaseProxy proxy, btDispatcher dispatcher) {
+               gdxBulletJNI.btOverlappingPairCache_cleanProxyFromPairs(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy), proxy,
+                       btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void setOverlapFilterCallback (btOverlapFilterCallback callback) {
+               gdxBulletJNI.btOverlappingPairCache_setOverlapFilterCallback(swigCPtr, this, btOverlapFilterCallback.getCPtr(callback),
+                       callback);
+       }
+
+       public void processAllOverlappingPairs (btOverlapCallback arg0, btDispatcher dispatcher) {
+               gdxBulletJNI.btOverlappingPairCache_processAllOverlappingPairs(swigCPtr, this, btOverlapCallback.getCPtr(arg0), arg0,
+                       btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public btBroadphasePair findPair (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               long cPtr = gdxBulletJNI.btOverlappingPairCache_findPair(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0,
+                       btBroadphaseProxy.getCPtr(proxy1), proxy1);
+               return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
+       }
+
+       public boolean hasDeferredRemoval () {
+               return gdxBulletJNI.btOverlappingPairCache_hasDeferredRemoval(swigCPtr, this);
+       }
+
+       public void setInternalGhostPairCallback (btOverlappingPairCallback ghostPairCallback) {
+               gdxBulletJNI.btOverlappingPairCache_setInternalGhostPairCallback(swigCPtr, this,
+                       btOverlappingPairCallback.getCPtr(ghostPairCallback), ghostPairCallback);
+       }
+
+       public void sortOverlappingPairs (btDispatcher dispatcher) {
+               gdxBulletJNI.btOverlappingPairCache_sortOverlappingPairs(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
 
 }
index af6189c..a82ac39 100644 (file)
@@ -8,49 +8,48 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btOverlappingPairCallback {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btOverlappingPairCallback(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btOverlappingPairCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btOverlappingPairCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btBroadphasePair addOverlappingPair(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    long cPtr = gdxBulletJNI.btOverlappingPairCallback_addOverlappingPair(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
-    return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
-  }
-
-  public SWIGTYPE_p_void removeOverlappingPair(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1, btDispatcher dispatcher) {
-    long cPtr = gdxBulletJNI.btOverlappingPairCallback_removeOverlappingPair(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1, btDispatcher.getCPtr(dispatcher), dispatcher);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void removeOverlappingPairsContainingProxy(btBroadphaseProxy proxy0, btDispatcher dispatcher) {
-    gdxBulletJNI.btOverlappingPairCallback_removeOverlappingPairsContainingProxy(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btOverlappingPairCallback (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btOverlappingPairCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btOverlappingPairCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btBroadphasePair addOverlappingPair (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               long cPtr = gdxBulletJNI.btOverlappingPairCallback_addOverlappingPair(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0),
+                       proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
+               return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
+       }
+
+       public SWIGTYPE_p_void removeOverlappingPair (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1, btDispatcher dispatcher) {
+               long cPtr = gdxBulletJNI.btOverlappingPairCallback_removeOverlappingPair(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0),
+                       proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1, btDispatcher.getCPtr(dispatcher), dispatcher);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void removeOverlappingPairsContainingProxy (btBroadphaseProxy proxy0, btDispatcher dispatcher) {
+               gdxBulletJNI.btOverlappingPairCallback_removeOverlappingPairsContainingProxy(swigCPtr, this,
+                       btBroadphaseProxy.getCPtr(proxy0), proxy0, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
 
 }
index 18f0bc8..26dee9e 100644 (file)
@@ -8,60 +8,61 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btPairCachingGhostObject extends btGhostObject {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btPairCachingGhostObject(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btPairCachingGhostObject_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btPairCachingGhostObject (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btPairCachingGhostObject_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btPairCachingGhostObject obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btPairCachingGhostObject obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPairCachingGhostObject(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPairCachingGhostObject(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public btPairCachingGhostObject() {
-    this(gdxBulletJNI.new_btPairCachingGhostObject(), true);
-  }
+       public btPairCachingGhostObject () {
+               this(gdxBulletJNI.new_btPairCachingGhostObject(), true);
+       }
 
-  public void addOverlappingObjectInternal(btBroadphaseProxy otherProxy, btBroadphaseProxy thisProxy) {
-    gdxBulletJNI.btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_0(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
-  }
+       public void addOverlappingObjectInternal (btBroadphaseProxy otherProxy, btBroadphaseProxy thisProxy) {
+               gdxBulletJNI.btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_0(swigCPtr, this,
+                       btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
+       }
 
-  public void addOverlappingObjectInternal(btBroadphaseProxy otherProxy) {
-    gdxBulletJNI.btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_1(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy);
-  }
+       public void addOverlappingObjectInternal (btBroadphaseProxy otherProxy) {
+               gdxBulletJNI.btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_1(swigCPtr, this,
+                       btBroadphaseProxy.getCPtr(otherProxy), otherProxy);
+       }
 
-  public void removeOverlappingObjectInternal(btBroadphaseProxy otherProxy, btDispatcher dispatcher, btBroadphaseProxy thisProxy) {
-    gdxBulletJNI.btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_0(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher, btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
-  }
+       public void removeOverlappingObjectInternal (btBroadphaseProxy otherProxy, btDispatcher dispatcher, btBroadphaseProxy thisProxy) {
+               gdxBulletJNI.btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_0(swigCPtr, this,
+                       btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btBroadphaseProxy.getCPtr(thisProxy), thisProxy);
+       }
 
-  public void removeOverlappingObjectInternal(btBroadphaseProxy otherProxy, btDispatcher dispatcher) {
-    gdxBulletJNI.btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_1(swigCPtr, this, btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
+       public void removeOverlappingObjectInternal (btBroadphaseProxy otherProxy, btDispatcher dispatcher) {
+               gdxBulletJNI.btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_1(swigCPtr, this,
+                       btBroadphaseProxy.getCPtr(otherProxy), otherProxy, btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
 
-  public btHashedOverlappingPairCache getOverlappingPairCache() {
-    long cPtr = gdxBulletJNI.btPairCachingGhostObject_getOverlappingPairCache(swigCPtr, this);
-    return (cPtr == 0) ? null : new btHashedOverlappingPairCache(cPtr, false);
-  }
+       public btHashedOverlappingPairCache getOverlappingPairCache () {
+               long cPtr = gdxBulletJNI.btPairCachingGhostObject_getOverlappingPairCache(swigCPtr, this);
+               return (cPtr == 0) ? null : new btHashedOverlappingPairCache(cPtr, false);
+       }
 
 }
index 04b6a3b..0c91eaa 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btPersistentManifold extends btTypedObject {
-  private long swigCPtr;
-
-  protected btPersistentManifold(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btPersistentManifold_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPersistentManifold obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPersistentManifold(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_companionIdA(int value) {
-    gdxBulletJNI.btPersistentManifold_m_companionIdA_set(swigCPtr, this, value);
-  }
-
-  public int getM_companionIdA() {
-    return gdxBulletJNI.btPersistentManifold_m_companionIdA_get(swigCPtr, this);
-  }
-
-  public void setM_companionIdB(int value) {
-    gdxBulletJNI.btPersistentManifold_m_companionIdB_set(swigCPtr, this, value);
-  }
-
-  public int getM_companionIdB() {
-    return gdxBulletJNI.btPersistentManifold_m_companionIdB_get(swigCPtr, this);
-  }
-
-  public void setM_index1a(int value) {
-    gdxBulletJNI.btPersistentManifold_m_index1a_set(swigCPtr, this, value);
-  }
-
-  public int getM_index1a() {
-    return gdxBulletJNI.btPersistentManifold_m_index1a_get(swigCPtr, this);
-  }
-
-  public btPersistentManifold() {
-    this(gdxBulletJNI.new_btPersistentManifold__SWIG_0(), true);
-  }
-
-  public btPersistentManifold(SWIGTYPE_p_void body0, SWIGTYPE_p_void body1, int arg2, float contactBreakingThreshold, float contactProcessingThreshold) {
-    this(gdxBulletJNI.new_btPersistentManifold__SWIG_1(SWIGTYPE_p_void.getCPtr(body0), SWIGTYPE_p_void.getCPtr(body1), arg2, contactBreakingThreshold, contactProcessingThreshold), true);
-  }
-
-  public SWIGTYPE_p_void getBody0() {
-    long cPtr = gdxBulletJNI.btPersistentManifold_getBody0__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public SWIGTYPE_p_void getBody1() {
-    long cPtr = gdxBulletJNI.btPersistentManifold_getBody1__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public void setBodies(SWIGTYPE_p_void body0, SWIGTYPE_p_void body1) {
-    gdxBulletJNI.btPersistentManifold_setBodies(swigCPtr, this, SWIGTYPE_p_void.getCPtr(body0), SWIGTYPE_p_void.getCPtr(body1));
-  }
-
-  public void clearUserCache(btManifoldPoint pt) {
-    gdxBulletJNI.btPersistentManifold_clearUserCache(swigCPtr, this, btManifoldPoint.getCPtr(pt), pt);
-  }
-
-  public int getNumContacts() {
-    return gdxBulletJNI.btPersistentManifold_getNumContacts(swigCPtr, this);
-  }
-
-  public btManifoldPoint getContactPoint(int index) {
-    return new btManifoldPoint(gdxBulletJNI.btPersistentManifold_getContactPoint__SWIG_0(swigCPtr, this, index), false);
-  }
-
-  public float getContactBreakingThreshold() {
-    return gdxBulletJNI.btPersistentManifold_getContactBreakingThreshold(swigCPtr, this);
-  }
-
-  public float getContactProcessingThreshold() {
-    return gdxBulletJNI.btPersistentManifold_getContactProcessingThreshold(swigCPtr, this);
-  }
-
-  public int getCacheEntry(btManifoldPoint newPoint) {
-    return gdxBulletJNI.btPersistentManifold_getCacheEntry(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint);
-  }
-
-  public int addManifoldPoint(btManifoldPoint newPoint) {
-    return gdxBulletJNI.btPersistentManifold_addManifoldPoint(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint);
-  }
-
-  public void removeContactPoint(int index) {
-    gdxBulletJNI.btPersistentManifold_removeContactPoint(swigCPtr, this, index);
-  }
-
-  public void replaceContactPoint(btManifoldPoint newPoint, int insertIndex) {
-    gdxBulletJNI.btPersistentManifold_replaceContactPoint(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint, insertIndex);
-  }
-
-  public boolean validContactDistance(btManifoldPoint pt) {
-    return gdxBulletJNI.btPersistentManifold_validContactDistance(swigCPtr, this, btManifoldPoint.getCPtr(pt), pt);
-  }
-
-  public void refreshContactPoints(btTransform trA, btTransform trB) {
-    gdxBulletJNI.btPersistentManifold_refreshContactPoints(swigCPtr, this, btTransform.getCPtr(trA), trA, btTransform.getCPtr(trB), trB);
-  }
-
-  public void clearManifold() {
-    gdxBulletJNI.btPersistentManifold_clearManifold(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btPersistentManifold (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btPersistentManifold_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPersistentManifold obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPersistentManifold(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_companionIdA (int value) {
+               gdxBulletJNI.btPersistentManifold_m_companionIdA_set(swigCPtr, this, value);
+       }
+
+       public int getM_companionIdA () {
+               return gdxBulletJNI.btPersistentManifold_m_companionIdA_get(swigCPtr, this);
+       }
+
+       public void setM_companionIdB (int value) {
+               gdxBulletJNI.btPersistentManifold_m_companionIdB_set(swigCPtr, this, value);
+       }
+
+       public int getM_companionIdB () {
+               return gdxBulletJNI.btPersistentManifold_m_companionIdB_get(swigCPtr, this);
+       }
+
+       public void setM_index1a (int value) {
+               gdxBulletJNI.btPersistentManifold_m_index1a_set(swigCPtr, this, value);
+       }
+
+       public int getM_index1a () {
+               return gdxBulletJNI.btPersistentManifold_m_index1a_get(swigCPtr, this);
+       }
+
+       public btPersistentManifold () {
+               this(gdxBulletJNI.new_btPersistentManifold__SWIG_0(), true);
+       }
+
+       public btPersistentManifold (SWIGTYPE_p_void body0, SWIGTYPE_p_void body1, int arg2, float contactBreakingThreshold,
+               float contactProcessingThreshold) {
+               this(gdxBulletJNI.new_btPersistentManifold__SWIG_1(SWIGTYPE_p_void.getCPtr(body0), SWIGTYPE_p_void.getCPtr(body1), arg2,
+                       contactBreakingThreshold, contactProcessingThreshold), true);
+       }
+
+       public SWIGTYPE_p_void getBody0 () {
+               long cPtr = gdxBulletJNI.btPersistentManifold_getBody0__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public SWIGTYPE_p_void getBody1 () {
+               long cPtr = gdxBulletJNI.btPersistentManifold_getBody1__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public void setBodies (SWIGTYPE_p_void body0, SWIGTYPE_p_void body1) {
+               gdxBulletJNI.btPersistentManifold_setBodies(swigCPtr, this, SWIGTYPE_p_void.getCPtr(body0), SWIGTYPE_p_void.getCPtr(body1));
+       }
+
+       public void clearUserCache (btManifoldPoint pt) {
+               gdxBulletJNI.btPersistentManifold_clearUserCache(swigCPtr, this, btManifoldPoint.getCPtr(pt), pt);
+       }
+
+       public int getNumContacts () {
+               return gdxBulletJNI.btPersistentManifold_getNumContacts(swigCPtr, this);
+       }
+
+       public btManifoldPoint getContactPoint (int index) {
+               return new btManifoldPoint(gdxBulletJNI.btPersistentManifold_getContactPoint__SWIG_0(swigCPtr, this, index), false);
+       }
+
+       public float getContactBreakingThreshold () {
+               return gdxBulletJNI.btPersistentManifold_getContactBreakingThreshold(swigCPtr, this);
+       }
+
+       public float getContactProcessingThreshold () {
+               return gdxBulletJNI.btPersistentManifold_getContactProcessingThreshold(swigCPtr, this);
+       }
+
+       public int getCacheEntry (btManifoldPoint newPoint) {
+               return gdxBulletJNI.btPersistentManifold_getCacheEntry(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint);
+       }
+
+       public int addManifoldPoint (btManifoldPoint newPoint) {
+               return gdxBulletJNI.btPersistentManifold_addManifoldPoint(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint);
+       }
+
+       public void removeContactPoint (int index) {
+               gdxBulletJNI.btPersistentManifold_removeContactPoint(swigCPtr, this, index);
+       }
+
+       public void replaceContactPoint (btManifoldPoint newPoint, int insertIndex) {
+               gdxBulletJNI.btPersistentManifold_replaceContactPoint(swigCPtr, this, btManifoldPoint.getCPtr(newPoint), newPoint,
+                       insertIndex);
+       }
+
+       public boolean validContactDistance (btManifoldPoint pt) {
+               return gdxBulletJNI.btPersistentManifold_validContactDistance(swigCPtr, this, btManifoldPoint.getCPtr(pt), pt);
+       }
+
+       public void refreshContactPoints (btTransform trA, btTransform trB) {
+               gdxBulletJNI.btPersistentManifold_refreshContactPoints(swigCPtr, this, btTransform.getCPtr(trA), trA,
+                       btTransform.getCPtr(trB), trB);
+       }
+
+       public void clearManifold () {
+               gdxBulletJNI.btPersistentManifold_clearManifold(swigCPtr, this);
+       }
 
 }
index f2fb1aa..b5f62af 100644 (file)
@@ -9,59 +9,57 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btPlane {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btPlane(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btPlane (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btPlane obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btPlane obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPlane(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPlane(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setNormal(btVector3 value) {
-    gdxBulletJNI.btPlane_normal_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
+       public void setNormal (btVector3 value) {
+               gdxBulletJNI.btPlane_normal_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
 
-  public btVector3 getNormal() {
-    long cPtr = gdxBulletJNI.btPlane_normal_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
+       public btVector3 getNormal () {
+               long cPtr = gdxBulletJNI.btPlane_normal_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
 
-  public void setDist(float value) {
-    gdxBulletJNI.btPlane_dist_set(swigCPtr, this, value);
-  }
+       public void setDist (float value) {
+               gdxBulletJNI.btPlane_dist_set(swigCPtr, this, value);
+       }
 
-  public float getDist() {
-    return gdxBulletJNI.btPlane_dist_get(swigCPtr, this);
-  }
+       public float getDist () {
+               return gdxBulletJNI.btPlane_dist_get(swigCPtr, this);
+       }
 
-  public btPlane(Vector3 n, float d) {
-    this(gdxBulletJNI.new_btPlane__SWIG_0(n, d), true);
-  }
+       public btPlane (Vector3 n, float d) {
+               this(gdxBulletJNI.new_btPlane__SWIG_0(n, d), true);
+       }
 
-  public btPlane() {
-    this(gdxBulletJNI.new_btPlane__SWIG_1(), true);
-  }
+       public btPlane () {
+               this(gdxBulletJNI.new_btPlane__SWIG_1(), true);
+       }
 
 }
index 5996b2a..b8cb65e 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btPoint2PointConstraint extends btTypedConstraint {
-  private long swigCPtr;
-
-  protected btPoint2PointConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btPoint2PointConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPoint2PointConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPoint2PointConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_useSolveConstraintObsolete(boolean value) {
-    gdxBulletJNI.btPoint2PointConstraint_m_useSolveConstraintObsolete_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_useSolveConstraintObsolete() {
-    return gdxBulletJNI.btPoint2PointConstraint_m_useSolveConstraintObsolete_get(swigCPtr, this);
-  }
-
-  public void setM_setting(btConstraintSetting value) {
-    gdxBulletJNI.btPoint2PointConstraint_m_setting_set(swigCPtr, this, btConstraintSetting.getCPtr(value), value);
-  }
-
-  public btConstraintSetting getM_setting() {
-    long cPtr = gdxBulletJNI.btPoint2PointConstraint_m_setting_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConstraintSetting(cPtr, false);
-  }
-
-  public btPoint2PointConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB) {
-    this(gdxBulletJNI.new_btPoint2PointConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, pivotInA, pivotInB), true);
-  }
-
-  public btPoint2PointConstraint(btRigidBody rbA, Vector3 pivotInA) {
-    this(gdxBulletJNI.new_btPoint2PointConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, pivotInA), true);
-  }
-
-  public void getInfo1NonVirtual(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
-    gdxBulletJNI.btPoint2PointConstraint_getInfo1NonVirtual(swigCPtr, this, SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
-  }
-
-  public void getInfo2NonVirtual(btConstraintInfo2 info, btTransform body0_trans, btTransform body1_trans) {
-    gdxBulletJNI.btPoint2PointConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info, btTransform.getCPtr(body0_trans), body0_trans, btTransform.getCPtr(body1_trans), body1_trans);
-  }
-
-  public void updateRHS(float timeStep) {
-    gdxBulletJNI.btPoint2PointConstraint_updateRHS(swigCPtr, this, timeStep);
-  }
-
-  public void setPivotA(Vector3 pivotA) {
-    gdxBulletJNI.btPoint2PointConstraint_setPivotA(swigCPtr, this, pivotA);
-  }
-
-  public void setPivotB(Vector3 pivotB) {
-    gdxBulletJNI.btPoint2PointConstraint_setPivotB(swigCPtr, this, pivotB);
-  }
-
-  public Vector3 getPivotInA() {
-       return gdxBulletJNI.btPoint2PointConstraint_getPivotInA(swigCPtr, this);
-}
-
-  public Vector3 getPivotInB() {
-       return gdxBulletJNI.btPoint2PointConstraint_getPivotInB(swigCPtr, this);
-}
-
-  public void setParam(int num, float value, int axis) {
-    gdxBulletJNI.btPoint2PointConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
-  }
-
-  public void setParam(int num, float value) {
-    gdxBulletJNI.btPoint2PointConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
-  }
-
-  public float getParam(int num, int axis) {
-    return gdxBulletJNI.btPoint2PointConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
-  }
-
-  public float getParam(int num) {
-    return gdxBulletJNI.btPoint2PointConstraint_getParam__SWIG_1(swigCPtr, this, num);
-  }
+       private long swigCPtr;
+
+       protected btPoint2PointConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btPoint2PointConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPoint2PointConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPoint2PointConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_useSolveConstraintObsolete (boolean value) {
+               gdxBulletJNI.btPoint2PointConstraint_m_useSolveConstraintObsolete_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_useSolveConstraintObsolete () {
+               return gdxBulletJNI.btPoint2PointConstraint_m_useSolveConstraintObsolete_get(swigCPtr, this);
+       }
+
+       public void setM_setting (btConstraintSetting value) {
+               gdxBulletJNI.btPoint2PointConstraint_m_setting_set(swigCPtr, this, btConstraintSetting.getCPtr(value), value);
+       }
+
+       public btConstraintSetting getM_setting () {
+               long cPtr = gdxBulletJNI.btPoint2PointConstraint_m_setting_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConstraintSetting(cPtr, false);
+       }
+
+       public btPoint2PointConstraint (btRigidBody rbA, btRigidBody rbB, Vector3 pivotInA, Vector3 pivotInB) {
+               this(gdxBulletJNI.new_btPoint2PointConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB,
+                       pivotInA, pivotInB), true);
+       }
+
+       public btPoint2PointConstraint (btRigidBody rbA, Vector3 pivotInA) {
+               this(gdxBulletJNI.new_btPoint2PointConstraint__SWIG_1(btRigidBody.getCPtr(rbA), rbA, pivotInA), true);
+       }
+
+       public void getInfo1NonVirtual (SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
+               gdxBulletJNI.btPoint2PointConstraint_getInfo1NonVirtual(swigCPtr, this,
+                       SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
+       }
+
+       public void getInfo2NonVirtual (btConstraintInfo2 info, btTransform body0_trans, btTransform body1_trans) {
+               gdxBulletJNI.btPoint2PointConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info,
+                       btTransform.getCPtr(body0_trans), body0_trans, btTransform.getCPtr(body1_trans), body1_trans);
+       }
+
+       public void updateRHS (float timeStep) {
+               gdxBulletJNI.btPoint2PointConstraint_updateRHS(swigCPtr, this, timeStep);
+       }
+
+       public void setPivotA (Vector3 pivotA) {
+               gdxBulletJNI.btPoint2PointConstraint_setPivotA(swigCPtr, this, pivotA);
+       }
+
+       public void setPivotB (Vector3 pivotB) {
+               gdxBulletJNI.btPoint2PointConstraint_setPivotB(swigCPtr, this, pivotB);
+       }
+
+       public Vector3 getPivotInA () {
+               return gdxBulletJNI.btPoint2PointConstraint_getPivotInA(swigCPtr, this);
+       }
+
+       public Vector3 getPivotInB () {
+               return gdxBulletJNI.btPoint2PointConstraint_getPivotInB(swigCPtr, this);
+       }
+
+       public void setParam (int num, float value, int axis) {
+               gdxBulletJNI.btPoint2PointConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
+       }
+
+       public void setParam (int num, float value) {
+               gdxBulletJNI.btPoint2PointConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
+       }
+
+       public float getParam (int num, int axis) {
+               return gdxBulletJNI.btPoint2PointConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
+       }
+
+       public float getParam (int num) {
+               return gdxBulletJNI.btPoint2PointConstraint_getParam__SWIG_1(swigCPtr, this, num);
+       }
 
 }
index ceeab58..c962e63 100644 (file)
@@ -8,66 +8,63 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btPoint2PointConstraintDoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btPoint2PointConstraintDoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btPoint2PointConstraintDoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btPoint2PointConstraintDoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btPoint2PointConstraintDoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPoint2PointConstraintDoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPoint2PointConstraintDoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setM_typeConstraintData(btTypedConstraintData value) {
-    gdxBulletJNI.btPoint2PointConstraintDoubleData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
-  }
+       public void setM_typeConstraintData (btTypedConstraintData value) {
+               gdxBulletJNI.btPoint2PointConstraintDoubleData_m_typeConstraintData_set(swigCPtr, this,
+                       btTypedConstraintData.getCPtr(value), value);
+       }
 
-  public btTypedConstraintData getM_typeConstraintData() {
-    long cPtr = gdxBulletJNI.btPoint2PointConstraintDoubleData_m_typeConstraintData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
-  }
+       public btTypedConstraintData getM_typeConstraintData () {
+               long cPtr = gdxBulletJNI.btPoint2PointConstraintDoubleData_m_typeConstraintData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
+       }
 
-  public void setM_pivotInA(btVector3DoubleData value) {
-    gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInA_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
+       public void setM_pivotInA (btVector3DoubleData value) {
+               gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInA_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
 
-  public btVector3DoubleData getM_pivotInA() {
-    long cPtr = gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInA_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
+       public btVector3DoubleData getM_pivotInA () {
+               long cPtr = gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInA_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
 
-  public void setM_pivotInB(btVector3DoubleData value) {
-    gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInB_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
+       public void setM_pivotInB (btVector3DoubleData value) {
+               gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInB_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
 
-  public btVector3DoubleData getM_pivotInB() {
-    long cPtr = gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
+       public btVector3DoubleData getM_pivotInB () {
+               long cPtr = gdxBulletJNI.btPoint2PointConstraintDoubleData_m_pivotInB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
 
-  public btPoint2PointConstraintDoubleData() {
-    this(gdxBulletJNI.new_btPoint2PointConstraintDoubleData(), true);
-  }
+       public btPoint2PointConstraintDoubleData () {
+               this(gdxBulletJNI.new_btPoint2PointConstraintDoubleData(), true);
+       }
 
 }
index 24ba8dd..3c9590e 100644 (file)
@@ -8,66 +8,63 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btPoint2PointConstraintFloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btPoint2PointConstraintFloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btPoint2PointConstraintFloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btPoint2PointConstraintFloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btPoint2PointConstraintFloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPoint2PointConstraintFloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPoint2PointConstraintFloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setM_typeConstraintData(btTypedConstraintData value) {
-    gdxBulletJNI.btPoint2PointConstraintFloatData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
-  }
+       public void setM_typeConstraintData (btTypedConstraintData value) {
+               gdxBulletJNI.btPoint2PointConstraintFloatData_m_typeConstraintData_set(swigCPtr, this,
+                       btTypedConstraintData.getCPtr(value), value);
+       }
 
-  public btTypedConstraintData getM_typeConstraintData() {
-    long cPtr = gdxBulletJNI.btPoint2PointConstraintFloatData_m_typeConstraintData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
-  }
+       public btTypedConstraintData getM_typeConstraintData () {
+               long cPtr = gdxBulletJNI.btPoint2PointConstraintFloatData_m_typeConstraintData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
+       }
 
-  public void setM_pivotInA(btVector3FloatData value) {
-    gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInA_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
+       public void setM_pivotInA (btVector3FloatData value) {
+               gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInA_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
 
-  public btVector3FloatData getM_pivotInA() {
-    long cPtr = gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInA_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
+       public btVector3FloatData getM_pivotInA () {
+               long cPtr = gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInA_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
 
-  public void setM_pivotInB(btVector3FloatData value) {
-    gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInB_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
+       public void setM_pivotInB (btVector3FloatData value) {
+               gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInB_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
 
-  public btVector3FloatData getM_pivotInB() {
-    long cPtr = gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
+       public btVector3FloatData getM_pivotInB () {
+               long cPtr = gdxBulletJNI.btPoint2PointConstraintFloatData_m_pivotInB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
 
-  public btPoint2PointConstraintFloatData() {
-    this(gdxBulletJNI.new_btPoint2PointConstraintFloatData(), true);
-  }
+       public btPoint2PointConstraintFloatData () {
+               this(gdxBulletJNI.new_btPoint2PointConstraintFloatData(), true);
+       }
 
 }
index e3511e7..95d260c 100644 (file)
@@ -9,7 +9,6 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btPoint2PointFlags {
-  public final static int BT_P2P_FLAGS_ERP = 1;
-  public final static int BT_P2P_FLAGS_CFM = 2;
+       public final static int BT_P2P_FLAGS_ERP = 1;
+       public final static int BT_P2P_FLAGS_CFM = 2;
 }
-
index b9cf2ee..f2e2630 100644 (file)
@@ -9,84 +9,82 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btPointCollector {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btPointCollector(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPointCollector obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPointCollector(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_normalOnBInWorld(btVector3 value) {
-    gdxBulletJNI.btPointCollector_m_normalOnBInWorld_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_normalOnBInWorld() {
-    long cPtr = gdxBulletJNI.btPointCollector_m_normalOnBInWorld_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_pointInWorld(btVector3 value) {
-    gdxBulletJNI.btPointCollector_m_pointInWorld_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_pointInWorld() {
-    long cPtr = gdxBulletJNI.btPointCollector_m_pointInWorld_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_distance(float value) {
-    gdxBulletJNI.btPointCollector_m_distance_set(swigCPtr, this, value);
-  }
-
-  public float getM_distance() {
-    return gdxBulletJNI.btPointCollector_m_distance_get(swigCPtr, this);
-  }
-
-  public void setM_hasResult(boolean value) {
-    gdxBulletJNI.btPointCollector_m_hasResult_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_hasResult() {
-    return gdxBulletJNI.btPointCollector_m_hasResult_get(swigCPtr, this);
-  }
-
-  public btPointCollector() {
-    this(gdxBulletJNI.new_btPointCollector(), true);
-  }
-
-  public void setShapeIdentifiersA(int partId0, int index0) {
-    gdxBulletJNI.btPointCollector_setShapeIdentifiersA(swigCPtr, this, partId0, index0);
-  }
-
-  public void setShapeIdentifiersB(int partId1, int index1) {
-    gdxBulletJNI.btPointCollector_setShapeIdentifiersB(swigCPtr, this, partId1, index1);
-  }
-
-  public void addContactPoint(Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) {
-    gdxBulletJNI.btPointCollector_addContactPoint(swigCPtr, this, normalOnBInWorld, pointInWorld, depth);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btPointCollector (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPointCollector obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPointCollector(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_normalOnBInWorld (btVector3 value) {
+               gdxBulletJNI.btPointCollector_m_normalOnBInWorld_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_normalOnBInWorld () {
+               long cPtr = gdxBulletJNI.btPointCollector_m_normalOnBInWorld_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_pointInWorld (btVector3 value) {
+               gdxBulletJNI.btPointCollector_m_pointInWorld_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_pointInWorld () {
+               long cPtr = gdxBulletJNI.btPointCollector_m_pointInWorld_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_distance (float value) {
+               gdxBulletJNI.btPointCollector_m_distance_set(swigCPtr, this, value);
+       }
+
+       public float getM_distance () {
+               return gdxBulletJNI.btPointCollector_m_distance_get(swigCPtr, this);
+       }
+
+       public void setM_hasResult (boolean value) {
+               gdxBulletJNI.btPointCollector_m_hasResult_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_hasResult () {
+               return gdxBulletJNI.btPointCollector_m_hasResult_get(swigCPtr, this);
+       }
+
+       public btPointCollector () {
+               this(gdxBulletJNI.new_btPointCollector(), true);
+       }
+
+       public void setShapeIdentifiersA (int partId0, int index0) {
+               gdxBulletJNI.btPointCollector_setShapeIdentifiersA(swigCPtr, this, partId0, index0);
+       }
+
+       public void setShapeIdentifiersB (int partId1, int index1) {
+               gdxBulletJNI.btPointCollector_setShapeIdentifiersB(swigCPtr, this, partId1, index1);
+       }
+
+       public void addContactPoint (Vector3 normalOnBInWorld, Vector3 pointInWorld, float depth) {
+               gdxBulletJNI.btPointCollector_addContactPoint(swigCPtr, this, normalOnBInWorld, pointInWorld, depth);
+       }
 
 }
index 511b8db..58571b1 100644 (file)
@@ -9,54 +9,64 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btPolyhedralContactClipping {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btPolyhedralContactClipping(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPolyhedralContactClipping obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPolyhedralContactClipping(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public static void clipHullAgainstHull(Vector3 separatingNormal, btConvexPolyhedron hullA, btConvexPolyhedron hullB, btTransform transA, btTransform transB, float minDist, float maxDist, SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result resultOut) {
-    gdxBulletJNI.btPolyhedralContactClipping_clipHullAgainstHull(separatingNormal, btConvexPolyhedron.getCPtr(hullA), hullA, btConvexPolyhedron.getCPtr(hullB), hullB, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, minDist, maxDist, SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result.getCPtr(resultOut));
-  }
-
-  public static void clipFaceAgainstHull(Vector3 separatingNormal, btConvexPolyhedron hullA, btTransform transA, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t worldVertsB1, float minDist, float maxDist, SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result resultOut) {
-    gdxBulletJNI.btPolyhedralContactClipping_clipFaceAgainstHull(separatingNormal, btConvexPolyhedron.getCPtr(hullA), hullA, btTransform.getCPtr(transA), transA, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(worldVertsB1), minDist, maxDist, SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result.getCPtr(resultOut));
-  }
-
-  public static boolean findSeparatingAxis(btConvexPolyhedron hullA, btConvexPolyhedron hullB, btTransform transA, btTransform transB, Vector3 sep) {
-    return gdxBulletJNI.btPolyhedralContactClipping_findSeparatingAxis(btConvexPolyhedron.getCPtr(hullA), hullA, btConvexPolyhedron.getCPtr(hullB), hullB, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, sep);
-  }
-
-  public static void clipFace(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t pVtxIn, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t ppVtxOut, Vector3 planeNormalWS, float planeEqWS) {
-    gdxBulletJNI.btPolyhedralContactClipping_clipFace(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(pVtxIn), SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(ppVtxOut), planeNormalWS, planeEqWS);
-  }
-
-  public btPolyhedralContactClipping() {
-    this(gdxBulletJNI.new_btPolyhedralContactClipping(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btPolyhedralContactClipping (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPolyhedralContactClipping obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPolyhedralContactClipping(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public static void clipHullAgainstHull (Vector3 separatingNormal, btConvexPolyhedron hullA, btConvexPolyhedron hullB,
+               btTransform transA, btTransform transB, float minDist, float maxDist,
+               SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result resultOut) {
+               gdxBulletJNI.btPolyhedralContactClipping_clipHullAgainstHull(separatingNormal, btConvexPolyhedron.getCPtr(hullA), hullA,
+                       btConvexPolyhedron.getCPtr(hullB), hullB, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB,
+                       minDist, maxDist, SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result.getCPtr(resultOut));
+       }
+
+       public static void clipFaceAgainstHull (Vector3 separatingNormal, btConvexPolyhedron hullA, btTransform transA,
+               SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t worldVertsB1, float minDist, float maxDist,
+               SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result resultOut) {
+               gdxBulletJNI.btPolyhedralContactClipping_clipFaceAgainstHull(separatingNormal, btConvexPolyhedron.getCPtr(hullA), hullA,
+                       btTransform.getCPtr(transA), transA, SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(worldVertsB1), minDist,
+                       maxDist, SWIGTYPE_p_btDiscreteCollisionDetectorInterface__Result.getCPtr(resultOut));
+       }
+
+       public static boolean findSeparatingAxis (btConvexPolyhedron hullA, btConvexPolyhedron hullB, btTransform transA,
+               btTransform transB, Vector3 sep) {
+               return gdxBulletJNI.btPolyhedralContactClipping_findSeparatingAxis(btConvexPolyhedron.getCPtr(hullA), hullA,
+                       btConvexPolyhedron.getCPtr(hullB), hullB, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, sep);
+       }
+
+       public static void clipFace (SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t pVtxIn,
+               SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t ppVtxOut, Vector3 planeNormalWS, float planeEqWS) {
+               gdxBulletJNI.btPolyhedralContactClipping_clipFace(SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(pVtxIn),
+                       SWIGTYPE_p_btAlignedObjectArrayT_btVector3_t.getCPtr(ppVtxOut), planeNormalWS, planeEqWS);
+       }
+
+       public btPolyhedralContactClipping () {
+               this(gdxBulletJNI.new_btPolyhedralContactClipping(), true);
+       }
 
 }
index 8a7808d..bf43f38 100644 (file)
@@ -9,42 +9,41 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btPolyhedralConvexAabbCachingShape extends btPolyhedralConvexShape {
-  private long swigCPtr;
-
-  protected btPolyhedralConvexAabbCachingShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btPolyhedralConvexAabbCachingShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPolyhedralConvexAabbCachingShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPolyhedralConvexAabbCachingShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void getNonvirtualAabb(btTransform trans, Vector3 aabbMin, Vector3 aabbMax, float margin) {
-    gdxBulletJNI.btPolyhedralConvexAabbCachingShape_getNonvirtualAabb(swigCPtr, this, btTransform.getCPtr(trans), trans, aabbMin, aabbMax, margin);
-  }
-
-  public void recalcLocalAabb() {
-    gdxBulletJNI.btPolyhedralConvexAabbCachingShape_recalcLocalAabb(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btPolyhedralConvexAabbCachingShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btPolyhedralConvexAabbCachingShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPolyhedralConvexAabbCachingShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPolyhedralConvexAabbCachingShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void getNonvirtualAabb (btTransform trans, Vector3 aabbMin, Vector3 aabbMax, float margin) {
+               gdxBulletJNI.btPolyhedralConvexAabbCachingShape_getNonvirtualAabb(swigCPtr, this, btTransform.getCPtr(trans), trans,
+                       aabbMin, aabbMax, margin);
+       }
+
+       public void recalcLocalAabb () {
+               gdxBulletJNI.btPolyhedralConvexAabbCachingShape_recalcLocalAabb(swigCPtr, this);
+       }
 
 }
index 2e3d19a..a046a22 100644 (file)
@@ -9,71 +9,69 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btPolyhedralConvexShape extends btConvexInternalShape {
-  private long swigCPtr;
-
-  protected btPolyhedralConvexShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btPolyhedralConvexShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPolyhedralConvexShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPolyhedralConvexShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public boolean initializePolyhedralFeatures() {
-    return gdxBulletJNI.btPolyhedralConvexShape_initializePolyhedralFeatures(swigCPtr, this);
-  }
-
-  public btConvexPolyhedron getConvexPolyhedron() {
-    long cPtr = gdxBulletJNI.btPolyhedralConvexShape_getConvexPolyhedron(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexPolyhedron(cPtr, false);
-  }
-
-  public int getNumVertices() {
-    return gdxBulletJNI.btPolyhedralConvexShape_getNumVertices(swigCPtr, this);
-  }
-
-  public int getNumEdges() {
-    return gdxBulletJNI.btPolyhedralConvexShape_getNumEdges(swigCPtr, this);
-  }
-
-  public void getEdge(int i, Vector3 pa, Vector3 pb) {
-    gdxBulletJNI.btPolyhedralConvexShape_getEdge(swigCPtr, this, i, pa, pb);
-  }
-
-  public void getVertex(int i, Vector3 vtx) {
-    gdxBulletJNI.btPolyhedralConvexShape_getVertex(swigCPtr, this, i, vtx);
-  }
-
-  public int getNumPlanes() {
-    return gdxBulletJNI.btPolyhedralConvexShape_getNumPlanes(swigCPtr, this);
-  }
-
-  public void getPlane(Vector3 planeNormal, Vector3 planeSupport, int i) {
-    gdxBulletJNI.btPolyhedralConvexShape_getPlane(swigCPtr, this, planeNormal, planeSupport, i);
-  }
-
-  public boolean isInside(Vector3 pt, float tolerance) {
-    return gdxBulletJNI.btPolyhedralConvexShape_isInside(swigCPtr, this, pt, tolerance);
-  }
+       private long swigCPtr;
+
+       protected btPolyhedralConvexShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btPolyhedralConvexShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPolyhedralConvexShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPolyhedralConvexShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public boolean initializePolyhedralFeatures () {
+               return gdxBulletJNI.btPolyhedralConvexShape_initializePolyhedralFeatures(swigCPtr, this);
+       }
+
+       public btConvexPolyhedron getConvexPolyhedron () {
+               long cPtr = gdxBulletJNI.btPolyhedralConvexShape_getConvexPolyhedron(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexPolyhedron(cPtr, false);
+       }
+
+       public int getNumVertices () {
+               return gdxBulletJNI.btPolyhedralConvexShape_getNumVertices(swigCPtr, this);
+       }
+
+       public int getNumEdges () {
+               return gdxBulletJNI.btPolyhedralConvexShape_getNumEdges(swigCPtr, this);
+       }
+
+       public void getEdge (int i, Vector3 pa, Vector3 pb) {
+               gdxBulletJNI.btPolyhedralConvexShape_getEdge(swigCPtr, this, i, pa, pb);
+       }
+
+       public void getVertex (int i, Vector3 vtx) {
+               gdxBulletJNI.btPolyhedralConvexShape_getVertex(swigCPtr, this, i, vtx);
+       }
+
+       public int getNumPlanes () {
+               return gdxBulletJNI.btPolyhedralConvexShape_getNumPlanes(swigCPtr, this);
+       }
+
+       public void getPlane (Vector3 planeNormal, Vector3 planeSupport, int i) {
+               gdxBulletJNI.btPolyhedralConvexShape_getPlane(swigCPtr, this, planeNormal, planeSupport, i);
+       }
+
+       public boolean isInside (Vector3 pt, float tolerance) {
+               return gdxBulletJNI.btPolyhedralConvexShape_isInside(swigCPtr, this, pt, tolerance);
+       }
 
 }
index 74a9744..1bb9ee3 100644 (file)
@@ -8,73 +8,69 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btPoolAllocator {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btPoolAllocator(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPoolAllocator obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPoolAllocator(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btPoolAllocator(int elemSize, int maxElements) {
-    this(gdxBulletJNI.new_btPoolAllocator(elemSize, maxElements), true);
-  }
-
-  public int getFreeCount() {
-    return gdxBulletJNI.btPoolAllocator_getFreeCount(swigCPtr, this);
-  }
-
-  public int getUsedCount() {
-    return gdxBulletJNI.btPoolAllocator_getUsedCount(swigCPtr, this);
-  }
-
-  public int getMaxCount() {
-    return gdxBulletJNI.btPoolAllocator_getMaxCount(swigCPtr, this);
-  }
-
-  public SWIGTYPE_p_void allocate(int size) {
-    long cPtr = gdxBulletJNI.btPoolAllocator_allocate(swigCPtr, this, size);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public boolean validPtr(SWIGTYPE_p_void ptr) {
-    return gdxBulletJNI.btPoolAllocator_validPtr(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
-  }
-
-  public void freeMemory(SWIGTYPE_p_void ptr) {
-    gdxBulletJNI.btPoolAllocator_freeMemory(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
-  }
-
-  public int getElementSize() {
-    return gdxBulletJNI.btPoolAllocator_getElementSize(swigCPtr, this);
-  }
-
-  public SWIGTYPE_p_unsigned_char getPoolAddress() {
-    long cPtr = gdxBulletJNI.btPoolAllocator_getPoolAddress__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btPoolAllocator (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPoolAllocator obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPoolAllocator(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btPoolAllocator (int elemSize, int maxElements) {
+               this(gdxBulletJNI.new_btPoolAllocator(elemSize, maxElements), true);
+       }
+
+       public int getFreeCount () {
+               return gdxBulletJNI.btPoolAllocator_getFreeCount(swigCPtr, this);
+       }
+
+       public int getUsedCount () {
+               return gdxBulletJNI.btPoolAllocator_getUsedCount(swigCPtr, this);
+       }
+
+       public int getMaxCount () {
+               return gdxBulletJNI.btPoolAllocator_getMaxCount(swigCPtr, this);
+       }
+
+       public SWIGTYPE_p_void allocate (int size) {
+               long cPtr = gdxBulletJNI.btPoolAllocator_allocate(swigCPtr, this, size);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public boolean validPtr (SWIGTYPE_p_void ptr) {
+               return gdxBulletJNI.btPoolAllocator_validPtr(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
+       }
+
+       public void freeMemory (SWIGTYPE_p_void ptr) {
+               gdxBulletJNI.btPoolAllocator_freeMemory(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
+       }
+
+       public int getElementSize () {
+               return gdxBulletJNI.btPoolAllocator_getElementSize(swigCPtr, this);
+       }
+
+       public SWIGTYPE_p_unsigned_char getPoolAddress () {
+               long cPtr = gdxBulletJNI.btPoolAllocator_getPoolAddress__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+       }
 
 }
index 229f174..fa5d93a 100644 (file)
@@ -8,56 +8,52 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btPositionAndRadius {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btPositionAndRadius(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btPositionAndRadius obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btPositionAndRadius(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_pos(btVector3FloatData value) {
-    gdxBulletJNI.btPositionAndRadius_m_pos_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_pos() {
-    long cPtr = gdxBulletJNI.btPositionAndRadius_m_pos_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_radius(float value) {
-    gdxBulletJNI.btPositionAndRadius_m_radius_set(swigCPtr, this, value);
-  }
-
-  public float getM_radius() {
-    return gdxBulletJNI.btPositionAndRadius_m_radius_get(swigCPtr, this);
-  }
-
-  public btPositionAndRadius() {
-    this(gdxBulletJNI.new_btPositionAndRadius(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btPositionAndRadius (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btPositionAndRadius obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btPositionAndRadius(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_pos (btVector3FloatData value) {
+               gdxBulletJNI.btPositionAndRadius_m_pos_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_pos () {
+               long cPtr = gdxBulletJNI.btPositionAndRadius_m_pos_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_radius (float value) {
+               gdxBulletJNI.btPositionAndRadius_m_radius_set(swigCPtr, this, value);
+       }
+
+       public float getM_radius () {
+               return gdxBulletJNI.btPositionAndRadius_m_radius_get(swigCPtr, this);
+       }
+
+       public btPositionAndRadius () {
+               this(gdxBulletJNI.new_btPositionAndRadius(), true);
+       }
 
 }
index 76b780c..97adb62 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btQuantizedBvh {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btQuantizedBvh(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btQuantizedBvh obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btQuantizedBvh(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btQuantizedBvh() {
-    this(gdxBulletJNI.new_btQuantizedBvh(), true);
-  }
-
-  public void setQuantizationValues(Vector3 bvhAabbMin, Vector3 bvhAabbMax, float quantizationMargin) {
-    gdxBulletJNI.btQuantizedBvh_setQuantizationValues__SWIG_0(swigCPtr, this, bvhAabbMin, bvhAabbMax, quantizationMargin);
-  }
-
-  public void setQuantizationValues(Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
-    gdxBulletJNI.btQuantizedBvh_setQuantizationValues__SWIG_1(swigCPtr, this, bvhAabbMin, bvhAabbMax);
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t getLeafNodeArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t(gdxBulletJNI.btQuantizedBvh_getLeafNodeArray(swigCPtr, this), false);
-  }
-
-  public void buildInternal() {
-    gdxBulletJNI.btQuantizedBvh_buildInternal(swigCPtr, this);
-  }
-
-  public void reportAabbOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btQuantizedBvh_reportAabbOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback), nodeCallback, aabbMin, aabbMax);
-  }
-
-  public void reportRayOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget) {
-    gdxBulletJNI.btQuantizedBvh_reportRayOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback), nodeCallback, raySource, rayTarget);
-  }
-
-  public void reportBoxCastOverlappingNodex(btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btQuantizedBvh_reportBoxCastOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback), nodeCallback, raySource, rayTarget, aabbMin, aabbMax);
-  }
-
-  public void quantize(SWIGTYPE_p_unsigned_short out, Vector3 point, int isMax) {
-    gdxBulletJNI.btQuantizedBvh_quantize(swigCPtr, this, SWIGTYPE_p_unsigned_short.getCPtr(out), point, isMax);
-  }
-
-  public void quantizeWithClamp(SWIGTYPE_p_unsigned_short out, Vector3 point2, int isMax) {
-    gdxBulletJNI.btQuantizedBvh_quantizeWithClamp(swigCPtr, this, SWIGTYPE_p_unsigned_short.getCPtr(out), point2, isMax);
-  }
-
-  public Vector3 unQuantize(SWIGTYPE_p_unsigned_short vecIn) {
-       return gdxBulletJNI.btQuantizedBvh_unQuantize(swigCPtr, this, SWIGTYPE_p_unsigned_short.getCPtr(vecIn));
-}
-
-  public void setTraversalMode(int traversalMode) {
-    gdxBulletJNI.btQuantizedBvh_setTraversalMode(swigCPtr, this, traversalMode);
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t getQuantizedNodeArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t(gdxBulletJNI.btQuantizedBvh_getQuantizedNodeArray(swigCPtr, this), false);
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t getSubtreeInfoArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t(gdxBulletJNI.btQuantizedBvh_getSubtreeInfoArray(swigCPtr, this), false);
-  }
-
-  public long calculateSerializeBufferSize() {
-    return gdxBulletJNI.btQuantizedBvh_calculateSerializeBufferSize(swigCPtr, this);
-  }
-
-  public boolean serialize(SWIGTYPE_p_void o_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) {
-    return gdxBulletJNI.btQuantizedBvh_serialize__SWIG_0(swigCPtr, this, SWIGTYPE_p_void.getCPtr(o_alignedDataBuffer), i_dataBufferSize, i_swapEndian);
-  }
-
-  public static btQuantizedBvh deSerializeInPlace(SWIGTYPE_p_void i_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) {
-    long cPtr = gdxBulletJNI.btQuantizedBvh_deSerializeInPlace(SWIGTYPE_p_void.getCPtr(i_alignedDataBuffer), i_dataBufferSize, i_swapEndian);
-    return (cPtr == 0) ? null : new btQuantizedBvh(cPtr, false);
-  }
-
-  public static long getAlignmentSerializationPadding() {
-    return gdxBulletJNI.btQuantizedBvh_getAlignmentSerializationPadding();
-  }
-
-  public int calculateSerializeBufferSizeNew() {
-    return gdxBulletJNI.btQuantizedBvh_calculateSerializeBufferSizeNew(swigCPtr, this);
-  }
-
-  public String serialize(SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
-    return gdxBulletJNI.btQuantizedBvh_serialize__SWIG_1(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer), SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
-
-  public void deSerializeFloat(btQuantizedBvhFloatData quantizedBvhFloatData) {
-    gdxBulletJNI.btQuantizedBvh_deSerializeFloat(swigCPtr, this, btQuantizedBvhFloatData.getCPtr(quantizedBvhFloatData), quantizedBvhFloatData);
-  }
-
-  public void deSerializeDouble(btQuantizedBvhDoubleData quantizedBvhDoubleData) {
-    gdxBulletJNI.btQuantizedBvh_deSerializeDouble(swigCPtr, this, btQuantizedBvhDoubleData.getCPtr(quantizedBvhDoubleData), quantizedBvhDoubleData);
-  }
-
-  public boolean isQuantized() {
-    return gdxBulletJNI.btQuantizedBvh_isQuantized(swigCPtr, this);
-  }
-
-  public final static class btTraversalMode {
-    public final static int TRAVERSAL_STACKLESS = 0;
-    public final static int TRAVERSAL_STACKLESS_CACHE_FRIENDLY = TRAVERSAL_STACKLESS + 1;
-    public final static int TRAVERSAL_RECURSIVE = TRAVERSAL_STACKLESS_CACHE_FRIENDLY + 1;
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btQuantizedBvh (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btQuantizedBvh obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btQuantizedBvh(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btQuantizedBvh () {
+               this(gdxBulletJNI.new_btQuantizedBvh(), true);
+       }
+
+       public void setQuantizationValues (Vector3 bvhAabbMin, Vector3 bvhAabbMax, float quantizationMargin) {
+               gdxBulletJNI.btQuantizedBvh_setQuantizationValues__SWIG_0(swigCPtr, this, bvhAabbMin, bvhAabbMax, quantizationMargin);
+       }
+
+       public void setQuantizationValues (Vector3 bvhAabbMin, Vector3 bvhAabbMax) {
+               gdxBulletJNI.btQuantizedBvh_setQuantizationValues__SWIG_1(swigCPtr, this, bvhAabbMin, bvhAabbMax);
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t getLeafNodeArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t(gdxBulletJNI.btQuantizedBvh_getLeafNodeArray(swigCPtr,
+                       this), false);
+       }
+
+       public void buildInternal () {
+               gdxBulletJNI.btQuantizedBvh_buildInternal(swigCPtr, this);
+       }
+
+       public void reportAabbOverlappingNodex (btNodeOverlapCallback nodeCallback, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btQuantizedBvh_reportAabbOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback),
+                       nodeCallback, aabbMin, aabbMax);
+       }
+
+       public void reportRayOverlappingNodex (btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget) {
+               gdxBulletJNI.btQuantizedBvh_reportRayOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback),
+                       nodeCallback, raySource, rayTarget);
+       }
+
+       public void reportBoxCastOverlappingNodex (btNodeOverlapCallback nodeCallback, Vector3 raySource, Vector3 rayTarget,
+               Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btQuantizedBvh_reportBoxCastOverlappingNodex(swigCPtr, this, btNodeOverlapCallback.getCPtr(nodeCallback),
+                       nodeCallback, raySource, rayTarget, aabbMin, aabbMax);
+       }
+
+       public void quantize (SWIGTYPE_p_unsigned_short out, Vector3 point, int isMax) {
+               gdxBulletJNI.btQuantizedBvh_quantize(swigCPtr, this, SWIGTYPE_p_unsigned_short.getCPtr(out), point, isMax);
+       }
+
+       public void quantizeWithClamp (SWIGTYPE_p_unsigned_short out, Vector3 point2, int isMax) {
+               gdxBulletJNI.btQuantizedBvh_quantizeWithClamp(swigCPtr, this, SWIGTYPE_p_unsigned_short.getCPtr(out), point2, isMax);
+       }
+
+       public Vector3 unQuantize (SWIGTYPE_p_unsigned_short vecIn) {
+               return gdxBulletJNI.btQuantizedBvh_unQuantize(swigCPtr, this, SWIGTYPE_p_unsigned_short.getCPtr(vecIn));
+       }
+
+       public void setTraversalMode (int traversalMode) {
+               gdxBulletJNI.btQuantizedBvh_setTraversalMode(swigCPtr, this, traversalMode);
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t getQuantizedNodeArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btQuantizedBvhNode_t(gdxBulletJNI.btQuantizedBvh_getQuantizedNodeArray(
+                       swigCPtr, this), false);
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t getSubtreeInfoArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btBvhSubtreeInfo_t(gdxBulletJNI.btQuantizedBvh_getSubtreeInfoArray(swigCPtr,
+                       this), false);
+       }
+
+       public long calculateSerializeBufferSize () {
+               return gdxBulletJNI.btQuantizedBvh_calculateSerializeBufferSize(swigCPtr, this);
+       }
+
+       public boolean serialize (SWIGTYPE_p_void o_alignedDataBuffer, long i_dataBufferSize, boolean i_swapEndian) {
+               return gdxBulletJNI.btQuantizedBvh_serialize__SWIG_0(swigCPtr, this, SWIGTYPE_p_void.getCPtr(o_alignedDataBuffer),
+                       i_dataBufferSize, i_swapEndian);
+       }
+
+       public static btQuantizedBvh deSerializeInPlace (SWIGTYPE_p_void i_alignedDataBuffer, long i_dataBufferSize,
+               boolean i_swapEndian) {
+               long cPtr = gdxBulletJNI.btQuantizedBvh_deSerializeInPlace(SWIGTYPE_p_void.getCPtr(i_alignedDataBuffer), i_dataBufferSize,
+                       i_swapEndian);
+               return (cPtr == 0) ? null : new btQuantizedBvh(cPtr, false);
+       }
+
+       public static long getAlignmentSerializationPadding () {
+               return gdxBulletJNI.btQuantizedBvh_getAlignmentSerializationPadding();
+       }
+
+       public int calculateSerializeBufferSizeNew () {
+               return gdxBulletJNI.btQuantizedBvh_calculateSerializeBufferSizeNew(swigCPtr, this);
+       }
+
+       public String serialize (SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
+               return gdxBulletJNI.btQuantizedBvh_serialize__SWIG_1(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer),
+                       SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
+
+       public void deSerializeFloat (btQuantizedBvhFloatData quantizedBvhFloatData) {
+               gdxBulletJNI.btQuantizedBvh_deSerializeFloat(swigCPtr, this, btQuantizedBvhFloatData.getCPtr(quantizedBvhFloatData),
+                       quantizedBvhFloatData);
+       }
+
+       public void deSerializeDouble (btQuantizedBvhDoubleData quantizedBvhDoubleData) {
+               gdxBulletJNI.btQuantizedBvh_deSerializeDouble(swigCPtr, this, btQuantizedBvhDoubleData.getCPtr(quantizedBvhDoubleData),
+                       quantizedBvhDoubleData);
+       }
+
+       public boolean isQuantized () {
+               return gdxBulletJNI.btQuantizedBvh_isQuantized(swigCPtr, this);
+       }
+
+       public final static class btTraversalMode {
+               public final static int TRAVERSAL_STACKLESS = 0;
+               public final static int TRAVERSAL_STACKLESS_CACHE_FRIENDLY = TRAVERSAL_STACKLESS + 1;
+               public final static int TRAVERSAL_RECURSIVE = TRAVERSAL_STACKLESS_CACHE_FRIENDLY + 1;
+       }
 
 }
index 38fd870..768e9dd 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btQuantizedBvhDoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btQuantizedBvhDoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btQuantizedBvhDoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btQuantizedBvhDoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_bvhAabbMin(btVector3DoubleData value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMin_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_bvhAabbMin() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMin_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_bvhAabbMax(btVector3DoubleData value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMax_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_bvhAabbMax() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMax_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_bvhQuantization(btVector3DoubleData value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhQuantization_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_bvhQuantization() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhQuantization_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_curNodeIndex(int value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_curNodeIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_curNodeIndex() {
-    return gdxBulletJNI.btQuantizedBvhDoubleData_m_curNodeIndex_get(swigCPtr, this);
-  }
-
-  public void setM_useQuantization(int value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_useQuantization_set(swigCPtr, this, value);
-  }
-
-  public int getM_useQuantization() {
-    return gdxBulletJNI.btQuantizedBvhDoubleData_m_useQuantization_get(swigCPtr, this);
-  }
-
-  public void setM_numContiguousLeafNodes(int value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_numContiguousLeafNodes_set(swigCPtr, this, value);
-  }
-
-  public int getM_numContiguousLeafNodes() {
-    return gdxBulletJNI.btQuantizedBvhDoubleData_m_numContiguousLeafNodes_get(swigCPtr, this);
-  }
-
-  public void setM_numQuantizedContiguousNodes(int value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_set(swigCPtr, this, value);
-  }
-
-  public int getM_numQuantizedContiguousNodes() {
-    return gdxBulletJNI.btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_get(swigCPtr, this);
-  }
-
-  public void setM_contiguousNodesPtr(btOptimizedBvhNodeDoubleData value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_contiguousNodesPtr_set(swigCPtr, this, btOptimizedBvhNodeDoubleData.getCPtr(value), value);
-  }
-
-  public btOptimizedBvhNodeDoubleData getM_contiguousNodesPtr() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_contiguousNodesPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOptimizedBvhNodeDoubleData(cPtr, false);
-  }
-
-  public void setM_quantizedContiguousNodesPtr(btQuantizedBvhNodeData value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_set(swigCPtr, this, btQuantizedBvhNodeData.getCPtr(value), value);
-  }
-
-  public btQuantizedBvhNodeData getM_quantizedContiguousNodesPtr() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btQuantizedBvhNodeData(cPtr, false);
-  }
-
-  public void setM_traversalMode(int value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_traversalMode_set(swigCPtr, this, value);
-  }
-
-  public int getM_traversalMode() {
-    return gdxBulletJNI.btQuantizedBvhDoubleData_m_traversalMode_get(swigCPtr, this);
-  }
-
-  public void setM_numSubtreeHeaders(int value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_numSubtreeHeaders_set(swigCPtr, this, value);
-  }
-
-  public int getM_numSubtreeHeaders() {
-    return gdxBulletJNI.btQuantizedBvhDoubleData_m_numSubtreeHeaders_get(swigCPtr, this);
-  }
-
-  public void setM_subTreeInfoPtr(btBvhSubtreeInfoData value) {
-    gdxBulletJNI.btQuantizedBvhDoubleData_m_subTreeInfoPtr_set(swigCPtr, this, btBvhSubtreeInfoData.getCPtr(value), value);
-  }
-
-  public btBvhSubtreeInfoData getM_subTreeInfoPtr() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_subTreeInfoPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBvhSubtreeInfoData(cPtr, false);
-  }
-
-  public btQuantizedBvhDoubleData() {
-    this(gdxBulletJNI.new_btQuantizedBvhDoubleData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btQuantizedBvhDoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btQuantizedBvhDoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btQuantizedBvhDoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_bvhAabbMin (btVector3DoubleData value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMin_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_bvhAabbMin () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMin_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_bvhAabbMax (btVector3DoubleData value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMax_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_bvhAabbMax () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhAabbMax_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_bvhQuantization (btVector3DoubleData value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhQuantization_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_bvhQuantization () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_bvhQuantization_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_curNodeIndex (int value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_curNodeIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_curNodeIndex () {
+               return gdxBulletJNI.btQuantizedBvhDoubleData_m_curNodeIndex_get(swigCPtr, this);
+       }
+
+       public void setM_useQuantization (int value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_useQuantization_set(swigCPtr, this, value);
+       }
+
+       public int getM_useQuantization () {
+               return gdxBulletJNI.btQuantizedBvhDoubleData_m_useQuantization_get(swigCPtr, this);
+       }
+
+       public void setM_numContiguousLeafNodes (int value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_numContiguousLeafNodes_set(swigCPtr, this, value);
+       }
+
+       public int getM_numContiguousLeafNodes () {
+               return gdxBulletJNI.btQuantizedBvhDoubleData_m_numContiguousLeafNodes_get(swigCPtr, this);
+       }
+
+       public void setM_numQuantizedContiguousNodes (int value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_set(swigCPtr, this, value);
+       }
+
+       public int getM_numQuantizedContiguousNodes () {
+               return gdxBulletJNI.btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_get(swigCPtr, this);
+       }
+
+       public void setM_contiguousNodesPtr (btOptimizedBvhNodeDoubleData value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_contiguousNodesPtr_set(swigCPtr, this, btOptimizedBvhNodeDoubleData.getCPtr(value),
+                       value);
+       }
+
+       public btOptimizedBvhNodeDoubleData getM_contiguousNodesPtr () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_contiguousNodesPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOptimizedBvhNodeDoubleData(cPtr, false);
+       }
+
+       public void setM_quantizedContiguousNodesPtr (btQuantizedBvhNodeData value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_set(swigCPtr, this,
+                       btQuantizedBvhNodeData.getCPtr(value), value);
+       }
+
+       public btQuantizedBvhNodeData getM_quantizedContiguousNodesPtr () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btQuantizedBvhNodeData(cPtr, false);
+       }
+
+       public void setM_traversalMode (int value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_traversalMode_set(swigCPtr, this, value);
+       }
+
+       public int getM_traversalMode () {
+               return gdxBulletJNI.btQuantizedBvhDoubleData_m_traversalMode_get(swigCPtr, this);
+       }
+
+       public void setM_numSubtreeHeaders (int value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_numSubtreeHeaders_set(swigCPtr, this, value);
+       }
+
+       public int getM_numSubtreeHeaders () {
+               return gdxBulletJNI.btQuantizedBvhDoubleData_m_numSubtreeHeaders_get(swigCPtr, this);
+       }
+
+       public void setM_subTreeInfoPtr (btBvhSubtreeInfoData value) {
+               gdxBulletJNI.btQuantizedBvhDoubleData_m_subTreeInfoPtr_set(swigCPtr, this, btBvhSubtreeInfoData.getCPtr(value), value);
+       }
+
+       public btBvhSubtreeInfoData getM_subTreeInfoPtr () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhDoubleData_m_subTreeInfoPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBvhSubtreeInfoData(cPtr, false);
+       }
+
+       public btQuantizedBvhDoubleData () {
+               this(gdxBulletJNI.new_btQuantizedBvhDoubleData(), true);
+       }
 
 }
index 7c77052..30ec6a2 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btQuantizedBvhFloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btQuantizedBvhFloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btQuantizedBvhFloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btQuantizedBvhFloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_bvhAabbMin(btVector3FloatData value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMin_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_bvhAabbMin() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMin_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_bvhAabbMax(btVector3FloatData value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMax_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_bvhAabbMax() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMax_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_bvhQuantization(btVector3FloatData value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_bvhQuantization_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_bvhQuantization() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_bvhQuantization_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_curNodeIndex(int value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_curNodeIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_curNodeIndex() {
-    return gdxBulletJNI.btQuantizedBvhFloatData_m_curNodeIndex_get(swigCPtr, this);
-  }
-
-  public void setM_useQuantization(int value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_useQuantization_set(swigCPtr, this, value);
-  }
-
-  public int getM_useQuantization() {
-    return gdxBulletJNI.btQuantizedBvhFloatData_m_useQuantization_get(swigCPtr, this);
-  }
-
-  public void setM_numContiguousLeafNodes(int value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_numContiguousLeafNodes_set(swigCPtr, this, value);
-  }
-
-  public int getM_numContiguousLeafNodes() {
-    return gdxBulletJNI.btQuantizedBvhFloatData_m_numContiguousLeafNodes_get(swigCPtr, this);
-  }
-
-  public void setM_numQuantizedContiguousNodes(int value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_set(swigCPtr, this, value);
-  }
-
-  public int getM_numQuantizedContiguousNodes() {
-    return gdxBulletJNI.btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_get(swigCPtr, this);
-  }
-
-  public void setM_contiguousNodesPtr(btOptimizedBvhNodeFloatData value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_contiguousNodesPtr_set(swigCPtr, this, btOptimizedBvhNodeFloatData.getCPtr(value), value);
-  }
-
-  public btOptimizedBvhNodeFloatData getM_contiguousNodesPtr() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_contiguousNodesPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOptimizedBvhNodeFloatData(cPtr, false);
-  }
-
-  public void setM_quantizedContiguousNodesPtr(btQuantizedBvhNodeData value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_set(swigCPtr, this, btQuantizedBvhNodeData.getCPtr(value), value);
-  }
-
-  public btQuantizedBvhNodeData getM_quantizedContiguousNodesPtr() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btQuantizedBvhNodeData(cPtr, false);
-  }
-
-  public void setM_subTreeInfoPtr(btBvhSubtreeInfoData value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_subTreeInfoPtr_set(swigCPtr, this, btBvhSubtreeInfoData.getCPtr(value), value);
-  }
-
-  public btBvhSubtreeInfoData getM_subTreeInfoPtr() {
-    long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_subTreeInfoPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBvhSubtreeInfoData(cPtr, false);
-  }
-
-  public void setM_traversalMode(int value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_traversalMode_set(swigCPtr, this, value);
-  }
-
-  public int getM_traversalMode() {
-    return gdxBulletJNI.btQuantizedBvhFloatData_m_traversalMode_get(swigCPtr, this);
-  }
-
-  public void setM_numSubtreeHeaders(int value) {
-    gdxBulletJNI.btQuantizedBvhFloatData_m_numSubtreeHeaders_set(swigCPtr, this, value);
-  }
-
-  public int getM_numSubtreeHeaders() {
-    return gdxBulletJNI.btQuantizedBvhFloatData_m_numSubtreeHeaders_get(swigCPtr, this);
-  }
-
-  public btQuantizedBvhFloatData() {
-    this(gdxBulletJNI.new_btQuantizedBvhFloatData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btQuantizedBvhFloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btQuantizedBvhFloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btQuantizedBvhFloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_bvhAabbMin (btVector3FloatData value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMin_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_bvhAabbMin () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMin_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_bvhAabbMax (btVector3FloatData value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMax_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_bvhAabbMax () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_bvhAabbMax_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_bvhQuantization (btVector3FloatData value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_bvhQuantization_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_bvhQuantization () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_bvhQuantization_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_curNodeIndex (int value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_curNodeIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_curNodeIndex () {
+               return gdxBulletJNI.btQuantizedBvhFloatData_m_curNodeIndex_get(swigCPtr, this);
+       }
+
+       public void setM_useQuantization (int value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_useQuantization_set(swigCPtr, this, value);
+       }
+
+       public int getM_useQuantization () {
+               return gdxBulletJNI.btQuantizedBvhFloatData_m_useQuantization_get(swigCPtr, this);
+       }
+
+       public void setM_numContiguousLeafNodes (int value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_numContiguousLeafNodes_set(swigCPtr, this, value);
+       }
+
+       public int getM_numContiguousLeafNodes () {
+               return gdxBulletJNI.btQuantizedBvhFloatData_m_numContiguousLeafNodes_get(swigCPtr, this);
+       }
+
+       public void setM_numQuantizedContiguousNodes (int value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_set(swigCPtr, this, value);
+       }
+
+       public int getM_numQuantizedContiguousNodes () {
+               return gdxBulletJNI.btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_get(swigCPtr, this);
+       }
+
+       public void setM_contiguousNodesPtr (btOptimizedBvhNodeFloatData value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_contiguousNodesPtr_set(swigCPtr, this, btOptimizedBvhNodeFloatData.getCPtr(value),
+                       value);
+       }
+
+       public btOptimizedBvhNodeFloatData getM_contiguousNodesPtr () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_contiguousNodesPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOptimizedBvhNodeFloatData(cPtr, false);
+       }
+
+       public void setM_quantizedContiguousNodesPtr (btQuantizedBvhNodeData value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_set(swigCPtr, this,
+                       btQuantizedBvhNodeData.getCPtr(value), value);
+       }
+
+       public btQuantizedBvhNodeData getM_quantizedContiguousNodesPtr () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btQuantizedBvhNodeData(cPtr, false);
+       }
+
+       public void setM_subTreeInfoPtr (btBvhSubtreeInfoData value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_subTreeInfoPtr_set(swigCPtr, this, btBvhSubtreeInfoData.getCPtr(value), value);
+       }
+
+       public btBvhSubtreeInfoData getM_subTreeInfoPtr () {
+               long cPtr = gdxBulletJNI.btQuantizedBvhFloatData_m_subTreeInfoPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBvhSubtreeInfoData(cPtr, false);
+       }
+
+       public void setM_traversalMode (int value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_traversalMode_set(swigCPtr, this, value);
+       }
+
+       public int getM_traversalMode () {
+               return gdxBulletJNI.btQuantizedBvhFloatData_m_traversalMode_get(swigCPtr, this);
+       }
+
+       public void setM_numSubtreeHeaders (int value) {
+               gdxBulletJNI.btQuantizedBvhFloatData_m_numSubtreeHeaders_set(swigCPtr, this, value);
+       }
+
+       public int getM_numSubtreeHeaders () {
+               return gdxBulletJNI.btQuantizedBvhFloatData_m_numSubtreeHeaders_get(swigCPtr, this);
+       }
+
+       public btQuantizedBvhFloatData () {
+               this(gdxBulletJNI.new_btQuantizedBvhFloatData(), true);
+       }
 
 }
index 77d5a52..d43cdc0 100644 (file)
@@ -8,79 +8,75 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btQuantizedBvhNode {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btQuantizedBvhNode(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btQuantizedBvhNode obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btQuantizedBvhNode(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_quantizedAabbMin(int[] value) {
-    gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMin_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_quantizedAabbMin() {
-    return gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMin_get(swigCPtr, this);
-  }
-
-  public void setM_quantizedAabbMax(int[] value) {
-    gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMax_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_quantizedAabbMax() {
-    return gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMax_get(swigCPtr, this);
-  }
-
-  public void setM_escapeIndexOrTriangleIndex(int value) {
-    gdxBulletJNI.btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_escapeIndexOrTriangleIndex() {
-    return gdxBulletJNI.btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_get(swigCPtr, this);
-  }
-
-  public boolean isLeafNode() {
-    return gdxBulletJNI.btQuantizedBvhNode_isLeafNode(swigCPtr, this);
-  }
-
-  public int getEscapeIndex() {
-    return gdxBulletJNI.btQuantizedBvhNode_getEscapeIndex(swigCPtr, this);
-  }
-
-  public int getTriangleIndex() {
-    return gdxBulletJNI.btQuantizedBvhNode_getTriangleIndex(swigCPtr, this);
-  }
-
-  public int getPartId() {
-    return gdxBulletJNI.btQuantizedBvhNode_getPartId(swigCPtr, this);
-  }
-
-  public btQuantizedBvhNode() {
-    this(gdxBulletJNI.new_btQuantizedBvhNode(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btQuantizedBvhNode (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btQuantizedBvhNode obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btQuantizedBvhNode(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_quantizedAabbMin (int[] value) {
+               gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMin_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_quantizedAabbMin () {
+               return gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMin_get(swigCPtr, this);
+       }
+
+       public void setM_quantizedAabbMax (int[] value) {
+               gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMax_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_quantizedAabbMax () {
+               return gdxBulletJNI.btQuantizedBvhNode_m_quantizedAabbMax_get(swigCPtr, this);
+       }
+
+       public void setM_escapeIndexOrTriangleIndex (int value) {
+               gdxBulletJNI.btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_escapeIndexOrTriangleIndex () {
+               return gdxBulletJNI.btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_get(swigCPtr, this);
+       }
+
+       public boolean isLeafNode () {
+               return gdxBulletJNI.btQuantizedBvhNode_isLeafNode(swigCPtr, this);
+       }
+
+       public int getEscapeIndex () {
+               return gdxBulletJNI.btQuantizedBvhNode_getEscapeIndex(swigCPtr, this);
+       }
+
+       public int getTriangleIndex () {
+               return gdxBulletJNI.btQuantizedBvhNode_getTriangleIndex(swigCPtr, this);
+       }
+
+       public int getPartId () {
+               return gdxBulletJNI.btQuantizedBvhNode_getPartId(swigCPtr, this);
+       }
+
+       public btQuantizedBvhNode () {
+               this(gdxBulletJNI.new_btQuantizedBvhNode(), true);
+       }
 
 }
index 627e102..d234ed0 100644 (file)
@@ -8,63 +8,59 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btQuantizedBvhNodeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btQuantizedBvhNodeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btQuantizedBvhNodeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btQuantizedBvhNodeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btQuantizedBvhNodeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btQuantizedBvhNodeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btQuantizedBvhNodeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public void setM_quantizedAabbMin(int[] value) {
-    gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMin_set(swigCPtr, this, value);
-  }
+       public void setM_quantizedAabbMin (int[] value) {
+               gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMin_set(swigCPtr, this, value);
+       }
 
-  public int[] getM_quantizedAabbMin() {
-    return gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMin_get(swigCPtr, this);
-  }
+       public int[] getM_quantizedAabbMin () {
+               return gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMin_get(swigCPtr, this);
+       }
 
-  public void setM_quantizedAabbMax(int[] value) {
-    gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMax_set(swigCPtr, this, value);
-  }
+       public void setM_quantizedAabbMax (int[] value) {
+               gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMax_set(swigCPtr, this, value);
+       }
 
-  public int[] getM_quantizedAabbMax() {
-    return gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMax_get(swigCPtr, this);
-  }
+       public int[] getM_quantizedAabbMax () {
+               return gdxBulletJNI.btQuantizedBvhNodeData_m_quantizedAabbMax_get(swigCPtr, this);
+       }
 
-  public void setM_escapeIndexOrTriangleIndex(int value) {
-    gdxBulletJNI.btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_set(swigCPtr, this, value);
-  }
+       public void setM_escapeIndexOrTriangleIndex (int value) {
+               gdxBulletJNI.btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_set(swigCPtr, this, value);
+       }
 
-  public int getM_escapeIndexOrTriangleIndex() {
-    return gdxBulletJNI.btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_get(swigCPtr, this);
-  }
+       public int getM_escapeIndexOrTriangleIndex () {
+               return gdxBulletJNI.btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_get(swigCPtr, this);
+       }
 
-  public btQuantizedBvhNodeData() {
-    this(gdxBulletJNI.new_btQuantizedBvhNodeData(), true);
-  }
+       public btQuantizedBvhNodeData () {
+               this(gdxBulletJNI.new_btQuantizedBvhNodeData(), true);
+       }
 
 }
index c605b64..19f52f2 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
 import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Vector3;
 
 public class btQuaternion {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btQuaternion(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btQuaternion obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btQuaternion(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btQuaternion() {
-    this(gdxBulletJNI.new_btQuaternion__SWIG_0(), true);
-  }
-
-  public btQuaternion(float x, float y, float z, float w) {
-    this(gdxBulletJNI.new_btQuaternion__SWIG_1(x, y, z, w), true);
-  }
-
-  public btQuaternion(Vector3 axis, float angle) {
-    this(gdxBulletJNI.new_btQuaternion__SWIG_2(axis, angle), true);
-  }
-
-  public btQuaternion(float yaw, float pitch, float roll) {
-    this(gdxBulletJNI.new_btQuaternion__SWIG_3(yaw, pitch, roll), true);
-  }
-
-  public void setRotation(Vector3 axis, float angle) {
-    gdxBulletJNI.btQuaternion_setRotation(swigCPtr, this, axis, angle);
-  }
-
-  public void setEuler(float yaw, float pitch, float roll) {
-    gdxBulletJNI.btQuaternion_setEuler(swigCPtr, this, yaw, pitch, roll);
-  }
-
-  public void setEulerZYX(float yaw, float pitch, float roll) {
-    gdxBulletJNI.btQuaternion_setEulerZYX(swigCPtr, this, yaw, pitch, roll);
-  }
-
-  public float dot(Quaternion q) {
-    return gdxBulletJNI.btQuaternion_dot(swigCPtr, this, q);
-  }
-
-  public float length2() {
-    return gdxBulletJNI.btQuaternion_length2(swigCPtr, this);
-  }
-
-  public float length() {
-    return gdxBulletJNI.btQuaternion_length(swigCPtr, this);
-  }
-
-  public Quaternion normalize() {
-       return gdxBulletJNI.btQuaternion_normalize(swigCPtr, this);
-}
-
-  public Quaternion normalized() {
-       return gdxBulletJNI.btQuaternion_normalized(swigCPtr, this);
-}
-
-  public float angle(Quaternion q) {
-    return gdxBulletJNI.btQuaternion_angle(swigCPtr, this, q);
-  }
-
-  public float getAngle() {
-    return gdxBulletJNI.btQuaternion_getAngle(swigCPtr, this);
-  }
-
-  public Vector3 getAxis() {
-       return gdxBulletJNI.btQuaternion_getAxis(swigCPtr, this);
-}
-
-  public Quaternion inverse() {
-       return gdxBulletJNI.btQuaternion_inverse(swigCPtr, this);
-}
-
-  public Quaternion farthest(Quaternion qd) {
-       return gdxBulletJNI.btQuaternion_farthest(swigCPtr, this, qd);
-}
-
-  public Quaternion nearest(Quaternion qd) {
-       return gdxBulletJNI.btQuaternion_nearest(swigCPtr, this, qd);
-}
-
-  public Quaternion slerp(Quaternion q, float t) {
-       return gdxBulletJNI.btQuaternion_slerp(swigCPtr, this, q, t);
-}
-
-  public static Quaternion getIdentity() {
-       return gdxBulletJNI.btQuaternion_getIdentity();
-}
-
-  public float getW() {
-    return gdxBulletJNI.btQuaternion_getW(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btQuaternion (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btQuaternion obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btQuaternion(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btQuaternion () {
+               this(gdxBulletJNI.new_btQuaternion__SWIG_0(), true);
+       }
+
+       public btQuaternion (float x, float y, float z, float w) {
+               this(gdxBulletJNI.new_btQuaternion__SWIG_1(x, y, z, w), true);
+       }
+
+       public btQuaternion (Vector3 axis, float angle) {
+               this(gdxBulletJNI.new_btQuaternion__SWIG_2(axis, angle), true);
+       }
+
+       public btQuaternion (float yaw, float pitch, float roll) {
+               this(gdxBulletJNI.new_btQuaternion__SWIG_3(yaw, pitch, roll), true);
+       }
+
+       public void setRotation (Vector3 axis, float angle) {
+               gdxBulletJNI.btQuaternion_setRotation(swigCPtr, this, axis, angle);
+       }
+
+       public void setEuler (float yaw, float pitch, float roll) {
+               gdxBulletJNI.btQuaternion_setEuler(swigCPtr, this, yaw, pitch, roll);
+       }
+
+       public void setEulerZYX (float yaw, float pitch, float roll) {
+               gdxBulletJNI.btQuaternion_setEulerZYX(swigCPtr, this, yaw, pitch, roll);
+       }
+
+       public float dot (Quaternion q) {
+               return gdxBulletJNI.btQuaternion_dot(swigCPtr, this, q);
+       }
+
+       public float length2 () {
+               return gdxBulletJNI.btQuaternion_length2(swigCPtr, this);
+       }
+
+       public float length () {
+               return gdxBulletJNI.btQuaternion_length(swigCPtr, this);
+       }
+
+       public Quaternion normalize () {
+               return gdxBulletJNI.btQuaternion_normalize(swigCPtr, this);
+       }
+
+       public Quaternion normalized () {
+               return gdxBulletJNI.btQuaternion_normalized(swigCPtr, this);
+       }
+
+       public float angle (Quaternion q) {
+               return gdxBulletJNI.btQuaternion_angle(swigCPtr, this, q);
+       }
+
+       public float getAngle () {
+               return gdxBulletJNI.btQuaternion_getAngle(swigCPtr, this);
+       }
+
+       public Vector3 getAxis () {
+               return gdxBulletJNI.btQuaternion_getAxis(swigCPtr, this);
+       }
+
+       public Quaternion inverse () {
+               return gdxBulletJNI.btQuaternion_inverse(swigCPtr, this);
+       }
+
+       public Quaternion farthest (Quaternion qd) {
+               return gdxBulletJNI.btQuaternion_farthest(swigCPtr, this, qd);
+       }
+
+       public Quaternion nearest (Quaternion qd) {
+               return gdxBulletJNI.btQuaternion_nearest(swigCPtr, this, qd);
+       }
+
+       public Quaternion slerp (Quaternion q, float t) {
+               return gdxBulletJNI.btQuaternion_slerp(swigCPtr, this, q, t);
+       }
+
+       public static Quaternion getIdentity () {
+               return gdxBulletJNI.btQuaternion_getIdentity();
+       }
+
+       public float getW () {
+               return gdxBulletJNI.btQuaternion_getW(swigCPtr, this);
+       }
 
 }
index 2ad4de4..6afa407 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
 import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Quaternion;
+import com.badlogic.gdx.math.Vector3;
 
 public class btRigidBody extends btCollisionObject {
-  private long swigCPtr;
-
-  protected btRigidBody(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btRigidBody_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btRigidBody obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btRigidBody(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btRigidBody(btRigidBodyConstructionInfo constructionInfo) {
-    this(gdxBulletJNI.new_btRigidBody__SWIG_0(btRigidBodyConstructionInfo.getCPtr(constructionInfo), constructionInfo), true);
-  }
-
-  public btRigidBody(float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
-    this(gdxBulletJNI.new_btRigidBody__SWIG_1(mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape, localInertia), true);
-  }
-
-  public btRigidBody(float mass, btMotionState motionState, btCollisionShape collisionShape) {
-    this(gdxBulletJNI.new_btRigidBody__SWIG_2(mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape), true);
-  }
-
-  public void proceedToTransform(btTransform newTrans) {
-    gdxBulletJNI.btRigidBody_proceedToTransform(swigCPtr, this, btTransform.getCPtr(newTrans), newTrans);
-  }
-
-  public static btRigidBody upcast(btCollisionObject colObj) {
-    long cPtr = gdxBulletJNI.btRigidBody_upcast__SWIG_0(btCollisionObject.getCPtr(colObj), colObj);
-    return (cPtr == 0) ? null : new btRigidBody(cPtr, false);
-  }
-
-  public void predictIntegratedTransform(float step, btTransform predictedTransform) {
-    gdxBulletJNI.btRigidBody_predictIntegratedTransform(swigCPtr, this, step, btTransform.getCPtr(predictedTransform), predictedTransform);
-  }
-
-  public void saveKinematicState(float step) {
-    gdxBulletJNI.btRigidBody_saveKinematicState(swigCPtr, this, step);
-  }
-
-  public void applyGravity() {
-    gdxBulletJNI.btRigidBody_applyGravity(swigCPtr, this);
-  }
-
-  public void setGravity(Vector3 acceleration) {
-    gdxBulletJNI.btRigidBody_setGravity(swigCPtr, this, acceleration);
-  }
-
-  public Vector3 getGravity() {
-       return gdxBulletJNI.btRigidBody_getGravity(swigCPtr, this);
-}
-
-  public void setDamping(float lin_damping, float ang_damping) {
-    gdxBulletJNI.btRigidBody_setDamping(swigCPtr, this, lin_damping, ang_damping);
-  }
-
-  public float getLinearDamping() {
-    return gdxBulletJNI.btRigidBody_getLinearDamping(swigCPtr, this);
-  }
-
-  public float getAngularDamping() {
-    return gdxBulletJNI.btRigidBody_getAngularDamping(swigCPtr, this);
-  }
-
-  public float getLinearSleepingThreshold() {
-    return gdxBulletJNI.btRigidBody_getLinearSleepingThreshold(swigCPtr, this);
-  }
-
-  public float getAngularSleepingThreshold() {
-    return gdxBulletJNI.btRigidBody_getAngularSleepingThreshold(swigCPtr, this);
-  }
-
-  public void applyDamping(float timeStep) {
-    gdxBulletJNI.btRigidBody_applyDamping(swigCPtr, this, timeStep);
-  }
-
-  public btCollisionShape getCollisionShape() {
-    long cPtr = gdxBulletJNI.btRigidBody_getCollisionShape__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
-  }
-
-  public void setMassProps(float mass, Vector3 inertia) {
-    gdxBulletJNI.btRigidBody_setMassProps(swigCPtr, this, mass, inertia);
-  }
-
-  public Vector3 getLinearFactor() {
-       return gdxBulletJNI.btRigidBody_getLinearFactor(swigCPtr, this);
-}
-
-  public void setLinearFactor(Vector3 linearFactor) {
-    gdxBulletJNI.btRigidBody_setLinearFactor(swigCPtr, this, linearFactor);
-  }
-
-  public float getInvMass() {
-    return gdxBulletJNI.btRigidBody_getInvMass(swigCPtr, this);
-  }
-
-  public Matrix3 getInvInertiaTensorWorld() {
-       return gdxBulletJNI.btRigidBody_getInvInertiaTensorWorld(swigCPtr, this);
-}
-
-  public void integrateVelocities(float step) {
-    gdxBulletJNI.btRigidBody_integrateVelocities(swigCPtr, this, step);
-  }
-
-  public void setCenterOfMassTransform(btTransform xform) {
-    gdxBulletJNI.btRigidBody_setCenterOfMassTransform(swigCPtr, this, btTransform.getCPtr(xform), xform);
-  }
-
-  public void applyCentralForce(Vector3 force) {
-    gdxBulletJNI.btRigidBody_applyCentralForce(swigCPtr, this, force);
-  }
-
-  public Vector3 getTotalForce() {
-       return gdxBulletJNI.btRigidBody_getTotalForce(swigCPtr, this);
-}
-
-  public Vector3 getTotalTorque() {
-       return gdxBulletJNI.btRigidBody_getTotalTorque(swigCPtr, this);
-}
-
-  public Vector3 getInvInertiaDiagLocal() {
-       return gdxBulletJNI.btRigidBody_getInvInertiaDiagLocal(swigCPtr, this);
-}
-
-  public void setInvInertiaDiagLocal(Vector3 diagInvInertia) {
-    gdxBulletJNI.btRigidBody_setInvInertiaDiagLocal(swigCPtr, this, diagInvInertia);
-  }
+       private long swigCPtr;
+
+       protected btRigidBody (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btRigidBody_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btRigidBody obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btRigidBody(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btRigidBody (btRigidBodyConstructionInfo constructionInfo) {
+               this(gdxBulletJNI.new_btRigidBody__SWIG_0(btRigidBodyConstructionInfo.getCPtr(constructionInfo), constructionInfo), true);
+       }
+
+       public btRigidBody (float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
+               this(gdxBulletJNI.new_btRigidBody__SWIG_1(mass, btMotionState.getCPtr(motionState), motionState,
+                       btCollisionShape.getCPtr(collisionShape), collisionShape, localInertia), true);
+       }
+
+       public btRigidBody (float mass, btMotionState motionState, btCollisionShape collisionShape) {
+               this(gdxBulletJNI.new_btRigidBody__SWIG_2(mass, btMotionState.getCPtr(motionState), motionState,
+                       btCollisionShape.getCPtr(collisionShape), collisionShape), true);
+       }
+
+       public void proceedToTransform (btTransform newTrans) {
+               gdxBulletJNI.btRigidBody_proceedToTransform(swigCPtr, this, btTransform.getCPtr(newTrans), newTrans);
+       }
+
+       public static btRigidBody upcast (btCollisionObject colObj) {
+               long cPtr = gdxBulletJNI.btRigidBody_upcast__SWIG_0(btCollisionObject.getCPtr(colObj), colObj);
+               return (cPtr == 0) ? null : new btRigidBody(cPtr, false);
+       }
+
+       public void predictIntegratedTransform (float step, btTransform predictedTransform) {
+               gdxBulletJNI.btRigidBody_predictIntegratedTransform(swigCPtr, this, step, btTransform.getCPtr(predictedTransform),
+                       predictedTransform);
+       }
+
+       public void saveKinematicState (float step) {
+               gdxBulletJNI.btRigidBody_saveKinematicState(swigCPtr, this, step);
+       }
+
+       public void applyGravity () {
+               gdxBulletJNI.btRigidBody_applyGravity(swigCPtr, this);
+       }
+
+       public void setGravity (Vector3 acceleration) {
+               gdxBulletJNI.btRigidBody_setGravity(swigCPtr, this, acceleration);
+       }
+
+       public Vector3 getGravity () {
+               return gdxBulletJNI.btRigidBody_getGravity(swigCPtr, this);
+       }
+
+       public void setDamping (float lin_damping, float ang_damping) {
+               gdxBulletJNI.btRigidBody_setDamping(swigCPtr, this, lin_damping, ang_damping);
+       }
+
+       public float getLinearDamping () {
+               return gdxBulletJNI.btRigidBody_getLinearDamping(swigCPtr, this);
+       }
+
+       public float getAngularDamping () {
+               return gdxBulletJNI.btRigidBody_getAngularDamping(swigCPtr, this);
+       }
+
+       public float getLinearSleepingThreshold () {
+               return gdxBulletJNI.btRigidBody_getLinearSleepingThreshold(swigCPtr, this);
+       }
+
+       public float getAngularSleepingThreshold () {
+               return gdxBulletJNI.btRigidBody_getAngularSleepingThreshold(swigCPtr, this);
+       }
+
+       public void applyDamping (float timeStep) {
+               gdxBulletJNI.btRigidBody_applyDamping(swigCPtr, this, timeStep);
+       }
+
+       public btCollisionShape getCollisionShape () {
+               long cPtr = gdxBulletJNI.btRigidBody_getCollisionShape__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
+       }
+
+       public void setMassProps (float mass, Vector3 inertia) {
+               gdxBulletJNI.btRigidBody_setMassProps(swigCPtr, this, mass, inertia);
+       }
+
+       public Vector3 getLinearFactor () {
+               return gdxBulletJNI.btRigidBody_getLinearFactor(swigCPtr, this);
+       }
+
+       public void setLinearFactor (Vector3 linearFactor) {
+               gdxBulletJNI.btRigidBody_setLinearFactor(swigCPtr, this, linearFactor);
+       }
+
+       public float getInvMass () {
+               return gdxBulletJNI.btRigidBody_getInvMass(swigCPtr, this);
+       }
+
+       public Matrix3 getInvInertiaTensorWorld () {
+               return gdxBulletJNI.btRigidBody_getInvInertiaTensorWorld(swigCPtr, this);
+       }
+
+       public void integrateVelocities (float step) {
+               gdxBulletJNI.btRigidBody_integrateVelocities(swigCPtr, this, step);
+       }
+
+       public void setCenterOfMassTransform (btTransform xform) {
+               gdxBulletJNI.btRigidBody_setCenterOfMassTransform(swigCPtr, this, btTransform.getCPtr(xform), xform);
+       }
+
+       public void applyCentralForce (Vector3 force) {
+               gdxBulletJNI.btRigidBody_applyCentralForce(swigCPtr, this, force);
+       }
+
+       public Vector3 getTotalForce () {
+               return gdxBulletJNI.btRigidBody_getTotalForce(swigCPtr, this);
+       }
 
-  public void setSleepingThresholds(float linear, float angular) {
-    gdxBulletJNI.btRigidBody_setSleepingThresholds(swigCPtr, this, linear, angular);
-  }
+       public Vector3 getTotalTorque () {
+               return gdxBulletJNI.btRigidBody_getTotalTorque(swigCPtr, this);
+       }
+
+       public Vector3 getInvInertiaDiagLocal () {
+               return gdxBulletJNI.btRigidBody_getInvInertiaDiagLocal(swigCPtr, this);
+       }
+
+       public void setInvInertiaDiagLocal (Vector3 diagInvInertia) {
+               gdxBulletJNI.btRigidBody_setInvInertiaDiagLocal(swigCPtr, this, diagInvInertia);
+       }
+
+       public void setSleepingThresholds (float linear, float angular) {
+               gdxBulletJNI.btRigidBody_setSleepingThresholds(swigCPtr, this, linear, angular);
+       }
+
+       public void applyTorque (Vector3 torque) {
+               gdxBulletJNI.btRigidBody_applyTorque(swigCPtr, this, torque);
+       }
+
+       public void applyForce (Vector3 force, Vector3 rel_pos) {
+               gdxBulletJNI.btRigidBody_applyForce(swigCPtr, this, force, rel_pos);
+       }
+
+       public void applyCentralImpulse (Vector3 impulse) {
+               gdxBulletJNI.btRigidBody_applyCentralImpulse(swigCPtr, this, impulse);
+       }
+
+       public void applyTorqueImpulse (Vector3 torque) {
+               gdxBulletJNI.btRigidBody_applyTorqueImpulse(swigCPtr, this, torque);
+       }
+
+       public void applyImpulse (Vector3 impulse, Vector3 rel_pos) {
+               gdxBulletJNI.btRigidBody_applyImpulse(swigCPtr, this, impulse, rel_pos);
+       }
+
+       public void clearForces () {
+               gdxBulletJNI.btRigidBody_clearForces(swigCPtr, this);
+       }
+
+       public void updateInertiaTensor () {
+               gdxBulletJNI.btRigidBody_updateInertiaTensor(swigCPtr, this);
+       }
+
+       public Vector3 getCenterOfMassPosition () {
+               return gdxBulletJNI.btRigidBody_getCenterOfMassPosition(swigCPtr, this);
+       }
+
+       public Quaternion getOrientation () {
+               return gdxBulletJNI.btRigidBody_getOrientation(swigCPtr, this);
+       }
+
+       public btTransform getCenterOfMassTransform () {
+               return new btTransform(gdxBulletJNI.btRigidBody_getCenterOfMassTransform(swigCPtr, this), false);
+       }
+
+       public Vector3 getLinearVelocity () {
+               return gdxBulletJNI.btRigidBody_getLinearVelocity(swigCPtr, this);
+       }
+
+       public Vector3 getAngularVelocity () {
+               return gdxBulletJNI.btRigidBody_getAngularVelocity(swigCPtr, this);
+       }
 
-  public void applyTorque(Vector3 torque) {
-    gdxBulletJNI.btRigidBody_applyTorque(swigCPtr, this, torque);
-  }
+       public void setLinearVelocity (Vector3 lin_vel) {
+               gdxBulletJNI.btRigidBody_setLinearVelocity(swigCPtr, this, lin_vel);
+       }
 
-  public void applyForce(Vector3 force, Vector3 rel_pos) {
-    gdxBulletJNI.btRigidBody_applyForce(swigCPtr, this, force, rel_pos);
-  }
+       public void setAngularVelocity (Vector3 ang_vel) {
+               gdxBulletJNI.btRigidBody_setAngularVelocity(swigCPtr, this, ang_vel);
+       }
 
-  public void applyCentralImpulse(Vector3 impulse) {
-    gdxBulletJNI.btRigidBody_applyCentralImpulse(swigCPtr, this, impulse);
-  }
-
-  public void applyTorqueImpulse(Vector3 torque) {
-    gdxBulletJNI.btRigidBody_applyTorqueImpulse(swigCPtr, this, torque);
-  }
-
-  public void applyImpulse(Vector3 impulse, Vector3 rel_pos) {
-    gdxBulletJNI.btRigidBody_applyImpulse(swigCPtr, this, impulse, rel_pos);
-  }
-
-  public void clearForces() {
-    gdxBulletJNI.btRigidBody_clearForces(swigCPtr, this);
-  }
-
-  public void updateInertiaTensor() {
-    gdxBulletJNI.btRigidBody_updateInertiaTensor(swigCPtr, this);
-  }
-
-  public Vector3 getCenterOfMassPosition() {
-       return gdxBulletJNI.btRigidBody_getCenterOfMassPosition(swigCPtr, this);
-}
-
-  public Quaternion getOrientation() {
-       return gdxBulletJNI.btRigidBody_getOrientation(swigCPtr, this);
-}
-
-  public btTransform getCenterOfMassTransform() {
-    return new btTransform(gdxBulletJNI.btRigidBody_getCenterOfMassTransform(swigCPtr, this), false);
-  }
-
-  public Vector3 getLinearVelocity() {
-       return gdxBulletJNI.btRigidBody_getLinearVelocity(swigCPtr, this);
-}
-
-  public Vector3 getAngularVelocity() {
-       return gdxBulletJNI.btRigidBody_getAngularVelocity(swigCPtr, this);
-}
-
-  public void setLinearVelocity(Vector3 lin_vel) {
-    gdxBulletJNI.btRigidBody_setLinearVelocity(swigCPtr, this, lin_vel);
-  }
-
-  public void setAngularVelocity(Vector3 ang_vel) {
-    gdxBulletJNI.btRigidBody_setAngularVelocity(swigCPtr, this, ang_vel);
-  }
-
-  public Vector3 getVelocityInLocalPoint(Vector3 rel_pos) {
-       return gdxBulletJNI.btRigidBody_getVelocityInLocalPoint(swigCPtr, this, rel_pos);
-}
+       public Vector3 getVelocityInLocalPoint (Vector3 rel_pos) {
+               return gdxBulletJNI.btRigidBody_getVelocityInLocalPoint(swigCPtr, this, rel_pos);
+       }
 
-  public void translate(Vector3 v) {
-    gdxBulletJNI.btRigidBody_translate(swigCPtr, this, v);
-  }
-
-  public void getAabb(Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btRigidBody_getAabb(swigCPtr, this, aabbMin, aabbMax);
-  }
-
-  public float computeImpulseDenominator(Vector3 pos, Vector3 normal) {
-    return gdxBulletJNI.btRigidBody_computeImpulseDenominator(swigCPtr, this, pos, normal);
-  }
-
-  public float computeAngularImpulseDenominator(Vector3 axis) {
-    return gdxBulletJNI.btRigidBody_computeAngularImpulseDenominator(swigCPtr, this, axis);
-  }
-
-  public void updateDeactivation(float timeStep) {
-    gdxBulletJNI.btRigidBody_updateDeactivation(swigCPtr, this, timeStep);
-  }
-
-  public boolean wantsSleeping() {
-    return gdxBulletJNI.btRigidBody_wantsSleeping(swigCPtr, this);
-  }
-
-  public btBroadphaseProxy getBroadphaseProxy() {
-    long cPtr = gdxBulletJNI.btRigidBody_getBroadphaseProxy__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
-  }
-
-  public void setNewBroadphaseProxy(btBroadphaseProxy broadphaseProxy) {
-    gdxBulletJNI.btRigidBody_setNewBroadphaseProxy(swigCPtr, this, btBroadphaseProxy.getCPtr(broadphaseProxy), broadphaseProxy);
-  }
-
-  public btMotionState getMotionState() {
-    long cPtr = gdxBulletJNI.btRigidBody_getMotionState__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : btMotionState.newDerivedObject(cPtr, false);
-  }
-
-  public void setMotionState(btMotionState motionState) {
-    gdxBulletJNI.btRigidBody_setMotionState(swigCPtr, this, btMotionState.getCPtr(motionState), motionState);
-  }
-
-  public void setM_contactSolverType(int value) {
-    gdxBulletJNI.btRigidBody_m_contactSolverType_set(swigCPtr, this, value);
-  }
-
-  public int getM_contactSolverType() {
-    return gdxBulletJNI.btRigidBody_m_contactSolverType_get(swigCPtr, this);
-  }
-
-  public void setM_frictionSolverType(int value) {
-    gdxBulletJNI.btRigidBody_m_frictionSolverType_set(swigCPtr, this, value);
-  }
-
-  public int getM_frictionSolverType() {
-    return gdxBulletJNI.btRigidBody_m_frictionSolverType_get(swigCPtr, this);
-  }
-
-  public void setAngularFactor(Vector3 angFac) {
-    gdxBulletJNI.btRigidBody_setAngularFactor__SWIG_0(swigCPtr, this, angFac);
-  }
-
-  public void setAngularFactor(float angFac) {
-    gdxBulletJNI.btRigidBody_setAngularFactor__SWIG_1(swigCPtr, this, angFac);
-  }
-
-  public Vector3 getAngularFactor() {
-       return gdxBulletJNI.btRigidBody_getAngularFactor(swigCPtr, this);
-}
-
-  public boolean isInWorld() {
-    return gdxBulletJNI.btRigidBody_isInWorld(swigCPtr, this);
-  }
-
-  public boolean checkCollideWithOverride(btCollisionObject co) {
-    return gdxBulletJNI.btRigidBody_checkCollideWithOverride(swigCPtr, this, btCollisionObject.getCPtr(co), co);
-  }
-
-  public void addConstraintRef(btTypedConstraint c) {
-    gdxBulletJNI.btRigidBody_addConstraintRef(swigCPtr, this, btTypedConstraint.getCPtr(c), c);
-  }
-
-  public void removeConstraintRef(btTypedConstraint c) {
-    gdxBulletJNI.btRigidBody_removeConstraintRef(swigCPtr, this, btTypedConstraint.getCPtr(c), c);
-  }
-
-  public btTypedConstraint getConstraintRef(int index) {
-    long cPtr = gdxBulletJNI.btRigidBody_getConstraintRef(swigCPtr, this, index);
-    return (cPtr == 0) ? null : new btTypedConstraint(cPtr, false);
-  }
-
-  public int getNumConstraintRefs() {
-    return gdxBulletJNI.btRigidBody_getNumConstraintRefs(swigCPtr, this);
-  }
-
-  public void setFlags(int flags) {
-    gdxBulletJNI.btRigidBody_setFlags(swigCPtr, this, flags);
-  }
-
-  public int getFlags() {
-    return gdxBulletJNI.btRigidBody_getFlags(swigCPtr, this);
-  }
-
-  public Vector3 getDeltaLinearVelocity() {
-       return gdxBulletJNI.btRigidBody_getDeltaLinearVelocity(swigCPtr, this);
-}
-
-  public Vector3 getDeltaAngularVelocity() {
-       return gdxBulletJNI.btRigidBody_getDeltaAngularVelocity(swigCPtr, this);
-}
-
-  public Vector3 getPushVelocity() {
-       return gdxBulletJNI.btRigidBody_getPushVelocity(swigCPtr, this);
-}
-
-  public Vector3 getTurnVelocity() {
-       return gdxBulletJNI.btRigidBody_getTurnVelocity(swigCPtr, this);
-}
-
-  public Vector3 internalGetDeltaLinearVelocity() {
-       return gdxBulletJNI.btRigidBody_internalGetDeltaLinearVelocity(swigCPtr, this);
-}
-
-  public Vector3 internalGetDeltaAngularVelocity() {
-       return gdxBulletJNI.btRigidBody_internalGetDeltaAngularVelocity(swigCPtr, this);
-}
-
-  public Vector3 internalGetAngularFactor() {
-       return gdxBulletJNI.btRigidBody_internalGetAngularFactor(swigCPtr, this);
-}
-
-  public Vector3 internalGetInvMass() {
-       return gdxBulletJNI.btRigidBody_internalGetInvMass(swigCPtr, this);
-}
-
-  public Vector3 internalGetPushVelocity() {
-       return gdxBulletJNI.btRigidBody_internalGetPushVelocity(swigCPtr, this);
-}
-
-  public Vector3 internalGetTurnVelocity() {
-       return gdxBulletJNI.btRigidBody_internalGetTurnVelocity(swigCPtr, this);
-}
+       public void translate (Vector3 v) {
+               gdxBulletJNI.btRigidBody_translate(swigCPtr, this, v);
+       }
 
-  public void internalGetVelocityInLocalPointObsolete(Vector3 rel_pos, Vector3 velocity) {
-    gdxBulletJNI.btRigidBody_internalGetVelocityInLocalPointObsolete(swigCPtr, this, rel_pos, velocity);
-  }
+       public void getAabb (Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btRigidBody_getAabb(swigCPtr, this, aabbMin, aabbMax);
+       }
 
-  public void internalGetAngularVelocity(Vector3 angVel) {
-    gdxBulletJNI.btRigidBody_internalGetAngularVelocity(swigCPtr, this, angVel);
-  }
+       public float computeImpulseDenominator (Vector3 pos, Vector3 normal) {
+               return gdxBulletJNI.btRigidBody_computeImpulseDenominator(swigCPtr, this, pos, normal);
+       }
 
-  public void internalApplyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
-    gdxBulletJNI.btRigidBody_internalApplyImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
-  }
+       public float computeAngularImpulseDenominator (Vector3 axis) {
+               return gdxBulletJNI.btRigidBody_computeAngularImpulseDenominator(swigCPtr, this, axis);
+       }
 
-  public void internalApplyPushImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
-    gdxBulletJNI.btRigidBody_internalApplyPushImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
-  }
+       public void updateDeactivation (float timeStep) {
+               gdxBulletJNI.btRigidBody_updateDeactivation(swigCPtr, this, timeStep);
+       }
 
-  public void internalWritebackVelocity() {
-    gdxBulletJNI.btRigidBody_internalWritebackVelocity__SWIG_0(swigCPtr, this);
-  }
+       public boolean wantsSleeping () {
+               return gdxBulletJNI.btRigidBody_wantsSleeping(swigCPtr, this);
+       }
 
-  public void internalWritebackVelocity(float timeStep) {
-    gdxBulletJNI.btRigidBody_internalWritebackVelocity__SWIG_1(swigCPtr, this, timeStep);
-  }
+       public btBroadphaseProxy getBroadphaseProxy () {
+               long cPtr = gdxBulletJNI.btRigidBody_getBroadphaseProxy__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphaseProxy(cPtr, false);
+       }
+
+       public void setNewBroadphaseProxy (btBroadphaseProxy broadphaseProxy) {
+               gdxBulletJNI.btRigidBody_setNewBroadphaseProxy(swigCPtr, this, btBroadphaseProxy.getCPtr(broadphaseProxy), broadphaseProxy);
+       }
+
+       public btMotionState getMotionState () {
+               long cPtr = gdxBulletJNI.btRigidBody_getMotionState__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : btMotionState.newDerivedObject(cPtr, false);
+       }
+
+       public void setMotionState (btMotionState motionState) {
+               gdxBulletJNI.btRigidBody_setMotionState(swigCPtr, this, btMotionState.getCPtr(motionState), motionState);
+       }
+
+       public void setM_contactSolverType (int value) {
+               gdxBulletJNI.btRigidBody_m_contactSolverType_set(swigCPtr, this, value);
+       }
+
+       public int getM_contactSolverType () {
+               return gdxBulletJNI.btRigidBody_m_contactSolverType_get(swigCPtr, this);
+       }
+
+       public void setM_frictionSolverType (int value) {
+               gdxBulletJNI.btRigidBody_m_frictionSolverType_set(swigCPtr, this, value);
+       }
+
+       public int getM_frictionSolverType () {
+               return gdxBulletJNI.btRigidBody_m_frictionSolverType_get(swigCPtr, this);
+       }
+
+       public void setAngularFactor (Vector3 angFac) {
+               gdxBulletJNI.btRigidBody_setAngularFactor__SWIG_0(swigCPtr, this, angFac);
+       }
+
+       public void setAngularFactor (float angFac) {
+               gdxBulletJNI.btRigidBody_setAngularFactor__SWIG_1(swigCPtr, this, angFac);
+       }
+
+       public Vector3 getAngularFactor () {
+               return gdxBulletJNI.btRigidBody_getAngularFactor(swigCPtr, this);
+       }
+
+       public boolean isInWorld () {
+               return gdxBulletJNI.btRigidBody_isInWorld(swigCPtr, this);
+       }
+
+       public boolean checkCollideWithOverride (btCollisionObject co) {
+               return gdxBulletJNI.btRigidBody_checkCollideWithOverride(swigCPtr, this, btCollisionObject.getCPtr(co), co);
+       }
+
+       public void addConstraintRef (btTypedConstraint c) {
+               gdxBulletJNI.btRigidBody_addConstraintRef(swigCPtr, this, btTypedConstraint.getCPtr(c), c);
+       }
+
+       public void removeConstraintRef (btTypedConstraint c) {
+               gdxBulletJNI.btRigidBody_removeConstraintRef(swigCPtr, this, btTypedConstraint.getCPtr(c), c);
+       }
+
+       public btTypedConstraint getConstraintRef (int index) {
+               long cPtr = gdxBulletJNI.btRigidBody_getConstraintRef(swigCPtr, this, index);
+               return (cPtr == 0) ? null : new btTypedConstraint(cPtr, false);
+       }
+
+       public int getNumConstraintRefs () {
+               return gdxBulletJNI.btRigidBody_getNumConstraintRefs(swigCPtr, this);
+       }
+
+       public void setFlags (int flags) {
+               gdxBulletJNI.btRigidBody_setFlags(swigCPtr, this, flags);
+       }
+
+       public int getFlags () {
+               return gdxBulletJNI.btRigidBody_getFlags(swigCPtr, this);
+       }
+
+       public Vector3 getDeltaLinearVelocity () {
+               return gdxBulletJNI.btRigidBody_getDeltaLinearVelocity(swigCPtr, this);
+       }
+
+       public Vector3 getDeltaAngularVelocity () {
+               return gdxBulletJNI.btRigidBody_getDeltaAngularVelocity(swigCPtr, this);
+       }
+
+       public Vector3 getPushVelocity () {
+               return gdxBulletJNI.btRigidBody_getPushVelocity(swigCPtr, this);
+       }
+
+       public Vector3 getTurnVelocity () {
+               return gdxBulletJNI.btRigidBody_getTurnVelocity(swigCPtr, this);
+       }
+
+       public Vector3 internalGetDeltaLinearVelocity () {
+               return gdxBulletJNI.btRigidBody_internalGetDeltaLinearVelocity(swigCPtr, this);
+       }
+
+       public Vector3 internalGetDeltaAngularVelocity () {
+               return gdxBulletJNI.btRigidBody_internalGetDeltaAngularVelocity(swigCPtr, this);
+       }
+
+       public Vector3 internalGetAngularFactor () {
+               return gdxBulletJNI.btRigidBody_internalGetAngularFactor(swigCPtr, this);
+       }
+
+       public Vector3 internalGetInvMass () {
+               return gdxBulletJNI.btRigidBody_internalGetInvMass(swigCPtr, this);
+       }
+
+       public Vector3 internalGetPushVelocity () {
+               return gdxBulletJNI.btRigidBody_internalGetPushVelocity(swigCPtr, this);
+       }
+
+       public Vector3 internalGetTurnVelocity () {
+               return gdxBulletJNI.btRigidBody_internalGetTurnVelocity(swigCPtr, this);
+       }
+
+       public void internalGetVelocityInLocalPointObsolete (Vector3 rel_pos, Vector3 velocity) {
+               gdxBulletJNI.btRigidBody_internalGetVelocityInLocalPointObsolete(swigCPtr, this, rel_pos, velocity);
+       }
+
+       public void internalGetAngularVelocity (Vector3 angVel) {
+               gdxBulletJNI.btRigidBody_internalGetAngularVelocity(swigCPtr, this, angVel);
+       }
+
+       public void internalApplyImpulse (Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
+               gdxBulletJNI.btRigidBody_internalApplyImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
+       }
+
+       public void internalApplyPushImpulse (Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
+               gdxBulletJNI.btRigidBody_internalApplyPushImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
+       }
+
+       public void internalWritebackVelocity () {
+               gdxBulletJNI.btRigidBody_internalWritebackVelocity__SWIG_0(swigCPtr, this);
+       }
+
+       public void internalWritebackVelocity (float timeStep) {
+               gdxBulletJNI.btRigidBody_internalWritebackVelocity__SWIG_1(swigCPtr, this, timeStep);
+       }
 
 }
index f19ee99..975a5df 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btRigidBodyConstructionInfo {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btRigidBodyConstructionInfo(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btRigidBodyConstructionInfo obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btRigidBodyConstructionInfo(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_mass(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_mass_set(swigCPtr, this, value);
-  }
-
-  public float getM_mass() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_mass_get(swigCPtr, this);
-  }
-
-  public void setM_motionState(btMotionState value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_motionState_set(swigCPtr, this, btMotionState.getCPtr(value), value);
-  }
-
-  public btMotionState getM_motionState() {
-    long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_motionState_get(swigCPtr, this);
-    return (cPtr == 0) ? null : btMotionState.newDerivedObject(cPtr, false);
-  }
-
-  public void setM_startWorldTransform(btTransform value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_startWorldTransform_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_startWorldTransform() {
-    long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_startWorldTransform_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_collisionShape(btCollisionShape value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_collisionShape_set(swigCPtr, this, btCollisionShape.getCPtr(value), value);
-  }
-
-  public btCollisionShape getM_collisionShape() {
-    long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_collisionShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
-  }
-
-  public void setM_localInertia(btVector3 value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_localInertia_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_localInertia() {
-    long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_localInertia_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_linearDamping(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_linearDamping_set(swigCPtr, this, value);
-  }
-
-  public float getM_linearDamping() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_linearDamping_get(swigCPtr, this);
-  }
-
-  public void setM_angularDamping(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_angularDamping_set(swigCPtr, this, value);
-  }
-
-  public float getM_angularDamping() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_angularDamping_get(swigCPtr, this);
-  }
-
-  public void setM_friction(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_friction_set(swigCPtr, this, value);
-  }
-
-  public float getM_friction() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_friction_get(swigCPtr, this);
-  }
-
-  public void setM_restitution(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_restitution_set(swigCPtr, this, value);
-  }
-
-  public float getM_restitution() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_restitution_get(swigCPtr, this);
-  }
-
-  public void setM_linearSleepingThreshold(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_linearSleepingThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_linearSleepingThreshold() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_linearSleepingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_angularSleepingThreshold(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_angularSleepingThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_angularSleepingThreshold() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_angularSleepingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_additionalDamping(boolean value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDamping_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_additionalDamping() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDamping_get(swigCPtr, this);
-  }
-
-  public void setM_additionalDampingFactor(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDampingFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalDampingFactor() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDampingFactor_get(swigCPtr, this);
-  }
-
-  public void setM_additionalLinearDampingThresholdSqr(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalLinearDampingThresholdSqr() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
-  }
-
-  public void setM_additionalAngularDampingThresholdSqr(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalAngularDampingThresholdSqr() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
-  }
-
-  public void setM_additionalAngularDampingFactor(float value) {
-    gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalAngularDampingFactor() {
-    return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_get(swigCPtr, this);
-  }
-
-  public btRigidBodyConstructionInfo(float mass, btMotionState motionState, btCollisionShape collisionShape, Vector3 localInertia) {
-    this(gdxBulletJNI.new_btRigidBodyConstructionInfo__SWIG_0(mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape, localInertia), true);
-  }
-
-  public btRigidBodyConstructionInfo(float mass, btMotionState motionState, btCollisionShape collisionShape) {
-    this(gdxBulletJNI.new_btRigidBodyConstructionInfo__SWIG_1(mass, btMotionState.getCPtr(motionState), motionState, btCollisionShape.getCPtr(collisionShape), collisionShape), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btRigidBodyConstructionInfo (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btRigidBodyConstructionInfo obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btRigidBodyConstructionInfo(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_mass (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_mass_set(swigCPtr, this, value);
+       }
+
+       public float getM_mass () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_mass_get(swigCPtr, this);
+       }
+
+       public void setM_motionState (btMotionState value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_motionState_set(swigCPtr, this, btMotionState.getCPtr(value), value);
+       }
+
+       public btMotionState getM_motionState () {
+               long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_motionState_get(swigCPtr, this);
+               return (cPtr == 0) ? null : btMotionState.newDerivedObject(cPtr, false);
+       }
+
+       public void setM_startWorldTransform (btTransform value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_startWorldTransform_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_startWorldTransform () {
+               long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_startWorldTransform_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_collisionShape (btCollisionShape value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_collisionShape_set(swigCPtr, this, btCollisionShape.getCPtr(value), value);
+       }
+
+       public btCollisionShape getM_collisionShape () {
+               long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_collisionShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : btCollisionShape.newDerivedObject(cPtr, false);
+       }
+
+       public void setM_localInertia (btVector3 value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_localInertia_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_localInertia () {
+               long cPtr = gdxBulletJNI.btRigidBodyConstructionInfo_m_localInertia_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_linearDamping (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_linearDamping_set(swigCPtr, this, value);
+       }
+
+       public float getM_linearDamping () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_linearDamping_get(swigCPtr, this);
+       }
+
+       public void setM_angularDamping (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_angularDamping_set(swigCPtr, this, value);
+       }
+
+       public float getM_angularDamping () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_angularDamping_get(swigCPtr, this);
+       }
+
+       public void setM_friction (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_friction_set(swigCPtr, this, value);
+       }
+
+       public float getM_friction () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_friction_get(swigCPtr, this);
+       }
+
+       public void setM_restitution (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_restitution_set(swigCPtr, this, value);
+       }
+
+       public float getM_restitution () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_restitution_get(swigCPtr, this);
+       }
+
+       public void setM_linearSleepingThreshold (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_linearSleepingThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_linearSleepingThreshold () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_linearSleepingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_angularSleepingThreshold (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_angularSleepingThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_angularSleepingThreshold () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_angularSleepingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_additionalDamping (boolean value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDamping_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_additionalDamping () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDamping_get(swigCPtr, this);
+       }
+
+       public void setM_additionalDampingFactor (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDampingFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalDampingFactor () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalDampingFactor_get(swigCPtr, this);
+       }
+
+       public void setM_additionalLinearDampingThresholdSqr (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalLinearDampingThresholdSqr () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
+       }
+
+       public void setM_additionalAngularDampingThresholdSqr (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalAngularDampingThresholdSqr () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
+       }
+
+       public void setM_additionalAngularDampingFactor (float value) {
+               gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalAngularDampingFactor () {
+               return gdxBulletJNI.btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_get(swigCPtr, this);
+       }
+
+       public btRigidBodyConstructionInfo (float mass, btMotionState motionState, btCollisionShape collisionShape,
+               Vector3 localInertia) {
+               this(gdxBulletJNI.new_btRigidBodyConstructionInfo__SWIG_0(mass, btMotionState.getCPtr(motionState), motionState,
+                       btCollisionShape.getCPtr(collisionShape), collisionShape, localInertia), true);
+       }
+
+       public btRigidBodyConstructionInfo (float mass, btMotionState motionState, btCollisionShape collisionShape) {
+               this(gdxBulletJNI.new_btRigidBodyConstructionInfo__SWIG_1(mass, btMotionState.getCPtr(motionState), motionState,
+                       btCollisionShape.getCPtr(collisionShape), collisionShape), true);
+       }
 
 }
index def6940..4397efd 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btRigidBodyDoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btRigidBodyDoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btRigidBodyDoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btRigidBodyDoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_collisionObjectData(btCollisionObjectDoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_collisionObjectData_set(swigCPtr, this, btCollisionObjectDoubleData.getCPtr(value), value);
-  }
-
-  public btCollisionObjectDoubleData getM_collisionObjectData() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_collisionObjectData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionObjectDoubleData(cPtr, false);
-  }
-
-  public void setM_invInertiaTensorWorld(SWIGTYPE_p_btMatrix3x3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaTensorWorld_set(swigCPtr, this, SWIGTYPE_p_btMatrix3x3DoubleData.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btMatrix3x3DoubleData getM_invInertiaTensorWorld() {
-    return new SWIGTYPE_p_btMatrix3x3DoubleData(gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaTensorWorld_get(swigCPtr, this), true);
-  }
-
-  public void setM_linearVelocity(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_linearVelocity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_linearVelocity() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_linearVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_angularVelocity(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_angularVelocity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_angularVelocity() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_angularVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_angularFactor(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_angularFactor_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_angularFactor() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_angularFactor_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_linearFactor(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_linearFactor_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_linearFactor() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_linearFactor_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_gravity(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_gravity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_gravity() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_gravity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_gravity_acceleration(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_gravity_acceleration_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_gravity_acceleration() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_gravity_acceleration_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_invInertiaLocal(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaLocal_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_invInertiaLocal() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaLocal_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_totalForce(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_totalForce_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_totalForce() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_totalForce_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_totalTorque(btVector3DoubleData value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_totalTorque_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_totalTorque() {
-    long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_totalTorque_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public void setM_inverseMass(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_inverseMass_set(swigCPtr, this, value);
-  }
-
-  public double getM_inverseMass() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_inverseMass_get(swigCPtr, this);
-  }
-
-  public void setM_linearDamping(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_linearDamping_set(swigCPtr, this, value);
-  }
-
-  public double getM_linearDamping() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_linearDamping_get(swigCPtr, this);
-  }
-
-  public void setM_angularDamping(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_angularDamping_set(swigCPtr, this, value);
-  }
-
-  public double getM_angularDamping() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_angularDamping_get(swigCPtr, this);
-  }
-
-  public void setM_additionalDampingFactor(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_additionalDampingFactor_set(swigCPtr, this, value);
-  }
-
-  public double getM_additionalDampingFactor() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_additionalDampingFactor_get(swigCPtr, this);
-  }
-
-  public void setM_additionalLinearDampingThresholdSqr(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
-  }
-
-  public double getM_additionalLinearDampingThresholdSqr() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
-  }
-
-  public void setM_additionalAngularDampingThresholdSqr(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
-  }
-
-  public double getM_additionalAngularDampingThresholdSqr() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
-  }
-
-  public void setM_additionalAngularDampingFactor(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingFactor_set(swigCPtr, this, value);
-  }
-
-  public double getM_additionalAngularDampingFactor() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingFactor_get(swigCPtr, this);
-  }
-
-  public void setM_linearSleepingThreshold(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_linearSleepingThreshold_set(swigCPtr, this, value);
-  }
-
-  public double getM_linearSleepingThreshold() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_linearSleepingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_angularSleepingThreshold(double value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_angularSleepingThreshold_set(swigCPtr, this, value);
-  }
-
-  public double getM_angularSleepingThreshold() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_angularSleepingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_additionalDamping(int value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_additionalDamping_set(swigCPtr, this, value);
-  }
-
-  public int getM_additionalDamping() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_additionalDamping_get(swigCPtr, this);
-  }
-
-  public void setM_padding(String value) {
-    gdxBulletJNI.btRigidBodyDoubleData_m_padding_set(swigCPtr, this, value);
-  }
-
-  public String getM_padding() {
-    return gdxBulletJNI.btRigidBodyDoubleData_m_padding_get(swigCPtr, this);
-  }
-
-  public btRigidBodyDoubleData() {
-    this(gdxBulletJNI.new_btRigidBodyDoubleData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btRigidBodyDoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btRigidBodyDoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btRigidBodyDoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_collisionObjectData (btCollisionObjectDoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_collisionObjectData_set(swigCPtr, this, btCollisionObjectDoubleData.getCPtr(value),
+                       value);
+       }
+
+       public btCollisionObjectDoubleData getM_collisionObjectData () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_collisionObjectData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionObjectDoubleData(cPtr, false);
+       }
+
+       public void setM_invInertiaTensorWorld (SWIGTYPE_p_btMatrix3x3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaTensorWorld_set(swigCPtr, this,
+                       SWIGTYPE_p_btMatrix3x3DoubleData.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btMatrix3x3DoubleData getM_invInertiaTensorWorld () {
+               return new SWIGTYPE_p_btMatrix3x3DoubleData(gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaTensorWorld_get(swigCPtr, this),
+                       true);
+       }
+
+       public void setM_linearVelocity (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_linearVelocity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_linearVelocity () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_linearVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_angularVelocity (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_angularVelocity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_angularVelocity () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_angularVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_angularFactor (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_angularFactor_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_angularFactor () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_angularFactor_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_linearFactor (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_linearFactor_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_linearFactor () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_linearFactor_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_gravity (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_gravity_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_gravity () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_gravity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_gravity_acceleration (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_gravity_acceleration_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_gravity_acceleration () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_gravity_acceleration_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_invInertiaLocal (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaLocal_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_invInertiaLocal () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_invInertiaLocal_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_totalForce (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_totalForce_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_totalForce () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_totalForce_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_totalTorque (btVector3DoubleData value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_totalTorque_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_totalTorque () {
+               long cPtr = gdxBulletJNI.btRigidBodyDoubleData_m_totalTorque_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public void setM_inverseMass (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_inverseMass_set(swigCPtr, this, value);
+       }
+
+       public double getM_inverseMass () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_inverseMass_get(swigCPtr, this);
+       }
+
+       public void setM_linearDamping (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_linearDamping_set(swigCPtr, this, value);
+       }
+
+       public double getM_linearDamping () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_linearDamping_get(swigCPtr, this);
+       }
+
+       public void setM_angularDamping (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_angularDamping_set(swigCPtr, this, value);
+       }
+
+       public double getM_angularDamping () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_angularDamping_get(swigCPtr, this);
+       }
+
+       public void setM_additionalDampingFactor (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_additionalDampingFactor_set(swigCPtr, this, value);
+       }
+
+       public double getM_additionalDampingFactor () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_additionalDampingFactor_get(swigCPtr, this);
+       }
+
+       public void setM_additionalLinearDampingThresholdSqr (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
+       }
+
+       public double getM_additionalLinearDampingThresholdSqr () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
+       }
+
+       public void setM_additionalAngularDampingThresholdSqr (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
+       }
+
+       public double getM_additionalAngularDampingThresholdSqr () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
+       }
+
+       public void setM_additionalAngularDampingFactor (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingFactor_set(swigCPtr, this, value);
+       }
+
+       public double getM_additionalAngularDampingFactor () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_additionalAngularDampingFactor_get(swigCPtr, this);
+       }
+
+       public void setM_linearSleepingThreshold (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_linearSleepingThreshold_set(swigCPtr, this, value);
+       }
+
+       public double getM_linearSleepingThreshold () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_linearSleepingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_angularSleepingThreshold (double value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_angularSleepingThreshold_set(swigCPtr, this, value);
+       }
+
+       public double getM_angularSleepingThreshold () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_angularSleepingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_additionalDamping (int value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_additionalDamping_set(swigCPtr, this, value);
+       }
+
+       public int getM_additionalDamping () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_additionalDamping_get(swigCPtr, this);
+       }
+
+       public void setM_padding (String value) {
+               gdxBulletJNI.btRigidBodyDoubleData_m_padding_set(swigCPtr, this, value);
+       }
+
+       public String getM_padding () {
+               return gdxBulletJNI.btRigidBodyDoubleData_m_padding_get(swigCPtr, this);
+       }
+
+       public btRigidBodyDoubleData () {
+               this(gdxBulletJNI.new_btRigidBodyDoubleData(), true);
+       }
 
 }
index e4759a0..4c90c53 100644 (file)
@@ -9,6 +9,5 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btRigidBodyFlags {
-  public final static int BT_DISABLE_WORLD_GRAVITY = 1;
+       public final static int BT_DISABLE_WORLD_GRAVITY = 1;
 }
-
index e49c0e4..22059ab 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btRigidBodyFloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btRigidBodyFloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btRigidBodyFloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btRigidBodyFloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_collisionObjectData(btCollisionObjectFloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_collisionObjectData_set(swigCPtr, this, btCollisionObjectFloatData.getCPtr(value), value);
-  }
-
-  public btCollisionObjectFloatData getM_collisionObjectData() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_collisionObjectData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionObjectFloatData(cPtr, false);
-  }
-
-  public void setM_invInertiaTensorWorld(SWIGTYPE_p_btMatrix3x3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_invInertiaTensorWorld_set(swigCPtr, this, SWIGTYPE_p_btMatrix3x3FloatData.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btMatrix3x3FloatData getM_invInertiaTensorWorld() {
-    return new SWIGTYPE_p_btMatrix3x3FloatData(gdxBulletJNI.btRigidBodyFloatData_m_invInertiaTensorWorld_get(swigCPtr, this), true);
-  }
-
-  public void setM_linearVelocity(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_linearVelocity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_linearVelocity() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_linearVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_angularVelocity(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_angularVelocity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_angularVelocity() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_angularVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_angularFactor(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_angularFactor_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_angularFactor() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_angularFactor_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_linearFactor(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_linearFactor_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_linearFactor() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_linearFactor_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_gravity(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_gravity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_gravity() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_gravity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_gravity_acceleration(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_gravity_acceleration_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_gravity_acceleration() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_gravity_acceleration_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_invInertiaLocal(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_invInertiaLocal_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_invInertiaLocal() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_invInertiaLocal_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_totalForce(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_totalForce_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_totalForce() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_totalForce_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_totalTorque(btVector3FloatData value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_totalTorque_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_totalTorque() {
-    long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_totalTorque_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_inverseMass(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_inverseMass_set(swigCPtr, this, value);
-  }
-
-  public float getM_inverseMass() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_inverseMass_get(swigCPtr, this);
-  }
-
-  public void setM_linearDamping(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_linearDamping_set(swigCPtr, this, value);
-  }
-
-  public float getM_linearDamping() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_linearDamping_get(swigCPtr, this);
-  }
-
-  public void setM_angularDamping(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_angularDamping_set(swigCPtr, this, value);
-  }
-
-  public float getM_angularDamping() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_angularDamping_get(swigCPtr, this);
-  }
-
-  public void setM_additionalDampingFactor(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_additionalDampingFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalDampingFactor() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_additionalDampingFactor_get(swigCPtr, this);
-  }
-
-  public void setM_additionalLinearDampingThresholdSqr(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalLinearDampingThresholdSqr() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
-  }
-
-  public void setM_additionalAngularDampingThresholdSqr(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalAngularDampingThresholdSqr() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
-  }
-
-  public void setM_additionalAngularDampingFactor(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingFactor_set(swigCPtr, this, value);
-  }
-
-  public float getM_additionalAngularDampingFactor() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingFactor_get(swigCPtr, this);
-  }
-
-  public void setM_linearSleepingThreshold(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_linearSleepingThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_linearSleepingThreshold() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_linearSleepingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_angularSleepingThreshold(float value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_angularSleepingThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_angularSleepingThreshold() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_angularSleepingThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_additionalDamping(int value) {
-    gdxBulletJNI.btRigidBodyFloatData_m_additionalDamping_set(swigCPtr, this, value);
-  }
-
-  public int getM_additionalDamping() {
-    return gdxBulletJNI.btRigidBodyFloatData_m_additionalDamping_get(swigCPtr, this);
-  }
-
-  public btRigidBodyFloatData() {
-    this(gdxBulletJNI.new_btRigidBodyFloatData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btRigidBodyFloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btRigidBodyFloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btRigidBodyFloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_collisionObjectData (btCollisionObjectFloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_collisionObjectData_set(swigCPtr, this, btCollisionObjectFloatData.getCPtr(value),
+                       value);
+       }
+
+       public btCollisionObjectFloatData getM_collisionObjectData () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_collisionObjectData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionObjectFloatData(cPtr, false);
+       }
+
+       public void setM_invInertiaTensorWorld (SWIGTYPE_p_btMatrix3x3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_invInertiaTensorWorld_set(swigCPtr, this,
+                       SWIGTYPE_p_btMatrix3x3FloatData.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btMatrix3x3FloatData getM_invInertiaTensorWorld () {
+               return new SWIGTYPE_p_btMatrix3x3FloatData(gdxBulletJNI.btRigidBodyFloatData_m_invInertiaTensorWorld_get(swigCPtr, this),
+                       true);
+       }
+
+       public void setM_linearVelocity (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_linearVelocity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_linearVelocity () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_linearVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_angularVelocity (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_angularVelocity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_angularVelocity () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_angularVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_angularFactor (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_angularFactor_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_angularFactor () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_angularFactor_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_linearFactor (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_linearFactor_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_linearFactor () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_linearFactor_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_gravity (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_gravity_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_gravity () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_gravity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_gravity_acceleration (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_gravity_acceleration_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_gravity_acceleration () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_gravity_acceleration_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_invInertiaLocal (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_invInertiaLocal_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_invInertiaLocal () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_invInertiaLocal_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_totalForce (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_totalForce_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_totalForce () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_totalForce_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_totalTorque (btVector3FloatData value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_totalTorque_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_totalTorque () {
+               long cPtr = gdxBulletJNI.btRigidBodyFloatData_m_totalTorque_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_inverseMass (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_inverseMass_set(swigCPtr, this, value);
+       }
+
+       public float getM_inverseMass () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_inverseMass_get(swigCPtr, this);
+       }
+
+       public void setM_linearDamping (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_linearDamping_set(swigCPtr, this, value);
+       }
+
+       public float getM_linearDamping () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_linearDamping_get(swigCPtr, this);
+       }
+
+       public void setM_angularDamping (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_angularDamping_set(swigCPtr, this, value);
+       }
+
+       public float getM_angularDamping () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_angularDamping_get(swigCPtr, this);
+       }
+
+       public void setM_additionalDampingFactor (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_additionalDampingFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalDampingFactor () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_additionalDampingFactor_get(swigCPtr, this);
+       }
+
+       public void setM_additionalLinearDampingThresholdSqr (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalLinearDampingThresholdSqr () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_get(swigCPtr, this);
+       }
+
+       public void setM_additionalAngularDampingThresholdSqr (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalAngularDampingThresholdSqr () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_get(swigCPtr, this);
+       }
+
+       public void setM_additionalAngularDampingFactor (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingFactor_set(swigCPtr, this, value);
+       }
+
+       public float getM_additionalAngularDampingFactor () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_additionalAngularDampingFactor_get(swigCPtr, this);
+       }
+
+       public void setM_linearSleepingThreshold (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_linearSleepingThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_linearSleepingThreshold () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_linearSleepingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_angularSleepingThreshold (float value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_angularSleepingThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_angularSleepingThreshold () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_angularSleepingThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_additionalDamping (int value) {
+               gdxBulletJNI.btRigidBodyFloatData_m_additionalDamping_set(swigCPtr, this, value);
+       }
+
+       public int getM_additionalDamping () {
+               return gdxBulletJNI.btRigidBodyFloatData_m_additionalDamping_get(swigCPtr, this);
+       }
+
+       public btRigidBodyFloatData () {
+               this(gdxBulletJNI.new_btRigidBodyFloatData(), true);
+       }
 
 }
index 0f5e2e5..6dab1e7 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btRotationalLimitMotor {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btRotationalLimitMotor(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btRotationalLimitMotor obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btRotationalLimitMotor(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_loLimit(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_loLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_loLimit() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_loLimit_get(swigCPtr, this);
-  }
-
-  public void setM_hiLimit(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_hiLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_hiLimit() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_hiLimit_get(swigCPtr, this);
-  }
-
-  public void setM_targetVelocity(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_targetVelocity_set(swigCPtr, this, value);
-  }
-
-  public float getM_targetVelocity() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_targetVelocity_get(swigCPtr, this);
-  }
-
-  public void setM_maxMotorForce(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_maxMotorForce_set(swigCPtr, this, value);
-  }
-
-  public float getM_maxMotorForce() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_maxMotorForce_get(swigCPtr, this);
-  }
-
-  public void setM_maxLimitForce(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_maxLimitForce_set(swigCPtr, this, value);
-  }
-
-  public float getM_maxLimitForce() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_maxLimitForce_get(swigCPtr, this);
-  }
-
-  public void setM_damping(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_damping_set(swigCPtr, this, value);
-  }
-
-  public float getM_damping() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_damping_get(swigCPtr, this);
-  }
-
-  public void setM_limitSoftness(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_limitSoftness_set(swigCPtr, this, value);
-  }
-
-  public float getM_limitSoftness() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_limitSoftness_get(swigCPtr, this);
-  }
-
-  public void setM_normalCFM(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_normalCFM_set(swigCPtr, this, value);
-  }
-
-  public float getM_normalCFM() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_normalCFM_get(swigCPtr, this);
-  }
-
-  public void setM_stopERP(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_stopERP_set(swigCPtr, this, value);
-  }
-
-  public float getM_stopERP() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_stopERP_get(swigCPtr, this);
-  }
-
-  public void setM_stopCFM(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_stopCFM_set(swigCPtr, this, value);
-  }
-
-  public float getM_stopCFM() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_stopCFM_get(swigCPtr, this);
-  }
-
-  public void setM_bounce(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_bounce_set(swigCPtr, this, value);
-  }
-
-  public float getM_bounce() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_bounce_get(swigCPtr, this);
-  }
-
-  public void setM_enableMotor(boolean value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_enableMotor_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_enableMotor() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_enableMotor_get(swigCPtr, this);
-  }
-
-  public void setM_currentLimitError(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_currentLimitError_set(swigCPtr, this, value);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btRotationalLimitMotor (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btRotationalLimitMotor obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btRotationalLimitMotor(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_loLimit (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_loLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_loLimit () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_loLimit_get(swigCPtr, this);
+       }
+
+       public void setM_hiLimit (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_hiLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_hiLimit () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_hiLimit_get(swigCPtr, this);
+       }
+
+       public void setM_targetVelocity (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_targetVelocity_set(swigCPtr, this, value);
+       }
+
+       public float getM_targetVelocity () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_targetVelocity_get(swigCPtr, this);
+       }
+
+       public void setM_maxMotorForce (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_maxMotorForce_set(swigCPtr, this, value);
+       }
+
+       public float getM_maxMotorForce () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_maxMotorForce_get(swigCPtr, this);
+       }
+
+       public void setM_maxLimitForce (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_maxLimitForce_set(swigCPtr, this, value);
+       }
+
+       public float getM_maxLimitForce () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_maxLimitForce_get(swigCPtr, this);
+       }
+
+       public void setM_damping (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_damping_set(swigCPtr, this, value);
+       }
+
+       public float getM_damping () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_damping_get(swigCPtr, this);
+       }
+
+       public void setM_limitSoftness (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_limitSoftness_set(swigCPtr, this, value);
+       }
+
+       public float getM_limitSoftness () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_limitSoftness_get(swigCPtr, this);
+       }
+
+       public void setM_normalCFM (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_normalCFM_set(swigCPtr, this, value);
+       }
+
+       public float getM_normalCFM () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_normalCFM_get(swigCPtr, this);
+       }
+
+       public void setM_stopERP (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_stopERP_set(swigCPtr, this, value);
+       }
+
+       public float getM_stopERP () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_stopERP_get(swigCPtr, this);
+       }
+
+       public void setM_stopCFM (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_stopCFM_set(swigCPtr, this, value);
+       }
+
+       public float getM_stopCFM () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_stopCFM_get(swigCPtr, this);
+       }
+
+       public void setM_bounce (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_bounce_set(swigCPtr, this, value);
+       }
+
+       public float getM_bounce () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_bounce_get(swigCPtr, this);
+       }
+
+       public void setM_enableMotor (boolean value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_enableMotor_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_enableMotor () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_enableMotor_get(swigCPtr, this);
+       }
+
+       public void setM_currentLimitError (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_currentLimitError_set(swigCPtr, this, value);
+       }
 
-  public float getM_currentLimitError() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_currentLimitError_get(swigCPtr, this);
-  }
+       public float getM_currentLimitError () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_currentLimitError_get(swigCPtr, this);
+       }
 
-  public void setM_currentPosition(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_currentPosition_set(swigCPtr, this, value);
-  }
+       public void setM_currentPosition (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_currentPosition_set(swigCPtr, this, value);
+       }
 
-  public float getM_currentPosition() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_currentPosition_get(swigCPtr, this);
-  }
+       public float getM_currentPosition () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_currentPosition_get(swigCPtr, this);
+       }
 
-  public void setM_currentLimit(int value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_currentLimit_set(swigCPtr, this, value);
-  }
+       public void setM_currentLimit (int value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_currentLimit_set(swigCPtr, this, value);
+       }
 
-  public int getM_currentLimit() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_currentLimit_get(swigCPtr, this);
-  }
+       public int getM_currentLimit () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_currentLimit_get(swigCPtr, this);
+       }
 
-  public void setM_accumulatedImpulse(float value) {
-    gdxBulletJNI.btRotationalLimitMotor_m_accumulatedImpulse_set(swigCPtr, this, value);
-  }
+       public void setM_accumulatedImpulse (float value) {
+               gdxBulletJNI.btRotationalLimitMotor_m_accumulatedImpulse_set(swigCPtr, this, value);
+       }
 
-  public float getM_accumulatedImpulse() {
-    return gdxBulletJNI.btRotationalLimitMotor_m_accumulatedImpulse_get(swigCPtr, this);
-  }
+       public float getM_accumulatedImpulse () {
+               return gdxBulletJNI.btRotationalLimitMotor_m_accumulatedImpulse_get(swigCPtr, this);
+       }
 
-  public btRotationalLimitMotor() {
-    this(gdxBulletJNI.new_btRotationalLimitMotor__SWIG_0(), true);
-  }
+       public btRotationalLimitMotor () {
+               this(gdxBulletJNI.new_btRotationalLimitMotor__SWIG_0(), true);
+       }
 
-  public btRotationalLimitMotor(btRotationalLimitMotor limot) {
-    this(gdxBulletJNI.new_btRotationalLimitMotor__SWIG_1(btRotationalLimitMotor.getCPtr(limot), limot), true);
-  }
+       public btRotationalLimitMotor (btRotationalLimitMotor limot) {
+               this(gdxBulletJNI.new_btRotationalLimitMotor__SWIG_1(btRotationalLimitMotor.getCPtr(limot), limot), true);
+       }
 
-  public boolean isLimited() {
-    return gdxBulletJNI.btRotationalLimitMotor_isLimited(swigCPtr, this);
-  }
+       public boolean isLimited () {
+               return gdxBulletJNI.btRotationalLimitMotor_isLimited(swigCPtr, this);
+       }
 
-  public boolean needApplyTorques() {
-    return gdxBulletJNI.btRotationalLimitMotor_needApplyTorques(swigCPtr, this);
-  }
+       public boolean needApplyTorques () {
+               return gdxBulletJNI.btRotationalLimitMotor_needApplyTorques(swigCPtr, this);
+       }
 
-  public int testLimitValue(float test_value) {
-    return gdxBulletJNI.btRotationalLimitMotor_testLimitValue(swigCPtr, this, test_value);
-  }
+       public int testLimitValue (float test_value) {
+               return gdxBulletJNI.btRotationalLimitMotor_testLimitValue(swigCPtr, this, test_value);
+       }
 
-  public float solveAngularLimits(float timeStep, Vector3 axis, float jacDiagABInv, btRigidBody body0, btRigidBody body1) {
-    return gdxBulletJNI.btRotationalLimitMotor_solveAngularLimits(swigCPtr, this, timeStep, axis, jacDiagABInv, btRigidBody.getCPtr(body0), body0, btRigidBody.getCPtr(body1), body1);
-  }
+       public float solveAngularLimits (float timeStep, Vector3 axis, float jacDiagABInv, btRigidBody body0, btRigidBody body1) {
+               return gdxBulletJNI.btRotationalLimitMotor_solveAngularLimits(swigCPtr, this, timeStep, axis, jacDiagABInv,
+                       btRigidBody.getCPtr(body0), body0, btRigidBody.getCPtr(body1), body1);
+       }
 
 }
index 0150763..59d0537 100644 (file)
@@ -9,43 +9,42 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btScaledBvhTriangleMeshShape extends btConcaveShape {
-  private long swigCPtr;
-
-  protected btScaledBvhTriangleMeshShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btScaledBvhTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btScaledBvhTriangleMeshShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btScaledBvhTriangleMeshShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape childShape, Vector3 localScaling) {
-    this(gdxBulletJNI.new_btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape.getCPtr(childShape), childShape, localScaling), true);
-  }
-
-  public btBvhTriangleMeshShape getChildShape() {
-    long cPtr = gdxBulletJNI.btScaledBvhTriangleMeshShape_getChildShape__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBvhTriangleMeshShape(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btScaledBvhTriangleMeshShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btScaledBvhTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btScaledBvhTriangleMeshShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btScaledBvhTriangleMeshShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btScaledBvhTriangleMeshShape (btBvhTriangleMeshShape childShape, Vector3 localScaling) {
+               this(gdxBulletJNI.new_btScaledBvhTriangleMeshShape(btBvhTriangleMeshShape.getCPtr(childShape), childShape, localScaling),
+                       true);
+       }
+
+       public btBvhTriangleMeshShape getChildShape () {
+               long cPtr = gdxBulletJNI.btScaledBvhTriangleMeshShape_getChildShape__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBvhTriangleMeshShape(cPtr, false);
+       }
 
 }
index 8cf1a31..40c4be6 100644 (file)
@@ -8,57 +8,54 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btScaledTriangleMeshShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btScaledTriangleMeshShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btScaledTriangleMeshShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btScaledTriangleMeshShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_trimeshShapeData(btTriangleMeshShapeData value) {
-    gdxBulletJNI.btScaledTriangleMeshShapeData_m_trimeshShapeData_set(swigCPtr, this, btTriangleMeshShapeData.getCPtr(value), value);
-  }
-
-  public btTriangleMeshShapeData getM_trimeshShapeData() {
-    long cPtr = gdxBulletJNI.btScaledTriangleMeshShapeData_m_trimeshShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTriangleMeshShapeData(cPtr, false);
-  }
-
-  public void setM_localScaling(btVector3FloatData value) {
-    gdxBulletJNI.btScaledTriangleMeshShapeData_m_localScaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_localScaling() {
-    long cPtr = gdxBulletJNI.btScaledTriangleMeshShapeData_m_localScaling_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public btScaledTriangleMeshShapeData() {
-    this(gdxBulletJNI.new_btScaledTriangleMeshShapeData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btScaledTriangleMeshShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btScaledTriangleMeshShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btScaledTriangleMeshShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_trimeshShapeData (btTriangleMeshShapeData value) {
+               gdxBulletJNI.btScaledTriangleMeshShapeData_m_trimeshShapeData_set(swigCPtr, this, btTriangleMeshShapeData.getCPtr(value),
+                       value);
+       }
+
+       public btTriangleMeshShapeData getM_trimeshShapeData () {
+               long cPtr = gdxBulletJNI.btScaledTriangleMeshShapeData_m_trimeshShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTriangleMeshShapeData(cPtr, false);
+       }
+
+       public void setM_localScaling (btVector3FloatData value) {
+               gdxBulletJNI.btScaledTriangleMeshShapeData_m_localScaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_localScaling () {
+               long cPtr = gdxBulletJNI.btScaledTriangleMeshShapeData_m_localScaling_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public btScaledTriangleMeshShapeData () {
+               this(gdxBulletJNI.new_btScaledTriangleMeshShapeData(), true);
+       }
 
 }
index 02be130..1afedc7 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSequentialImpulseConstraintSolver extends btConstraintSolver {
-  private long swigCPtr;
-
-  protected btSequentialImpulseConstraintSolver(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSequentialImpulseConstraintSolver_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSequentialImpulseConstraintSolver obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSequentialImpulseConstraintSolver(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSequentialImpulseConstraintSolver() {
-    this(gdxBulletJNI.new_btSequentialImpulseConstraintSolver(), true);
-  }
-
-  public long btRand2() {
-    return gdxBulletJNI.btSequentialImpulseConstraintSolver_btRand2(swigCPtr, this);
-  }
-
-  public int btRandInt2(int n) {
-    return gdxBulletJNI.btSequentialImpulseConstraintSolver_btRandInt2(swigCPtr, this, n);
-  }
-
-  public void setRandSeed(long seed) {
-    gdxBulletJNI.btSequentialImpulseConstraintSolver_setRandSeed(swigCPtr, this, seed);
-  }
-
-  public long getRandSeed() {
-    return gdxBulletJNI.btSequentialImpulseConstraintSolver_getRandSeed(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btSequentialImpulseConstraintSolver (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSequentialImpulseConstraintSolver_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSequentialImpulseConstraintSolver obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSequentialImpulseConstraintSolver(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSequentialImpulseConstraintSolver () {
+               this(gdxBulletJNI.new_btSequentialImpulseConstraintSolver(), true);
+       }
+
+       public long btRand2 () {
+               return gdxBulletJNI.btSequentialImpulseConstraintSolver_btRand2(swigCPtr, this);
+       }
+
+       public int btRandInt2 (int n) {
+               return gdxBulletJNI.btSequentialImpulseConstraintSolver_btRandInt2(swigCPtr, this, n);
+       }
+
+       public void setRandSeed (long seed) {
+               gdxBulletJNI.btSequentialImpulseConstraintSolver_setRandSeed(swigCPtr, this, seed);
+       }
+
+       public long getRandSeed () {
+               return gdxBulletJNI.btSequentialImpulseConstraintSolver_getRandSeed(swigCPtr, this);
+       }
 
 }
index e19ab4c..a387868 100644 (file)
@@ -8,65 +8,61 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btShapeHull {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btShapeHull(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btShapeHull (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btShapeHull obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btShapeHull obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btShapeHull(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btShapeHull(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public btShapeHull(btConvexShape shape) {
-    this(gdxBulletJNI.new_btShapeHull(btConvexShape.getCPtr(shape), shape), true);
-  }
+       public btShapeHull (btConvexShape shape) {
+               this(gdxBulletJNI.new_btShapeHull(btConvexShape.getCPtr(shape), shape), true);
+       }
 
-  public boolean buildHull(float margin) {
-    return gdxBulletJNI.btShapeHull_buildHull(swigCPtr, this, margin);
-  }
+       public boolean buildHull (float margin) {
+               return gdxBulletJNI.btShapeHull_buildHull(swigCPtr, this, margin);
+       }
 
-  public int numTriangles() {
-    return gdxBulletJNI.btShapeHull_numTriangles(swigCPtr, this);
-  }
+       public int numTriangles () {
+               return gdxBulletJNI.btShapeHull_numTriangles(swigCPtr, this);
+       }
 
-  public int numVertices() {
-    return gdxBulletJNI.btShapeHull_numVertices(swigCPtr, this);
-  }
+       public int numVertices () {
+               return gdxBulletJNI.btShapeHull_numVertices(swigCPtr, this);
+       }
 
-  public int numIndices() {
-    return gdxBulletJNI.btShapeHull_numIndices(swigCPtr, this);
-  }
+       public int numIndices () {
+               return gdxBulletJNI.btShapeHull_numIndices(swigCPtr, this);
+       }
 
-  public btVector3 getVertexPointer() {
-    long cPtr = gdxBulletJNI.btShapeHull_getVertexPointer(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
+       public btVector3 getVertexPointer () {
+               long cPtr = gdxBulletJNI.btShapeHull_getVertexPointer(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
 
-  public SWIGTYPE_p_unsigned_int getIndexPointer() {
-    long cPtr = gdxBulletJNI.btShapeHull_getIndexPointer(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_int(cPtr, false);
-  }
+       public SWIGTYPE_p_unsigned_int getIndexPointer () {
+               long cPtr = gdxBulletJNI.btShapeHull_getIndexPointer(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_int(cPtr, false);
+       }
 
 }
index 892d0f5..0275094 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btShortIntIndexData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btShortIntIndexData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btShortIntIndexData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btShortIntIndexData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_value(short value) {
-    gdxBulletJNI.btShortIntIndexData_m_value_set(swigCPtr, this, value);
-  }
-
-  public short getM_value() {
-    return gdxBulletJNI.btShortIntIndexData_m_value_get(swigCPtr, this);
-  }
-
-  public void setM_pad(String value) {
-    gdxBulletJNI.btShortIntIndexData_m_pad_set(swigCPtr, this, value);
-  }
-
-  public String getM_pad() {
-    return gdxBulletJNI.btShortIntIndexData_m_pad_get(swigCPtr, this);
-  }
-
-  public btShortIntIndexData() {
-    this(gdxBulletJNI.new_btShortIntIndexData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btShortIntIndexData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btShortIntIndexData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btShortIntIndexData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_value (short value) {
+               gdxBulletJNI.btShortIntIndexData_m_value_set(swigCPtr, this, value);
+       }
+
+       public short getM_value () {
+               return gdxBulletJNI.btShortIntIndexData_m_value_get(swigCPtr, this);
+       }
+
+       public void setM_pad (String value) {
+               gdxBulletJNI.btShortIntIndexData_m_pad_set(swigCPtr, this, value);
+       }
+
+       public String getM_pad () {
+               return gdxBulletJNI.btShortIntIndexData_m_pad_get(swigCPtr, this);
+       }
+
+       public btShortIntIndexData () {
+               this(gdxBulletJNI.new_btShortIntIndexData(), true);
+       }
 
 }
index 546ed99..185f2aa 100644 (file)
@@ -8,55 +8,51 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btShortIntIndexTripletData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btShortIntIndexTripletData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btShortIntIndexTripletData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btShortIntIndexTripletData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_values(short[] value) {
-    gdxBulletJNI.btShortIntIndexTripletData_m_values_set(swigCPtr, this, value);
-  }
-
-  public short[] getM_values() {
-    return gdxBulletJNI.btShortIntIndexTripletData_m_values_get(swigCPtr, this);
-  }
-
-  public void setM_pad(String value) {
-    gdxBulletJNI.btShortIntIndexTripletData_m_pad_set(swigCPtr, this, value);
-  }
-
-  public String getM_pad() {
-    return gdxBulletJNI.btShortIntIndexTripletData_m_pad_get(swigCPtr, this);
-  }
-
-  public btShortIntIndexTripletData() {
-    this(gdxBulletJNI.new_btShortIntIndexTripletData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btShortIntIndexTripletData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btShortIntIndexTripletData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btShortIntIndexTripletData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_values (short[] value) {
+               gdxBulletJNI.btShortIntIndexTripletData_m_values_set(swigCPtr, this, value);
+       }
+
+       public short[] getM_values () {
+               return gdxBulletJNI.btShortIntIndexTripletData_m_values_get(swigCPtr, this);
+       }
+
+       public void setM_pad (String value) {
+               gdxBulletJNI.btShortIntIndexTripletData_m_pad_set(swigCPtr, this, value);
+       }
+
+       public String getM_pad () {
+               return gdxBulletJNI.btShortIntIndexTripletData_m_pad_get(swigCPtr, this);
+       }
+
+       public btShortIntIndexTripletData () {
+               this(gdxBulletJNI.new_btShortIntIndexTripletData(), true);
+       }
 
 }
index a69e1a3..99ee3d7 100644 (file)
@@ -9,71 +9,75 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btSimpleBroadphase extends btBroadphaseInterface {
-  private long swigCPtr;
-
-  protected btSimpleBroadphase(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSimpleBroadphase_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSimpleBroadphase obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSimpleBroadphase(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSimpleBroadphase(int maxProxies, btOverlappingPairCache overlappingPairCache) {
-    this(gdxBulletJNI.new_btSimpleBroadphase__SWIG_0(maxProxies, btOverlappingPairCache.getCPtr(overlappingPairCache), overlappingPairCache), true);
-  }
-
-  public btSimpleBroadphase(int maxProxies) {
-    this(gdxBulletJNI.new_btSimpleBroadphase__SWIG_1(maxProxies), true);
-  }
-
-  public btSimpleBroadphase() {
-    this(gdxBulletJNI.new_btSimpleBroadphase__SWIG_2(), true);
-  }
-
-  public static boolean aabbOverlap(btSimpleBroadphaseProxy proxy0, btSimpleBroadphaseProxy proxy1) {
-    return gdxBulletJNI.btSimpleBroadphase_aabbOverlap(btSimpleBroadphaseProxy.getCPtr(proxy0), proxy0, btSimpleBroadphaseProxy.getCPtr(proxy1), proxy1);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btSimpleBroadphase_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin, aabbMax);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
-    gdxBulletJNI.btSimpleBroadphase_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin);
-  }
-
-  public void rayTest(Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
-    gdxBulletJNI.btSimpleBroadphase_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo, btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback);
-  }
-
-  public btOverlappingPairCache getOverlappingPairCache() {
-    long cPtr = gdxBulletJNI.btSimpleBroadphase_getOverlappingPairCache__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
-  }
-
-  public boolean testAabbOverlap(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    return gdxBulletJNI.btSimpleBroadphase_testAabbOverlap(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
-  }
+       private long swigCPtr;
+
+       protected btSimpleBroadphase (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSimpleBroadphase_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSimpleBroadphase obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSimpleBroadphase(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSimpleBroadphase (int maxProxies, btOverlappingPairCache overlappingPairCache) {
+               this(gdxBulletJNI.new_btSimpleBroadphase__SWIG_0(maxProxies, btOverlappingPairCache.getCPtr(overlappingPairCache),
+                       overlappingPairCache), true);
+       }
+
+       public btSimpleBroadphase (int maxProxies) {
+               this(gdxBulletJNI.new_btSimpleBroadphase__SWIG_1(maxProxies), true);
+       }
+
+       public btSimpleBroadphase () {
+               this(gdxBulletJNI.new_btSimpleBroadphase__SWIG_2(), true);
+       }
+
+       public static boolean aabbOverlap (btSimpleBroadphaseProxy proxy0, btSimpleBroadphaseProxy proxy1) {
+               return gdxBulletJNI.btSimpleBroadphase_aabbOverlap(btSimpleBroadphaseProxy.getCPtr(proxy0), proxy0,
+                       btSimpleBroadphaseProxy.getCPtr(proxy1), proxy1);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btSimpleBroadphase_rayTest__SWIG_0(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin, aabbMax);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback, Vector3 aabbMin) {
+               gdxBulletJNI.btSimpleBroadphase_rayTest__SWIG_1(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback, aabbMin);
+       }
+
+       public void rayTest (Vector3 rayFrom, Vector3 rayTo, btBroadphaseRayCallback rayCallback) {
+               gdxBulletJNI.btSimpleBroadphase_rayTest__SWIG_2(swigCPtr, this, rayFrom, rayTo,
+                       btBroadphaseRayCallback.getCPtr(rayCallback), rayCallback);
+       }
+
+       public btOverlappingPairCache getOverlappingPairCache () {
+               long cPtr = gdxBulletJNI.btSimpleBroadphase_getOverlappingPairCache__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlappingPairCache(cPtr, false);
+       }
+
+       public boolean testAabbOverlap (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               return gdxBulletJNI.btSimpleBroadphase_testAabbOverlap(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0,
+                       btBroadphaseProxy.getCPtr(proxy1), proxy1);
+       }
 
 }
index 7c455d1..1bd86b7 100644 (file)
@@ -9,58 +9,58 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btSimpleBroadphaseProxy extends btBroadphaseProxy {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btSimpleBroadphaseProxy(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSimpleBroadphaseProxy_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btSimpleBroadphaseProxy (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSimpleBroadphaseProxy_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btSimpleBroadphaseProxy obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btSimpleBroadphaseProxy obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSimpleBroadphaseProxy(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSimpleBroadphaseProxy(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public void setM_nextFree(int value) {
-    gdxBulletJNI.btSimpleBroadphaseProxy_m_nextFree_set(swigCPtr, this, value);
-  }
+       public void setM_nextFree (int value) {
+               gdxBulletJNI.btSimpleBroadphaseProxy_m_nextFree_set(swigCPtr, this, value);
+       }
 
-  public int getM_nextFree() {
-    return gdxBulletJNI.btSimpleBroadphaseProxy_m_nextFree_get(swigCPtr, this);
-  }
+       public int getM_nextFree () {
+               return gdxBulletJNI.btSimpleBroadphaseProxy_m_nextFree_get(swigCPtr, this);
+       }
 
-  public btSimpleBroadphaseProxy() {
-    this(gdxBulletJNI.new_btSimpleBroadphaseProxy__SWIG_0(), true);
-  }
+       public btSimpleBroadphaseProxy () {
+               this(gdxBulletJNI.new_btSimpleBroadphaseProxy__SWIG_0(), true);
+       }
 
-  public btSimpleBroadphaseProxy(Vector3 minpt, Vector3 maxpt, int shapeType, SWIGTYPE_p_void userPtr, short collisionFilterGroup, short collisionFilterMask, SWIGTYPE_p_void multiSapProxy) {
-    this(gdxBulletJNI.new_btSimpleBroadphaseProxy__SWIG_1(minpt, maxpt, shapeType, SWIGTYPE_p_void.getCPtr(userPtr), collisionFilterGroup, collisionFilterMask, SWIGTYPE_p_void.getCPtr(multiSapProxy)), true);
-  }
+       public btSimpleBroadphaseProxy (Vector3 minpt, Vector3 maxpt, int shapeType, SWIGTYPE_p_void userPtr,
+               short collisionFilterGroup, short collisionFilterMask, SWIGTYPE_p_void multiSapProxy) {
+               this(gdxBulletJNI.new_btSimpleBroadphaseProxy__SWIG_1(minpt, maxpt, shapeType, SWIGTYPE_p_void.getCPtr(userPtr),
+                       collisionFilterGroup, collisionFilterMask, SWIGTYPE_p_void.getCPtr(multiSapProxy)), true);
+       }
 
-  public void SetNextFree(int next) {
-    gdxBulletJNI.btSimpleBroadphaseProxy_SetNextFree(swigCPtr, this, next);
-  }
+       public void SetNextFree (int next) {
+               gdxBulletJNI.btSimpleBroadphaseProxy_SetNextFree(swigCPtr, this, next);
+       }
 
-  public int GetNextFree() {
-    return gdxBulletJNI.btSimpleBroadphaseProxy_GetNextFree(swigCPtr, this);
-  }
+       public int GetNextFree () {
+               return gdxBulletJNI.btSimpleBroadphaseProxy_GetNextFree(swigCPtr, this);
+       }
 
 }
index 476a5b7..8a6c71f 100644 (file)
@@ -8,59 +8,58 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSimpleDynamicsWorld extends btDynamicsWorld {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btSimpleDynamicsWorld(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSimpleDynamicsWorld_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btSimpleDynamicsWorld (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSimpleDynamicsWorld_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btSimpleDynamicsWorld obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btSimpleDynamicsWorld obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSimpleDynamicsWorld(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSimpleDynamicsWorld(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public btSimpleDynamicsWorld(btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver, btCollisionConfiguration collisionConfiguration) {
-    this(gdxBulletJNI.new_btSimpleDynamicsWorld(btDispatcher.getCPtr(dispatcher), dispatcher, btBroadphaseInterface.getCPtr(pairCache), pairCache, btConstraintSolver.getCPtr(constraintSolver), constraintSolver, btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
-  }
+       public btSimpleDynamicsWorld (btDispatcher dispatcher, btBroadphaseInterface pairCache, btConstraintSolver constraintSolver,
+               btCollisionConfiguration collisionConfiguration) {
+               this(gdxBulletJNI.new_btSimpleDynamicsWorld(btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btBroadphaseInterface.getCPtr(pairCache), pairCache, btConstraintSolver.getCPtr(constraintSolver), constraintSolver,
+                       btCollisionConfiguration.getCPtr(collisionConfiguration), collisionConfiguration), true);
+       }
 
-  public int stepSimulation(float timeStep, int maxSubSteps, float fixedTimeStep) {
-    return gdxBulletJNI.btSimpleDynamicsWorld_stepSimulation__SWIG_0(swigCPtr, this, timeStep, maxSubSteps, fixedTimeStep);
-  }
+       public int stepSimulation (float timeStep, int maxSubSteps, float fixedTimeStep) {
+               return gdxBulletJNI.btSimpleDynamicsWorld_stepSimulation__SWIG_0(swigCPtr, this, timeStep, maxSubSteps, fixedTimeStep);
+       }
 
-  public int stepSimulation(float timeStep, int maxSubSteps) {
-    return gdxBulletJNI.btSimpleDynamicsWorld_stepSimulation__SWIG_1(swigCPtr, this, timeStep, maxSubSteps);
-  }
+       public int stepSimulation (float timeStep, int maxSubSteps) {
+               return gdxBulletJNI.btSimpleDynamicsWorld_stepSimulation__SWIG_1(swigCPtr, this, timeStep, maxSubSteps);
+       }
 
-  public int stepSimulation(float timeStep) {
-    return gdxBulletJNI.btSimpleDynamicsWorld_stepSimulation__SWIG_2(swigCPtr, this, timeStep);
-  }
+       public int stepSimulation (float timeStep) {
+               return gdxBulletJNI.btSimpleDynamicsWorld_stepSimulation__SWIG_2(swigCPtr, this, timeStep);
+       }
 
-  public void addRigidBody(btRigidBody body) {
-    gdxBulletJNI.btSimpleDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, this, btRigidBody.getCPtr(body), body);
-  }
+       public void addRigidBody (btRigidBody body) {
+               gdxBulletJNI.btSimpleDynamicsWorld_addRigidBody__SWIG_0(swigCPtr, this, btRigidBody.getCPtr(body), body);
+       }
 
-  public void addRigidBody(btRigidBody body, short group, short mask) {
-    gdxBulletJNI.btSimpleDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, this, btRigidBody.getCPtr(body), body, group, mask);
-  }
+       public void addRigidBody (btRigidBody body, short group, short mask) {
+               gdxBulletJNI.btSimpleDynamicsWorld_addRigidBody__SWIG_1(swigCPtr, this, btRigidBody.getCPtr(body), body, group, mask);
+       }
 
 }
index ec9dfac..40a8c8e 100644 (file)
@@ -8,75 +8,77 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSimulationIslandManager {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btSimulationIslandManager(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSimulationIslandManager obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSimulationIslandManager(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btSimulationIslandManager() {
-    this(gdxBulletJNI.new_btSimulationIslandManager(), true);
-  }
-
-  public void initUnionFind(int n) {
-    gdxBulletJNI.btSimulationIslandManager_initUnionFind(swigCPtr, this, n);
-  }
-
-  public btUnionFind getUnionFind() {
-    return new btUnionFind(gdxBulletJNI.btSimulationIslandManager_getUnionFind(swigCPtr, this), false);
-  }
-
-  public void updateActivationState(btCollisionWorld colWorld, btDispatcher dispatcher) {
-    gdxBulletJNI.btSimulationIslandManager_updateActivationState(swigCPtr, this, btCollisionWorld.getCPtr(colWorld), colWorld, btDispatcher.getCPtr(dispatcher), dispatcher);
-  }
-
-  public void storeIslandActivationState(btCollisionWorld world) {
-    gdxBulletJNI.btSimulationIslandManager_storeIslandActivationState(swigCPtr, this, btCollisionWorld.getCPtr(world), world);
-  }
-
-  public void findUnions(btDispatcher dispatcher, btCollisionWorld colWorld) {
-    gdxBulletJNI.btSimulationIslandManager_findUnions(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher, btCollisionWorld.getCPtr(colWorld), colWorld);
-  }
-
-  public void buildAndProcessIslands(btDispatcher dispatcher, btCollisionWorld collisionWorld, SWIGTYPE_p_btSimulationIslandManager__IslandCallback callback) {
-    gdxBulletJNI.btSimulationIslandManager_buildAndProcessIslands(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher, btCollisionWorld.getCPtr(collisionWorld), collisionWorld, SWIGTYPE_p_btSimulationIslandManager__IslandCallback.getCPtr(callback));
-  }
-
-  public void buildIslands(btDispatcher dispatcher, btCollisionWorld colWorld) {
-    gdxBulletJNI.btSimulationIslandManager_buildIslands(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher, btCollisionWorld.getCPtr(colWorld), colWorld);
-  }
-
-  public boolean getSplitIslands() {
-    return gdxBulletJNI.btSimulationIslandManager_getSplitIslands(swigCPtr, this);
-  }
-
-  public void setSplitIslands(boolean doSplitIslands) {
-    gdxBulletJNI.btSimulationIslandManager_setSplitIslands(swigCPtr, this, doSplitIslands);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btSimulationIslandManager (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSimulationIslandManager obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSimulationIslandManager(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btSimulationIslandManager () {
+               this(gdxBulletJNI.new_btSimulationIslandManager(), true);
+       }
+
+       public void initUnionFind (int n) {
+               gdxBulletJNI.btSimulationIslandManager_initUnionFind(swigCPtr, this, n);
+       }
+
+       public btUnionFind getUnionFind () {
+               return new btUnionFind(gdxBulletJNI.btSimulationIslandManager_getUnionFind(swigCPtr, this), false);
+       }
+
+       public void updateActivationState (btCollisionWorld colWorld, btDispatcher dispatcher) {
+               gdxBulletJNI.btSimulationIslandManager_updateActivationState(swigCPtr, this, btCollisionWorld.getCPtr(colWorld), colWorld,
+                       btDispatcher.getCPtr(dispatcher), dispatcher);
+       }
+
+       public void storeIslandActivationState (btCollisionWorld world) {
+               gdxBulletJNI.btSimulationIslandManager_storeIslandActivationState(swigCPtr, this, btCollisionWorld.getCPtr(world), world);
+       }
+
+       public void findUnions (btDispatcher dispatcher, btCollisionWorld colWorld) {
+               gdxBulletJNI.btSimulationIslandManager_findUnions(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btCollisionWorld.getCPtr(colWorld), colWorld);
+       }
+
+       public void buildAndProcessIslands (btDispatcher dispatcher, btCollisionWorld collisionWorld,
+               SWIGTYPE_p_btSimulationIslandManager__IslandCallback callback) {
+               gdxBulletJNI.btSimulationIslandManager_buildAndProcessIslands(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btCollisionWorld.getCPtr(collisionWorld), collisionWorld,
+                       SWIGTYPE_p_btSimulationIslandManager__IslandCallback.getCPtr(callback));
+       }
+
+       public void buildIslands (btDispatcher dispatcher, btCollisionWorld colWorld) {
+               gdxBulletJNI.btSimulationIslandManager_buildIslands(swigCPtr, this, btDispatcher.getCPtr(dispatcher), dispatcher,
+                       btCollisionWorld.getCPtr(colWorld), colWorld);
+       }
+
+       public boolean getSplitIslands () {
+               return gdxBulletJNI.btSimulationIslandManager_getSplitIslands(swigCPtr, this);
+       }
+
+       public void setSplitIslands (boolean doSplitIslands) {
+               gdxBulletJNI.btSimulationIslandManager_setSplitIslands(swigCPtr, this, doSplitIslands);
+       }
 
 }
index 4c124ee..f5029c0 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btSliderConstraint extends btTypedConstraint {
-  private long swigCPtr;
-
-  protected btSliderConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSliderConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSliderConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSliderConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSliderConstraint(btRigidBody rbA, btRigidBody rbB, btTransform frameInA, btTransform frameInB, boolean useLinearReferenceFrameA) {
-    this(gdxBulletJNI.new_btSliderConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInA), frameInA, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameA), true);
-  }
-
-  public btSliderConstraint(btRigidBody rbB, btTransform frameInB, boolean useLinearReferenceFrameA) {
-    this(gdxBulletJNI.new_btSliderConstraint__SWIG_1(btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameA), true);
-  }
-
-  public void getInfo1NonVirtual(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
-    gdxBulletJNI.btSliderConstraint_getInfo1NonVirtual(swigCPtr, this, SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
-  }
-
-  public void getInfo2NonVirtual(btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 linVelA, Vector3 linVelB, float rbAinvMass, float rbBinvMass) {
-    gdxBulletJNI.btSliderConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, linVelA, linVelB, rbAinvMass, rbBinvMass);
-  }
-
-  public btRigidBody getRigidBodyA() {
-    return new btRigidBody(gdxBulletJNI.btSliderConstraint_getRigidBodyA(swigCPtr, this), false);
-  }
-
-  public btRigidBody getRigidBodyB() {
-    return new btRigidBody(gdxBulletJNI.btSliderConstraint_getRigidBodyB(swigCPtr, this), false);
-  }
-
-  public btTransform getCalculatedTransformA() {
-    return new btTransform(gdxBulletJNI.btSliderConstraint_getCalculatedTransformA(swigCPtr, this), false);
-  }
-
-  public btTransform getCalculatedTransformB() {
-    return new btTransform(gdxBulletJNI.btSliderConstraint_getCalculatedTransformB(swigCPtr, this), false);
-  }
-
-  public btTransform getFrameOffsetA() {
-    return new btTransform(gdxBulletJNI.btSliderConstraint_getFrameOffsetA__SWIG_0(swigCPtr, this), false);
-  }
-
-  public btTransform getFrameOffsetB() {
-    return new btTransform(gdxBulletJNI.btSliderConstraint_getFrameOffsetB__SWIG_0(swigCPtr, this), false);
-  }
-
-  public float getLowerLinLimit() {
-    return gdxBulletJNI.btSliderConstraint_getLowerLinLimit(swigCPtr, this);
-  }
-
-  public void setLowerLinLimit(float lowerLimit) {
-    gdxBulletJNI.btSliderConstraint_setLowerLinLimit(swigCPtr, this, lowerLimit);
-  }
-
-  public float getUpperLinLimit() {
-    return gdxBulletJNI.btSliderConstraint_getUpperLinLimit(swigCPtr, this);
-  }
-
-  public void setUpperLinLimit(float upperLimit) {
-    gdxBulletJNI.btSliderConstraint_setUpperLinLimit(swigCPtr, this, upperLimit);
-  }
-
-  public float getLowerAngLimit() {
-    return gdxBulletJNI.btSliderConstraint_getLowerAngLimit(swigCPtr, this);
-  }
-
-  public void setLowerAngLimit(float lowerLimit) {
-    gdxBulletJNI.btSliderConstraint_setLowerAngLimit(swigCPtr, this, lowerLimit);
-  }
-
-  public float getUpperAngLimit() {
-    return gdxBulletJNI.btSliderConstraint_getUpperAngLimit(swigCPtr, this);
-  }
-
-  public void setUpperAngLimit(float upperLimit) {
-    gdxBulletJNI.btSliderConstraint_setUpperAngLimit(swigCPtr, this, upperLimit);
-  }
-
-  public boolean getUseLinearReferenceFrameA() {
-    return gdxBulletJNI.btSliderConstraint_getUseLinearReferenceFrameA(swigCPtr, this);
-  }
-
-  public float getSoftnessDirLin() {
-    return gdxBulletJNI.btSliderConstraint_getSoftnessDirLin(swigCPtr, this);
-  }
-
-  public float getRestitutionDirLin() {
-    return gdxBulletJNI.btSliderConstraint_getRestitutionDirLin(swigCPtr, this);
-  }
-
-  public float getDampingDirLin() {
-    return gdxBulletJNI.btSliderConstraint_getDampingDirLin(swigCPtr, this);
-  }
-
-  public float getSoftnessDirAng() {
-    return gdxBulletJNI.btSliderConstraint_getSoftnessDirAng(swigCPtr, this);
-  }
-
-  public float getRestitutionDirAng() {
-    return gdxBulletJNI.btSliderConstraint_getRestitutionDirAng(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btSliderConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSliderConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSliderConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSliderConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSliderConstraint (btRigidBody rbA, btRigidBody rbB, btTransform frameInA, btTransform frameInB,
+               boolean useLinearReferenceFrameA) {
+               this(gdxBulletJNI.new_btSliderConstraint__SWIG_0(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB,
+                       btTransform.getCPtr(frameInA), frameInA, btTransform.getCPtr(frameInB), frameInB, useLinearReferenceFrameA), true);
+       }
+
+       public btSliderConstraint (btRigidBody rbB, btTransform frameInB, boolean useLinearReferenceFrameA) {
+               this(gdxBulletJNI.new_btSliderConstraint__SWIG_1(btRigidBody.getCPtr(rbB), rbB, btTransform.getCPtr(frameInB), frameInB,
+                       useLinearReferenceFrameA), true);
+       }
+
+       public void getInfo1NonVirtual (SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
+               gdxBulletJNI.btSliderConstraint_getInfo1NonVirtual(swigCPtr, this,
+                       SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
+       }
+
+       public void getInfo2NonVirtual (btConstraintInfo2 info, btTransform transA, btTransform transB, Vector3 linVelA,
+               Vector3 linVelB, float rbAinvMass, float rbBinvMass) {
+               gdxBulletJNI.btSliderConstraint_getInfo2NonVirtual(swigCPtr, this, btConstraintInfo2.getCPtr(info), info,
+                       btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB, linVelA, linVelB, rbAinvMass, rbBinvMass);
+       }
+
+       public btRigidBody getRigidBodyA () {
+               return new btRigidBody(gdxBulletJNI.btSliderConstraint_getRigidBodyA(swigCPtr, this), false);
+       }
+
+       public btRigidBody getRigidBodyB () {
+               return new btRigidBody(gdxBulletJNI.btSliderConstraint_getRigidBodyB(swigCPtr, this), false);
+       }
+
+       public btTransform getCalculatedTransformA () {
+               return new btTransform(gdxBulletJNI.btSliderConstraint_getCalculatedTransformA(swigCPtr, this), false);
+       }
+
+       public btTransform getCalculatedTransformB () {
+               return new btTransform(gdxBulletJNI.btSliderConstraint_getCalculatedTransformB(swigCPtr, this), false);
+       }
+
+       public btTransform getFrameOffsetA () {
+               return new btTransform(gdxBulletJNI.btSliderConstraint_getFrameOffsetA__SWIG_0(swigCPtr, this), false);
+       }
+
+       public btTransform getFrameOffsetB () {
+               return new btTransform(gdxBulletJNI.btSliderConstraint_getFrameOffsetB__SWIG_0(swigCPtr, this), false);
+       }
+
+       public float getLowerLinLimit () {
+               return gdxBulletJNI.btSliderConstraint_getLowerLinLimit(swigCPtr, this);
+       }
+
+       public void setLowerLinLimit (float lowerLimit) {
+               gdxBulletJNI.btSliderConstraint_setLowerLinLimit(swigCPtr, this, lowerLimit);
+       }
+
+       public float getUpperLinLimit () {
+               return gdxBulletJNI.btSliderConstraint_getUpperLinLimit(swigCPtr, this);
+       }
+
+       public void setUpperLinLimit (float upperLimit) {
+               gdxBulletJNI.btSliderConstraint_setUpperLinLimit(swigCPtr, this, upperLimit);
+       }
+
+       public float getLowerAngLimit () {
+               return gdxBulletJNI.btSliderConstraint_getLowerAngLimit(swigCPtr, this);
+       }
+
+       public void setLowerAngLimit (float lowerLimit) {
+               gdxBulletJNI.btSliderConstraint_setLowerAngLimit(swigCPtr, this, lowerLimit);
+       }
+
+       public float getUpperAngLimit () {
+               return gdxBulletJNI.btSliderConstraint_getUpperAngLimit(swigCPtr, this);
+       }
+
+       public void setUpperAngLimit (float upperLimit) {
+               gdxBulletJNI.btSliderConstraint_setUpperAngLimit(swigCPtr, this, upperLimit);
+       }
+
+       public boolean getUseLinearReferenceFrameA () {
+               return gdxBulletJNI.btSliderConstraint_getUseLinearReferenceFrameA(swigCPtr, this);
+       }
+
+       public float getSoftnessDirLin () {
+               return gdxBulletJNI.btSliderConstraint_getSoftnessDirLin(swigCPtr, this);
+       }
+
+       public float getRestitutionDirLin () {
+               return gdxBulletJNI.btSliderConstraint_getRestitutionDirLin(swigCPtr, this);
+       }
+
+       public float getDampingDirLin () {
+               return gdxBulletJNI.btSliderConstraint_getDampingDirLin(swigCPtr, this);
+       }
+
+       public float getSoftnessDirAng () {
+               return gdxBulletJNI.btSliderConstraint_getSoftnessDirAng(swigCPtr, this);
+       }
+
+       public float getRestitutionDirAng () {
+               return gdxBulletJNI.btSliderConstraint_getRestitutionDirAng(swigCPtr, this);
+       }
+
+       public float getDampingDirAng () {
+               return gdxBulletJNI.btSliderConstraint_getDampingDirAng(swigCPtr, this);
+       }
 
-  public float getDampingDirAng() {
-    return gdxBulletJNI.btSliderConstraint_getDampingDirAng(swigCPtr, this);
-  }
+       public float getSoftnessLimLin () {
+               return gdxBulletJNI.btSliderConstraint_getSoftnessLimLin(swigCPtr, this);
+       }
 
-  public float getSoftnessLimLin() {
-    return gdxBulletJNI.btSliderConstraint_getSoftnessLimLin(swigCPtr, this);
-  }
+       public float getRestitutionLimLin () {
+               return gdxBulletJNI.btSliderConstraint_getRestitutionLimLin(swigCPtr, this);
+       }
 
-  public float getRestitutionLimLin() {
-    return gdxBulletJNI.btSliderConstraint_getRestitutionLimLin(swigCPtr, this);
-  }
+       public float getDampingLimLin () {
+               return gdxBulletJNI.btSliderConstraint_getDampingLimLin(swigCPtr, this);
+       }
 
-  public float getDampingLimLin() {
-    return gdxBulletJNI.btSliderConstraint_getDampingLimLin(swigCPtr, this);
-  }
+       public float getSoftnessLimAng () {
+               return gdxBulletJNI.btSliderConstraint_getSoftnessLimAng(swigCPtr, this);
+       }
 
-  public float getSoftnessLimAng() {
-    return gdxBulletJNI.btSliderConstraint_getSoftnessLimAng(swigCPtr, this);
-  }
+       public float getRestitutionLimAng () {
+               return gdxBulletJNI.btSliderConstraint_getRestitutionLimAng(swigCPtr, this);
+       }
 
-  public float getRestitutionLimAng() {
-    return gdxBulletJNI.btSliderConstraint_getRestitutionLimAng(swigCPtr, this);
-  }
+       public float getDampingLimAng () {
+               return gdxBulletJNI.btSliderConstraint_getDampingLimAng(swigCPtr, this);
+       }
 
-  public float getDampingLimAng() {
-    return gdxBulletJNI.btSliderConstraint_getDampingLimAng(swigCPtr, this);
-  }
+       public float getSoftnessOrthoLin () {
+               return gdxBulletJNI.btSliderConstraint_getSoftnessOrthoLin(swigCPtr, this);
+       }
 
-  public float getSoftnessOrthoLin() {
-    return gdxBulletJNI.btSliderConstraint_getSoftnessOrthoLin(swigCPtr, this);
-  }
+       public float getRestitutionOrthoLin () {
+               return gdxBulletJNI.btSliderConstraint_getRestitutionOrthoLin(swigCPtr, this);
+       }
 
-  public float getRestitutionOrthoLin() {
-    return gdxBulletJNI.btSliderConstraint_getRestitutionOrthoLin(swigCPtr, this);
-  }
+       public float getDampingOrthoLin () {
+               return gdxBulletJNI.btSliderConstraint_getDampingOrthoLin(swigCPtr, this);
+       }
 
-  public float getDampingOrthoLin() {
-    return gdxBulletJNI.btSliderConstraint_getDampingOrthoLin(swigCPtr, this);
-  }
+       public float getSoftnessOrthoAng () {
+               return gdxBulletJNI.btSliderConstraint_getSoftnessOrthoAng(swigCPtr, this);
+       }
 
-  public float getSoftnessOrthoAng() {
-    return gdxBulletJNI.btSliderConstraint_getSoftnessOrthoAng(swigCPtr, this);
-  }
+       public float getRestitutionOrthoAng () {
+               return gdxBulletJNI.btSliderConstraint_getRestitutionOrthoAng(swigCPtr, this);
+       }
 
-  public float getRestitutionOrthoAng() {
-    return gdxBulletJNI.btSliderConstraint_getRestitutionOrthoAng(swigCPtr, this);
-  }
+       public float getDampingOrthoAng () {
+               return gdxBulletJNI.btSliderConstraint_getDampingOrthoAng(swigCPtr, this);
+       }
 
-  public float getDampingOrthoAng() {
-    return gdxBulletJNI.btSliderConstraint_getDampingOrthoAng(swigCPtr, this);
-  }
+       public void setSoftnessDirLin (float softnessDirLin) {
+               gdxBulletJNI.btSliderConstraint_setSoftnessDirLin(swigCPtr, this, softnessDirLin);
+       }
 
-  public void setSoftnessDirLin(float softnessDirLin) {
-    gdxBulletJNI.btSliderConstraint_setSoftnessDirLin(swigCPtr, this, softnessDirLin);
-  }
+       public void setRestitutionDirLin (float restitutionDirLin) {
+               gdxBulletJNI.btSliderConstraint_setRestitutionDirLin(swigCPtr, this, restitutionDirLin);
+       }
 
-  public void setRestitutionDirLin(float restitutionDirLin) {
-    gdxBulletJNI.btSliderConstraint_setRestitutionDirLin(swigCPtr, this, restitutionDirLin);
-  }
+       public void setDampingDirLin (float dampingDirLin) {
+               gdxBulletJNI.btSliderConstraint_setDampingDirLin(swigCPtr, this, dampingDirLin);
+       }
 
-  public void setDampingDirLin(float dampingDirLin) {
-    gdxBulletJNI.btSliderConstraint_setDampingDirLin(swigCPtr, this, dampingDirLin);
-  }
+       public void setSoftnessDirAng (float softnessDirAng) {
+               gdxBulletJNI.btSliderConstraint_setSoftnessDirAng(swigCPtr, this, softnessDirAng);
+       }
 
-  public void setSoftnessDirAng(float softnessDirAng) {
-    gdxBulletJNI.btSliderConstraint_setSoftnessDirAng(swigCPtr, this, softnessDirAng);
-  }
+       public void setRestitutionDirAng (float restitutionDirAng) {
+               gdxBulletJNI.btSliderConstraint_setRestitutionDirAng(swigCPtr, this, restitutionDirAng);
+       }
 
-  public void setRestitutionDirAng(float restitutionDirAng) {
-    gdxBulletJNI.btSliderConstraint_setRestitutionDirAng(swigCPtr, this, restitutionDirAng);
-  }
+       public void setDampingDirAng (float dampingDirAng) {
+               gdxBulletJNI.btSliderConstraint_setDampingDirAng(swigCPtr, this, dampingDirAng);
+       }
 
-  public void setDampingDirAng(float dampingDirAng) {
-    gdxBulletJNI.btSliderConstraint_setDampingDirAng(swigCPtr, this, dampingDirAng);
-  }
+       public void setSoftnessLimLin (float softnessLimLin) {
+               gdxBulletJNI.btSliderConstraint_setSoftnessLimLin(swigCPtr, this, softnessLimLin);
+       }
 
-  public void setSoftnessLimLin(float softnessLimLin) {
-    gdxBulletJNI.btSliderConstraint_setSoftnessLimLin(swigCPtr, this, softnessLimLin);
-  }
+       public void setRestitutionLimLin (float restitutionLimLin) {
+               gdxBulletJNI.btSliderConstraint_setRestitutionLimLin(swigCPtr, this, restitutionLimLin);
+       }
 
-  public void setRestitutionLimLin(float restitutionLimLin) {
-    gdxBulletJNI.btSliderConstraint_setRestitutionLimLin(swigCPtr, this, restitutionLimLin);
-  }
+       public void setDampingLimLin (float dampingLimLin) {
+               gdxBulletJNI.btSliderConstraint_setDampingLimLin(swigCPtr, this, dampingLimLin);
+       }
 
-  public void setDampingLimLin(float dampingLimLin) {
-    gdxBulletJNI.btSliderConstraint_setDampingLimLin(swigCPtr, this, dampingLimLin);
-  }
+       public void setSoftnessLimAng (float softnessLimAng) {
+               gdxBulletJNI.btSliderConstraint_setSoftnessLimAng(swigCPtr, this, softnessLimAng);
+       }
 
-  public void setSoftnessLimAng(float softnessLimAng) {
-    gdxBulletJNI.btSliderConstraint_setSoftnessLimAng(swigCPtr, this, softnessLimAng);
-  }
+       public void setRestitutionLimAng (float restitutionLimAng) {
+               gdxBulletJNI.btSliderConstraint_setRestitutionLimAng(swigCPtr, this, restitutionLimAng);
+       }
 
-  public void setRestitutionLimAng(float restitutionLimAng) {
-    gdxBulletJNI.btSliderConstraint_setRestitutionLimAng(swigCPtr, this, restitutionLimAng);
-  }
+       public void setDampingLimAng (float dampingLimAng) {
+               gdxBulletJNI.btSliderConstraint_setDampingLimAng(swigCPtr, this, dampingLimAng);
+       }
 
-  public void setDampingLimAng(float dampingLimAng) {
-    gdxBulletJNI.btSliderConstraint_setDampingLimAng(swigCPtr, this, dampingLimAng);
-  }
+       public void setSoftnessOrthoLin (float softnessOrthoLin) {
+               gdxBulletJNI.btSliderConstraint_setSoftnessOrthoLin(swigCPtr, this, softnessOrthoLin);
+       }
 
-  public void setSoftnessOrthoLin(float softnessOrthoLin) {
-    gdxBulletJNI.btSliderConstraint_setSoftnessOrthoLin(swigCPtr, this, softnessOrthoLin);
-  }
+       public void setRestitutionOrthoLin (float restitutionOrthoLin) {
+               gdxBulletJNI.btSliderConstraint_setRestitutionOrthoLin(swigCPtr, this, restitutionOrthoLin);
+       }
 
-  public void setRestitutionOrthoLin(float restitutionOrthoLin) {
-    gdxBulletJNI.btSliderConstraint_setRestitutionOrthoLin(swigCPtr, this, restitutionOrthoLin);
-  }
+       public void setDampingOrthoLin (float dampingOrthoLin) {
+               gdxBulletJNI.btSliderConstraint_setDampingOrthoLin(swigCPtr, this, dampingOrthoLin);
+       }
 
-  public void setDampingOrthoLin(float dampingOrthoLin) {
-    gdxBulletJNI.btSliderConstraint_setDampingOrthoLin(swigCPtr, this, dampingOrthoLin);
-  }
+       public void setSoftnessOrthoAng (float softnessOrthoAng) {
+               gdxBulletJNI.btSliderConstraint_setSoftnessOrthoAng(swigCPtr, this, softnessOrthoAng);
+       }
 
-  public void setSoftnessOrthoAng(float softnessOrthoAng) {
-    gdxBulletJNI.btSliderConstraint_setSoftnessOrthoAng(swigCPtr, this, softnessOrthoAng);
-  }
+       public void setRestitutionOrthoAng (float restitutionOrthoAng) {
+               gdxBulletJNI.btSliderConstraint_setRestitutionOrthoAng(swigCPtr, this, restitutionOrthoAng);
+       }
 
-  public void setRestitutionOrthoAng(float restitutionOrthoAng) {
-    gdxBulletJNI.btSliderConstraint_setRestitutionOrthoAng(swigCPtr, this, restitutionOrthoAng);
-  }
+       public void setDampingOrthoAng (float dampingOrthoAng) {
+               gdxBulletJNI.btSliderConstraint_setDampingOrthoAng(swigCPtr, this, dampingOrthoAng);
+       }
 
-  public void setDampingOrthoAng(float dampingOrthoAng) {
-    gdxBulletJNI.btSliderConstraint_setDampingOrthoAng(swigCPtr, this, dampingOrthoAng);
-  }
+       public void setPoweredLinMotor (boolean onOff) {
+               gdxBulletJNI.btSliderConstraint_setPoweredLinMotor(swigCPtr, this, onOff);
+       }
 
-  public void setPoweredLinMotor(boolean onOff) {
-    gdxBulletJNI.btSliderConstraint_setPoweredLinMotor(swigCPtr, this, onOff);
-  }
+       public boolean getPoweredLinMotor () {
+               return gdxBulletJNI.btSliderConstraint_getPoweredLinMotor(swigCPtr, this);
+       }
 
-  public boolean getPoweredLinMotor() {
-    return gdxBulletJNI.btSliderConstraint_getPoweredLinMotor(swigCPtr, this);
-  }
+       public void setTargetLinMotorVelocity (float targetLinMotorVelocity) {
+               gdxBulletJNI.btSliderConstraint_setTargetLinMotorVelocity(swigCPtr, this, targetLinMotorVelocity);
+       }
 
-  public void setTargetLinMotorVelocity(float targetLinMotorVelocity) {
-    gdxBulletJNI.btSliderConstraint_setTargetLinMotorVelocity(swigCPtr, this, targetLinMotorVelocity);
-  }
+       public float getTargetLinMotorVelocity () {
+               return gdxBulletJNI.btSliderConstraint_getTargetLinMotorVelocity(swigCPtr, this);
+       }
 
-  public float getTargetLinMotorVelocity() {
-    return gdxBulletJNI.btSliderConstraint_getTargetLinMotorVelocity(swigCPtr, this);
-  }
+       public void setMaxLinMotorForce (float maxLinMotorForce) {
+               gdxBulletJNI.btSliderConstraint_setMaxLinMotorForce(swigCPtr, this, maxLinMotorForce);
+       }
 
-  public void setMaxLinMotorForce(float maxLinMotorForce) {
-    gdxBulletJNI.btSliderConstraint_setMaxLinMotorForce(swigCPtr, this, maxLinMotorForce);
-  }
+       public float getMaxLinMotorForce () {
+               return gdxBulletJNI.btSliderConstraint_getMaxLinMotorForce(swigCPtr, this);
+       }
 
-  public float getMaxLinMotorForce() {
-    return gdxBulletJNI.btSliderConstraint_getMaxLinMotorForce(swigCPtr, this);
-  }
+       public void setPoweredAngMotor (boolean onOff) {
+               gdxBulletJNI.btSliderConstraint_setPoweredAngMotor(swigCPtr, this, onOff);
+       }
 
-  public void setPoweredAngMotor(boolean onOff) {
-    gdxBulletJNI.btSliderConstraint_setPoweredAngMotor(swigCPtr, this, onOff);
-  }
+       public boolean getPoweredAngMotor () {
+               return gdxBulletJNI.btSliderConstraint_getPoweredAngMotor(swigCPtr, this);
+       }
 
-  public boolean getPoweredAngMotor() {
-    return gdxBulletJNI.btSliderConstraint_getPoweredAngMotor(swigCPtr, this);
-  }
+       public void setTargetAngMotorVelocity (float targetAngMotorVelocity) {
+               gdxBulletJNI.btSliderConstraint_setTargetAngMotorVelocity(swigCPtr, this, targetAngMotorVelocity);
+       }
 
-  public void setTargetAngMotorVelocity(float targetAngMotorVelocity) {
-    gdxBulletJNI.btSliderConstraint_setTargetAngMotorVelocity(swigCPtr, this, targetAngMotorVelocity);
-  }
+       public float getTargetAngMotorVelocity () {
+               return gdxBulletJNI.btSliderConstraint_getTargetAngMotorVelocity(swigCPtr, this);
+       }
 
-  public float getTargetAngMotorVelocity() {
-    return gdxBulletJNI.btSliderConstraint_getTargetAngMotorVelocity(swigCPtr, this);
-  }
+       public void setMaxAngMotorForce (float maxAngMotorForce) {
+               gdxBulletJNI.btSliderConstraint_setMaxAngMotorForce(swigCPtr, this, maxAngMotorForce);
+       }
 
-  public void setMaxAngMotorForce(float maxAngMotorForce) {
-    gdxBulletJNI.btSliderConstraint_setMaxAngMotorForce(swigCPtr, this, maxAngMotorForce);
-  }
+       public float getMaxAngMotorForce () {
+               return gdxBulletJNI.btSliderConstraint_getMaxAngMotorForce(swigCPtr, this);
+       }
 
-  public float getMaxAngMotorForce() {
-    return gdxBulletJNI.btSliderConstraint_getMaxAngMotorForce(swigCPtr, this);
-  }
+       public float getLinearPos () {
+               return gdxBulletJNI.btSliderConstraint_getLinearPos(swigCPtr, this);
+       }
 
-  public float getLinearPos() {
-    return gdxBulletJNI.btSliderConstraint_getLinearPos(swigCPtr, this);
-  }
+       public float getAngularPos () {
+               return gdxBulletJNI.btSliderConstraint_getAngularPos(swigCPtr, this);
+       }
 
-  public float getAngularPos() {
-    return gdxBulletJNI.btSliderConstraint_getAngularPos(swigCPtr, this);
-  }
+       public boolean getSolveLinLimit () {
+               return gdxBulletJNI.btSliderConstraint_getSolveLinLimit(swigCPtr, this);
+       }
 
-  public boolean getSolveLinLimit() {
-    return gdxBulletJNI.btSliderConstraint_getSolveLinLimit(swigCPtr, this);
-  }
+       public float getLinDepth () {
+               return gdxBulletJNI.btSliderConstraint_getLinDepth(swigCPtr, this);
+       }
 
-  public float getLinDepth() {
-    return gdxBulletJNI.btSliderConstraint_getLinDepth(swigCPtr, this);
-  }
+       public boolean getSolveAngLimit () {
+               return gdxBulletJNI.btSliderConstraint_getSolveAngLimit(swigCPtr, this);
+       }
 
-  public boolean getSolveAngLimit() {
-    return gdxBulletJNI.btSliderConstraint_getSolveAngLimit(swigCPtr, this);
-  }
+       public float getAngDepth () {
+               return gdxBulletJNI.btSliderConstraint_getAngDepth(swigCPtr, this);
+       }
 
-  public float getAngDepth() {
-    return gdxBulletJNI.btSliderConstraint_getAngDepth(swigCPtr, this);
-  }
-
-  public void calculateTransforms(btTransform transA, btTransform transB) {
-    gdxBulletJNI.btSliderConstraint_calculateTransforms(swigCPtr, this, btTransform.getCPtr(transA), transA, btTransform.getCPtr(transB), transB);
-  }
-
-  public void testLinLimits() {
-    gdxBulletJNI.btSliderConstraint_testLinLimits(swigCPtr, this);
-  }
-
-  public void testAngLimits() {
-    gdxBulletJNI.btSliderConstraint_testAngLimits(swigCPtr, this);
-  }
-
-  public Vector3 getAncorInA() {
-       return gdxBulletJNI.btSliderConstraint_getAncorInA(swigCPtr, this);
-}
-
-  public Vector3 getAncorInB() {
-       return gdxBulletJNI.btSliderConstraint_getAncorInB(swigCPtr, this);
-}
-
-  public boolean getUseFrameOffset() {
-    return gdxBulletJNI.btSliderConstraint_getUseFrameOffset(swigCPtr, this);
-  }
-
-  public void setUseFrameOffset(boolean frameOffsetOnOff) {
-    gdxBulletJNI.btSliderConstraint_setUseFrameOffset(swigCPtr, this, frameOffsetOnOff);
-  }
-
-  public void setFrames(btTransform frameA, btTransform frameB) {
-    gdxBulletJNI.btSliderConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA, btTransform.getCPtr(frameB), frameB);
-  }
-
-  public void setParam(int num, float value, int axis) {
-    gdxBulletJNI.btSliderConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
-  }
-
-  public void setParam(int num, float value) {
-    gdxBulletJNI.btSliderConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
-  }
-
-  public float getParam(int num, int axis) {
-    return gdxBulletJNI.btSliderConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
-  }
-
-  public float getParam(int num) {
-    return gdxBulletJNI.btSliderConstraint_getParam__SWIG_1(swigCPtr, this, num);
-  }
+       public void calculateTransforms (btTransform transA, btTransform transB) {
+               gdxBulletJNI.btSliderConstraint_calculateTransforms(swigCPtr, this, btTransform.getCPtr(transA), transA,
+                       btTransform.getCPtr(transB), transB);
+       }
+
+       public void testLinLimits () {
+               gdxBulletJNI.btSliderConstraint_testLinLimits(swigCPtr, this);
+       }
+
+       public void testAngLimits () {
+               gdxBulletJNI.btSliderConstraint_testAngLimits(swigCPtr, this);
+       }
+
+       public Vector3 getAncorInA () {
+               return gdxBulletJNI.btSliderConstraint_getAncorInA(swigCPtr, this);
+       }
+
+       public Vector3 getAncorInB () {
+               return gdxBulletJNI.btSliderConstraint_getAncorInB(swigCPtr, this);
+       }
+
+       public boolean getUseFrameOffset () {
+               return gdxBulletJNI.btSliderConstraint_getUseFrameOffset(swigCPtr, this);
+       }
+
+       public void setUseFrameOffset (boolean frameOffsetOnOff) {
+               gdxBulletJNI.btSliderConstraint_setUseFrameOffset(swigCPtr, this, frameOffsetOnOff);
+       }
+
+       public void setFrames (btTransform frameA, btTransform frameB) {
+               gdxBulletJNI.btSliderConstraint_setFrames(swigCPtr, this, btTransform.getCPtr(frameA), frameA, btTransform.getCPtr(frameB),
+                       frameB);
+       }
+
+       public void setParam (int num, float value, int axis) {
+               gdxBulletJNI.btSliderConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
+       }
+
+       public void setParam (int num, float value) {
+               gdxBulletJNI.btSliderConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
+       }
+
+       public float getParam (int num, int axis) {
+               return gdxBulletJNI.btSliderConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
+       }
+
+       public float getParam (int num) {
+               return gdxBulletJNI.btSliderConstraint_getParam__SWIG_1(swigCPtr, this, num);
+       }
 
 }
index c0185da..9b452cc 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSliderConstraintData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btSliderConstraintData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSliderConstraintData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSliderConstraintData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_typeConstraintData(btTypedConstraintData value) {
-    gdxBulletJNI.btSliderConstraintData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
-  }
-
-  public btTypedConstraintData getM_typeConstraintData() {
-    long cPtr = gdxBulletJNI.btSliderConstraintData_m_typeConstraintData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
-  }
-
-  public void setM_rbAFrame(btTransformFloatData value) {
-    gdxBulletJNI.btSliderConstraintData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbAFrame() {
-    long cPtr = gdxBulletJNI.btSliderConstraintData_m_rbAFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_rbBFrame(btTransformFloatData value) {
-    gdxBulletJNI.btSliderConstraintData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
-  }
-
-  public btTransformFloatData getM_rbBFrame() {
-    long cPtr = gdxBulletJNI.btSliderConstraintData_m_rbBFrame_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
-  }
-
-  public void setM_linearUpperLimit(float value) {
-    gdxBulletJNI.btSliderConstraintData_m_linearUpperLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_linearUpperLimit() {
-    return gdxBulletJNI.btSliderConstraintData_m_linearUpperLimit_get(swigCPtr, this);
-  }
-
-  public void setM_linearLowerLimit(float value) {
-    gdxBulletJNI.btSliderConstraintData_m_linearLowerLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_linearLowerLimit() {
-    return gdxBulletJNI.btSliderConstraintData_m_linearLowerLimit_get(swigCPtr, this);
-  }
-
-  public void setM_angularUpperLimit(float value) {
-    gdxBulletJNI.btSliderConstraintData_m_angularUpperLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_angularUpperLimit() {
-    return gdxBulletJNI.btSliderConstraintData_m_angularUpperLimit_get(swigCPtr, this);
-  }
-
-  public void setM_angularLowerLimit(float value) {
-    gdxBulletJNI.btSliderConstraintData_m_angularLowerLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_angularLowerLimit() {
-    return gdxBulletJNI.btSliderConstraintData_m_angularLowerLimit_get(swigCPtr, this);
-  }
-
-  public void setM_useLinearReferenceFrameA(int value) {
-    gdxBulletJNI.btSliderConstraintData_m_useLinearReferenceFrameA_set(swigCPtr, this, value);
-  }
-
-  public int getM_useLinearReferenceFrameA() {
-    return gdxBulletJNI.btSliderConstraintData_m_useLinearReferenceFrameA_get(swigCPtr, this);
-  }
-
-  public void setM_useOffsetForConstraintFrame(int value) {
-    gdxBulletJNI.btSliderConstraintData_m_useOffsetForConstraintFrame_set(swigCPtr, this, value);
-  }
-
-  public int getM_useOffsetForConstraintFrame() {
-    return gdxBulletJNI.btSliderConstraintData_m_useOffsetForConstraintFrame_get(swigCPtr, this);
-  }
-
-  public btSliderConstraintData() {
-    this(gdxBulletJNI.new_btSliderConstraintData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btSliderConstraintData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSliderConstraintData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSliderConstraintData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_typeConstraintData (btTypedConstraintData value) {
+               gdxBulletJNI.btSliderConstraintData_m_typeConstraintData_set(swigCPtr, this, btTypedConstraintData.getCPtr(value), value);
+       }
+
+       public btTypedConstraintData getM_typeConstraintData () {
+               long cPtr = gdxBulletJNI.btSliderConstraintData_m_typeConstraintData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTypedConstraintData(cPtr, false);
+       }
+
+       public void setM_rbAFrame (btTransformFloatData value) {
+               gdxBulletJNI.btSliderConstraintData_m_rbAFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbAFrame () {
+               long cPtr = gdxBulletJNI.btSliderConstraintData_m_rbAFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_rbBFrame (btTransformFloatData value) {
+               gdxBulletJNI.btSliderConstraintData_m_rbBFrame_set(swigCPtr, this, btTransformFloatData.getCPtr(value), value);
+       }
+
+       public btTransformFloatData getM_rbBFrame () {
+               long cPtr = gdxBulletJNI.btSliderConstraintData_m_rbBFrame_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransformFloatData(cPtr, false);
+       }
+
+       public void setM_linearUpperLimit (float value) {
+               gdxBulletJNI.btSliderConstraintData_m_linearUpperLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_linearUpperLimit () {
+               return gdxBulletJNI.btSliderConstraintData_m_linearUpperLimit_get(swigCPtr, this);
+       }
+
+       public void setM_linearLowerLimit (float value) {
+               gdxBulletJNI.btSliderConstraintData_m_linearLowerLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_linearLowerLimit () {
+               return gdxBulletJNI.btSliderConstraintData_m_linearLowerLimit_get(swigCPtr, this);
+       }
+
+       public void setM_angularUpperLimit (float value) {
+               gdxBulletJNI.btSliderConstraintData_m_angularUpperLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_angularUpperLimit () {
+               return gdxBulletJNI.btSliderConstraintData_m_angularUpperLimit_get(swigCPtr, this);
+       }
+
+       public void setM_angularLowerLimit (float value) {
+               gdxBulletJNI.btSliderConstraintData_m_angularLowerLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_angularLowerLimit () {
+               return gdxBulletJNI.btSliderConstraintData_m_angularLowerLimit_get(swigCPtr, this);
+       }
+
+       public void setM_useLinearReferenceFrameA (int value) {
+               gdxBulletJNI.btSliderConstraintData_m_useLinearReferenceFrameA_set(swigCPtr, this, value);
+       }
+
+       public int getM_useLinearReferenceFrameA () {
+               return gdxBulletJNI.btSliderConstraintData_m_useLinearReferenceFrameA_get(swigCPtr, this);
+       }
+
+       public void setM_useOffsetForConstraintFrame (int value) {
+               gdxBulletJNI.btSliderConstraintData_m_useOffsetForConstraintFrame_set(swigCPtr, this, value);
+       }
+
+       public int getM_useOffsetForConstraintFrame () {
+               return gdxBulletJNI.btSliderConstraintData_m_useOffsetForConstraintFrame_get(swigCPtr, this);
+       }
+
+       public btSliderConstraintData () {
+               this(gdxBulletJNI.new_btSliderConstraintData(), true);
+       }
 
 }
index 8b3600f..1c80494 100644 (file)
@@ -9,17 +9,16 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btSliderFlags {
-  public final static int BT_SLIDER_FLAGS_CFM_DIRLIN = (1 << 0);
-  public final static int BT_SLIDER_FLAGS_ERP_DIRLIN = (1 << 1);
-  public final static int BT_SLIDER_FLAGS_CFM_DIRANG = (1 << 2);
-  public final static int BT_SLIDER_FLAGS_ERP_DIRANG = (1 << 3);
-  public final static int BT_SLIDER_FLAGS_CFM_ORTLIN = (1 << 4);
-  public final static int BT_SLIDER_FLAGS_ERP_ORTLIN = (1 << 5);
-  public final static int BT_SLIDER_FLAGS_CFM_ORTANG = (1 << 6);
-  public final static int BT_SLIDER_FLAGS_ERP_ORTANG = (1 << 7);
-  public final static int BT_SLIDER_FLAGS_CFM_LIMLIN = (1 << 8);
-  public final static int BT_SLIDER_FLAGS_ERP_LIMLIN = (1 << 9);
-  public final static int BT_SLIDER_FLAGS_CFM_LIMANG = (1 << 10);
-  public final static int BT_SLIDER_FLAGS_ERP_LIMANG = (1 << 11);
+       public final static int BT_SLIDER_FLAGS_CFM_DIRLIN = (1 << 0);
+       public final static int BT_SLIDER_FLAGS_ERP_DIRLIN = (1 << 1);
+       public final static int BT_SLIDER_FLAGS_CFM_DIRANG = (1 << 2);
+       public final static int BT_SLIDER_FLAGS_ERP_DIRANG = (1 << 3);
+       public final static int BT_SLIDER_FLAGS_CFM_ORTLIN = (1 << 4);
+       public final static int BT_SLIDER_FLAGS_ERP_ORTLIN = (1 << 5);
+       public final static int BT_SLIDER_FLAGS_CFM_ORTANG = (1 << 6);
+       public final static int BT_SLIDER_FLAGS_ERP_ORTANG = (1 << 7);
+       public final static int BT_SLIDER_FLAGS_CFM_LIMLIN = (1 << 8);
+       public final static int BT_SLIDER_FLAGS_ERP_LIMLIN = (1 << 9);
+       public final static int BT_SLIDER_FLAGS_CFM_LIMANG = (1 << 10);
+       public final static int BT_SLIDER_FLAGS_ERP_LIMANG = (1 << 11);
 }
-
index 5638dc3..0976b38 100644 (file)
@@ -8,47 +8,58 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
 import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Vector3;
 
 public class btSolve2LinearConstraint {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btSolve2LinearConstraint(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSolve2LinearConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSolve2LinearConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btSolve2LinearConstraint(float tau, float damping) {
-    this(gdxBulletJNI.new_btSolve2LinearConstraint(tau, damping), true);
-  }
-
-  public void resolveUnilateralPairConstraint(btRigidBody body0, btRigidBody body1, Matrix3 world2A, Matrix3 world2B, Vector3 invInertiaADiag, float invMassA, Vector3 linvelA, Vector3 angvelA, Vector3 rel_posA1, Vector3 invInertiaBDiag, float invMassB, Vector3 linvelB, Vector3 angvelB, Vector3 rel_posA2, float depthA, Vector3 normalA, Vector3 rel_posB1, Vector3 rel_posB2, float depthB, Vector3 normalB, SWIGTYPE_p_float imp0, SWIGTYPE_p_float imp1) {
-    gdxBulletJNI.btSolve2LinearConstraint_resolveUnilateralPairConstraint(swigCPtr, this, btRigidBody.getCPtr(body0), body0, btRigidBody.getCPtr(body1), body1, world2A, world2B, invInertiaADiag, invMassA, linvelA, angvelA, rel_posA1, invInertiaBDiag, invMassB, linvelB, angvelB, rel_posA2, depthA, normalA, rel_posB1, rel_posB2, depthB, normalB, SWIGTYPE_p_float.getCPtr(imp0), SWIGTYPE_p_float.getCPtr(imp1));
-  }
-
-  public void resolveBilateralPairConstraint(btRigidBody body0, btRigidBody body1, Matrix3 world2A, Matrix3 world2B, Vector3 invInertiaADiag, float invMassA, Vector3 linvelA, Vector3 angvelA, Vector3 rel_posA1, Vector3 invInertiaBDiag, float invMassB, Vector3 linvelB, Vector3 angvelB, Vector3 rel_posA2, float depthA, Vector3 normalA, Vector3 rel_posB1, Vector3 rel_posB2, float depthB, Vector3 normalB, SWIGTYPE_p_float imp0, SWIGTYPE_p_float imp1) {
-    gdxBulletJNI.btSolve2LinearConstraint_resolveBilateralPairConstraint(swigCPtr, this, btRigidBody.getCPtr(body0), body0, btRigidBody.getCPtr(body1), body1, world2A, world2B, invInertiaADiag, invMassA, linvelA, angvelA, rel_posA1, invInertiaBDiag, invMassB, linvelB, angvelB, rel_posA2, depthA, normalA, rel_posB1, rel_posB2, depthB, normalB, SWIGTYPE_p_float.getCPtr(imp0), SWIGTYPE_p_float.getCPtr(imp1));
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btSolve2LinearConstraint (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSolve2LinearConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSolve2LinearConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btSolve2LinearConstraint (float tau, float damping) {
+               this(gdxBulletJNI.new_btSolve2LinearConstraint(tau, damping), true);
+       }
+
+       public void resolveUnilateralPairConstraint (btRigidBody body0, btRigidBody body1, Matrix3 world2A, Matrix3 world2B,
+               Vector3 invInertiaADiag, float invMassA, Vector3 linvelA, Vector3 angvelA, Vector3 rel_posA1, Vector3 invInertiaBDiag,
+               float invMassB, Vector3 linvelB, Vector3 angvelB, Vector3 rel_posA2, float depthA, Vector3 normalA, Vector3 rel_posB1,
+               Vector3 rel_posB2, float depthB, Vector3 normalB, SWIGTYPE_p_float imp0, SWIGTYPE_p_float imp1) {
+               gdxBulletJNI.btSolve2LinearConstraint_resolveUnilateralPairConstraint(swigCPtr, this, btRigidBody.getCPtr(body0), body0,
+                       btRigidBody.getCPtr(body1), body1, world2A, world2B, invInertiaADiag, invMassA, linvelA, angvelA, rel_posA1,
+                       invInertiaBDiag, invMassB, linvelB, angvelB, rel_posA2, depthA, normalA, rel_posB1, rel_posB2, depthB, normalB,
+                       SWIGTYPE_p_float.getCPtr(imp0), SWIGTYPE_p_float.getCPtr(imp1));
+       }
+
+       public void resolveBilateralPairConstraint (btRigidBody body0, btRigidBody body1, Matrix3 world2A, Matrix3 world2B,
+               Vector3 invInertiaADiag, float invMassA, Vector3 linvelA, Vector3 angvelA, Vector3 rel_posA1, Vector3 invInertiaBDiag,
+               float invMassB, Vector3 linvelB, Vector3 angvelB, Vector3 rel_posA2, float depthA, Vector3 normalA, Vector3 rel_posB1,
+               Vector3 rel_posB2, float depthB, Vector3 normalB, SWIGTYPE_p_float imp0, SWIGTYPE_p_float imp1) {
+               gdxBulletJNI.btSolve2LinearConstraint_resolveBilateralPairConstraint(swigCPtr, this, btRigidBody.getCPtr(body0), body0,
+                       btRigidBody.getCPtr(body1), body1, world2A, world2B, invInertiaADiag, invMassA, linvelA, angvelA, rel_posA1,
+                       invInertiaBDiag, invMassB, linvelB, angvelB, rel_posA2, depthA, normalA, rel_posB1, rel_posB2, depthB, normalB,
+                       SWIGTYPE_p_float.getCPtr(imp0), SWIGTYPE_p_float.getCPtr(imp1));
+       }
 
 }
index dad9965..b7e0d18 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btSolverBodyObsolete {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btSolverBodyObsolete(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSolverBodyObsolete obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSolverBodyObsolete(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_deltaLinearVelocity(btVector3 value) {
-    gdxBulletJNI.btSolverBodyObsolete_m_deltaLinearVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_deltaLinearVelocity() {
-    long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_deltaLinearVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_deltaAngularVelocity(btVector3 value) {
-    gdxBulletJNI.btSolverBodyObsolete_m_deltaAngularVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_deltaAngularVelocity() {
-    long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_deltaAngularVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_angularFactor(btVector3 value) {
-    gdxBulletJNI.btSolverBodyObsolete_m_angularFactor_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_angularFactor() {
-    long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_angularFactor_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_invMass(btVector3 value) {
-    gdxBulletJNI.btSolverBodyObsolete_m_invMass_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_invMass() {
-    long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_invMass_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_originalBody(btRigidBody value) {
-    gdxBulletJNI.btSolverBodyObsolete_m_originalBody_set(swigCPtr, this, btRigidBody.getCPtr(value), value);
-  }
-
-  public btRigidBody getM_originalBody() {
-    long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_originalBody_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btRigidBody(cPtr, false);
-  }
-
-  public void setM_pushVelocity(btVector3 value) {
-    gdxBulletJNI.btSolverBodyObsolete_m_pushVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_pushVelocity() {
-    long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_pushVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_turnVelocity(btVector3 value) {
-    gdxBulletJNI.btSolverBodyObsolete_m_turnVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_turnVelocity() {
-    long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_turnVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void getVelocityInLocalPointObsolete(Vector3 rel_pos, Vector3 velocity) {
-    gdxBulletJNI.btSolverBodyObsolete_getVelocityInLocalPointObsolete(swigCPtr, this, rel_pos, velocity);
-  }
-
-  public void getAngularVelocity(Vector3 angVel) {
-    gdxBulletJNI.btSolverBodyObsolete_getAngularVelocity(swigCPtr, this, angVel);
-  }
-
-  public void applyImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
-    gdxBulletJNI.btSolverBodyObsolete_applyImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
-  }
-
-  public void internalApplyPushImpulse(Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
-    gdxBulletJNI.btSolverBodyObsolete_internalApplyPushImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
-  }
-
-  public void writebackVelocity() {
-    gdxBulletJNI.btSolverBodyObsolete_writebackVelocity__SWIG_0(swigCPtr, this);
-  }
-
-  public void writebackVelocity(float timeStep) {
-    gdxBulletJNI.btSolverBodyObsolete_writebackVelocity__SWIG_1(swigCPtr, this, timeStep);
-  }
-
-  public btSolverBodyObsolete() {
-    this(gdxBulletJNI.new_btSolverBodyObsolete(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btSolverBodyObsolete (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSolverBodyObsolete obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSolverBodyObsolete(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_deltaLinearVelocity (btVector3 value) {
+               gdxBulletJNI.btSolverBodyObsolete_m_deltaLinearVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_deltaLinearVelocity () {
+               long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_deltaLinearVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_deltaAngularVelocity (btVector3 value) {
+               gdxBulletJNI.btSolverBodyObsolete_m_deltaAngularVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_deltaAngularVelocity () {
+               long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_deltaAngularVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_angularFactor (btVector3 value) {
+               gdxBulletJNI.btSolverBodyObsolete_m_angularFactor_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_angularFactor () {
+               long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_angularFactor_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_invMass (btVector3 value) {
+               gdxBulletJNI.btSolverBodyObsolete_m_invMass_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_invMass () {
+               long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_invMass_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_originalBody (btRigidBody value) {
+               gdxBulletJNI.btSolverBodyObsolete_m_originalBody_set(swigCPtr, this, btRigidBody.getCPtr(value), value);
+       }
+
+       public btRigidBody getM_originalBody () {
+               long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_originalBody_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btRigidBody(cPtr, false);
+       }
+
+       public void setM_pushVelocity (btVector3 value) {
+               gdxBulletJNI.btSolverBodyObsolete_m_pushVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_pushVelocity () {
+               long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_pushVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_turnVelocity (btVector3 value) {
+               gdxBulletJNI.btSolverBodyObsolete_m_turnVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_turnVelocity () {
+               long cPtr = gdxBulletJNI.btSolverBodyObsolete_m_turnVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void getVelocityInLocalPointObsolete (Vector3 rel_pos, Vector3 velocity) {
+               gdxBulletJNI.btSolverBodyObsolete_getVelocityInLocalPointObsolete(swigCPtr, this, rel_pos, velocity);
+       }
+
+       public void getAngularVelocity (Vector3 angVel) {
+               gdxBulletJNI.btSolverBodyObsolete_getAngularVelocity(swigCPtr, this, angVel);
+       }
+
+       public void applyImpulse (Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
+               gdxBulletJNI.btSolverBodyObsolete_applyImpulse(swigCPtr, this, linearComponent, angularComponent, impulseMagnitude);
+       }
+
+       public void internalApplyPushImpulse (Vector3 linearComponent, Vector3 angularComponent, float impulseMagnitude) {
+               gdxBulletJNI.btSolverBodyObsolete_internalApplyPushImpulse(swigCPtr, this, linearComponent, angularComponent,
+                       impulseMagnitude);
+       }
+
+       public void writebackVelocity () {
+               gdxBulletJNI.btSolverBodyObsolete_writebackVelocity__SWIG_0(swigCPtr, this);
+       }
+
+       public void writebackVelocity (float timeStep) {
+               gdxBulletJNI.btSolverBodyObsolete_writebackVelocity__SWIG_1(swigCPtr, this, timeStep);
+       }
+
+       public btSolverBodyObsolete () {
+               this(gdxBulletJNI.new_btSolverBodyObsolete(), true);
+       }
 
 }
index 6dda840..055f4a3 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSolverConstraint {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btSolverConstraint(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSolverConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSolverConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_relpos1CrossNormal(btVector3 value) {
-    gdxBulletJNI.btSolverConstraint_m_relpos1CrossNormal_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_relpos1CrossNormal() {
-    long cPtr = gdxBulletJNI.btSolverConstraint_m_relpos1CrossNormal_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_contactNormal(btVector3 value) {
-    gdxBulletJNI.btSolverConstraint_m_contactNormal_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_contactNormal() {
-    long cPtr = gdxBulletJNI.btSolverConstraint_m_contactNormal_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_relpos2CrossNormal(btVector3 value) {
-    gdxBulletJNI.btSolverConstraint_m_relpos2CrossNormal_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_relpos2CrossNormal() {
-    long cPtr = gdxBulletJNI.btSolverConstraint_m_relpos2CrossNormal_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_angularComponentA(btVector3 value) {
-    gdxBulletJNI.btSolverConstraint_m_angularComponentA_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_angularComponentA() {
-    long cPtr = gdxBulletJNI.btSolverConstraint_m_angularComponentA_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_angularComponentB(btVector3 value) {
-    gdxBulletJNI.btSolverConstraint_m_angularComponentB_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_angularComponentB() {
-    long cPtr = gdxBulletJNI.btSolverConstraint_m_angularComponentB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_appliedPushImpulse(float value) {
-    gdxBulletJNI.btSolverConstraint_m_appliedPushImpulse_set(swigCPtr, this, value);
-  }
-
-  public float getM_appliedPushImpulse() {
-    return gdxBulletJNI.btSolverConstraint_m_appliedPushImpulse_get(swigCPtr, this);
-  }
-
-  public void setM_appliedImpulse(float value) {
-    gdxBulletJNI.btSolverConstraint_m_appliedImpulse_set(swigCPtr, this, value);
-  }
-
-  public float getM_appliedImpulse() {
-    return gdxBulletJNI.btSolverConstraint_m_appliedImpulse_get(swigCPtr, this);
-  }
-
-  public void setM_friction(float value) {
-    gdxBulletJNI.btSolverConstraint_m_friction_set(swigCPtr, this, value);
-  }
-
-  public float getM_friction() {
-    return gdxBulletJNI.btSolverConstraint_m_friction_get(swigCPtr, this);
-  }
-
-  public void setM_jacDiagABInv(float value) {
-    gdxBulletJNI.btSolverConstraint_m_jacDiagABInv_set(swigCPtr, this, value);
-  }
-
-  public float getM_jacDiagABInv() {
-    return gdxBulletJNI.btSolverConstraint_m_jacDiagABInv_get(swigCPtr, this);
-  }
-
-  public void setM_overrideNumSolverIterations(int value) {
-    gdxBulletJNI.btSolverConstraint_m_overrideNumSolverIterations_set(swigCPtr, this, value);
-  }
-
-  public int getM_overrideNumSolverIterations() {
-    return gdxBulletJNI.btSolverConstraint_m_overrideNumSolverIterations_get(swigCPtr, this);
-  }
-
-  public void setM_rhs(float value) {
-    gdxBulletJNI.btSolverConstraint_m_rhs_set(swigCPtr, this, value);
-  }
-
-  public float getM_rhs() {
-    return gdxBulletJNI.btSolverConstraint_m_rhs_get(swigCPtr, this);
-  }
-
-  public void setM_cfm(float value) {
-    gdxBulletJNI.btSolverConstraint_m_cfm_set(swigCPtr, this, value);
-  }
-
-  public float getM_cfm() {
-    return gdxBulletJNI.btSolverConstraint_m_cfm_get(swigCPtr, this);
-  }
-
-  public void setM_lowerLimit(float value) {
-    gdxBulletJNI.btSolverConstraint_m_lowerLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_lowerLimit() {
-    return gdxBulletJNI.btSolverConstraint_m_lowerLimit_get(swigCPtr, this);
-  }
-
-  public void setM_upperLimit(float value) {
-    gdxBulletJNI.btSolverConstraint_m_upperLimit_set(swigCPtr, this, value);
-  }
-
-  public float getM_upperLimit() {
-    return gdxBulletJNI.btSolverConstraint_m_upperLimit_get(swigCPtr, this);
-  }
-
-  public void setM_rhsPenetration(float value) {
-    gdxBulletJNI.btSolverConstraint_m_rhsPenetration_set(swigCPtr, this, value);
-  }
-
-  public float getM_rhsPenetration() {
-    return gdxBulletJNI.btSolverConstraint_m_rhsPenetration_get(swigCPtr, this);
-  }
-
-  public btSolverConstraint() {
-    this(gdxBulletJNI.new_btSolverConstraint(), true);
-  }
-
-  public final static class btSolverConstraintType {
-    public final static int BT_SOLVER_CONTACT_1D = 0;
-    public final static int BT_SOLVER_FRICTION_1D = BT_SOLVER_CONTACT_1D + 1;
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btSolverConstraint (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSolverConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSolverConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_relpos1CrossNormal (btVector3 value) {
+               gdxBulletJNI.btSolverConstraint_m_relpos1CrossNormal_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_relpos1CrossNormal () {
+               long cPtr = gdxBulletJNI.btSolverConstraint_m_relpos1CrossNormal_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_contactNormal (btVector3 value) {
+               gdxBulletJNI.btSolverConstraint_m_contactNormal_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_contactNormal () {
+               long cPtr = gdxBulletJNI.btSolverConstraint_m_contactNormal_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_relpos2CrossNormal (btVector3 value) {
+               gdxBulletJNI.btSolverConstraint_m_relpos2CrossNormal_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_relpos2CrossNormal () {
+               long cPtr = gdxBulletJNI.btSolverConstraint_m_relpos2CrossNormal_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_angularComponentA (btVector3 value) {
+               gdxBulletJNI.btSolverConstraint_m_angularComponentA_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_angularComponentA () {
+               long cPtr = gdxBulletJNI.btSolverConstraint_m_angularComponentA_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_angularComponentB (btVector3 value) {
+               gdxBulletJNI.btSolverConstraint_m_angularComponentB_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_angularComponentB () {
+               long cPtr = gdxBulletJNI.btSolverConstraint_m_angularComponentB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_appliedPushImpulse (float value) {
+               gdxBulletJNI.btSolverConstraint_m_appliedPushImpulse_set(swigCPtr, this, value);
+       }
+
+       public float getM_appliedPushImpulse () {
+               return gdxBulletJNI.btSolverConstraint_m_appliedPushImpulse_get(swigCPtr, this);
+       }
+
+       public void setM_appliedImpulse (float value) {
+               gdxBulletJNI.btSolverConstraint_m_appliedImpulse_set(swigCPtr, this, value);
+       }
+
+       public float getM_appliedImpulse () {
+               return gdxBulletJNI.btSolverConstraint_m_appliedImpulse_get(swigCPtr, this);
+       }
+
+       public void setM_friction (float value) {
+               gdxBulletJNI.btSolverConstraint_m_friction_set(swigCPtr, this, value);
+       }
+
+       public float getM_friction () {
+               return gdxBulletJNI.btSolverConstraint_m_friction_get(swigCPtr, this);
+       }
+
+       public void setM_jacDiagABInv (float value) {
+               gdxBulletJNI.btSolverConstraint_m_jacDiagABInv_set(swigCPtr, this, value);
+       }
+
+       public float getM_jacDiagABInv () {
+               return gdxBulletJNI.btSolverConstraint_m_jacDiagABInv_get(swigCPtr, this);
+       }
+
+       public void setM_overrideNumSolverIterations (int value) {
+               gdxBulletJNI.btSolverConstraint_m_overrideNumSolverIterations_set(swigCPtr, this, value);
+       }
+
+       public int getM_overrideNumSolverIterations () {
+               return gdxBulletJNI.btSolverConstraint_m_overrideNumSolverIterations_get(swigCPtr, this);
+       }
+
+       public void setM_rhs (float value) {
+               gdxBulletJNI.btSolverConstraint_m_rhs_set(swigCPtr, this, value);
+       }
+
+       public float getM_rhs () {
+               return gdxBulletJNI.btSolverConstraint_m_rhs_get(swigCPtr, this);
+       }
+
+       public void setM_cfm (float value) {
+               gdxBulletJNI.btSolverConstraint_m_cfm_set(swigCPtr, this, value);
+       }
+
+       public float getM_cfm () {
+               return gdxBulletJNI.btSolverConstraint_m_cfm_get(swigCPtr, this);
+       }
+
+       public void setM_lowerLimit (float value) {
+               gdxBulletJNI.btSolverConstraint_m_lowerLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_lowerLimit () {
+               return gdxBulletJNI.btSolverConstraint_m_lowerLimit_get(swigCPtr, this);
+       }
+
+       public void setM_upperLimit (float value) {
+               gdxBulletJNI.btSolverConstraint_m_upperLimit_set(swigCPtr, this, value);
+       }
+
+       public float getM_upperLimit () {
+               return gdxBulletJNI.btSolverConstraint_m_upperLimit_get(swigCPtr, this);
+       }
+
+       public void setM_rhsPenetration (float value) {
+               gdxBulletJNI.btSolverConstraint_m_rhsPenetration_set(swigCPtr, this, value);
+       }
+
+       public float getM_rhsPenetration () {
+               return gdxBulletJNI.btSolverConstraint_m_rhsPenetration_get(swigCPtr, this);
+       }
+
+       public btSolverConstraint () {
+               this(gdxBulletJNI.new_btSolverConstraint(), true);
+       }
+
+       public final static class btSolverConstraintType {
+               public final static int BT_SOLVER_CONTACT_1D = 0;
+               public final static int BT_SOLVER_FRICTION_1D = BT_SOLVER_CONTACT_1D + 1;
+       }
 
 }
index 3aafe21..aab20f8 100644 (file)
@@ -9,15 +9,14 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btSolverMode {
-  public final static int SOLVER_RANDMIZE_ORDER = 1;
-  public final static int SOLVER_FRICTION_SEPARATE = 2;
-  public final static int SOLVER_USE_WARMSTARTING = 4;
-  public final static int SOLVER_USE_FRICTION_WARMSTARTING = 8;
-  public final static int SOLVER_USE_2_FRICTION_DIRECTIONS = 16;
-  public final static int SOLVER_ENABLE_FRICTION_DIRECTION_CACHING = 32;
-  public final static int SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION = 64;
-  public final static int SOLVER_CACHE_FRIENDLY = 128;
-  public final static int SOLVER_SIMD = 256;
-  public final static int SOLVER_CUDA = 512;
+       public final static int SOLVER_RANDMIZE_ORDER = 1;
+       public final static int SOLVER_FRICTION_SEPARATE = 2;
+       public final static int SOLVER_USE_WARMSTARTING = 4;
+       public final static int SOLVER_USE_FRICTION_WARMSTARTING = 8;
+       public final static int SOLVER_USE_2_FRICTION_DIRECTIONS = 16;
+       public final static int SOLVER_ENABLE_FRICTION_DIRECTION_CACHING = 32;
+       public final static int SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION = 64;
+       public final static int SOLVER_CACHE_FRIENDLY = 128;
+       public final static int SOLVER_SIMD = 256;
+       public final static int SOLVER_CUDA = 512;
 }
-
index 74d4663..f0e0d74 100644 (file)
@@ -8,57 +8,55 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSortedOverlappingPairCache extends btOverlappingPairCache {
-  private long swigCPtr;
-
-  protected btSortedOverlappingPairCache(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSortedOverlappingPairCache_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSortedOverlappingPairCache obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSortedOverlappingPairCache(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSortedOverlappingPairCache() {
-    this(gdxBulletJNI.new_btSortedOverlappingPairCache(), true);
-  }
-
-  public boolean needsBroadphaseCollision(btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
-    return gdxBulletJNI.btSortedOverlappingPairCache_needsBroadphaseCollision(swigCPtr, this, btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t getOverlappingPairArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t(gdxBulletJNI.btSortedOverlappingPairCache_getOverlappingPairArray__SWIG_0(swigCPtr, this), false);
-  }
-
-  public btBroadphasePair getOverlappingPairArrayPtr() {
-    long cPtr = gdxBulletJNI.btSortedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
-  }
-
-  public btOverlapFilterCallback getOverlapFilterCallback() {
-    long cPtr = gdxBulletJNI.btSortedOverlappingPairCache_getOverlapFilterCallback(swigCPtr, this);
-    return (cPtr == 0) ? null : new btOverlapFilterCallback(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btSortedOverlappingPairCache (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSortedOverlappingPairCache_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSortedOverlappingPairCache obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSortedOverlappingPairCache(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSortedOverlappingPairCache () {
+               this(gdxBulletJNI.new_btSortedOverlappingPairCache(), true);
+       }
+
+       public boolean needsBroadphaseCollision (btBroadphaseProxy proxy0, btBroadphaseProxy proxy1) {
+               return gdxBulletJNI.btSortedOverlappingPairCache_needsBroadphaseCollision(swigCPtr, this,
+                       btBroadphaseProxy.getCPtr(proxy0), proxy0, btBroadphaseProxy.getCPtr(proxy1), proxy1);
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t getOverlappingPairArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btBroadphasePair_t(
+                       gdxBulletJNI.btSortedOverlappingPairCache_getOverlappingPairArray__SWIG_0(swigCPtr, this), false);
+       }
+
+       public btBroadphasePair getOverlappingPairArrayPtr () {
+               long cPtr = gdxBulletJNI.btSortedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBroadphasePair(cPtr, false);
+       }
+
+       public btOverlapFilterCallback getOverlapFilterCallback () {
+               long cPtr = gdxBulletJNI.btSortedOverlappingPairCache_getOverlapFilterCallback(swigCPtr, this);
+               return (cPtr == 0) ? null : new btOverlapFilterCallback(cPtr, false);
+       }
 
 }
index 403a9f7..0196733 100644 (file)
@@ -9,46 +9,51 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btSphereBoxCollisionAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btSphereBoxCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSphereBoxCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSphereBoxCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSphereBoxCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSphereBoxCollisionAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject col0, btCollisionObject col1, boolean isSwapped) {
-    this(gdxBulletJNI.new_btSphereBoxCollisionAlgorithm(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(col0), col0, btCollisionObject.getCPtr(col1), col1, isSwapped), true);
-  }
-
-  public float getSphereDistance(btCollisionObject boxObj, Vector3 v3PointOnBox, Vector3 v3PointOnSphere, Vector3 v3SphereCenter, float fRadius) {
-    return gdxBulletJNI.btSphereBoxCollisionAlgorithm_getSphereDistance(swigCPtr, this, btCollisionObject.getCPtr(boxObj), boxObj, v3PointOnBox, v3PointOnSphere, v3SphereCenter, fRadius);
-  }
-
-  public float getSpherePenetration(btCollisionObject boxObj, Vector3 v3PointOnBox, Vector3 v3PointOnSphere, Vector3 v3SphereCenter, float fRadius, Vector3 aabbMin, Vector3 aabbMax) {
-    return gdxBulletJNI.btSphereBoxCollisionAlgorithm_getSpherePenetration(swigCPtr, this, btCollisionObject.getCPtr(boxObj), boxObj, v3PointOnBox, v3PointOnSphere, v3SphereCenter, fRadius, aabbMin, aabbMax);
-  }
+       private long swigCPtr;
+
+       protected btSphereBoxCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSphereBoxCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSphereBoxCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSphereBoxCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSphereBoxCollisionAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci,
+               btCollisionObject col0, btCollisionObject col1, boolean isSwapped) {
+               this(gdxBulletJNI.new_btSphereBoxCollisionAlgorithm(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(col0), col0,
+                       btCollisionObject.getCPtr(col1), col1, isSwapped), true);
+       }
+
+       public float getSphereDistance (btCollisionObject boxObj, Vector3 v3PointOnBox, Vector3 v3PointOnSphere,
+               Vector3 v3SphereCenter, float fRadius) {
+               return gdxBulletJNI.btSphereBoxCollisionAlgorithm_getSphereDistance(swigCPtr, this, btCollisionObject.getCPtr(boxObj),
+                       boxObj, v3PointOnBox, v3PointOnSphere, v3SphereCenter, fRadius);
+       }
+
+       public float getSpherePenetration (btCollisionObject boxObj, Vector3 v3PointOnBox, Vector3 v3PointOnSphere,
+               Vector3 v3SphereCenter, float fRadius, Vector3 aabbMin, Vector3 aabbMax) {
+               return gdxBulletJNI.btSphereBoxCollisionAlgorithm_getSpherePenetration(swigCPtr, this, btCollisionObject.getCPtr(boxObj),
+                       boxObj, v3PointOnBox, v3PointOnSphere, v3SphereCenter, fRadius, aabbMin, aabbMax);
+       }
 
 }
index f0df5c6..ffe89d0 100644 (file)
@@ -8,47 +8,43 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSphereShape extends btConvexInternalShape {
-  private long swigCPtr;
-
-  protected btSphereShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSphereShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSphereShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSphereShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSphereShape(float radius) {
-    this(gdxBulletJNI.new_btSphereShape(radius), true);
-  }
-
-  public float getRadius() {
-    return gdxBulletJNI.btSphereShape_getRadius(swigCPtr, this);
-  }
-
-  public void setUnscaledRadius(float radius) {
-    gdxBulletJNI.btSphereShape_setUnscaledRadius(swigCPtr, this, radius);
-  }
+       private long swigCPtr;
+
+       protected btSphereShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSphereShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSphereShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSphereShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSphereShape (float radius) {
+               this(gdxBulletJNI.new_btSphereShape(radius), true);
+       }
+
+       public float getRadius () {
+               return gdxBulletJNI.btSphereShape_getRadius(swigCPtr, this);
+       }
+
+       public void setUnscaledRadius (float radius) {
+               gdxBulletJNI.btSphereShape_setUnscaledRadius(swigCPtr, this, radius);
+       }
 
 }
index b86e363..00ff3a2 100644 (file)
@@ -8,43 +8,42 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSphereSphereCollisionAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btSphereSphereCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSphereSphereCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSphereSphereCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSphereSphereCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSphereSphereCollisionAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1) {
-    this(gdxBulletJNI.new_btSphereSphereCollisionAlgorithm__SWIG_0(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1), true);
-  }
-
-  public btSphereSphereCollisionAlgorithm(btCollisionAlgorithmConstructionInfo ci) {
-    this(gdxBulletJNI.new_btSphereSphereCollisionAlgorithm__SWIG_1(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
-  }
+       private long swigCPtr;
+
+       protected btSphereSphereCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSphereSphereCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSphereSphereCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSphereSphereCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSphereSphereCollisionAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci,
+               btCollisionObject body0, btCollisionObject body1) {
+               this(gdxBulletJNI.new_btSphereSphereCollisionAlgorithm__SWIG_0(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1), true);
+       }
+
+       public btSphereSphereCollisionAlgorithm (btCollisionAlgorithmConstructionInfo ci) {
+               this(gdxBulletJNI.new_btSphereSphereCollisionAlgorithm__SWIG_1(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
+       }
 
 }
index 165efcd..7932903 100644 (file)
@@ -8,43 +8,43 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSphereTriangleCollisionAlgorithm extends btActivatingCollisionAlgorithm {
-  private long swigCPtr;
-
-  protected btSphereTriangleCollisionAlgorithm(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSphereTriangleCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSphereTriangleCollisionAlgorithm obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSphereTriangleCollisionAlgorithm(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSphereTriangleCollisionAlgorithm(btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci, btCollisionObject body0, btCollisionObject body1, boolean swapped) {
-    this(gdxBulletJNI.new_btSphereTriangleCollisionAlgorithm__SWIG_0(btPersistentManifold.getCPtr(mf), mf, btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0, btCollisionObject.getCPtr(body1), body1, swapped), true);
-  }
-
-  public btSphereTriangleCollisionAlgorithm(btCollisionAlgorithmConstructionInfo ci) {
-    this(gdxBulletJNI.new_btSphereTriangleCollisionAlgorithm__SWIG_1(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci), true);
-  }
+       private long swigCPtr;
+
+       protected btSphereTriangleCollisionAlgorithm (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSphereTriangleCollisionAlgorithm_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSphereTriangleCollisionAlgorithm obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSphereTriangleCollisionAlgorithm(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSphereTriangleCollisionAlgorithm (btPersistentManifold mf, btCollisionAlgorithmConstructionInfo ci,
+               btCollisionObject body0, btCollisionObject body1, boolean swapped) {
+               this(gdxBulletJNI.new_btSphereTriangleCollisionAlgorithm__SWIG_0(btPersistentManifold.getCPtr(mf), mf,
+                       btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci, btCollisionObject.getCPtr(body0), body0,
+                       btCollisionObject.getCPtr(body1), body1, swapped), true);
+       }
+
+       public btSphereTriangleCollisionAlgorithm (btCollisionAlgorithmConstructionInfo ci) {
+               this(gdxBulletJNI.new_btSphereTriangleCollisionAlgorithm__SWIG_1(btCollisionAlgorithmConstructionInfo.getCPtr(ci), ci),
+                       true);
+       }
 
 }
index 0160546..2435d12 100644 (file)
@@ -8,65 +8,61 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btStackAlloc {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btStackAlloc(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btStackAlloc (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btStackAlloc obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btStackAlloc obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btStackAlloc(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btStackAlloc(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public btStackAlloc(long size) {
-    this(gdxBulletJNI.new_btStackAlloc(size), true);
-  }
+       public btStackAlloc (long size) {
+               this(gdxBulletJNI.new_btStackAlloc(size), true);
+       }
 
-  public void create(long size) {
-    gdxBulletJNI.btStackAlloc_create(swigCPtr, this, size);
-  }
+       public void create (long size) {
+               gdxBulletJNI.btStackAlloc_create(swigCPtr, this, size);
+       }
 
-  public void destroy() {
-    gdxBulletJNI.btStackAlloc_destroy(swigCPtr, this);
-  }
+       public void destroy () {
+               gdxBulletJNI.btStackAlloc_destroy(swigCPtr, this);
+       }
 
-  public int getAvailableMemory() {
-    return gdxBulletJNI.btStackAlloc_getAvailableMemory(swigCPtr, this);
-  }
+       public int getAvailableMemory () {
+               return gdxBulletJNI.btStackAlloc_getAvailableMemory(swigCPtr, this);
+       }
 
-  public SWIGTYPE_p_unsigned_char allocate(long size) {
-    long cPtr = gdxBulletJNI.btStackAlloc_allocate(swigCPtr, this, size);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
-  }
+       public SWIGTYPE_p_unsigned_char allocate (long size) {
+               long cPtr = gdxBulletJNI.btStackAlloc_allocate(swigCPtr, this, size);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_unsigned_char(cPtr, false);
+       }
 
-  public btBlock beginBlock() {
-    long cPtr = gdxBulletJNI.btStackAlloc_beginBlock(swigCPtr, this);
-    return (cPtr == 0) ? null : new btBlock(cPtr, false);
-  }
+       public btBlock beginBlock () {
+               long cPtr = gdxBulletJNI.btStackAlloc_beginBlock(swigCPtr, this);
+               return (cPtr == 0) ? null : new btBlock(cPtr, false);
+       }
 
-  public void endBlock(btBlock block) {
-    gdxBulletJNI.btStackAlloc_endBlock(swigCPtr, this, btBlock.getCPtr(block), block);
-  }
+       public void endBlock (btBlock block) {
+               gdxBulletJNI.btStackAlloc_endBlock(swigCPtr, this, btBlock.getCPtr(block), block);
+       }
 
 }
index 8734bfd..2224bd6 100644 (file)
@@ -9,46 +9,44 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btStaticPlaneShape extends btConcaveShape {
-  private long swigCPtr;
-
-  protected btStaticPlaneShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btStaticPlaneShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btStaticPlaneShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btStaticPlaneShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btStaticPlaneShape(Vector3 planeNormal, float planeConstant) {
-    this(gdxBulletJNI.new_btStaticPlaneShape(planeNormal, planeConstant), true);
-  }
-
-  public Vector3 getPlaneNormal() {
-       return gdxBulletJNI.btStaticPlaneShape_getPlaneNormal(swigCPtr, this);
-}
-
-  public float getPlaneConstant() {
-    return gdxBulletJNI.btStaticPlaneShape_getPlaneConstant(swigCPtr, this);
-  }
+       private long swigCPtr;
+
+       protected btStaticPlaneShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btStaticPlaneShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btStaticPlaneShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btStaticPlaneShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btStaticPlaneShape (Vector3 planeNormal, float planeConstant) {
+               this(gdxBulletJNI.new_btStaticPlaneShape(planeNormal, planeConstant), true);
+       }
+
+       public Vector3 getPlaneNormal () {
+               return gdxBulletJNI.btStaticPlaneShape_getPlaneNormal(swigCPtr, this);
+       }
+
+       public float getPlaneConstant () {
+               return gdxBulletJNI.btStaticPlaneShape_getPlaneConstant(swigCPtr, this);
+       }
 
 }
index 6209551..79e934c 100644 (file)
@@ -8,82 +8,78 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btStaticPlaneShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btStaticPlaneShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btStaticPlaneShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btStaticPlaneShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_collisionShapeData(btCollisionShapeData value) {
-    gdxBulletJNI.btStaticPlaneShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
-  }
-
-  public btCollisionShapeData getM_collisionShapeData() {
-    long cPtr = gdxBulletJNI.btStaticPlaneShapeData_m_collisionShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
-  }
-
-  public void setM_localScaling(btVector3FloatData value) {
-    gdxBulletJNI.btStaticPlaneShapeData_m_localScaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_localScaling() {
-    long cPtr = gdxBulletJNI.btStaticPlaneShapeData_m_localScaling_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_planeNormal(btVector3FloatData value) {
-    gdxBulletJNI.btStaticPlaneShapeData_m_planeNormal_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_planeNormal() {
-    long cPtr = gdxBulletJNI.btStaticPlaneShapeData_m_planeNormal_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_planeConstant(float value) {
-    gdxBulletJNI.btStaticPlaneShapeData_m_planeConstant_set(swigCPtr, this, value);
-  }
-
-  public float getM_planeConstant() {
-    return gdxBulletJNI.btStaticPlaneShapeData_m_planeConstant_get(swigCPtr, this);
-  }
-
-  public void setM_pad(String value) {
-    gdxBulletJNI.btStaticPlaneShapeData_m_pad_set(swigCPtr, this, value);
-  }
-
-  public String getM_pad() {
-    return gdxBulletJNI.btStaticPlaneShapeData_m_pad_get(swigCPtr, this);
-  }
-
-  public btStaticPlaneShapeData() {
-    this(gdxBulletJNI.new_btStaticPlaneShapeData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btStaticPlaneShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btStaticPlaneShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btStaticPlaneShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_collisionShapeData (btCollisionShapeData value) {
+               gdxBulletJNI.btStaticPlaneShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
+       }
+
+       public btCollisionShapeData getM_collisionShapeData () {
+               long cPtr = gdxBulletJNI.btStaticPlaneShapeData_m_collisionShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
+       }
+
+       public void setM_localScaling (btVector3FloatData value) {
+               gdxBulletJNI.btStaticPlaneShapeData_m_localScaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_localScaling () {
+               long cPtr = gdxBulletJNI.btStaticPlaneShapeData_m_localScaling_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_planeNormal (btVector3FloatData value) {
+               gdxBulletJNI.btStaticPlaneShapeData_m_planeNormal_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_planeNormal () {
+               long cPtr = gdxBulletJNI.btStaticPlaneShapeData_m_planeNormal_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_planeConstant (float value) {
+               gdxBulletJNI.btStaticPlaneShapeData_m_planeConstant_set(swigCPtr, this, value);
+       }
+
+       public float getM_planeConstant () {
+               return gdxBulletJNI.btStaticPlaneShapeData_m_planeConstant_get(swigCPtr, this);
+       }
+
+       public void setM_pad (String value) {
+               gdxBulletJNI.btStaticPlaneShapeData_m_pad_set(swigCPtr, this, value);
+       }
+
+       public String getM_pad () {
+               return gdxBulletJNI.btStaticPlaneShapeData_m_pad_get(swigCPtr, this);
+       }
+
+       public btStaticPlaneShapeData () {
+               this(gdxBulletJNI.new_btStaticPlaneShapeData(), true);
+       }
 
 }
index 010b983..f69fdb6 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btStridingMeshInterface {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btStridingMeshInterface(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btStridingMeshInterface obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btStridingMeshInterface(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void InternalProcessAllTriangles(btInternalTriangleIndexCallback callback, Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btStridingMeshInterface_InternalProcessAllTriangles(swigCPtr, this, btInternalTriangleIndexCallback.getCPtr(callback), callback, aabbMin, aabbMax);
-  }
-
-  public void calculateAabbBruteForce(Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btStridingMeshInterface_calculateAabbBruteForce(swigCPtr, this, aabbMin, aabbMax);
-  }
-
-  public void getLockedVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
-    gdxBulletJNI.btStridingMeshInterface_getLockedVertexIndexBase__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype), subpart);
-  }
-
-  public void getLockedVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
-    gdxBulletJNI.btStridingMeshInterface_getLockedVertexIndexBase__SWIG_1(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
-  }
-
-  public void getLockedReadOnlyVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
-    gdxBulletJNI.btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype), subpart);
-  }
-
-  public void getLockedReadOnlyVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
-    gdxBulletJNI.btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_1(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
-  }
-
-  public void unLockVertexBase(int subpart) {
-    gdxBulletJNI.btStridingMeshInterface_unLockVertexBase(swigCPtr, this, subpart);
-  }
-
-  public void unLockReadOnlyVertexBase(int subpart) {
-    gdxBulletJNI.btStridingMeshInterface_unLockReadOnlyVertexBase(swigCPtr, this, subpart);
-  }
-
-  public int getNumSubParts() {
-    return gdxBulletJNI.btStridingMeshInterface_getNumSubParts(swigCPtr, this);
-  }
-
-  public void preallocateVertices(int numverts) {
-    gdxBulletJNI.btStridingMeshInterface_preallocateVertices(swigCPtr, this, numverts);
-  }
-
-  public void preallocateIndices(int numindices) {
-    gdxBulletJNI.btStridingMeshInterface_preallocateIndices(swigCPtr, this, numindices);
-  }
-
-  public boolean hasPremadeAabb() {
-    return gdxBulletJNI.btStridingMeshInterface_hasPremadeAabb(swigCPtr, this);
-  }
-
-  public void setPremadeAabb(Vector3 aabbMin, Vector3 aabbMax) {
-    gdxBulletJNI.btStridingMeshInterface_setPremadeAabb(swigCPtr, this, aabbMin, aabbMax);
-  }
-
-  public void getPremadeAabb(btVector3 aabbMin, btVector3 aabbMax) {
-    gdxBulletJNI.btStridingMeshInterface_getPremadeAabb(swigCPtr, this, btVector3.getCPtr(aabbMin), aabbMin, btVector3.getCPtr(aabbMax), aabbMax);
-  }
-
-  public Vector3 getScaling() {
-       return gdxBulletJNI.btStridingMeshInterface_getScaling(swigCPtr, this);
-}
-
-  public void setScaling(Vector3 scaling) {
-    gdxBulletJNI.btStridingMeshInterface_setScaling(swigCPtr, this, scaling);
-  }
-
-  public int calculateSerializeBufferSize() {
-    return gdxBulletJNI.btStridingMeshInterface_calculateSerializeBufferSize(swigCPtr, this);
-  }
-
-  public String serialize(SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
-    return gdxBulletJNI.btStridingMeshInterface_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer), SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btStridingMeshInterface (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btStridingMeshInterface obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btStridingMeshInterface(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void InternalProcessAllTriangles (btInternalTriangleIndexCallback callback, Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btStridingMeshInterface_InternalProcessAllTriangles(swigCPtr, this,
+                       btInternalTriangleIndexCallback.getCPtr(callback), callback, aabbMin, aabbMax);
+       }
+
+       public void calculateAabbBruteForce (Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btStridingMeshInterface_calculateAabbBruteForce(swigCPtr, this, aabbMin, aabbMax);
+       }
+
+       public void getLockedVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride,
+               SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
+               gdxBulletJNI.btStridingMeshInterface_getLockedVertexIndexBase__SWIG_0(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase),
+                       SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype),
+                       subpart);
+       }
+
+       public void getLockedVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride,
+               SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
+               gdxBulletJNI.btStridingMeshInterface_getLockedVertexIndexBase__SWIG_1(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase),
+                       SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
+       }
+
+       public void getLockedReadOnlyVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride,
+               SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
+               gdxBulletJNI.btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_0(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase),
+                       SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype),
+                       subpart);
+       }
+
+       public void getLockedReadOnlyVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int stride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride,
+               SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
+               gdxBulletJNI.btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_1(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(stride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase),
+                       SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
+       }
+
+       public void unLockVertexBase (int subpart) {
+               gdxBulletJNI.btStridingMeshInterface_unLockVertexBase(swigCPtr, this, subpart);
+       }
+
+       public void unLockReadOnlyVertexBase (int subpart) {
+               gdxBulletJNI.btStridingMeshInterface_unLockReadOnlyVertexBase(swigCPtr, this, subpart);
+       }
+
+       public int getNumSubParts () {
+               return gdxBulletJNI.btStridingMeshInterface_getNumSubParts(swigCPtr, this);
+       }
+
+       public void preallocateVertices (int numverts) {
+               gdxBulletJNI.btStridingMeshInterface_preallocateVertices(swigCPtr, this, numverts);
+       }
+
+       public void preallocateIndices (int numindices) {
+               gdxBulletJNI.btStridingMeshInterface_preallocateIndices(swigCPtr, this, numindices);
+       }
+
+       public boolean hasPremadeAabb () {
+               return gdxBulletJNI.btStridingMeshInterface_hasPremadeAabb(swigCPtr, this);
+       }
+
+       public void setPremadeAabb (Vector3 aabbMin, Vector3 aabbMax) {
+               gdxBulletJNI.btStridingMeshInterface_setPremadeAabb(swigCPtr, this, aabbMin, aabbMax);
+       }
+
+       public void getPremadeAabb (btVector3 aabbMin, btVector3 aabbMax) {
+               gdxBulletJNI.btStridingMeshInterface_getPremadeAabb(swigCPtr, this, btVector3.getCPtr(aabbMin), aabbMin,
+                       btVector3.getCPtr(aabbMax), aabbMax);
+       }
+
+       public Vector3 getScaling () {
+               return gdxBulletJNI.btStridingMeshInterface_getScaling(swigCPtr, this);
+       }
+
+       public void setScaling (Vector3 scaling) {
+               gdxBulletJNI.btStridingMeshInterface_setScaling(swigCPtr, this, scaling);
+       }
+
+       public int calculateSerializeBufferSize () {
+               return gdxBulletJNI.btStridingMeshInterface_calculateSerializeBufferSize(swigCPtr, this);
+       }
+
+       public String serialize (SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
+               return gdxBulletJNI.btStridingMeshInterface_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer),
+                       SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
 
 }
index e32cdd3..a86b112 100644 (file)
@@ -8,73 +8,69 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btStridingMeshInterfaceData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btStridingMeshInterfaceData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btStridingMeshInterfaceData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btStridingMeshInterfaceData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_meshPartsPtr(btMeshPartData value) {
-    gdxBulletJNI.btStridingMeshInterfaceData_m_meshPartsPtr_set(swigCPtr, this, btMeshPartData.getCPtr(value), value);
-  }
-
-  public btMeshPartData getM_meshPartsPtr() {
-    long cPtr = gdxBulletJNI.btStridingMeshInterfaceData_m_meshPartsPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btMeshPartData(cPtr, false);
-  }
-
-  public void setM_scaling(btVector3FloatData value) {
-    gdxBulletJNI.btStridingMeshInterfaceData_m_scaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_scaling() {
-    long cPtr = gdxBulletJNI.btStridingMeshInterfaceData_m_scaling_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public void setM_numMeshParts(int value) {
-    gdxBulletJNI.btStridingMeshInterfaceData_m_numMeshParts_set(swigCPtr, this, value);
-  }
-
-  public int getM_numMeshParts() {
-    return gdxBulletJNI.btStridingMeshInterfaceData_m_numMeshParts_get(swigCPtr, this);
-  }
-
-  public void setM_padding(String value) {
-    gdxBulletJNI.btStridingMeshInterfaceData_m_padding_set(swigCPtr, this, value);
-  }
-
-  public String getM_padding() {
-    return gdxBulletJNI.btStridingMeshInterfaceData_m_padding_get(swigCPtr, this);
-  }
-
-  public btStridingMeshInterfaceData() {
-    this(gdxBulletJNI.new_btStridingMeshInterfaceData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btStridingMeshInterfaceData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btStridingMeshInterfaceData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btStridingMeshInterfaceData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_meshPartsPtr (btMeshPartData value) {
+               gdxBulletJNI.btStridingMeshInterfaceData_m_meshPartsPtr_set(swigCPtr, this, btMeshPartData.getCPtr(value), value);
+       }
+
+       public btMeshPartData getM_meshPartsPtr () {
+               long cPtr = gdxBulletJNI.btStridingMeshInterfaceData_m_meshPartsPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btMeshPartData(cPtr, false);
+       }
+
+       public void setM_scaling (btVector3FloatData value) {
+               gdxBulletJNI.btStridingMeshInterfaceData_m_scaling_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_scaling () {
+               long cPtr = gdxBulletJNI.btStridingMeshInterfaceData_m_scaling_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public void setM_numMeshParts (int value) {
+               gdxBulletJNI.btStridingMeshInterfaceData_m_numMeshParts_set(swigCPtr, this, value);
+       }
+
+       public int getM_numMeshParts () {
+               return gdxBulletJNI.btStridingMeshInterfaceData_m_numMeshParts_get(swigCPtr, this);
+       }
+
+       public void setM_padding (String value) {
+               gdxBulletJNI.btStridingMeshInterfaceData_m_padding_set(swigCPtr, this, value);
+       }
+
+       public String getM_padding () {
+               return gdxBulletJNI.btStridingMeshInterfaceData_m_padding_get(swigCPtr, this);
+       }
+
+       public btStridingMeshInterfaceData () {
+               this(gdxBulletJNI.new_btStridingMeshInterfaceData(), true);
+       }
 
 }
index 94a67d0..f751cda 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSubSimplexClosestResult {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btSubSimplexClosestResult(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSubSimplexClosestResult obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSubSimplexClosestResult(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_closestPointOnSimplex(btVector3 value) {
-    gdxBulletJNI.btSubSimplexClosestResult_m_closestPointOnSimplex_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_closestPointOnSimplex() {
-    long cPtr = gdxBulletJNI.btSubSimplexClosestResult_m_closestPointOnSimplex_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_usedVertices(btUsageBitfield value) {
-    gdxBulletJNI.btSubSimplexClosestResult_m_usedVertices_set(swigCPtr, this, btUsageBitfield.getCPtr(value), value);
-  }
-
-  public btUsageBitfield getM_usedVertices() {
-    long cPtr = gdxBulletJNI.btSubSimplexClosestResult_m_usedVertices_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btUsageBitfield(cPtr, false);
-  }
-
-  public void setM_barycentricCoords(float[] value) {
-    gdxBulletJNI.btSubSimplexClosestResult_m_barycentricCoords_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_barycentricCoords() {
-    return gdxBulletJNI.btSubSimplexClosestResult_m_barycentricCoords_get(swigCPtr, this);
-  }
-
-  public void setM_degenerate(boolean value) {
-    gdxBulletJNI.btSubSimplexClosestResult_m_degenerate_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_degenerate() {
-    return gdxBulletJNI.btSubSimplexClosestResult_m_degenerate_get(swigCPtr, this);
-  }
-
-  public void reset() {
-    gdxBulletJNI.btSubSimplexClosestResult_reset(swigCPtr, this);
-  }
-
-  public boolean isValid() {
-    return gdxBulletJNI.btSubSimplexClosestResult_isValid(swigCPtr, this);
-  }
-
-  public void setBarycentricCoordinates(float a, float b, float c, float d) {
-    gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_0(swigCPtr, this, a, b, c, d);
-  }
-
-  public void setBarycentricCoordinates(float a, float b, float c) {
-    gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_1(swigCPtr, this, a, b, c);
-  }
-
-  public void setBarycentricCoordinates(float a, float b) {
-    gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_2(swigCPtr, this, a, b);
-  }
-
-  public void setBarycentricCoordinates(float a) {
-    gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_3(swigCPtr, this, a);
-  }
-
-  public void setBarycentricCoordinates() {
-    gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_4(swigCPtr, this);
-  }
-
-  public btSubSimplexClosestResult() {
-    this(gdxBulletJNI.new_btSubSimplexClosestResult(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btSubSimplexClosestResult (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSubSimplexClosestResult obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSubSimplexClosestResult(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_closestPointOnSimplex (btVector3 value) {
+               gdxBulletJNI.btSubSimplexClosestResult_m_closestPointOnSimplex_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_closestPointOnSimplex () {
+               long cPtr = gdxBulletJNI.btSubSimplexClosestResult_m_closestPointOnSimplex_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_usedVertices (btUsageBitfield value) {
+               gdxBulletJNI.btSubSimplexClosestResult_m_usedVertices_set(swigCPtr, this, btUsageBitfield.getCPtr(value), value);
+       }
+
+       public btUsageBitfield getM_usedVertices () {
+               long cPtr = gdxBulletJNI.btSubSimplexClosestResult_m_usedVertices_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btUsageBitfield(cPtr, false);
+       }
+
+       public void setM_barycentricCoords (float[] value) {
+               gdxBulletJNI.btSubSimplexClosestResult_m_barycentricCoords_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_barycentricCoords () {
+               return gdxBulletJNI.btSubSimplexClosestResult_m_barycentricCoords_get(swigCPtr, this);
+       }
+
+       public void setM_degenerate (boolean value) {
+               gdxBulletJNI.btSubSimplexClosestResult_m_degenerate_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_degenerate () {
+               return gdxBulletJNI.btSubSimplexClosestResult_m_degenerate_get(swigCPtr, this);
+       }
+
+       public void reset () {
+               gdxBulletJNI.btSubSimplexClosestResult_reset(swigCPtr, this);
+       }
+
+       public boolean isValid () {
+               return gdxBulletJNI.btSubSimplexClosestResult_isValid(swigCPtr, this);
+       }
+
+       public void setBarycentricCoordinates (float a, float b, float c, float d) {
+               gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_0(swigCPtr, this, a, b, c, d);
+       }
+
+       public void setBarycentricCoordinates (float a, float b, float c) {
+               gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_1(swigCPtr, this, a, b, c);
+       }
+
+       public void setBarycentricCoordinates (float a, float b) {
+               gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_2(swigCPtr, this, a, b);
+       }
+
+       public void setBarycentricCoordinates (float a) {
+               gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_3(swigCPtr, this, a);
+       }
+
+       public void setBarycentricCoordinates () {
+               gdxBulletJNI.btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_4(swigCPtr, this);
+       }
+
+       public btSubSimplexClosestResult () {
+               this(gdxBulletJNI.new_btSubSimplexClosestResult(), true);
+       }
 
 }
index ac511da..9fc56da 100644 (file)
@@ -8,39 +8,36 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btSubsimplexConvexCast extends btConvexCast {
-  private long swigCPtr;
-
-  protected btSubsimplexConvexCast(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btSubsimplexConvexCast_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btSubsimplexConvexCast obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btSubsimplexConvexCast(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btSubsimplexConvexCast(btConvexShape shapeA, btConvexShape shapeB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver) {
-    this(gdxBulletJNI.new_btSubsimplexConvexCast(btConvexShape.getCPtr(shapeA), shapeA, btConvexShape.getCPtr(shapeB), shapeB, SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver)), true);
-  }
+       private long swigCPtr;
+
+       protected btSubsimplexConvexCast (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btSubsimplexConvexCast_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btSubsimplexConvexCast obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btSubsimplexConvexCast(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btSubsimplexConvexCast (btConvexShape shapeA, btConvexShape shapeB, SWIGTYPE_p_btSimplexSolverInterface simplexSolver) {
+               this(gdxBulletJNI.new_btSubsimplexConvexCast(btConvexShape.getCPtr(shapeA), shapeA, btConvexShape.getCPtr(shapeB), shapeB,
+                       SWIGTYPE_p_btSimplexSolverInterface.getCPtr(simplexSolver)), true);
+       }
 
 }
index 4c87c59..b89f54d 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
 import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Quaternion;
+import com.badlogic.gdx.math.Vector3;
 
 public class btTransform {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTransform(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTransform obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTransform(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-
-  /**
-   * Sets the values in this transform from the other.
-   */
-  public void set(btTransform other) {
-       setOrigin(other.getOrigin());
-    setBasis(other.getBasis());
-  }
-  
-  @Override
-  public String toString() {
-    return getOrigin() + "\n" + getBasis();
-  }
-
-  public btTransform() {
-    this(gdxBulletJNI.new_btTransform__SWIG_0(), true);
-  }
-
-  public btTransform(Quaternion q, Vector3 c) {
-    this(gdxBulletJNI.new_btTransform__SWIG_1(q, c), true);
-  }
-
-  public btTransform(Quaternion q) {
-    this(gdxBulletJNI.new_btTransform__SWIG_2(q), true);
-  }
-
-  public btTransform(Matrix3 b, Vector3 c) {
-    this(gdxBulletJNI.new_btTransform__SWIG_3(b, c), true);
-  }
-
-  public btTransform(Matrix3 b) {
-    this(gdxBulletJNI.new_btTransform__SWIG_4(b), true);
-  }
-
-  public btTransform(btTransform other) {
-    this(gdxBulletJNI.new_btTransform__SWIG_5(btTransform.getCPtr(other), other), true);
-  }
-
-  public void mult(btTransform t1, btTransform t2) {
-    gdxBulletJNI.btTransform_mult(swigCPtr, this, btTransform.getCPtr(t1), t1, btTransform.getCPtr(t2), t2);
-  }
-
-  public Matrix3 getBasis() {
-       return gdxBulletJNI.btTransform_getBasis__SWIG_0(swigCPtr, this);
-}
-
-  public Vector3 getOrigin() {
-       return gdxBulletJNI.btTransform_getOrigin__SWIG_0(swigCPtr, this);
-}
-
-  public Quaternion getRotation() {
-       return gdxBulletJNI.btTransform_getRotation(swigCPtr, this);
-}
-
-  public void setFromOpenGLMatrix(float[] m) {
-    gdxBulletJNI.btTransform_setFromOpenGLMatrix(swigCPtr, this, m);
-  }
-
-  public void getOpenGLMatrix(float[] m) {
-    gdxBulletJNI.btTransform_getOpenGLMatrix(swigCPtr, this, m);
-  }
-
-  public void setOrigin(Vector3 origin) {
-    gdxBulletJNI.btTransform_setOrigin(swigCPtr, this, origin);
-  }
-
-  public Vector3 invXform(Vector3 inVec) {
-       return gdxBulletJNI.btTransform_invXform(swigCPtr, this, inVec);
-}
-
-  public void setBasis(Matrix3 basis) {
-    gdxBulletJNI.btTransform_setBasis(swigCPtr, this, basis);
-  }
-
-  public void setRotation(Quaternion q) {
-    gdxBulletJNI.btTransform_setRotation(swigCPtr, this, q);
-  }
-
-  public void setIdentity() {
-    gdxBulletJNI.btTransform_setIdentity(swigCPtr, this);
-  }
-
-  public btTransform inverse() {
-    return new btTransform(gdxBulletJNI.btTransform_inverse(swigCPtr, this), true);
-  }
-
-  public btTransform inverseTimes(btTransform t) {
-    return new btTransform(gdxBulletJNI.btTransform_inverseTimes(swigCPtr, this, btTransform.getCPtr(t), t), true);
-  }
-
-  public static btTransform getIdentity() {
-    return new btTransform(gdxBulletJNI.btTransform_getIdentity(), false);
-  }
-
-  public void serialize(btTransformFloatData dataOut) {
-    gdxBulletJNI.btTransform_serialize(swigCPtr, this, btTransformFloatData.getCPtr(dataOut), dataOut);
-  }
-
-  public void serializeFloat(btTransformFloatData dataOut) {
-    gdxBulletJNI.btTransform_serializeFloat(swigCPtr, this, btTransformFloatData.getCPtr(dataOut), dataOut);
-  }
-
-  public void deSerialize(btTransformFloatData dataIn) {
-    gdxBulletJNI.btTransform_deSerialize(swigCPtr, this, btTransformFloatData.getCPtr(dataIn), dataIn);
-  }
-
-  public void deSerializeDouble(btTransformDoubleData dataIn) {
-    gdxBulletJNI.btTransform_deSerializeDouble(swigCPtr, this, btTransformDoubleData.getCPtr(dataIn), dataIn);
-  }
-
-  public void deSerializeFloat(btTransformFloatData dataIn) {
-    gdxBulletJNI.btTransform_deSerializeFloat(swigCPtr, this, btTransformFloatData.getCPtr(dataIn), dataIn);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTransform (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTransform obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTransform(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       /** Sets the values in this transform from the other. */
+       public void set (btTransform other) {
+               setOrigin(other.getOrigin());
+               setBasis(other.getBasis());
+       }
+
+       @Override
+       public String toString () {
+               return getOrigin() + "\n" + getBasis();
+       }
+
+       public btTransform () {
+               this(gdxBulletJNI.new_btTransform__SWIG_0(), true);
+       }
+
+       public btTransform (Quaternion q, Vector3 c) {
+               this(gdxBulletJNI.new_btTransform__SWIG_1(q, c), true);
+       }
+
+       public btTransform (Quaternion q) {
+               this(gdxBulletJNI.new_btTransform__SWIG_2(q), true);
+       }
+
+       public btTransform (Matrix3 b, Vector3 c) {
+               this(gdxBulletJNI.new_btTransform__SWIG_3(b, c), true);
+       }
+
+       public btTransform (Matrix3 b) {
+               this(gdxBulletJNI.new_btTransform__SWIG_4(b), true);
+       }
+
+       public btTransform (btTransform other) {
+               this(gdxBulletJNI.new_btTransform__SWIG_5(btTransform.getCPtr(other), other), true);
+       }
+
+       public void mult (btTransform t1, btTransform t2) {
+               gdxBulletJNI.btTransform_mult(swigCPtr, this, btTransform.getCPtr(t1), t1, btTransform.getCPtr(t2), t2);
+       }
+
+       public Matrix3 getBasis () {
+               return gdxBulletJNI.btTransform_getBasis__SWIG_0(swigCPtr, this);
+       }
+
+       public Vector3 getOrigin () {
+               return gdxBulletJNI.btTransform_getOrigin__SWIG_0(swigCPtr, this);
+       }
+
+       public Quaternion getRotation () {
+               return gdxBulletJNI.btTransform_getRotation(swigCPtr, this);
+       }
+
+       public void setFromOpenGLMatrix (float[] m) {
+               gdxBulletJNI.btTransform_setFromOpenGLMatrix(swigCPtr, this, m);
+       }
+
+       public void getOpenGLMatrix (float[] m) {
+               gdxBulletJNI.btTransform_getOpenGLMatrix(swigCPtr, this, m);
+       }
+
+       public void setOrigin (Vector3 origin) {
+               gdxBulletJNI.btTransform_setOrigin(swigCPtr, this, origin);
+       }
+
+       public Vector3 invXform (Vector3 inVec) {
+               return gdxBulletJNI.btTransform_invXform(swigCPtr, this, inVec);
+       }
+
+       public void setBasis (Matrix3 basis) {
+               gdxBulletJNI.btTransform_setBasis(swigCPtr, this, basis);
+       }
+
+       public void setRotation (Quaternion q) {
+               gdxBulletJNI.btTransform_setRotation(swigCPtr, this, q);
+       }
+
+       public void setIdentity () {
+               gdxBulletJNI.btTransform_setIdentity(swigCPtr, this);
+       }
+
+       public btTransform inverse () {
+               return new btTransform(gdxBulletJNI.btTransform_inverse(swigCPtr, this), true);
+       }
+
+       public btTransform inverseTimes (btTransform t) {
+               return new btTransform(gdxBulletJNI.btTransform_inverseTimes(swigCPtr, this, btTransform.getCPtr(t), t), true);
+       }
+
+       public static btTransform getIdentity () {
+               return new btTransform(gdxBulletJNI.btTransform_getIdentity(), false);
+       }
+
+       public void serialize (btTransformFloatData dataOut) {
+               gdxBulletJNI.btTransform_serialize(swigCPtr, this, btTransformFloatData.getCPtr(dataOut), dataOut);
+       }
+
+       public void serializeFloat (btTransformFloatData dataOut) {
+               gdxBulletJNI.btTransform_serializeFloat(swigCPtr, this, btTransformFloatData.getCPtr(dataOut), dataOut);
+       }
+
+       public void deSerialize (btTransformFloatData dataIn) {
+               gdxBulletJNI.btTransform_deSerialize(swigCPtr, this, btTransformFloatData.getCPtr(dataIn), dataIn);
+       }
+
+       public void deSerializeDouble (btTransformDoubleData dataIn) {
+               gdxBulletJNI.btTransform_deSerializeDouble(swigCPtr, this, btTransformDoubleData.getCPtr(dataIn), dataIn);
+       }
+
+       public void deSerializeFloat (btTransformFloatData dataIn) {
+               gdxBulletJNI.btTransform_deSerializeFloat(swigCPtr, this, btTransformFloatData.getCPtr(dataIn), dataIn);
+       }
 
 }
index 0a9f746..b43118f 100644 (file)
@@ -8,56 +8,52 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTransformDoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTransformDoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTransformDoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTransformDoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_basis(SWIGTYPE_p_btMatrix3x3DoubleData value) {
-    gdxBulletJNI.btTransformDoubleData_m_basis_set(swigCPtr, this, SWIGTYPE_p_btMatrix3x3DoubleData.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btMatrix3x3DoubleData getM_basis() {
-    return new SWIGTYPE_p_btMatrix3x3DoubleData(gdxBulletJNI.btTransformDoubleData_m_basis_get(swigCPtr, this), true);
-  }
-
-  public void setM_origin(btVector3DoubleData value) {
-    gdxBulletJNI.btTransformDoubleData_m_origin_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
-  }
-
-  public btVector3DoubleData getM_origin() {
-    long cPtr = gdxBulletJNI.btTransformDoubleData_m_origin_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
-  }
-
-  public btTransformDoubleData() {
-    this(gdxBulletJNI.new_btTransformDoubleData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTransformDoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTransformDoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTransformDoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_basis (SWIGTYPE_p_btMatrix3x3DoubleData value) {
+               gdxBulletJNI.btTransformDoubleData_m_basis_set(swigCPtr, this, SWIGTYPE_p_btMatrix3x3DoubleData.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btMatrix3x3DoubleData getM_basis () {
+               return new SWIGTYPE_p_btMatrix3x3DoubleData(gdxBulletJNI.btTransformDoubleData_m_basis_get(swigCPtr, this), true);
+       }
+
+       public void setM_origin (btVector3DoubleData value) {
+               gdxBulletJNI.btTransformDoubleData_m_origin_set(swigCPtr, this, btVector3DoubleData.getCPtr(value), value);
+       }
+
+       public btVector3DoubleData getM_origin () {
+               long cPtr = gdxBulletJNI.btTransformDoubleData_m_origin_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3DoubleData(cPtr, false);
+       }
+
+       public btTransformDoubleData () {
+               this(gdxBulletJNI.new_btTransformDoubleData(), true);
+       }
 
 }
index cbcdbdc..2389e60 100644 (file)
@@ -8,56 +8,52 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTransformFloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTransformFloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTransformFloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTransformFloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_basis(SWIGTYPE_p_btMatrix3x3FloatData value) {
-    gdxBulletJNI.btTransformFloatData_m_basis_set(swigCPtr, this, SWIGTYPE_p_btMatrix3x3FloatData.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_btMatrix3x3FloatData getM_basis() {
-    return new SWIGTYPE_p_btMatrix3x3FloatData(gdxBulletJNI.btTransformFloatData_m_basis_get(swigCPtr, this), true);
-  }
-
-  public void setM_origin(btVector3FloatData value) {
-    gdxBulletJNI.btTransformFloatData_m_origin_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
-  }
-
-  public btVector3FloatData getM_origin() {
-    long cPtr = gdxBulletJNI.btTransformFloatData_m_origin_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
-  }
-
-  public btTransformFloatData() {
-    this(gdxBulletJNI.new_btTransformFloatData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTransformFloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTransformFloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTransformFloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_basis (SWIGTYPE_p_btMatrix3x3FloatData value) {
+               gdxBulletJNI.btTransformFloatData_m_basis_set(swigCPtr, this, SWIGTYPE_p_btMatrix3x3FloatData.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_btMatrix3x3FloatData getM_basis () {
+               return new SWIGTYPE_p_btMatrix3x3FloatData(gdxBulletJNI.btTransformFloatData_m_basis_get(swigCPtr, this), true);
+       }
+
+       public void setM_origin (btVector3FloatData value) {
+               gdxBulletJNI.btTransformFloatData_m_origin_set(swigCPtr, this, btVector3FloatData.getCPtr(value), value);
+       }
+
+       public btVector3FloatData getM_origin () {
+               long cPtr = gdxBulletJNI.btTransformFloatData_m_origin_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3FloatData(cPtr, false);
+       }
+
+       public btTransformFloatData () {
+               this(gdxBulletJNI.new_btTransformFloatData(), true);
+       }
 
 }
index acd6ce3..433fa52 100644 (file)
@@ -8,59 +8,64 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
 import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Vector3;
 
 public class btTransformUtil {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
 
-  protected btTransformUtil(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
+       protected btTransformUtil (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btTransformUtil obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btTransformUtil obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTransformUtil(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTransformUtil(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
 
-  public static void integrateTransform(btTransform curTrans, Vector3 linvel, Vector3 angvel, float timeStep, btTransform predictedTransform) {
-    gdxBulletJNI.btTransformUtil_integrateTransform(btTransform.getCPtr(curTrans), curTrans, linvel, angvel, timeStep, btTransform.getCPtr(predictedTransform), predictedTransform);
-  }
+       public static void integrateTransform (btTransform curTrans, Vector3 linvel, Vector3 angvel, float timeStep,
+               btTransform predictedTransform) {
+               gdxBulletJNI.btTransformUtil_integrateTransform(btTransform.getCPtr(curTrans), curTrans, linvel, angvel, timeStep,
+                       btTransform.getCPtr(predictedTransform), predictedTransform);
+       }
 
-  public static void calculateVelocityQuaternion(Vector3 pos0, Vector3 pos1, Quaternion orn0, Quaternion orn1, float timeStep, Vector3 linVel, Vector3 angVel) {
-    gdxBulletJNI.btTransformUtil_calculateVelocityQuaternion(pos0, pos1, orn0, orn1, timeStep, linVel, angVel);
-  }
+       public static void calculateVelocityQuaternion (Vector3 pos0, Vector3 pos1, Quaternion orn0, Quaternion orn1, float timeStep,
+               Vector3 linVel, Vector3 angVel) {
+               gdxBulletJNI.btTransformUtil_calculateVelocityQuaternion(pos0, pos1, orn0, orn1, timeStep, linVel, angVel);
+       }
 
-  public static void calculateDiffAxisAngleQuaternion(Quaternion orn0, Quaternion orn1a, Vector3 axis, SWIGTYPE_p_float angle) {
-    gdxBulletJNI.btTransformUtil_calculateDiffAxisAngleQuaternion(orn0, orn1a, axis, SWIGTYPE_p_float.getCPtr(angle));
-  }
+       public static void calculateDiffAxisAngleQuaternion (Quaternion orn0, Quaternion orn1a, Vector3 axis, SWIGTYPE_p_float angle) {
+               gdxBulletJNI.btTransformUtil_calculateDiffAxisAngleQuaternion(orn0, orn1a, axis, SWIGTYPE_p_float.getCPtr(angle));
+       }
 
-  public static void calculateVelocity(btTransform transform0, btTransform transform1, float timeStep, Vector3 linVel, Vector3 angVel) {
-    gdxBulletJNI.btTransformUtil_calculateVelocity(btTransform.getCPtr(transform0), transform0, btTransform.getCPtr(transform1), transform1, timeStep, linVel, angVel);
-  }
+       public static void calculateVelocity (btTransform transform0, btTransform transform1, float timeStep, Vector3 linVel,
+               Vector3 angVel) {
+               gdxBulletJNI.btTransformUtil_calculateVelocity(btTransform.getCPtr(transform0), transform0,
+                       btTransform.getCPtr(transform1), transform1, timeStep, linVel, angVel);
+       }
 
-  public static void calculateDiffAxisAngle(btTransform transform0, btTransform transform1, Vector3 axis, SWIGTYPE_p_float angle) {
-    gdxBulletJNI.btTransformUtil_calculateDiffAxisAngle(btTransform.getCPtr(transform0), transform0, btTransform.getCPtr(transform1), transform1, axis, SWIGTYPE_p_float.getCPtr(angle));
-  }
+       public static void calculateDiffAxisAngle (btTransform transform0, btTransform transform1, Vector3 axis, SWIGTYPE_p_float angle) {
+               gdxBulletJNI.btTransformUtil_calculateDiffAxisAngle(btTransform.getCPtr(transform0), transform0,
+                       btTransform.getCPtr(transform1), transform1, axis, SWIGTYPE_p_float.getCPtr(angle));
+       }
 
-  public btTransformUtil() {
-    this(gdxBulletJNI.new_btTransformUtil(), true);
-  }
+       public btTransformUtil () {
+               this(gdxBulletJNI.new_btTransformUtil(), true);
+       }
 
 }
index ff05702..203107a 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btTranslationalLimitMotor {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTranslationalLimitMotor(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTranslationalLimitMotor obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTranslationalLimitMotor(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_lowerLimit(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_lowerLimit_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_lowerLimit() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_lowerLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_upperLimit(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_upperLimit_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_upperLimit() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_upperLimit_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_accumulatedImpulse(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_accumulatedImpulse_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_accumulatedImpulse() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_accumulatedImpulse_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_limitSoftness(float value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_limitSoftness_set(swigCPtr, this, value);
-  }
-
-  public float getM_limitSoftness() {
-    return gdxBulletJNI.btTranslationalLimitMotor_m_limitSoftness_get(swigCPtr, this);
-  }
-
-  public void setM_damping(float value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_damping_set(swigCPtr, this, value);
-  }
-
-  public float getM_damping() {
-    return gdxBulletJNI.btTranslationalLimitMotor_m_damping_get(swigCPtr, this);
-  }
-
-  public void setM_restitution(float value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_restitution_set(swigCPtr, this, value);
-  }
-
-  public float getM_restitution() {
-    return gdxBulletJNI.btTranslationalLimitMotor_m_restitution_get(swigCPtr, this);
-  }
-
-  public void setM_normalCFM(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_normalCFM_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_normalCFM() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_normalCFM_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_stopERP(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_stopERP_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_stopERP() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_stopERP_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_stopCFM(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_stopCFM_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_stopCFM() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_stopCFM_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_enableMotor(boolean[] value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_enableMotor_set(swigCPtr, this, value);
-  }
-
-  public boolean[] getM_enableMotor() {
-    return gdxBulletJNI.btTranslationalLimitMotor_m_enableMotor_get(swigCPtr, this);
-  }
-
-  public void setM_targetVelocity(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_targetVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_targetVelocity() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_targetVelocity_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_maxMotorForce(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_maxMotorForce_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_maxMotorForce() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_maxMotorForce_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_currentLimitError(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_currentLimitError_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_currentLimitError() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_currentLimitError_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_currentLinearDiff(btVector3 value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_currentLinearDiff_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_currentLinearDiff() {
-    long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_currentLinearDiff_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_currentLimit(int[] value) {
-    gdxBulletJNI.btTranslationalLimitMotor_m_currentLimit_set(swigCPtr, this, value);
-  }
-
-  public int[] getM_currentLimit() {
-    return gdxBulletJNI.btTranslationalLimitMotor_m_currentLimit_get(swigCPtr, this);
-  }
-
-  public btTranslationalLimitMotor() {
-    this(gdxBulletJNI.new_btTranslationalLimitMotor__SWIG_0(), true);
-  }
-
-  public btTranslationalLimitMotor(btTranslationalLimitMotor other) {
-    this(gdxBulletJNI.new_btTranslationalLimitMotor__SWIG_1(btTranslationalLimitMotor.getCPtr(other), other), true);
-  }
-
-  public boolean isLimited(int limitIndex) {
-    return gdxBulletJNI.btTranslationalLimitMotor_isLimited(swigCPtr, this, limitIndex);
-  }
-
-  public boolean needApplyForce(int limitIndex) {
-    return gdxBulletJNI.btTranslationalLimitMotor_needApplyForce(swigCPtr, this, limitIndex);
-  }
-
-  public int testLimitValue(int limitIndex, float test_value) {
-    return gdxBulletJNI.btTranslationalLimitMotor_testLimitValue(swigCPtr, this, limitIndex, test_value);
-  }
-
-  public float solveLinearAxis(float timeStep, float jacDiagABInv, btRigidBody body1, Vector3 pointInA, btRigidBody body2, Vector3 pointInB, int limit_index, Vector3 axis_normal_on_a, Vector3 anchorPos) {
-    return gdxBulletJNI.btTranslationalLimitMotor_solveLinearAxis(swigCPtr, this, timeStep, jacDiagABInv, btRigidBody.getCPtr(body1), body1, pointInA, btRigidBody.getCPtr(body2), body2, pointInB, limit_index, axis_normal_on_a, anchorPos);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTranslationalLimitMotor (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTranslationalLimitMotor obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTranslationalLimitMotor(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_lowerLimit (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_lowerLimit_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_lowerLimit () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_lowerLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_upperLimit (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_upperLimit_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_upperLimit () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_upperLimit_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_accumulatedImpulse (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_accumulatedImpulse_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_accumulatedImpulse () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_accumulatedImpulse_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_limitSoftness (float value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_limitSoftness_set(swigCPtr, this, value);
+       }
+
+       public float getM_limitSoftness () {
+               return gdxBulletJNI.btTranslationalLimitMotor_m_limitSoftness_get(swigCPtr, this);
+       }
+
+       public void setM_damping (float value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_damping_set(swigCPtr, this, value);
+       }
+
+       public float getM_damping () {
+               return gdxBulletJNI.btTranslationalLimitMotor_m_damping_get(swigCPtr, this);
+       }
+
+       public void setM_restitution (float value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_restitution_set(swigCPtr, this, value);
+       }
+
+       public float getM_restitution () {
+               return gdxBulletJNI.btTranslationalLimitMotor_m_restitution_get(swigCPtr, this);
+       }
+
+       public void setM_normalCFM (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_normalCFM_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_normalCFM () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_normalCFM_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_stopERP (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_stopERP_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_stopERP () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_stopERP_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_stopCFM (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_stopCFM_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_stopCFM () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_stopCFM_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_enableMotor (boolean[] value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_enableMotor_set(swigCPtr, this, value);
+       }
+
+       public boolean[] getM_enableMotor () {
+               return gdxBulletJNI.btTranslationalLimitMotor_m_enableMotor_get(swigCPtr, this);
+       }
+
+       public void setM_targetVelocity (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_targetVelocity_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_targetVelocity () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_targetVelocity_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_maxMotorForce (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_maxMotorForce_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_maxMotorForce () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_maxMotorForce_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_currentLimitError (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_currentLimitError_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_currentLimitError () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_currentLimitError_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_currentLinearDiff (btVector3 value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_currentLinearDiff_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_currentLinearDiff () {
+               long cPtr = gdxBulletJNI.btTranslationalLimitMotor_m_currentLinearDiff_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_currentLimit (int[] value) {
+               gdxBulletJNI.btTranslationalLimitMotor_m_currentLimit_set(swigCPtr, this, value);
+       }
+
+       public int[] getM_currentLimit () {
+               return gdxBulletJNI.btTranslationalLimitMotor_m_currentLimit_get(swigCPtr, this);
+       }
+
+       public btTranslationalLimitMotor () {
+               this(gdxBulletJNI.new_btTranslationalLimitMotor__SWIG_0(), true);
+       }
+
+       public btTranslationalLimitMotor (btTranslationalLimitMotor other) {
+               this(gdxBulletJNI.new_btTranslationalLimitMotor__SWIG_1(btTranslationalLimitMotor.getCPtr(other), other), true);
+       }
+
+       public boolean isLimited (int limitIndex) {
+               return gdxBulletJNI.btTranslationalLimitMotor_isLimited(swigCPtr, this, limitIndex);
+       }
+
+       public boolean needApplyForce (int limitIndex) {
+               return gdxBulletJNI.btTranslationalLimitMotor_needApplyForce(swigCPtr, this, limitIndex);
+       }
+
+       public int testLimitValue (int limitIndex, float test_value) {
+               return gdxBulletJNI.btTranslationalLimitMotor_testLimitValue(swigCPtr, this, limitIndex, test_value);
+       }
+
+       public float solveLinearAxis (float timeStep, float jacDiagABInv, btRigidBody body1, Vector3 pointInA, btRigidBody body2,
+               Vector3 pointInB, int limit_index, Vector3 axis_normal_on_a, Vector3 anchorPos) {
+               return gdxBulletJNI.btTranslationalLimitMotor_solveLinearAxis(swigCPtr, this, timeStep, jacDiagABInv,
+                       btRigidBody.getCPtr(body1), body1, pointInA, btRigidBody.getCPtr(body2), body2, pointInB, limit_index, axis_normal_on_a,
+                       anchorPos);
+       }
 
 }
index 18fe1c2..8971163 100644 (file)
@@ -8,82 +8,78 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangle {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTriangle(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangle obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangle(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_vertex0(btVector3 value) {
-    gdxBulletJNI.btTriangle_m_vertex0_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_vertex0() {
-    long cPtr = gdxBulletJNI.btTriangle_m_vertex0_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_vertex1(btVector3 value) {
-    gdxBulletJNI.btTriangle_m_vertex1_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_vertex1() {
-    long cPtr = gdxBulletJNI.btTriangle_m_vertex1_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_vertex2(btVector3 value) {
-    gdxBulletJNI.btTriangle_m_vertex2_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_vertex2() {
-    long cPtr = gdxBulletJNI.btTriangle_m_vertex2_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_partId(int value) {
-    gdxBulletJNI.btTriangle_m_partId_set(swigCPtr, this, value);
-  }
-
-  public int getM_partId() {
-    return gdxBulletJNI.btTriangle_m_partId_get(swigCPtr, this);
-  }
-
-  public void setM_triangleIndex(int value) {
-    gdxBulletJNI.btTriangle_m_triangleIndex_set(swigCPtr, this, value);
-  }
-
-  public int getM_triangleIndex() {
-    return gdxBulletJNI.btTriangle_m_triangleIndex_get(swigCPtr, this);
-  }
-
-  public btTriangle() {
-    this(gdxBulletJNI.new_btTriangle(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTriangle (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangle obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangle(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_vertex0 (btVector3 value) {
+               gdxBulletJNI.btTriangle_m_vertex0_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_vertex0 () {
+               long cPtr = gdxBulletJNI.btTriangle_m_vertex0_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_vertex1 (btVector3 value) {
+               gdxBulletJNI.btTriangle_m_vertex1_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_vertex1 () {
+               long cPtr = gdxBulletJNI.btTriangle_m_vertex1_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_vertex2 (btVector3 value) {
+               gdxBulletJNI.btTriangle_m_vertex2_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_vertex2 () {
+               long cPtr = gdxBulletJNI.btTriangle_m_vertex2_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_partId (int value) {
+               gdxBulletJNI.btTriangle_m_partId_set(swigCPtr, this, value);
+       }
+
+       public int getM_partId () {
+               return gdxBulletJNI.btTriangle_m_partId_get(swigCPtr, this);
+       }
+
+       public void setM_triangleIndex (int value) {
+               gdxBulletJNI.btTriangle_m_triangleIndex_set(swigCPtr, this, value);
+       }
+
+       public int getM_triangleIndex () {
+               return gdxBulletJNI.btTriangle_m_triangleIndex_get(swigCPtr, this);
+       }
+
+       public btTriangle () {
+               this(gdxBulletJNI.new_btTriangle(), true);
+       }
 
 }
index 3147acc..3b0ce3d 100644 (file)
@@ -8,51 +8,47 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleBuffer extends btTriangleCallback {
-  private long swigCPtr;
-
-  protected btTriangleBuffer(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleBuffer_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleBuffer obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleBuffer(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public int getNumTriangles() {
-    return gdxBulletJNI.btTriangleBuffer_getNumTriangles(swigCPtr, this);
-  }
-
-  public btTriangle getTriangle(int index) {
-    return new btTriangle(gdxBulletJNI.btTriangleBuffer_getTriangle(swigCPtr, this, index), false);
-  }
-
-  public void clearBuffer() {
-    gdxBulletJNI.btTriangleBuffer_clearBuffer(swigCPtr, this);
-  }
-
-  public btTriangleBuffer() {
-    this(gdxBulletJNI.new_btTriangleBuffer(), true);
-  }
+       private long swigCPtr;
+
+       protected btTriangleBuffer (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleBuffer_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleBuffer obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleBuffer(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public int getNumTriangles () {
+               return gdxBulletJNI.btTriangleBuffer_getNumTriangles(swigCPtr, this);
+       }
+
+       public btTriangle getTriangle (int index) {
+               return new btTriangle(gdxBulletJNI.btTriangleBuffer_getTriangle(swigCPtr, this, index), false);
+       }
+
+       public void clearBuffer () {
+               gdxBulletJNI.btTriangleBuffer_clearBuffer(swigCPtr, this);
+       }
+
+       public btTriangleBuffer () {
+               this(gdxBulletJNI.new_btTriangleBuffer(), true);
+       }
 
 }
index 472d695..5b25756 100644 (file)
@@ -8,39 +8,36 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleCallback {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTriangleCallback(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void processTriangle(btVector3 triangle, int partId, int triangleIndex) {
-    gdxBulletJNI.btTriangleCallback_processTriangle(swigCPtr, this, btVector3.getCPtr(triangle), triangle, partId, triangleIndex);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTriangleCallback (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void processTriangle (btVector3 triangle, int partId, int triangleIndex) {
+               gdxBulletJNI.btTriangleCallback_processTriangle(swigCPtr, this, btVector3.getCPtr(triangle), triangle, partId,
+                       triangleIndex);
+       }
 
 }
index 0887427..00afeb4 100644 (file)
@@ -9,98 +9,97 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btTriangleConvexcastCallback extends btTriangleCallback {
-  private long swigCPtr;
-
-  protected btTriangleConvexcastCallback(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleConvexcastCallback_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleConvexcastCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleConvexcastCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_convexShape(btConvexShape value) {
-    gdxBulletJNI.btTriangleConvexcastCallback_m_convexShape_set(swigCPtr, this, btConvexShape.getCPtr(value), value);
-  }
-
-  public btConvexShape getM_convexShape() {
-    long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_convexShape_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
-  }
-
-  public void setM_convexShapeFrom(btTransform value) {
-    gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeFrom_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_convexShapeFrom() {
-    long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeFrom_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_convexShapeTo(btTransform value) {
-    gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeTo_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_convexShapeTo() {
-    long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeTo_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_triangleToWorld(btTransform value) {
-    gdxBulletJNI.btTriangleConvexcastCallback_m_triangleToWorld_set(swigCPtr, this, btTransform.getCPtr(value), value);
-  }
-
-  public btTransform getM_triangleToWorld() {
-    long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_triangleToWorld_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTransform(cPtr, false);
-  }
-
-  public void setM_hitFraction(float value) {
-    gdxBulletJNI.btTriangleConvexcastCallback_m_hitFraction_set(swigCPtr, this, value);
-  }
-
-  public float getM_hitFraction() {
-    return gdxBulletJNI.btTriangleConvexcastCallback_m_hitFraction_get(swigCPtr, this);
-  }
-
-  public void setM_triangleCollisionMargin(float value) {
-    gdxBulletJNI.btTriangleConvexcastCallback_m_triangleCollisionMargin_set(swigCPtr, this, value);
-  }
-
-  public float getM_triangleCollisionMargin() {
-    return gdxBulletJNI.btTriangleConvexcastCallback_m_triangleCollisionMargin_get(swigCPtr, this);
-  }
-
-  public void setM_allowedPenetration(float value) {
-    gdxBulletJNI.btTriangleConvexcastCallback_m_allowedPenetration_set(swigCPtr, this, value);
-  }
-
-  public float getM_allowedPenetration() {
-    return gdxBulletJNI.btTriangleConvexcastCallback_m_allowedPenetration_get(swigCPtr, this);
-  }
-
-  public float reportHit(Vector3 hitNormalLocal, Vector3 hitPointLocal, float hitFraction, int partId, int triangleIndex) {
-    return gdxBulletJNI.btTriangleConvexcastCallback_reportHit(swigCPtr, this, hitNormalLocal, hitPointLocal, hitFraction, partId, triangleIndex);
-  }
+       private long swigCPtr;
+
+       protected btTriangleConvexcastCallback (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleConvexcastCallback_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleConvexcastCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleConvexcastCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_convexShape (btConvexShape value) {
+               gdxBulletJNI.btTriangleConvexcastCallback_m_convexShape_set(swigCPtr, this, btConvexShape.getCPtr(value), value);
+       }
+
+       public btConvexShape getM_convexShape () {
+               long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_convexShape_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
+       }
+
+       public void setM_convexShapeFrom (btTransform value) {
+               gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeFrom_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_convexShapeFrom () {
+               long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeFrom_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_convexShapeTo (btTransform value) {
+               gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeTo_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_convexShapeTo () {
+               long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_convexShapeTo_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_triangleToWorld (btTransform value) {
+               gdxBulletJNI.btTriangleConvexcastCallback_m_triangleToWorld_set(swigCPtr, this, btTransform.getCPtr(value), value);
+       }
+
+       public btTransform getM_triangleToWorld () {
+               long cPtr = gdxBulletJNI.btTriangleConvexcastCallback_m_triangleToWorld_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTransform(cPtr, false);
+       }
+
+       public void setM_hitFraction (float value) {
+               gdxBulletJNI.btTriangleConvexcastCallback_m_hitFraction_set(swigCPtr, this, value);
+       }
+
+       public float getM_hitFraction () {
+               return gdxBulletJNI.btTriangleConvexcastCallback_m_hitFraction_get(swigCPtr, this);
+       }
+
+       public void setM_triangleCollisionMargin (float value) {
+               gdxBulletJNI.btTriangleConvexcastCallback_m_triangleCollisionMargin_set(swigCPtr, this, value);
+       }
+
+       public float getM_triangleCollisionMargin () {
+               return gdxBulletJNI.btTriangleConvexcastCallback_m_triangleCollisionMargin_get(swigCPtr, this);
+       }
+
+       public void setM_allowedPenetration (float value) {
+               gdxBulletJNI.btTriangleConvexcastCallback_m_allowedPenetration_set(swigCPtr, this, value);
+       }
+
+       public float getM_allowedPenetration () {
+               return gdxBulletJNI.btTriangleConvexcastCallback_m_allowedPenetration_get(swigCPtr, this);
+       }
+
+       public float reportHit (Vector3 hitNormalLocal, Vector3 hitPointLocal, float hitFraction, int partId, int triangleIndex) {
+               return gdxBulletJNI.btTriangleConvexcastCallback_reportHit(swigCPtr, this, hitNormalLocal, hitPointLocal, hitFraction,
+                       partId, triangleIndex);
+       }
 
 }
index f2073b0..04f36d7 100644 (file)
@@ -8,71 +8,95 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleIndexVertexArray extends btStridingMeshInterface {
-  private long swigCPtr;
-
-  protected btTriangleIndexVertexArray(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleIndexVertexArray_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleIndexVertexArray obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleIndexVertexArray(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btTriangleIndexVertexArray() {
-    this(gdxBulletJNI.new_btTriangleIndexVertexArray__SWIG_0(), true);
-  }
-
-  public btTriangleIndexVertexArray(int numTriangles, SWIGTYPE_p_int triangleIndexBase, int triangleIndexStride, int numVertices, float[] vertexBase, int vertexStride) {
-    this(gdxBulletJNI.new_btTriangleIndexVertexArray__SWIG_1(numTriangles, SWIGTYPE_p_int.getCPtr(triangleIndexBase), triangleIndexStride, numVertices, vertexBase, vertexStride), true);
-  }
-
-  public void addIndexedMesh(btIndexedMesh mesh, int indexType) {
-    gdxBulletJNI.btTriangleIndexVertexArray_addIndexedMesh__SWIG_0(swigCPtr, this, btIndexedMesh.getCPtr(mesh), mesh, indexType);
-  }
-
-  public void addIndexedMesh(btIndexedMesh mesh) {
-    gdxBulletJNI.btTriangleIndexVertexArray_addIndexedMesh__SWIG_1(swigCPtr, this, btIndexedMesh.getCPtr(mesh), mesh);
-  }
-
-  public void getLockedVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
-    gdxBulletJNI.btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype), subpart);
-  }
-
-  public void getLockedVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
-    gdxBulletJNI.btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_1(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
-  }
-
-  public void getLockedReadOnlyVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
-    gdxBulletJNI.btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype), subpart);
-  }
-
-  public void getLockedReadOnlyVertexIndexBase(SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts, SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase, SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
-    gdxBulletJNI.btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_1(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts), SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride), SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces), SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
-  }
-
-  public SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t getIndexedMeshArray() {
-    return new SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t(gdxBulletJNI.btTriangleIndexVertexArray_getIndexedMeshArray__SWIG_0(swigCPtr, this), false);
-  }
+       private long swigCPtr;
+
+       protected btTriangleIndexVertexArray (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleIndexVertexArray_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleIndexVertexArray obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleIndexVertexArray(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btTriangleIndexVertexArray () {
+               this(gdxBulletJNI.new_btTriangleIndexVertexArray__SWIG_0(), true);
+       }
+
+       public btTriangleIndexVertexArray (int numTriangles, SWIGTYPE_p_int triangleIndexBase, int triangleIndexStride,
+               int numVertices, float[] vertexBase, int vertexStride) {
+               this(gdxBulletJNI.new_btTriangleIndexVertexArray__SWIG_1(numTriangles, SWIGTYPE_p_int.getCPtr(triangleIndexBase),
+                       triangleIndexStride, numVertices, vertexBase, vertexStride), true);
+       }
+
+       public void addIndexedMesh (btIndexedMesh mesh, int indexType) {
+               gdxBulletJNI
+                       .btTriangleIndexVertexArray_addIndexedMesh__SWIG_0(swigCPtr, this, btIndexedMesh.getCPtr(mesh), mesh, indexType);
+       }
+
+       public void addIndexedMesh (btIndexedMesh mesh) {
+               gdxBulletJNI.btTriangleIndexVertexArray_addIndexedMesh__SWIG_1(swigCPtr, this, btIndexedMesh.getCPtr(mesh), mesh);
+       }
+
+       public void getLockedVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase,
+               SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
+               gdxBulletJNI.btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_0(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype), subpart);
+       }
+
+       public void getLockedVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase,
+               SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
+               gdxBulletJNI.btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_1(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
+       }
+
+       public void getLockedReadOnlyVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase,
+               SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype, int subpart) {
+               gdxBulletJNI.btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_0(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype), subpart);
+       }
+
+       public void getLockedReadOnlyVertexIndexBase (SWIGTYPE_p_p_unsigned_char vertexbase, SWIGTYPE_p_int numverts,
+               SWIGTYPE_p_PHY_ScalarType type, SWIGTYPE_p_int vertexStride, SWIGTYPE_p_p_unsigned_char indexbase,
+               SWIGTYPE_p_int indexstride, SWIGTYPE_p_int numfaces, SWIGTYPE_p_PHY_ScalarType indicestype) {
+               gdxBulletJNI.btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_1(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(vertexbase), SWIGTYPE_p_int.getCPtr(numverts),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(type), SWIGTYPE_p_int.getCPtr(vertexStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(indexbase), SWIGTYPE_p_int.getCPtr(indexstride), SWIGTYPE_p_int.getCPtr(numfaces),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(indicestype));
+       }
+
+       public SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t getIndexedMeshArray () {
+               return new SWIGTYPE_p_btAlignedObjectArrayT_btIndexedMesh_t(
+                       gdxBulletJNI.btTriangleIndexVertexArray_getIndexedMeshArray__SWIG_0(swigCPtr, this), false);
+       }
 
 }
index ec4e9cc..dcadf28 100644 (file)
@@ -8,67 +8,94 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleIndexVertexMaterialArray extends btTriangleIndexVertexArray {
-  private long swigCPtr;
-
-  protected btTriangleIndexVertexMaterialArray(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleIndexVertexMaterialArray_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleIndexVertexMaterialArray obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleIndexVertexMaterialArray(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btTriangleIndexVertexMaterialArray() {
-    this(gdxBulletJNI.new_btTriangleIndexVertexMaterialArray__SWIG_0(), true);
-  }
-
-  public btTriangleIndexVertexMaterialArray(int numTriangles, SWIGTYPE_p_int triangleIndexBase, int triangleIndexStride, int numVertices, float[] vertexBase, int vertexStride, int numMaterials, SWIGTYPE_p_unsigned_char materialBase, int materialStride, SWIGTYPE_p_int triangleMaterialsBase, int materialIndexStride) {
-    this(gdxBulletJNI.new_btTriangleIndexVertexMaterialArray__SWIG_1(numTriangles, SWIGTYPE_p_int.getCPtr(triangleIndexBase), triangleIndexStride, numVertices, vertexBase, vertexStride, numMaterials, SWIGTYPE_p_unsigned_char.getCPtr(materialBase), materialStride, SWIGTYPE_p_int.getCPtr(triangleMaterialsBase), materialIndexStride), true);
-  }
-
-  public void addMaterialProperties(btMaterialProperties mat, int triangleType) {
-    gdxBulletJNI.btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_0(swigCPtr, this, btMaterialProperties.getCPtr(mat), mat, triangleType);
-  }
-
-  public void addMaterialProperties(btMaterialProperties mat) {
-    gdxBulletJNI.btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_1(swigCPtr, this, btMaterialProperties.getCPtr(mat), mat);
-  }
-
-  public void getLockedMaterialBase(SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials, SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase, SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType, int subpart) {
-    gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials), SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride), SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles), SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType), subpart);
-  }
-
-  public void getLockedMaterialBase(SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials, SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase, SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType) {
-    gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_1(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials), SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride), SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles), SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType));
-  }
-
-  public void getLockedReadOnlyMaterialBase(SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials, SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase, SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType, int subpart) {
-    gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_0(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials), SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride), SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles), SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType), subpart);
-  }
-
-  public void getLockedReadOnlyMaterialBase(SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials, SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase, SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType) {
-    gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_1(swigCPtr, this, SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials), SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride), SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles), SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType));
-  }
+       private long swigCPtr;
+
+       protected btTriangleIndexVertexMaterialArray (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleIndexVertexMaterialArray_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleIndexVertexMaterialArray obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleIndexVertexMaterialArray(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btTriangleIndexVertexMaterialArray () {
+               this(gdxBulletJNI.new_btTriangleIndexVertexMaterialArray__SWIG_0(), true);
+       }
+
+       public btTriangleIndexVertexMaterialArray (int numTriangles, SWIGTYPE_p_int triangleIndexBase, int triangleIndexStride,
+               int numVertices, float[] vertexBase, int vertexStride, int numMaterials, SWIGTYPE_p_unsigned_char materialBase,
+               int materialStride, SWIGTYPE_p_int triangleMaterialsBase, int materialIndexStride) {
+               this(gdxBulletJNI.new_btTriangleIndexVertexMaterialArray__SWIG_1(numTriangles, SWIGTYPE_p_int.getCPtr(triangleIndexBase),
+                       triangleIndexStride, numVertices, vertexBase, vertexStride, numMaterials,
+                       SWIGTYPE_p_unsigned_char.getCPtr(materialBase), materialStride, SWIGTYPE_p_int.getCPtr(triangleMaterialsBase),
+                       materialIndexStride), true);
+       }
+
+       public void addMaterialProperties (btMaterialProperties mat, int triangleType) {
+               gdxBulletJNI.btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_0(swigCPtr, this,
+                       btMaterialProperties.getCPtr(mat), mat, triangleType);
+       }
+
+       public void addMaterialProperties (btMaterialProperties mat) {
+               gdxBulletJNI.btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_1(swigCPtr, this,
+                       btMaterialProperties.getCPtr(mat), mat);
+       }
+
+       public void getLockedMaterialBase (SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials,
+               SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase,
+               SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType, int subpart) {
+               gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_0(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles),
+                       SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType), subpart);
+       }
+
+       public void getLockedMaterialBase (SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials,
+               SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase,
+               SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType) {
+               gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_1(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles),
+                       SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType));
+       }
+
+       public void getLockedReadOnlyMaterialBase (SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials,
+               SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase,
+               SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType, int subpart) {
+               gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_0(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles),
+                       SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType), subpart);
+       }
+
+       public void getLockedReadOnlyMaterialBase (SWIGTYPE_p_p_unsigned_char materialBase, SWIGTYPE_p_int numMaterials,
+               SWIGTYPE_p_PHY_ScalarType materialType, SWIGTYPE_p_int materialStride, SWIGTYPE_p_p_unsigned_char triangleMaterialBase,
+               SWIGTYPE_p_int numTriangles, SWIGTYPE_p_int triangleMaterialStride, SWIGTYPE_p_PHY_ScalarType triangleType) {
+               gdxBulletJNI.btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_1(swigCPtr, this,
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(materialBase), SWIGTYPE_p_int.getCPtr(numMaterials),
+                       SWIGTYPE_p_PHY_ScalarType.getCPtr(materialType), SWIGTYPE_p_int.getCPtr(materialStride),
+                       SWIGTYPE_p_p_unsigned_char.getCPtr(triangleMaterialBase), SWIGTYPE_p_int.getCPtr(numTriangles),
+                       SWIGTYPE_p_int.getCPtr(triangleMaterialStride), SWIGTYPE_p_PHY_ScalarType.getCPtr(triangleType));
+       }
 
 }
index 057aa67..48eb0b2 100644 (file)
@@ -8,71 +8,67 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleInfo {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTriangleInfo(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleInfo obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleInfo(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btTriangleInfo() {
-    this(gdxBulletJNI.new_btTriangleInfo(), true);
-  }
-
-  public void setM_flags(int value) {
-    gdxBulletJNI.btTriangleInfo_m_flags_set(swigCPtr, this, value);
-  }
-
-  public int getM_flags() {
-    return gdxBulletJNI.btTriangleInfo_m_flags_get(swigCPtr, this);
-  }
-
-  public void setM_edgeV0V1Angle(float value) {
-    gdxBulletJNI.btTriangleInfo_m_edgeV0V1Angle_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeV0V1Angle() {
-    return gdxBulletJNI.btTriangleInfo_m_edgeV0V1Angle_get(swigCPtr, this);
-  }
-
-  public void setM_edgeV1V2Angle(float value) {
-    gdxBulletJNI.btTriangleInfo_m_edgeV1V2Angle_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeV1V2Angle() {
-    return gdxBulletJNI.btTriangleInfo_m_edgeV1V2Angle_get(swigCPtr, this);
-  }
-
-  public void setM_edgeV2V0Angle(float value) {
-    gdxBulletJNI.btTriangleInfo_m_edgeV2V0Angle_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeV2V0Angle() {
-    return gdxBulletJNI.btTriangleInfo_m_edgeV2V0Angle_get(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTriangleInfo (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleInfo obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleInfo(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btTriangleInfo () {
+               this(gdxBulletJNI.new_btTriangleInfo(), true);
+       }
+
+       public void setM_flags (int value) {
+               gdxBulletJNI.btTriangleInfo_m_flags_set(swigCPtr, this, value);
+       }
+
+       public int getM_flags () {
+               return gdxBulletJNI.btTriangleInfo_m_flags_get(swigCPtr, this);
+       }
+
+       public void setM_edgeV0V1Angle (float value) {
+               gdxBulletJNI.btTriangleInfo_m_edgeV0V1Angle_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeV0V1Angle () {
+               return gdxBulletJNI.btTriangleInfo_m_edgeV0V1Angle_get(swigCPtr, this);
+       }
+
+       public void setM_edgeV1V2Angle (float value) {
+               gdxBulletJNI.btTriangleInfo_m_edgeV1V2Angle_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeV1V2Angle () {
+               return gdxBulletJNI.btTriangleInfo_m_edgeV1V2Angle_get(swigCPtr, this);
+       }
+
+       public void setM_edgeV2V0Angle (float value) {
+               gdxBulletJNI.btTriangleInfo_m_edgeV2V0Angle_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeV2V0Angle () {
+               return gdxBulletJNI.btTriangleInfo_m_edgeV2V0Angle_get(swigCPtr, this);
+       }
 
 }
index 7a971e7..bace59c 100644 (file)
@@ -8,71 +8,67 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleInfoData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTriangleInfoData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleInfoData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleInfoData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_flags(int value) {
-    gdxBulletJNI.btTriangleInfoData_m_flags_set(swigCPtr, this, value);
-  }
-
-  public int getM_flags() {
-    return gdxBulletJNI.btTriangleInfoData_m_flags_get(swigCPtr, this);
-  }
-
-  public void setM_edgeV0V1Angle(float value) {
-    gdxBulletJNI.btTriangleInfoData_m_edgeV0V1Angle_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeV0V1Angle() {
-    return gdxBulletJNI.btTriangleInfoData_m_edgeV0V1Angle_get(swigCPtr, this);
-  }
-
-  public void setM_edgeV1V2Angle(float value) {
-    gdxBulletJNI.btTriangleInfoData_m_edgeV1V2Angle_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeV1V2Angle() {
-    return gdxBulletJNI.btTriangleInfoData_m_edgeV1V2Angle_get(swigCPtr, this);
-  }
-
-  public void setM_edgeV2V0Angle(float value) {
-    gdxBulletJNI.btTriangleInfoData_m_edgeV2V0Angle_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeV2V0Angle() {
-    return gdxBulletJNI.btTriangleInfoData_m_edgeV2V0Angle_get(swigCPtr, this);
-  }
-
-  public btTriangleInfoData() {
-    this(gdxBulletJNI.new_btTriangleInfoData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTriangleInfoData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleInfoData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleInfoData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_flags (int value) {
+               gdxBulletJNI.btTriangleInfoData_m_flags_set(swigCPtr, this, value);
+       }
+
+       public int getM_flags () {
+               return gdxBulletJNI.btTriangleInfoData_m_flags_get(swigCPtr, this);
+       }
+
+       public void setM_edgeV0V1Angle (float value) {
+               gdxBulletJNI.btTriangleInfoData_m_edgeV0V1Angle_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeV0V1Angle () {
+               return gdxBulletJNI.btTriangleInfoData_m_edgeV0V1Angle_get(swigCPtr, this);
+       }
+
+       public void setM_edgeV1V2Angle (float value) {
+               gdxBulletJNI.btTriangleInfoData_m_edgeV1V2Angle_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeV1V2Angle () {
+               return gdxBulletJNI.btTriangleInfoData_m_edgeV1V2Angle_get(swigCPtr, this);
+       }
+
+       public void setM_edgeV2V0Angle (float value) {
+               gdxBulletJNI.btTriangleInfoData_m_edgeV2V0Angle_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeV2V0Angle () {
+               return gdxBulletJNI.btTriangleInfoData_m_edgeV2V0Angle_get(swigCPtr, this);
+       }
+
+       public btTriangleInfoData () {
+               this(gdxBulletJNI.new_btTriangleInfoData(), true);
+       }
 
 }
index 8a3753e..e1cd19d 100644 (file)
@@ -8,99 +8,96 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleInfoMap {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTriangleInfoMap(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleInfoMap obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleInfoMap(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_convexEpsilon(float value) {
-    gdxBulletJNI.btTriangleInfoMap_m_convexEpsilon_set(swigCPtr, this, value);
-  }
-
-  public float getM_convexEpsilon() {
-    return gdxBulletJNI.btTriangleInfoMap_m_convexEpsilon_get(swigCPtr, this);
-  }
-
-  public void setM_planarEpsilon(float value) {
-    gdxBulletJNI.btTriangleInfoMap_m_planarEpsilon_set(swigCPtr, this, value);
-  }
-
-  public float getM_planarEpsilon() {
-    return gdxBulletJNI.btTriangleInfoMap_m_planarEpsilon_get(swigCPtr, this);
-  }
-
-  public void setM_equalVertexThreshold(float value) {
-    gdxBulletJNI.btTriangleInfoMap_m_equalVertexThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_equalVertexThreshold() {
-    return gdxBulletJNI.btTriangleInfoMap_m_equalVertexThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_edgeDistanceThreshold(float value) {
-    gdxBulletJNI.btTriangleInfoMap_m_edgeDistanceThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeDistanceThreshold() {
-    return gdxBulletJNI.btTriangleInfoMap_m_edgeDistanceThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_maxEdgeAngleThreshold(float value) {
-    gdxBulletJNI.btTriangleInfoMap_m_maxEdgeAngleThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_maxEdgeAngleThreshold() {
-    return gdxBulletJNI.btTriangleInfoMap_m_maxEdgeAngleThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_zeroAreaThreshold(float value) {
-    gdxBulletJNI.btTriangleInfoMap_m_zeroAreaThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_zeroAreaThreshold() {
-    return gdxBulletJNI.btTriangleInfoMap_m_zeroAreaThreshold_get(swigCPtr, this);
-  }
-
-  public btTriangleInfoMap() {
-    this(gdxBulletJNI.new_btTriangleInfoMap(), true);
-  }
-
-  public int calculateSerializeBufferSize() {
-    return gdxBulletJNI.btTriangleInfoMap_calculateSerializeBufferSize(swigCPtr, this);
-  }
-
-  public String serialize(SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
-    return gdxBulletJNI.btTriangleInfoMap_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer), SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
-
-  public void deSerialize(btTriangleInfoMapData data) {
-    gdxBulletJNI.btTriangleInfoMap_deSerialize(swigCPtr, this, btTriangleInfoMapData.getCPtr(data), data);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTriangleInfoMap (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleInfoMap obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleInfoMap(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_convexEpsilon (float value) {
+               gdxBulletJNI.btTriangleInfoMap_m_convexEpsilon_set(swigCPtr, this, value);
+       }
+
+       public float getM_convexEpsilon () {
+               return gdxBulletJNI.btTriangleInfoMap_m_convexEpsilon_get(swigCPtr, this);
+       }
+
+       public void setM_planarEpsilon (float value) {
+               gdxBulletJNI.btTriangleInfoMap_m_planarEpsilon_set(swigCPtr, this, value);
+       }
+
+       public float getM_planarEpsilon () {
+               return gdxBulletJNI.btTriangleInfoMap_m_planarEpsilon_get(swigCPtr, this);
+       }
+
+       public void setM_equalVertexThreshold (float value) {
+               gdxBulletJNI.btTriangleInfoMap_m_equalVertexThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_equalVertexThreshold () {
+               return gdxBulletJNI.btTriangleInfoMap_m_equalVertexThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_edgeDistanceThreshold (float value) {
+               gdxBulletJNI.btTriangleInfoMap_m_edgeDistanceThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeDistanceThreshold () {
+               return gdxBulletJNI.btTriangleInfoMap_m_edgeDistanceThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_maxEdgeAngleThreshold (float value) {
+               gdxBulletJNI.btTriangleInfoMap_m_maxEdgeAngleThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_maxEdgeAngleThreshold () {
+               return gdxBulletJNI.btTriangleInfoMap_m_maxEdgeAngleThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_zeroAreaThreshold (float value) {
+               gdxBulletJNI.btTriangleInfoMap_m_zeroAreaThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_zeroAreaThreshold () {
+               return gdxBulletJNI.btTriangleInfoMap_m_zeroAreaThreshold_get(swigCPtr, this);
+       }
+
+       public btTriangleInfoMap () {
+               this(gdxBulletJNI.new_btTriangleInfoMap(), true);
+       }
+
+       public int calculateSerializeBufferSize () {
+               return gdxBulletJNI.btTriangleInfoMap_calculateSerializeBufferSize(swigCPtr, this);
+       }
+
+       public String serialize (SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
+               return gdxBulletJNI.btTriangleInfoMap_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer),
+                       SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
+
+       public void deSerialize (btTriangleInfoMapData data) {
+               gdxBulletJNI.btTriangleInfoMap_deSerialize(swigCPtr, this, btTriangleInfoMapData.getCPtr(data), data);
+       }
 
 }
index b7720db..ab5cb5b 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleInfoMapData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTriangleInfoMapData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleInfoMapData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleInfoMapData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_hashTablePtr(SWIGTYPE_p_int value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_hashTablePtr_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_int getM_hashTablePtr() {
-    long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_hashTablePtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
-  }
-
-  public void setM_nextPtr(SWIGTYPE_p_int value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_nextPtr_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_int getM_nextPtr() {
-    long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_nextPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
-  }
-
-  public void setM_valueArrayPtr(btTriangleInfoData value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_valueArrayPtr_set(swigCPtr, this, btTriangleInfoData.getCPtr(value), value);
-  }
-
-  public btTriangleInfoData getM_valueArrayPtr() {
-    long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_valueArrayPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTriangleInfoData(cPtr, false);
-  }
-
-  public void setM_keyArrayPtr(SWIGTYPE_p_int value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_keyArrayPtr_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
-  }
-
-  public SWIGTYPE_p_int getM_keyArrayPtr() {
-    long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_keyArrayPtr_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
-  }
-
-  public void setM_convexEpsilon(float value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_convexEpsilon_set(swigCPtr, this, value);
-  }
-
-  public float getM_convexEpsilon() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_convexEpsilon_get(swigCPtr, this);
-  }
-
-  public void setM_planarEpsilon(float value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_planarEpsilon_set(swigCPtr, this, value);
-  }
-
-  public float getM_planarEpsilon() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_planarEpsilon_get(swigCPtr, this);
-  }
-
-  public void setM_equalVertexThreshold(float value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_equalVertexThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_equalVertexThreshold() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_equalVertexThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_edgeDistanceThreshold(float value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_edgeDistanceThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_edgeDistanceThreshold() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_edgeDistanceThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_zeroAreaThreshold(float value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_zeroAreaThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_zeroAreaThreshold() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_zeroAreaThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_nextSize(int value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_nextSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_nextSize() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_nextSize_get(swigCPtr, this);
-  }
-
-  public void setM_hashTableSize(int value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_hashTableSize_set(swigCPtr, this, value);
-  }
-
-  public int getM_hashTableSize() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_hashTableSize_get(swigCPtr, this);
-  }
-
-  public void setM_numValues(int value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_numValues_set(swigCPtr, this, value);
-  }
-
-  public int getM_numValues() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_numValues_get(swigCPtr, this);
-  }
-
-  public void setM_numKeys(int value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_numKeys_set(swigCPtr, this, value);
-  }
-
-  public int getM_numKeys() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_numKeys_get(swigCPtr, this);
-  }
-
-  public void setM_padding(String value) {
-    gdxBulletJNI.btTriangleInfoMapData_m_padding_set(swigCPtr, this, value);
-  }
-
-  public String getM_padding() {
-    return gdxBulletJNI.btTriangleInfoMapData_m_padding_get(swigCPtr, this);
-  }
-
-  public btTriangleInfoMapData() {
-    this(gdxBulletJNI.new_btTriangleInfoMapData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTriangleInfoMapData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleInfoMapData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleInfoMapData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_hashTablePtr (SWIGTYPE_p_int value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_hashTablePtr_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_int getM_hashTablePtr () {
+               long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_hashTablePtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
+       }
+
+       public void setM_nextPtr (SWIGTYPE_p_int value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_nextPtr_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_int getM_nextPtr () {
+               long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_nextPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
+       }
+
+       public void setM_valueArrayPtr (btTriangleInfoData value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_valueArrayPtr_set(swigCPtr, this, btTriangleInfoData.getCPtr(value), value);
+       }
+
+       public btTriangleInfoData getM_valueArrayPtr () {
+               long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_valueArrayPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTriangleInfoData(cPtr, false);
+       }
+
+       public void setM_keyArrayPtr (SWIGTYPE_p_int value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_keyArrayPtr_set(swigCPtr, this, SWIGTYPE_p_int.getCPtr(value));
+       }
+
+       public SWIGTYPE_p_int getM_keyArrayPtr () {
+               long cPtr = gdxBulletJNI.btTriangleInfoMapData_m_keyArrayPtr_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_int(cPtr, false);
+       }
+
+       public void setM_convexEpsilon (float value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_convexEpsilon_set(swigCPtr, this, value);
+       }
+
+       public float getM_convexEpsilon () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_convexEpsilon_get(swigCPtr, this);
+       }
+
+       public void setM_planarEpsilon (float value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_planarEpsilon_set(swigCPtr, this, value);
+       }
+
+       public float getM_planarEpsilon () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_planarEpsilon_get(swigCPtr, this);
+       }
+
+       public void setM_equalVertexThreshold (float value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_equalVertexThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_equalVertexThreshold () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_equalVertexThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_edgeDistanceThreshold (float value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_edgeDistanceThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_edgeDistanceThreshold () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_edgeDistanceThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_zeroAreaThreshold (float value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_zeroAreaThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_zeroAreaThreshold () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_zeroAreaThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_nextSize (int value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_nextSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_nextSize () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_nextSize_get(swigCPtr, this);
+       }
+
+       public void setM_hashTableSize (int value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_hashTableSize_set(swigCPtr, this, value);
+       }
+
+       public int getM_hashTableSize () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_hashTableSize_get(swigCPtr, this);
+       }
+
+       public void setM_numValues (int value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_numValues_set(swigCPtr, this, value);
+       }
+
+       public int getM_numValues () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_numValues_get(swigCPtr, this);
+       }
+
+       public void setM_numKeys (int value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_numKeys_set(swigCPtr, this, value);
+       }
+
+       public int getM_numKeys () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_numKeys_get(swigCPtr, this);
+       }
+
+       public void setM_padding (String value) {
+               gdxBulletJNI.btTriangleInfoMapData_m_padding_set(swigCPtr, this, value);
+       }
+
+       public String getM_padding () {
+               return gdxBulletJNI.btTriangleInfoMapData_m_padding_get(swigCPtr, this);
+       }
+
+       public btTriangleInfoMapData () {
+               this(gdxBulletJNI.new_btTriangleInfoMapData(), true);
+       }
 
 }
index 27b51b4..8b90a9d 100644 (file)
@@ -9,82 +9,80 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btTriangleMesh extends btTriangleIndexVertexArray {
-  private long swigCPtr;
-
-  protected btTriangleMesh(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleMesh_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleMesh obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleMesh(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_weldingThreshold(float value) {
-    gdxBulletJNI.btTriangleMesh_m_weldingThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_weldingThreshold() {
-    return gdxBulletJNI.btTriangleMesh_m_weldingThreshold_get(swigCPtr, this);
-  }
-
-  public btTriangleMesh(boolean use32bitIndices, boolean use4componentVertices) {
-    this(gdxBulletJNI.new_btTriangleMesh__SWIG_0(use32bitIndices, use4componentVertices), true);
-  }
-
-  public btTriangleMesh(boolean use32bitIndices) {
-    this(gdxBulletJNI.new_btTriangleMesh__SWIG_1(use32bitIndices), true);
-  }
-
-  public btTriangleMesh() {
-    this(gdxBulletJNI.new_btTriangleMesh__SWIG_2(), true);
-  }
-
-  public boolean getUse32bitIndices() {
-    return gdxBulletJNI.btTriangleMesh_getUse32bitIndices(swigCPtr, this);
-  }
-
-  public boolean getUse4componentVertices() {
-    return gdxBulletJNI.btTriangleMesh_getUse4componentVertices(swigCPtr, this);
-  }
-
-  public void addTriangle(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2, boolean removeDuplicateVertices) {
-    gdxBulletJNI.btTriangleMesh_addTriangle__SWIG_0(swigCPtr, this, vertex0, vertex1, vertex2, removeDuplicateVertices);
-  }
-
-  public void addTriangle(Vector3 vertex0, Vector3 vertex1, Vector3 vertex2) {
-    gdxBulletJNI.btTriangleMesh_addTriangle__SWIG_1(swigCPtr, this, vertex0, vertex1, vertex2);
-  }
-
-  public int getNumTriangles() {
-    return gdxBulletJNI.btTriangleMesh_getNumTriangles(swigCPtr, this);
-  }
-
-  public int findOrAddVertex(Vector3 vertex, boolean removeDuplicateVertices) {
-    return gdxBulletJNI.btTriangleMesh_findOrAddVertex(swigCPtr, this, vertex, removeDuplicateVertices);
-  }
-
-  public void addIndex(int index) {
-    gdxBulletJNI.btTriangleMesh_addIndex(swigCPtr, this, index);
-  }
+       private long swigCPtr;
+
+       protected btTriangleMesh (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleMesh_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleMesh obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleMesh(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_weldingThreshold (float value) {
+               gdxBulletJNI.btTriangleMesh_m_weldingThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_weldingThreshold () {
+               return gdxBulletJNI.btTriangleMesh_m_weldingThreshold_get(swigCPtr, this);
+       }
+
+       public btTriangleMesh (boolean use32bitIndices, boolean use4componentVertices) {
+               this(gdxBulletJNI.new_btTriangleMesh__SWIG_0(use32bitIndices, use4componentVertices), true);
+       }
+
+       public btTriangleMesh (boolean use32bitIndices) {
+               this(gdxBulletJNI.new_btTriangleMesh__SWIG_1(use32bitIndices), true);
+       }
+
+       public btTriangleMesh () {
+               this(gdxBulletJNI.new_btTriangleMesh__SWIG_2(), true);
+       }
+
+       public boolean getUse32bitIndices () {
+               return gdxBulletJNI.btTriangleMesh_getUse32bitIndices(swigCPtr, this);
+       }
+
+       public boolean getUse4componentVertices () {
+               return gdxBulletJNI.btTriangleMesh_getUse4componentVertices(swigCPtr, this);
+       }
+
+       public void addTriangle (Vector3 vertex0, Vector3 vertex1, Vector3 vertex2, boolean removeDuplicateVertices) {
+               gdxBulletJNI.btTriangleMesh_addTriangle__SWIG_0(swigCPtr, this, vertex0, vertex1, vertex2, removeDuplicateVertices);
+       }
+
+       public void addTriangle (Vector3 vertex0, Vector3 vertex1, Vector3 vertex2) {
+               gdxBulletJNI.btTriangleMesh_addTriangle__SWIG_1(swigCPtr, this, vertex0, vertex1, vertex2);
+       }
+
+       public int getNumTriangles () {
+               return gdxBulletJNI.btTriangleMesh_getNumTriangles(swigCPtr, this);
+       }
+
+       public int findOrAddVertex (Vector3 vertex, boolean removeDuplicateVertices) {
+               return gdxBulletJNI.btTriangleMesh_findOrAddVertex(swigCPtr, this, vertex, removeDuplicateVertices);
+       }
+
+       public void addIndex (int index) {
+               gdxBulletJNI.btTriangleMesh_addIndex(swigCPtr, this, index);
+       }
 
 }
index 2c23bdf..a83684d 100644 (file)
@@ -9,59 +9,57 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btTriangleMeshShape extends btConcaveShape {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btTriangleMeshShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btTriangleMeshShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleMeshShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btTriangleMeshShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btTriangleMeshShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleMeshShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleMeshShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public Vector3 localGetSupportingVertex(Vector3 vec) {
-       return gdxBulletJNI.btTriangleMeshShape_localGetSupportingVertex(swigCPtr, this, vec);
-}
+       public Vector3 localGetSupportingVertex (Vector3 vec) {
+               return gdxBulletJNI.btTriangleMeshShape_localGetSupportingVertex(swigCPtr, this, vec);
+       }
 
-  public Vector3 localGetSupportingVertexWithoutMargin(Vector3 vec) {
-       return gdxBulletJNI.btTriangleMeshShape_localGetSupportingVertexWithoutMargin(swigCPtr, this, vec);
-}
+       public Vector3 localGetSupportingVertexWithoutMargin (Vector3 vec) {
+               return gdxBulletJNI.btTriangleMeshShape_localGetSupportingVertexWithoutMargin(swigCPtr, this, vec);
+       }
 
-  public void recalcLocalAabb() {
-    gdxBulletJNI.btTriangleMeshShape_recalcLocalAabb(swigCPtr, this);
-  }
+       public void recalcLocalAabb () {
+               gdxBulletJNI.btTriangleMeshShape_recalcLocalAabb(swigCPtr, this);
+       }
 
-  public btStridingMeshInterface getMeshInterface() {
-    long cPtr = gdxBulletJNI.btTriangleMeshShape_getMeshInterface__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btStridingMeshInterface(cPtr, false);
-  }
+       public btStridingMeshInterface getMeshInterface () {
+               long cPtr = gdxBulletJNI.btTriangleMeshShape_getMeshInterface__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btStridingMeshInterface(cPtr, false);
+       }
 
-  public Vector3 getLocalAabbMin() {
-       return gdxBulletJNI.btTriangleMeshShape_getLocalAabbMin(swigCPtr, this);
-}
+       public Vector3 getLocalAabbMin () {
+               return gdxBulletJNI.btTriangleMeshShape_getLocalAabbMin(swigCPtr, this);
+       }
 
-  public Vector3 getLocalAabbMax() {
-       return gdxBulletJNI.btTriangleMeshShape_getLocalAabbMax(swigCPtr, this);
-}
+       public Vector3 getLocalAabbMax () {
+               return gdxBulletJNI.btTriangleMeshShape_getLocalAabbMax(swigCPtr, this);
+       }
 
 }
index 214b9db..566b697 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTriangleMeshShapeData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTriangleMeshShapeData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleMeshShapeData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleMeshShapeData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_collisionShapeData(btCollisionShapeData value) {
-    gdxBulletJNI.btTriangleMeshShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
-  }
-
-  public btCollisionShapeData getM_collisionShapeData() {
-    long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_collisionShapeData_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
-  }
-
-  public void setM_meshInterface(btStridingMeshInterfaceData value) {
-    gdxBulletJNI.btTriangleMeshShapeData_m_meshInterface_set(swigCPtr, this, btStridingMeshInterfaceData.getCPtr(value), value);
-  }
-
-  public btStridingMeshInterfaceData getM_meshInterface() {
-    long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_meshInterface_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btStridingMeshInterfaceData(cPtr, false);
-  }
-
-  public void setM_quantizedFloatBvh(btQuantizedBvhFloatData value) {
-    gdxBulletJNI.btTriangleMeshShapeData_m_quantizedFloatBvh_set(swigCPtr, this, btQuantizedBvhFloatData.getCPtr(value), value);
-  }
-
-  public btQuantizedBvhFloatData getM_quantizedFloatBvh() {
-    long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_quantizedFloatBvh_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btQuantizedBvhFloatData(cPtr, false);
-  }
-
-  public void setM_quantizedDoubleBvh(btQuantizedBvhDoubleData value) {
-    gdxBulletJNI.btTriangleMeshShapeData_m_quantizedDoubleBvh_set(swigCPtr, this, btQuantizedBvhDoubleData.getCPtr(value), value);
-  }
-
-  public btQuantizedBvhDoubleData getM_quantizedDoubleBvh() {
-    long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_quantizedDoubleBvh_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btQuantizedBvhDoubleData(cPtr, false);
-  }
-
-  public void setM_triangleInfoMap(btTriangleInfoMapData value) {
-    gdxBulletJNI.btTriangleMeshShapeData_m_triangleInfoMap_set(swigCPtr, this, btTriangleInfoMapData.getCPtr(value), value);
-  }
-
-  public btTriangleInfoMapData getM_triangleInfoMap() {
-    long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_triangleInfoMap_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btTriangleInfoMapData(cPtr, false);
-  }
-
-  public void setM_collisionMargin(float value) {
-    gdxBulletJNI.btTriangleMeshShapeData_m_collisionMargin_set(swigCPtr, this, value);
-  }
-
-  public float getM_collisionMargin() {
-    return gdxBulletJNI.btTriangleMeshShapeData_m_collisionMargin_get(swigCPtr, this);
-  }
-
-  public void setM_pad3(String value) {
-    gdxBulletJNI.btTriangleMeshShapeData_m_pad3_set(swigCPtr, this, value);
-  }
-
-  public String getM_pad3() {
-    return gdxBulletJNI.btTriangleMeshShapeData_m_pad3_get(swigCPtr, this);
-  }
-
-  public btTriangleMeshShapeData() {
-    this(gdxBulletJNI.new_btTriangleMeshShapeData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTriangleMeshShapeData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleMeshShapeData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleMeshShapeData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_collisionShapeData (btCollisionShapeData value) {
+               gdxBulletJNI.btTriangleMeshShapeData_m_collisionShapeData_set(swigCPtr, this, btCollisionShapeData.getCPtr(value), value);
+       }
+
+       public btCollisionShapeData getM_collisionShapeData () {
+               long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_collisionShapeData_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btCollisionShapeData(cPtr, false);
+       }
+
+       public void setM_meshInterface (btStridingMeshInterfaceData value) {
+               gdxBulletJNI.btTriangleMeshShapeData_m_meshInterface_set(swigCPtr, this, btStridingMeshInterfaceData.getCPtr(value), value);
+       }
+
+       public btStridingMeshInterfaceData getM_meshInterface () {
+               long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_meshInterface_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btStridingMeshInterfaceData(cPtr, false);
+       }
+
+       public void setM_quantizedFloatBvh (btQuantizedBvhFloatData value) {
+               gdxBulletJNI.btTriangleMeshShapeData_m_quantizedFloatBvh_set(swigCPtr, this, btQuantizedBvhFloatData.getCPtr(value), value);
+       }
+
+       public btQuantizedBvhFloatData getM_quantizedFloatBvh () {
+               long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_quantizedFloatBvh_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btQuantizedBvhFloatData(cPtr, false);
+       }
+
+       public void setM_quantizedDoubleBvh (btQuantizedBvhDoubleData value) {
+               gdxBulletJNI.btTriangleMeshShapeData_m_quantizedDoubleBvh_set(swigCPtr, this, btQuantizedBvhDoubleData.getCPtr(value),
+                       value);
+       }
+
+       public btQuantizedBvhDoubleData getM_quantizedDoubleBvh () {
+               long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_quantizedDoubleBvh_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btQuantizedBvhDoubleData(cPtr, false);
+       }
+
+       public void setM_triangleInfoMap (btTriangleInfoMapData value) {
+               gdxBulletJNI.btTriangleMeshShapeData_m_triangleInfoMap_set(swigCPtr, this, btTriangleInfoMapData.getCPtr(value), value);
+       }
+
+       public btTriangleInfoMapData getM_triangleInfoMap () {
+               long cPtr = gdxBulletJNI.btTriangleMeshShapeData_m_triangleInfoMap_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btTriangleInfoMapData(cPtr, false);
+       }
+
+       public void setM_collisionMargin (float value) {
+               gdxBulletJNI.btTriangleMeshShapeData_m_collisionMargin_set(swigCPtr, this, value);
+       }
+
+       public float getM_collisionMargin () {
+               return gdxBulletJNI.btTriangleMeshShapeData_m_collisionMargin_get(swigCPtr, this);
+       }
+
+       public void setM_pad3 (String value) {
+               gdxBulletJNI.btTriangleMeshShapeData_m_pad3_set(swigCPtr, this, value);
+       }
+
+       public String getM_pad3 () {
+               return gdxBulletJNI.btTriangleMeshShapeData_m_pad3_get(swigCPtr, this);
+       }
+
+       public btTriangleMeshShapeData () {
+               this(gdxBulletJNI.new_btTriangleMeshShapeData(), true);
+       }
 
 }
index 008c4fc..57980ba 100644 (file)
@@ -9,79 +9,77 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btTriangleRaycastCallback extends btTriangleCallback {
-  private long swigCPtr;
-
-  protected btTriangleRaycastCallback(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleRaycastCallback_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTriangleRaycastCallback obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleRaycastCallback(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public void setM_from(btVector3 value) {
-    gdxBulletJNI.btTriangleRaycastCallback_m_from_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_from() {
-    long cPtr = gdxBulletJNI.btTriangleRaycastCallback_m_from_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_to(btVector3 value) {
-    gdxBulletJNI.btTriangleRaycastCallback_m_to_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_to() {
-    long cPtr = gdxBulletJNI.btTriangleRaycastCallback_m_to_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_flags(long value) {
-    gdxBulletJNI.btTriangleRaycastCallback_m_flags_set(swigCPtr, this, value);
-  }
-
-  public long getM_flags() {
-    return gdxBulletJNI.btTriangleRaycastCallback_m_flags_get(swigCPtr, this);
-  }
-
-  public void setM_hitFraction(float value) {
-    gdxBulletJNI.btTriangleRaycastCallback_m_hitFraction_set(swigCPtr, this, value);
-  }
-
-  public float getM_hitFraction() {
-    return gdxBulletJNI.btTriangleRaycastCallback_m_hitFraction_get(swigCPtr, this);
-  }
-
-  public float reportHit(Vector3 hitNormalLocal, float hitFraction, int partId, int triangleIndex) {
-    return gdxBulletJNI.btTriangleRaycastCallback_reportHit(swigCPtr, this, hitNormalLocal, hitFraction, partId, triangleIndex);
-  }
-
-  public final static class EFlags {
-    public final static int kF_None = 0;
-    public final static int kF_FilterBackfaces = 1 << 0;
-    public final static int kF_KeepUnflippedNormal = 1 << 1;
-    public final static int kF_Terminator = 0xFFFFFFFF;
-  }
+       private long swigCPtr;
+
+       protected btTriangleRaycastCallback (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleRaycastCallback_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTriangleRaycastCallback obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleRaycastCallback(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public void setM_from (btVector3 value) {
+               gdxBulletJNI.btTriangleRaycastCallback_m_from_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_from () {
+               long cPtr = gdxBulletJNI.btTriangleRaycastCallback_m_from_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_to (btVector3 value) {
+               gdxBulletJNI.btTriangleRaycastCallback_m_to_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_to () {
+               long cPtr = gdxBulletJNI.btTriangleRaycastCallback_m_to_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_flags (long value) {
+               gdxBulletJNI.btTriangleRaycastCallback_m_flags_set(swigCPtr, this, value);
+       }
+
+       public long getM_flags () {
+               return gdxBulletJNI.btTriangleRaycastCallback_m_flags_get(swigCPtr, this);
+       }
+
+       public void setM_hitFraction (float value) {
+               gdxBulletJNI.btTriangleRaycastCallback_m_hitFraction_set(swigCPtr, this, value);
+       }
+
+       public float getM_hitFraction () {
+               return gdxBulletJNI.btTriangleRaycastCallback_m_hitFraction_get(swigCPtr, this);
+       }
+
+       public float reportHit (Vector3 hitNormalLocal, float hitFraction, int partId, int triangleIndex) {
+               return gdxBulletJNI.btTriangleRaycastCallback_reportHit(swigCPtr, this, hitNormalLocal, hitFraction, partId, triangleIndex);
+       }
+
+       public final static class EFlags {
+               public final static int kF_None = 0;
+               public final static int kF_FilterBackfaces = 1 << 0;
+               public final static int kF_KeepUnflippedNormal = 1 << 1;
+               public final static int kF_Terminator = 0xFFFFFFFF;
+       }
 
 }
index 2d3a7de..95dc490 100644 (file)
@@ -9,63 +9,61 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btTriangleShape extends btPolyhedralConvexShape {
-  private long swigCPtr;
+       private long swigCPtr;
 
-  protected btTriangleShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTriangleShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
+       protected btTriangleShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTriangleShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
 
-  public static long getCPtr(btTriangleShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
+       public static long getCPtr (btTriangleShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
 
-  protected void finalize() {
-    delete();
-  }
+       protected void finalize () {
+               delete();
+       }
 
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTriangleShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTriangleShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
 
-  public void setM_vertices1(btVector3 value) {
-    gdxBulletJNI.btTriangleShape_m_vertices1_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
+       public void setM_vertices1 (btVector3 value) {
+               gdxBulletJNI.btTriangleShape_m_vertices1_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
 
-  public btVector3 getM_vertices1() {
-    long cPtr = gdxBulletJNI.btTriangleShape_m_vertices1_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
+       public btVector3 getM_vertices1 () {
+               long cPtr = gdxBulletJNI.btTriangleShape_m_vertices1_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
 
-  public Vector3 getVertexPtr(int index) {
-       return gdxBulletJNI.btTriangleShape_getVertexPtr__SWIG_0(swigCPtr, this, index);
-}
+       public Vector3 getVertexPtr (int index) {
+               return gdxBulletJNI.btTriangleShape_getVertexPtr__SWIG_0(swigCPtr, this, index);
+       }
 
-  public btTriangleShape() {
-    this(gdxBulletJNI.new_btTriangleShape__SWIG_0(), true);
-  }
+       public btTriangleShape () {
+               this(gdxBulletJNI.new_btTriangleShape__SWIG_0(), true);
+       }
 
-  public btTriangleShape(Vector3 p0, Vector3 p1, Vector3 p2) {
-    this(gdxBulletJNI.new_btTriangleShape__SWIG_1(p0, p1, p2), true);
-  }
+       public btTriangleShape (Vector3 p0, Vector3 p1, Vector3 p2) {
+               this(gdxBulletJNI.new_btTriangleShape__SWIG_1(p0, p1, p2), true);
+       }
 
-  public void calcNormal(Vector3 normal) {
-    gdxBulletJNI.btTriangleShape_calcNormal(swigCPtr, this, normal);
-  }
+       public void calcNormal (Vector3 normal) {
+               gdxBulletJNI.btTriangleShape_calcNormal(swigCPtr, this, normal);
+       }
 
-  public void getPlaneEquation(int i, Vector3 planeNormal, Vector3 planeSupport) {
-    gdxBulletJNI.btTriangleShape_getPlaneEquation(swigCPtr, this, i, planeNormal, planeSupport);
-  }
+       public void getPlaneEquation (int i, Vector3 planeNormal, Vector3 planeSupport) {
+               gdxBulletJNI.btTriangleShape_getPlaneEquation(swigCPtr, this, i, planeNormal, planeSupport);
+       }
 
 }
index 4cfa170..f6443b8 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTypedConstraint extends btTypedObject {
-  private long swigCPtr;
-
-  protected btTypedConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btTypedConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTypedConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTypedConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public static btRigidBody getFixedBody() {
-    return new btRigidBody(gdxBulletJNI.btTypedConstraint_getFixedBody(), false);
-  }
-
-  public int getOverrideNumSolverIterations() {
-    return gdxBulletJNI.btTypedConstraint_getOverrideNumSolverIterations(swigCPtr, this);
-  }
-
-  public void setOverrideNumSolverIterations(int overideNumIterations) {
-    gdxBulletJNI.btTypedConstraint_setOverrideNumSolverIterations(swigCPtr, this, overideNumIterations);
-  }
-
-  public void buildJacobian() {
-    gdxBulletJNI.btTypedConstraint_buildJacobian(swigCPtr, this);
-  }
-
-  public void setupSolverConstraint(SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t ca, int solverBodyA, int solverBodyB, float timeStep) {
-    gdxBulletJNI.btTypedConstraint_setupSolverConstraint(swigCPtr, this, SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t.getCPtr(ca), solverBodyA, solverBodyB, timeStep);
-  }
-
-  public void getInfo1(SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
-    gdxBulletJNI.btTypedConstraint_getInfo1(swigCPtr, this, SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
-  }
-
-  public void getInfo2(btConstraintInfo2 info) {
-    gdxBulletJNI.btTypedConstraint_getInfo2(swigCPtr, this, btConstraintInfo2.getCPtr(info), info);
-  }
-
-  public void internalSetAppliedImpulse(float appliedImpulse) {
-    gdxBulletJNI.btTypedConstraint_internalSetAppliedImpulse(swigCPtr, this, appliedImpulse);
-  }
-
-  public float internalGetAppliedImpulse() {
-    return gdxBulletJNI.btTypedConstraint_internalGetAppliedImpulse(swigCPtr, this);
-  }
-
-  public float getBreakingImpulseThreshold() {
-    return gdxBulletJNI.btTypedConstraint_getBreakingImpulseThreshold(swigCPtr, this);
-  }
-
-  public void setBreakingImpulseThreshold(float threshold) {
-    gdxBulletJNI.btTypedConstraint_setBreakingImpulseThreshold(swigCPtr, this, threshold);
-  }
-
-  public boolean isEnabled() {
-    return gdxBulletJNI.btTypedConstraint_isEnabled(swigCPtr, this);
-  }
-
-  public void setEnabled(boolean enabled) {
-    gdxBulletJNI.btTypedConstraint_setEnabled(swigCPtr, this, enabled);
-  }
-
-  public void solveConstraintObsolete(btRigidBody arg0, btRigidBody arg1, float arg2) {
-    gdxBulletJNI.btTypedConstraint_solveConstraintObsolete(swigCPtr, this, btRigidBody.getCPtr(arg0), arg0, btRigidBody.getCPtr(arg1), arg1, arg2);
-  }
-
-  public btRigidBody getRigidBodyA() {
-    return new btRigidBody(gdxBulletJNI.btTypedConstraint_getRigidBodyA__SWIG_0(swigCPtr, this), false);
-  }
-
-  public btRigidBody getRigidBodyB() {
-    return new btRigidBody(gdxBulletJNI.btTypedConstraint_getRigidBodyB__SWIG_0(swigCPtr, this), false);
-  }
-
-  public int getUserConstraintType() {
-    return gdxBulletJNI.btTypedConstraint_getUserConstraintType(swigCPtr, this);
-  }
-
-  public void setUserConstraintType(int userConstraintType) {
-    gdxBulletJNI.btTypedConstraint_setUserConstraintType(swigCPtr, this, userConstraintType);
-  }
-
-  public void setUserConstraintId(int uid) {
-    gdxBulletJNI.btTypedConstraint_setUserConstraintId(swigCPtr, this, uid);
-  }
-
-  public int getUserConstraintId() {
-    return gdxBulletJNI.btTypedConstraint_getUserConstraintId(swigCPtr, this);
-  }
-
-  public void setUserConstraintPtr(SWIGTYPE_p_void ptr) {
-    gdxBulletJNI.btTypedConstraint_setUserConstraintPtr(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
-  }
-
-  public SWIGTYPE_p_void getUserConstraintPtr() {
-    long cPtr = gdxBulletJNI.btTypedConstraint_getUserConstraintPtr(swigCPtr, this);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
-
-  public int getUid() {
-    return gdxBulletJNI.btTypedConstraint_getUid(swigCPtr, this);
-  }
-
-  public boolean needsFeedback() {
-    return gdxBulletJNI.btTypedConstraint_needsFeedback(swigCPtr, this);
-  }
-
-  public void enableFeedback(boolean needsFeedback) {
-    gdxBulletJNI.btTypedConstraint_enableFeedback(swigCPtr, this, needsFeedback);
-  }
-
-  public float getAppliedImpulse() {
-    return gdxBulletJNI.btTypedConstraint_getAppliedImpulse(swigCPtr, this);
-  }
-
-  public int getConstraintType() {
-    return gdxBulletJNI.btTypedConstraint_getConstraintType(swigCPtr, this);
-  }
-
-  public void setDbgDrawSize(float dbgDrawSize) {
-    gdxBulletJNI.btTypedConstraint_setDbgDrawSize(swigCPtr, this, dbgDrawSize);
-  }
-
-  public float getDbgDrawSize() {
-    return gdxBulletJNI.btTypedConstraint_getDbgDrawSize(swigCPtr, this);
-  }
-
-  public void setParam(int num, float value, int axis) {
-    gdxBulletJNI.btTypedConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
-  }
-
-  public void setParam(int num, float value) {
-    gdxBulletJNI.btTypedConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
-  }
-
-  public float getParam(int num, int axis) {
-    return gdxBulletJNI.btTypedConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
-  }
-
-  public float getParam(int num) {
-    return gdxBulletJNI.btTypedConstraint_getParam__SWIG_1(swigCPtr, this, num);
-  }
-
-  public int calculateSerializeBufferSize() {
-    return gdxBulletJNI.btTypedConstraint_calculateSerializeBufferSize(swigCPtr, this);
-  }
-
-  public String serialize(SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
-    return gdxBulletJNI.btTypedConstraint_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer), SWIGTYPE_p_btSerializer.getCPtr(serializer));
-  }
+       private long swigCPtr;
+
+       protected btTypedConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btTypedConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTypedConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTypedConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public static btRigidBody getFixedBody () {
+               return new btRigidBody(gdxBulletJNI.btTypedConstraint_getFixedBody(), false);
+       }
+
+       public int getOverrideNumSolverIterations () {
+               return gdxBulletJNI.btTypedConstraint_getOverrideNumSolverIterations(swigCPtr, this);
+       }
+
+       public void setOverrideNumSolverIterations (int overideNumIterations) {
+               gdxBulletJNI.btTypedConstraint_setOverrideNumSolverIterations(swigCPtr, this, overideNumIterations);
+       }
+
+       public void buildJacobian () {
+               gdxBulletJNI.btTypedConstraint_buildJacobian(swigCPtr, this);
+       }
+
+       public void setupSolverConstraint (SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t ca, int solverBodyA, int solverBodyB,
+               float timeStep) {
+               gdxBulletJNI.btTypedConstraint_setupSolverConstraint(swigCPtr, this,
+                       SWIGTYPE_p_btAlignedObjectArrayT_btSolverConstraint_t.getCPtr(ca), solverBodyA, solverBodyB, timeStep);
+       }
+
+       public void getInfo1 (SWIGTYPE_p_btTypedConstraint__btConstraintInfo1 info) {
+               gdxBulletJNI.btTypedConstraint_getInfo1(swigCPtr, this, SWIGTYPE_p_btTypedConstraint__btConstraintInfo1.getCPtr(info));
+       }
+
+       public void getInfo2 (btConstraintInfo2 info) {
+               gdxBulletJNI.btTypedConstraint_getInfo2(swigCPtr, this, btConstraintInfo2.getCPtr(info), info);
+       }
+
+       public void internalSetAppliedImpulse (float appliedImpulse) {
+               gdxBulletJNI.btTypedConstraint_internalSetAppliedImpulse(swigCPtr, this, appliedImpulse);
+       }
+
+       public float internalGetAppliedImpulse () {
+               return gdxBulletJNI.btTypedConstraint_internalGetAppliedImpulse(swigCPtr, this);
+       }
+
+       public float getBreakingImpulseThreshold () {
+               return gdxBulletJNI.btTypedConstraint_getBreakingImpulseThreshold(swigCPtr, this);
+       }
+
+       public void setBreakingImpulseThreshold (float threshold) {
+               gdxBulletJNI.btTypedConstraint_setBreakingImpulseThreshold(swigCPtr, this, threshold);
+       }
+
+       public boolean isEnabled () {
+               return gdxBulletJNI.btTypedConstraint_isEnabled(swigCPtr, this);
+       }
+
+       public void setEnabled (boolean enabled) {
+               gdxBulletJNI.btTypedConstraint_setEnabled(swigCPtr, this, enabled);
+       }
+
+       public void solveConstraintObsolete (btRigidBody arg0, btRigidBody arg1, float arg2) {
+               gdxBulletJNI.btTypedConstraint_solveConstraintObsolete(swigCPtr, this, btRigidBody.getCPtr(arg0), arg0,
+                       btRigidBody.getCPtr(arg1), arg1, arg2);
+       }
+
+       public btRigidBody getRigidBodyA () {
+               return new btRigidBody(gdxBulletJNI.btTypedConstraint_getRigidBodyA__SWIG_0(swigCPtr, this), false);
+       }
+
+       public btRigidBody getRigidBodyB () {
+               return new btRigidBody(gdxBulletJNI.btTypedConstraint_getRigidBodyB__SWIG_0(swigCPtr, this), false);
+       }
+
+       public int getUserConstraintType () {
+               return gdxBulletJNI.btTypedConstraint_getUserConstraintType(swigCPtr, this);
+       }
+
+       public void setUserConstraintType (int userConstraintType) {
+               gdxBulletJNI.btTypedConstraint_setUserConstraintType(swigCPtr, this, userConstraintType);
+       }
+
+       public void setUserConstraintId (int uid) {
+               gdxBulletJNI.btTypedConstraint_setUserConstraintId(swigCPtr, this, uid);
+       }
+
+       public int getUserConstraintId () {
+               return gdxBulletJNI.btTypedConstraint_getUserConstraintId(swigCPtr, this);
+       }
+
+       public void setUserConstraintPtr (SWIGTYPE_p_void ptr) {
+               gdxBulletJNI.btTypedConstraint_setUserConstraintPtr(swigCPtr, this, SWIGTYPE_p_void.getCPtr(ptr));
+       }
+
+       public SWIGTYPE_p_void getUserConstraintPtr () {
+               long cPtr = gdxBulletJNI.btTypedConstraint_getUserConstraintPtr(swigCPtr, this);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public int getUid () {
+               return gdxBulletJNI.btTypedConstraint_getUid(swigCPtr, this);
+       }
+
+       public boolean needsFeedback () {
+               return gdxBulletJNI.btTypedConstraint_needsFeedback(swigCPtr, this);
+       }
+
+       public void enableFeedback (boolean needsFeedback) {
+               gdxBulletJNI.btTypedConstraint_enableFeedback(swigCPtr, this, needsFeedback);
+       }
+
+       public float getAppliedImpulse () {
+               return gdxBulletJNI.btTypedConstraint_getAppliedImpulse(swigCPtr, this);
+       }
+
+       public int getConstraintType () {
+               return gdxBulletJNI.btTypedConstraint_getConstraintType(swigCPtr, this);
+       }
+
+       public void setDbgDrawSize (float dbgDrawSize) {
+               gdxBulletJNI.btTypedConstraint_setDbgDrawSize(swigCPtr, this, dbgDrawSize);
+       }
+
+       public float getDbgDrawSize () {
+               return gdxBulletJNI.btTypedConstraint_getDbgDrawSize(swigCPtr, this);
+       }
+
+       public void setParam (int num, float value, int axis) {
+               gdxBulletJNI.btTypedConstraint_setParam__SWIG_0(swigCPtr, this, num, value, axis);
+       }
+
+       public void setParam (int num, float value) {
+               gdxBulletJNI.btTypedConstraint_setParam__SWIG_1(swigCPtr, this, num, value);
+       }
+
+       public float getParam (int num, int axis) {
+               return gdxBulletJNI.btTypedConstraint_getParam__SWIG_0(swigCPtr, this, num, axis);
+       }
+
+       public float getParam (int num) {
+               return gdxBulletJNI.btTypedConstraint_getParam__SWIG_1(swigCPtr, this, num);
+       }
+
+       public int calculateSerializeBufferSize () {
+               return gdxBulletJNI.btTypedConstraint_calculateSerializeBufferSize(swigCPtr, this);
+       }
+
+       public String serialize (SWIGTYPE_p_void dataBuffer, SWIGTYPE_p_btSerializer serializer) {
+               return gdxBulletJNI.btTypedConstraint_serialize(swigCPtr, this, SWIGTYPE_p_void.getCPtr(dataBuffer),
+                       SWIGTYPE_p_btSerializer.getCPtr(serializer));
+       }
 
 }
index 3dafa7c..f0fd12d 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTypedConstraintData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTypedConstraintData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTypedConstraintData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTypedConstraintData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_rbA(btRigidBodyFloatData value) {
-    gdxBulletJNI.btTypedConstraintData_m_rbA_set(swigCPtr, this, btRigidBodyFloatData.getCPtr(value), value);
-  }
-
-  public btRigidBodyFloatData getM_rbA() {
-    long cPtr = gdxBulletJNI.btTypedConstraintData_m_rbA_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btRigidBodyFloatData(cPtr, false);
-  }
-
-  public void setM_rbB(btRigidBodyFloatData value) {
-    gdxBulletJNI.btTypedConstraintData_m_rbB_set(swigCPtr, this, btRigidBodyFloatData.getCPtr(value), value);
-  }
-
-  public btRigidBodyFloatData getM_rbB() {
-    long cPtr = gdxBulletJNI.btTypedConstraintData_m_rbB_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btRigidBodyFloatData(cPtr, false);
-  }
-
-  public void setM_name(String value) {
-    gdxBulletJNI.btTypedConstraintData_m_name_set(swigCPtr, this, value);
-  }
-
-  public String getM_name() {
-    return gdxBulletJNI.btTypedConstraintData_m_name_get(swigCPtr, this);
-  }
-
-  public void setM_objectType(int value) {
-    gdxBulletJNI.btTypedConstraintData_m_objectType_set(swigCPtr, this, value);
-  }
-
-  public int getM_objectType() {
-    return gdxBulletJNI.btTypedConstraintData_m_objectType_get(swigCPtr, this);
-  }
-
-  public void setM_userConstraintType(int value) {
-    gdxBulletJNI.btTypedConstraintData_m_userConstraintType_set(swigCPtr, this, value);
-  }
-
-  public int getM_userConstraintType() {
-    return gdxBulletJNI.btTypedConstraintData_m_userConstraintType_get(swigCPtr, this);
-  }
-
-  public void setM_userConstraintId(int value) {
-    gdxBulletJNI.btTypedConstraintData_m_userConstraintId_set(swigCPtr, this, value);
-  }
-
-  public int getM_userConstraintId() {
-    return gdxBulletJNI.btTypedConstraintData_m_userConstraintId_get(swigCPtr, this);
-  }
-
-  public void setM_needsFeedback(int value) {
-    gdxBulletJNI.btTypedConstraintData_m_needsFeedback_set(swigCPtr, this, value);
-  }
-
-  public int getM_needsFeedback() {
-    return gdxBulletJNI.btTypedConstraintData_m_needsFeedback_get(swigCPtr, this);
-  }
-
-  public void setM_appliedImpulse(float value) {
-    gdxBulletJNI.btTypedConstraintData_m_appliedImpulse_set(swigCPtr, this, value);
-  }
-
-  public float getM_appliedImpulse() {
-    return gdxBulletJNI.btTypedConstraintData_m_appliedImpulse_get(swigCPtr, this);
-  }
-
-  public void setM_dbgDrawSize(float value) {
-    gdxBulletJNI.btTypedConstraintData_m_dbgDrawSize_set(swigCPtr, this, value);
-  }
-
-  public float getM_dbgDrawSize() {
-    return gdxBulletJNI.btTypedConstraintData_m_dbgDrawSize_get(swigCPtr, this);
-  }
-
-  public void setM_disableCollisionsBetweenLinkedBodies(int value) {
-    gdxBulletJNI.btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_set(swigCPtr, this, value);
-  }
-
-  public int getM_disableCollisionsBetweenLinkedBodies() {
-    return gdxBulletJNI.btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_get(swigCPtr, this);
-  }
-
-  public void setM_overrideNumSolverIterations(int value) {
-    gdxBulletJNI.btTypedConstraintData_m_overrideNumSolverIterations_set(swigCPtr, this, value);
-  }
-
-  public int getM_overrideNumSolverIterations() {
-    return gdxBulletJNI.btTypedConstraintData_m_overrideNumSolverIterations_get(swigCPtr, this);
-  }
-
-  public void setM_breakingImpulseThreshold(float value) {
-    gdxBulletJNI.btTypedConstraintData_m_breakingImpulseThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_breakingImpulseThreshold() {
-    return gdxBulletJNI.btTypedConstraintData_m_breakingImpulseThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_isEnabled(int value) {
-    gdxBulletJNI.btTypedConstraintData_m_isEnabled_set(swigCPtr, this, value);
-  }
-
-  public int getM_isEnabled() {
-    return gdxBulletJNI.btTypedConstraintData_m_isEnabled_get(swigCPtr, this);
-  }
-
-  public btTypedConstraintData() {
-    this(gdxBulletJNI.new_btTypedConstraintData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTypedConstraintData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTypedConstraintData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTypedConstraintData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_rbA (btRigidBodyFloatData value) {
+               gdxBulletJNI.btTypedConstraintData_m_rbA_set(swigCPtr, this, btRigidBodyFloatData.getCPtr(value), value);
+       }
+
+       public btRigidBodyFloatData getM_rbA () {
+               long cPtr = gdxBulletJNI.btTypedConstraintData_m_rbA_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btRigidBodyFloatData(cPtr, false);
+       }
+
+       public void setM_rbB (btRigidBodyFloatData value) {
+               gdxBulletJNI.btTypedConstraintData_m_rbB_set(swigCPtr, this, btRigidBodyFloatData.getCPtr(value), value);
+       }
+
+       public btRigidBodyFloatData getM_rbB () {
+               long cPtr = gdxBulletJNI.btTypedConstraintData_m_rbB_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btRigidBodyFloatData(cPtr, false);
+       }
+
+       public void setM_name (String value) {
+               gdxBulletJNI.btTypedConstraintData_m_name_set(swigCPtr, this, value);
+       }
+
+       public String getM_name () {
+               return gdxBulletJNI.btTypedConstraintData_m_name_get(swigCPtr, this);
+       }
+
+       public void setM_objectType (int value) {
+               gdxBulletJNI.btTypedConstraintData_m_objectType_set(swigCPtr, this, value);
+       }
+
+       public int getM_objectType () {
+               return gdxBulletJNI.btTypedConstraintData_m_objectType_get(swigCPtr, this);
+       }
+
+       public void setM_userConstraintType (int value) {
+               gdxBulletJNI.btTypedConstraintData_m_userConstraintType_set(swigCPtr, this, value);
+       }
+
+       public int getM_userConstraintType () {
+               return gdxBulletJNI.btTypedConstraintData_m_userConstraintType_get(swigCPtr, this);
+       }
+
+       public void setM_userConstraintId (int value) {
+               gdxBulletJNI.btTypedConstraintData_m_userConstraintId_set(swigCPtr, this, value);
+       }
+
+       public int getM_userConstraintId () {
+               return gdxBulletJNI.btTypedConstraintData_m_userConstraintId_get(swigCPtr, this);
+       }
+
+       public void setM_needsFeedback (int value) {
+               gdxBulletJNI.btTypedConstraintData_m_needsFeedback_set(swigCPtr, this, value);
+       }
+
+       public int getM_needsFeedback () {
+               return gdxBulletJNI.btTypedConstraintData_m_needsFeedback_get(swigCPtr, this);
+       }
+
+       public void setM_appliedImpulse (float value) {
+               gdxBulletJNI.btTypedConstraintData_m_appliedImpulse_set(swigCPtr, this, value);
+       }
+
+       public float getM_appliedImpulse () {
+               return gdxBulletJNI.btTypedConstraintData_m_appliedImpulse_get(swigCPtr, this);
+       }
+
+       public void setM_dbgDrawSize (float value) {
+               gdxBulletJNI.btTypedConstraintData_m_dbgDrawSize_set(swigCPtr, this, value);
+       }
+
+       public float getM_dbgDrawSize () {
+               return gdxBulletJNI.btTypedConstraintData_m_dbgDrawSize_get(swigCPtr, this);
+       }
+
+       public void setM_disableCollisionsBetweenLinkedBodies (int value) {
+               gdxBulletJNI.btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_set(swigCPtr, this, value);
+       }
+
+       public int getM_disableCollisionsBetweenLinkedBodies () {
+               return gdxBulletJNI.btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_get(swigCPtr, this);
+       }
+
+       public void setM_overrideNumSolverIterations (int value) {
+               gdxBulletJNI.btTypedConstraintData_m_overrideNumSolverIterations_set(swigCPtr, this, value);
+       }
+
+       public int getM_overrideNumSolverIterations () {
+               return gdxBulletJNI.btTypedConstraintData_m_overrideNumSolverIterations_get(swigCPtr, this);
+       }
+
+       public void setM_breakingImpulseThreshold (float value) {
+               gdxBulletJNI.btTypedConstraintData_m_breakingImpulseThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_breakingImpulseThreshold () {
+               return gdxBulletJNI.btTypedConstraintData_m_breakingImpulseThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_isEnabled (int value) {
+               gdxBulletJNI.btTypedConstraintData_m_isEnabled_set(swigCPtr, this, value);
+       }
+
+       public int getM_isEnabled () {
+               return gdxBulletJNI.btTypedConstraintData_m_isEnabled_get(swigCPtr, this);
+       }
+
+       public btTypedConstraintData () {
+               this(gdxBulletJNI.new_btTypedConstraintData(), true);
+       }
 
 }
index b2a27d3..30a1e22 100644 (file)
@@ -9,13 +9,12 @@
 package com.badlogic.gdx.physics.bullet;
 
 public final class btTypedConstraintType {
-  public final static int POINT2POINT_CONSTRAINT_TYPE = 3;
-  public final static int HINGE_CONSTRAINT_TYPE = POINT2POINT_CONSTRAINT_TYPE + 1;
-  public final static int CONETWIST_CONSTRAINT_TYPE = HINGE_CONSTRAINT_TYPE + 1;
-  public final static int D6_CONSTRAINT_TYPE = CONETWIST_CONSTRAINT_TYPE + 1;
-  public final static int SLIDER_CONSTRAINT_TYPE = D6_CONSTRAINT_TYPE + 1;
-  public final static int CONTACT_CONSTRAINT_TYPE = SLIDER_CONSTRAINT_TYPE + 1;
-  public final static int D6_SPRING_CONSTRAINT_TYPE = CONTACT_CONSTRAINT_TYPE + 1;
-  public final static int MAX_CONSTRAINT_TYPE = D6_SPRING_CONSTRAINT_TYPE + 1;
+       public final static int POINT2POINT_CONSTRAINT_TYPE = 3;
+       public final static int HINGE_CONSTRAINT_TYPE = POINT2POINT_CONSTRAINT_TYPE + 1;
+       public final static int CONETWIST_CONSTRAINT_TYPE = HINGE_CONSTRAINT_TYPE + 1;
+       public final static int D6_CONSTRAINT_TYPE = CONETWIST_CONSTRAINT_TYPE + 1;
+       public final static int SLIDER_CONSTRAINT_TYPE = D6_CONSTRAINT_TYPE + 1;
+       public final static int CONTACT_CONSTRAINT_TYPE = SLIDER_CONSTRAINT_TYPE + 1;
+       public final static int D6_SPRING_CONSTRAINT_TYPE = CONTACT_CONSTRAINT_TYPE + 1;
+       public final static int MAX_CONSTRAINT_TYPE = D6_SPRING_CONSTRAINT_TYPE + 1;
 }
-
index b85d201..6b73fb1 100644 (file)
@@ -8,51 +8,47 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btTypedObject {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btTypedObject(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btTypedObject obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btTypedObject(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btTypedObject(int objectType) {
-    this(gdxBulletJNI.new_btTypedObject(objectType), true);
-  }
-
-  public void setM_objectType(int value) {
-    gdxBulletJNI.btTypedObject_m_objectType_set(swigCPtr, this, value);
-  }
-
-  public int getM_objectType() {
-    return gdxBulletJNI.btTypedObject_m_objectType_get(swigCPtr, this);
-  }
-
-  public int getObjectType() {
-    return gdxBulletJNI.btTypedObject_getObjectType(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btTypedObject (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btTypedObject obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btTypedObject(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btTypedObject (int objectType) {
+               this(gdxBulletJNI.new_btTypedObject(objectType), true);
+       }
+
+       public void setM_objectType (int value) {
+               gdxBulletJNI.btTypedObject_m_objectType_set(swigCPtr, this, value);
+       }
+
+       public int getM_objectType () {
+               return gdxBulletJNI.btTypedObject_m_objectType_get(swigCPtr, this);
+       }
+
+       public int getObjectType () {
+               return gdxBulletJNI.btTypedObject_getObjectType(swigCPtr, this);
+       }
 
 }
index bcf677f..d4f8e0d 100644 (file)
@@ -8,48 +8,45 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btUniformScalingShape extends btConvexShape {
-  private long swigCPtr;
-
-  protected btUniformScalingShape(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btUniformScalingShape_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btUniformScalingShape obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btUniformScalingShape(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btUniformScalingShape(btConvexShape convexChildShape, float uniformScalingFactor) {
-    this(gdxBulletJNI.new_btUniformScalingShape(btConvexShape.getCPtr(convexChildShape), convexChildShape, uniformScalingFactor), true);
-  }
-
-  public float getUniformScalingFactor() {
-    return gdxBulletJNI.btUniformScalingShape_getUniformScalingFactor(swigCPtr, this);
-  }
-
-  public btConvexShape getChildShape() {
-    long cPtr = gdxBulletJNI.btUniformScalingShape_getChildShape__SWIG_0(swigCPtr, this);
-    return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
-  }
+       private long swigCPtr;
+
+       protected btUniformScalingShape (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btUniformScalingShape_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btUniformScalingShape obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btUniformScalingShape(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btUniformScalingShape (btConvexShape convexChildShape, float uniformScalingFactor) {
+               this(gdxBulletJNI
+                       .new_btUniformScalingShape(btConvexShape.getCPtr(convexChildShape), convexChildShape, uniformScalingFactor), true);
+       }
+
+       public float getUniformScalingFactor () {
+               return gdxBulletJNI.btUniformScalingShape_getUniformScalingFactor(swigCPtr, this);
+       }
+
+       public btConvexShape getChildShape () {
+               long cPtr = gdxBulletJNI.btUniformScalingShape_getChildShape__SWIG_0(swigCPtr, this);
+               return (cPtr == 0) ? null : new btConvexShape(cPtr, false);
+       }
 
 }
index 15d54bd..862e210 100644 (file)
@@ -8,79 +8,75 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btUnionFind {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btUnionFind(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btUnionFind obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btUnionFind(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btUnionFind() {
-    this(gdxBulletJNI.new_btUnionFind(), true);
-  }
-
-  public void sortIslands() {
-    gdxBulletJNI.btUnionFind_sortIslands(swigCPtr, this);
-  }
-
-  public void reset(int N) {
-    gdxBulletJNI.btUnionFind_reset(swigCPtr, this, N);
-  }
-
-  public int getNumElements() {
-    return gdxBulletJNI.btUnionFind_getNumElements(swigCPtr, this);
-  }
-
-  public boolean isRoot(int x) {
-    return gdxBulletJNI.btUnionFind_isRoot(swigCPtr, this, x);
-  }
-
-  public btElement getElement(int index) {
-    return new btElement(gdxBulletJNI.btUnionFind_getElement__SWIG_0(swigCPtr, this, index), false);
-  }
-
-  public void allocate(int N) {
-    gdxBulletJNI.btUnionFind_allocate(swigCPtr, this, N);
-  }
-
-  public void Free() {
-    gdxBulletJNI.btUnionFind_Free(swigCPtr, this);
-  }
-
-  public int find(int p, int q) {
-    return gdxBulletJNI.btUnionFind_find__SWIG_0(swigCPtr, this, p, q);
-  }
-
-  public void unite(int p, int q) {
-    gdxBulletJNI.btUnionFind_unite(swigCPtr, this, p, q);
-  }
-
-  public int find(int x) {
-    return gdxBulletJNI.btUnionFind_find__SWIG_1(swigCPtr, this, x);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btUnionFind (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btUnionFind obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btUnionFind(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btUnionFind () {
+               this(gdxBulletJNI.new_btUnionFind(), true);
+       }
+
+       public void sortIslands () {
+               gdxBulletJNI.btUnionFind_sortIslands(swigCPtr, this);
+       }
+
+       public void reset (int N) {
+               gdxBulletJNI.btUnionFind_reset(swigCPtr, this, N);
+       }
+
+       public int getNumElements () {
+               return gdxBulletJNI.btUnionFind_getNumElements(swigCPtr, this);
+       }
+
+       public boolean isRoot (int x) {
+               return gdxBulletJNI.btUnionFind_isRoot(swigCPtr, this, x);
+       }
+
+       public btElement getElement (int index) {
+               return new btElement(gdxBulletJNI.btUnionFind_getElement__SWIG_0(swigCPtr, this, index), false);
+       }
+
+       public void allocate (int N) {
+               gdxBulletJNI.btUnionFind_allocate(swigCPtr, this, N);
+       }
+
+       public void Free () {
+               gdxBulletJNI.btUnionFind_Free(swigCPtr, this);
+       }
+
+       public int find (int p, int q) {
+               return gdxBulletJNI.btUnionFind_find__SWIG_0(swigCPtr, this, p, q);
+       }
+
+       public void unite (int p, int q) {
+               gdxBulletJNI.btUnionFind_unite(swigCPtr, this, p, q);
+       }
+
+       public int find (int x) {
+               return gdxBulletJNI.btUnionFind_find__SWIG_1(swigCPtr, this, x);
+       }
 
 }
index 1b251c4..93aae93 100644 (file)
@@ -9,74 +9,73 @@
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btUniversalConstraint extends btGeneric6DofConstraint {
-  private long swigCPtr;
-
-  protected btUniversalConstraint(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btUniversalConstraint_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btUniversalConstraint obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btUniversalConstraint(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btUniversalConstraint(btRigidBody rbA, btRigidBody rbB, Vector3 anchor, Vector3 axis1, Vector3 axis2) {
-    this(gdxBulletJNI.new_btUniversalConstraint(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, anchor, axis1, axis2), true);
-  }
-
-  public Vector3 getAnchor() {
-       return gdxBulletJNI.btUniversalConstraint_getAnchor(swigCPtr, this);
-}
-
-  public Vector3 getAnchor2() {
-       return gdxBulletJNI.btUniversalConstraint_getAnchor2(swigCPtr, this);
-}
-
-  public Vector3 getAxis1() {
-       return gdxBulletJNI.btUniversalConstraint_getAxis1(swigCPtr, this);
-}
-
-  public Vector3 getAxis2() {
-       return gdxBulletJNI.btUniversalConstraint_getAxis2(swigCPtr, this);
-}
-
-  public float getAngle1() {
-    return gdxBulletJNI.btUniversalConstraint_getAngle1(swigCPtr, this);
-  }
-
-  public float getAngle2() {
-    return gdxBulletJNI.btUniversalConstraint_getAngle2(swigCPtr, this);
-  }
-
-  public void setUpperLimit(float ang1max, float ang2max) {
-    gdxBulletJNI.btUniversalConstraint_setUpperLimit(swigCPtr, this, ang1max, ang2max);
-  }
-
-  public void setLowerLimit(float ang1min, float ang2min) {
-    gdxBulletJNI.btUniversalConstraint_setLowerLimit(swigCPtr, this, ang1min, ang2min);
-  }
-
-  public void setAxis(Vector3 axis1, Vector3 axis2) {
-    gdxBulletJNI.btUniversalConstraint_setAxis(swigCPtr, this, axis1, axis2);
-  }
+       private long swigCPtr;
+
+       protected btUniversalConstraint (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btUniversalConstraint_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btUniversalConstraint obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btUniversalConstraint(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btUniversalConstraint (btRigidBody rbA, btRigidBody rbB, Vector3 anchor, Vector3 axis1, Vector3 axis2) {
+               this(gdxBulletJNI.new_btUniversalConstraint(btRigidBody.getCPtr(rbA), rbA, btRigidBody.getCPtr(rbB), rbB, anchor, axis1,
+                       axis2), true);
+       }
+
+       public Vector3 getAnchor () {
+               return gdxBulletJNI.btUniversalConstraint_getAnchor(swigCPtr, this);
+       }
+
+       public Vector3 getAnchor2 () {
+               return gdxBulletJNI.btUniversalConstraint_getAnchor2(swigCPtr, this);
+       }
+
+       public Vector3 getAxis1 () {
+               return gdxBulletJNI.btUniversalConstraint_getAxis1(swigCPtr, this);
+       }
+
+       public Vector3 getAxis2 () {
+               return gdxBulletJNI.btUniversalConstraint_getAxis2(swigCPtr, this);
+       }
+
+       public float getAngle1 () {
+               return gdxBulletJNI.btUniversalConstraint_getAngle1(swigCPtr, this);
+       }
+
+       public float getAngle2 () {
+               return gdxBulletJNI.btUniversalConstraint_getAngle2(swigCPtr, this);
+       }
+
+       public void setUpperLimit (float ang1max, float ang2max) {
+               gdxBulletJNI.btUniversalConstraint_setUpperLimit(swigCPtr, this, ang1max, ang2max);
+       }
+
+       public void setLowerLimit (float ang1min, float ang2min) {
+               gdxBulletJNI.btUniversalConstraint_setLowerLimit(swigCPtr, this, ang1min, ang2min);
+       }
+
+       public void setAxis (Vector3 axis1, Vector3 axis2) {
+               gdxBulletJNI.btUniversalConstraint_setAxis(swigCPtr, this, axis1, axis2);
+       }
 
 }
index 13ce9e1..10ec11b 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btUsageBitfield {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btUsageBitfield(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btUsageBitfield obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btUsageBitfield(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public btUsageBitfield() {
-    this(gdxBulletJNI.new_btUsageBitfield(), true);
-  }
-
-  public void reset() {
-    gdxBulletJNI.btUsageBitfield_reset(swigCPtr, this);
-  }
-
-  public void setUsedVertexA(int value) {
-    gdxBulletJNI.btUsageBitfield_usedVertexA_set(swigCPtr, this, value);
-  }
-
-  public int getUsedVertexA() {
-    return gdxBulletJNI.btUsageBitfield_usedVertexA_get(swigCPtr, this);
-  }
-
-  public void setUsedVertexB(int value) {
-    gdxBulletJNI.btUsageBitfield_usedVertexB_set(swigCPtr, this, value);
-  }
-
-  public int getUsedVertexB() {
-    return gdxBulletJNI.btUsageBitfield_usedVertexB_get(swigCPtr, this);
-  }
-
-  public void setUsedVertexC(int value) {
-    gdxBulletJNI.btUsageBitfield_usedVertexC_set(swigCPtr, this, value);
-  }
-
-  public int getUsedVertexC() {
-    return gdxBulletJNI.btUsageBitfield_usedVertexC_get(swigCPtr, this);
-  }
-
-  public void setUsedVertexD(int value) {
-    gdxBulletJNI.btUsageBitfield_usedVertexD_set(swigCPtr, this, value);
-  }
-
-  public int getUsedVertexD() {
-    return gdxBulletJNI.btUsageBitfield_usedVertexD_get(swigCPtr, this);
-  }
-
-  public void setUnused1(int value) {
-    gdxBulletJNI.btUsageBitfield_unused1_set(swigCPtr, this, value);
-  }
-
-  public int getUnused1() {
-    return gdxBulletJNI.btUsageBitfield_unused1_get(swigCPtr, this);
-  }
-
-  public void setUnused2(int value) {
-    gdxBulletJNI.btUsageBitfield_unused2_set(swigCPtr, this, value);
-  }
-
-  public int getUnused2() {
-    return gdxBulletJNI.btUsageBitfield_unused2_get(swigCPtr, this);
-  }
-
-  public void setUnused3(int value) {
-    gdxBulletJNI.btUsageBitfield_unused3_set(swigCPtr, this, value);
-  }
-
-  public int getUnused3() {
-    return gdxBulletJNI.btUsageBitfield_unused3_get(swigCPtr, this);
-  }
-
-  public void setUnused4(int value) {
-    gdxBulletJNI.btUsageBitfield_unused4_set(swigCPtr, this, value);
-  }
-
-  public int getUnused4() {
-    return gdxBulletJNI.btUsageBitfield_unused4_get(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btUsageBitfield (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btUsageBitfield obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btUsageBitfield(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public btUsageBitfield () {
+               this(gdxBulletJNI.new_btUsageBitfield(), true);
+       }
+
+       public void reset () {
+               gdxBulletJNI.btUsageBitfield_reset(swigCPtr, this);
+       }
+
+       public void setUsedVertexA (int value) {
+               gdxBulletJNI.btUsageBitfield_usedVertexA_set(swigCPtr, this, value);
+       }
+
+       public int getUsedVertexA () {
+               return gdxBulletJNI.btUsageBitfield_usedVertexA_get(swigCPtr, this);
+       }
+
+       public void setUsedVertexB (int value) {
+               gdxBulletJNI.btUsageBitfield_usedVertexB_set(swigCPtr, this, value);
+       }
+
+       public int getUsedVertexB () {
+               return gdxBulletJNI.btUsageBitfield_usedVertexB_get(swigCPtr, this);
+       }
+
+       public void setUsedVertexC (int value) {
+               gdxBulletJNI.btUsageBitfield_usedVertexC_set(swigCPtr, this, value);
+       }
+
+       public int getUsedVertexC () {
+               return gdxBulletJNI.btUsageBitfield_usedVertexC_get(swigCPtr, this);
+       }
+
+       public void setUsedVertexD (int value) {
+               gdxBulletJNI.btUsageBitfield_usedVertexD_set(swigCPtr, this, value);
+       }
+
+       public int getUsedVertexD () {
+               return gdxBulletJNI.btUsageBitfield_usedVertexD_get(swigCPtr, this);
+       }
+
+       public void setUnused1 (int value) {
+               gdxBulletJNI.btUsageBitfield_unused1_set(swigCPtr, this, value);
+       }
+
+       public int getUnused1 () {
+               return gdxBulletJNI.btUsageBitfield_unused1_get(swigCPtr, this);
+       }
+
+       public void setUnused2 (int value) {
+               gdxBulletJNI.btUsageBitfield_unused2_set(swigCPtr, this, value);
+       }
+
+       public int getUnused2 () {
+               return gdxBulletJNI.btUsageBitfield_unused2_get(swigCPtr, this);
+       }
+
+       public void setUnused3 (int value) {
+               gdxBulletJNI.btUsageBitfield_unused3_set(swigCPtr, this, value);
+       }
+
+       public int getUnused3 () {
+               return gdxBulletJNI.btUsageBitfield_unused3_get(swigCPtr, this);
+       }
+
+       public void setUnused4 (int value) {
+               gdxBulletJNI.btUsageBitfield_unused4_set(swigCPtr, this, value);
+       }
+
+       public int getUnused4 () {
+               return gdxBulletJNI.btUsageBitfield_unused4_get(swigCPtr, this);
+       }
 
 }
index a866f83..7963140 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btVector3 {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btVector3(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btVector3 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btVector3(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_floats(float[] value) {
-    gdxBulletJNI.btVector3_m_floats_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_floats() {
-    return gdxBulletJNI.btVector3_m_floats_get(swigCPtr, this);
-  }
-
-  public btVector3() {
-    this(gdxBulletJNI.new_btVector3__SWIG_0(), true);
-  }
-
-  public btVector3(float x, float y, float z) {
-    this(gdxBulletJNI.new_btVector3__SWIG_1(x, y, z), true);
-  }
-
-  public float dot(Vector3 v) {
-    return gdxBulletJNI.btVector3_dot(swigCPtr, this, v);
-  }
-
-  public float length2() {
-    return gdxBulletJNI.btVector3_length2(swigCPtr, this);
-  }
-
-  public float length() {
-    return gdxBulletJNI.btVector3_length(swigCPtr, this);
-  }
-
-  public float distance2(Vector3 v) {
-    return gdxBulletJNI.btVector3_distance2(swigCPtr, this, v);
-  }
-
-  public float distance(Vector3 v) {
-    return gdxBulletJNI.btVector3_distance(swigCPtr, this, v);
-  }
-
-  public Vector3 safeNormalize() {
-       return gdxBulletJNI.btVector3_safeNormalize(swigCPtr, this);
-}
-
-  public Vector3 normalize() {
-       return gdxBulletJNI.btVector3_normalize(swigCPtr, this);
-}
-
-  public Vector3 normalized() {
-       return gdxBulletJNI.btVector3_normalized(swigCPtr, this);
-}
-
-  public Vector3 rotate(Vector3 wAxis, float angle) {
-       return gdxBulletJNI.btVector3_rotate(swigCPtr, this, wAxis, angle);
-}
-
-  public float angle(Vector3 v) {
-    return gdxBulletJNI.btVector3_angle(swigCPtr, this, v);
-  }
-
-  public Vector3 absolute() {
-       return gdxBulletJNI.btVector3_absolute(swigCPtr, this);
-}
-
-  public Vector3 cross(Vector3 v) {
-       return gdxBulletJNI.btVector3_cross(swigCPtr, this, v);
-}
-
-  public float triple(Vector3 v1, Vector3 v2) {
-    return gdxBulletJNI.btVector3_triple(swigCPtr, this, v1, v2);
-  }
-
-  public int minAxis() {
-    return gdxBulletJNI.btVector3_minAxis(swigCPtr, this);
-  }
-
-  public int maxAxis() {
-    return gdxBulletJNI.btVector3_maxAxis(swigCPtr, this);
-  }
-
-  public int furthestAxis() {
-    return gdxBulletJNI.btVector3_furthestAxis(swigCPtr, this);
-  }
-
-  public int closestAxis() {
-    return gdxBulletJNI.btVector3_closestAxis(swigCPtr, this);
-  }
-
-  public void setInterpolate3(Vector3 v0, Vector3 v1, float rt) {
-    gdxBulletJNI.btVector3_setInterpolate3(swigCPtr, this, v0, v1, rt);
-  }
-
-  public Vector3 lerp(Vector3 v, float t) {
-       return gdxBulletJNI.btVector3_lerp(swigCPtr, this, v, t);
-}
-
-  public float getX() {
-    return gdxBulletJNI.btVector3_getX(swigCPtr, this);
-  }
-
-  public float getY() {
-    return gdxBulletJNI.btVector3_getY(swigCPtr, this);
-  }
-
-  public float getZ() {
-    return gdxBulletJNI.btVector3_getZ(swigCPtr, this);
-  }
-
-  public void setX(float x) {
-    gdxBulletJNI.btVector3_setX(swigCPtr, this, x);
-  }
-
-  public void setY(float y) {
-    gdxBulletJNI.btVector3_setY(swigCPtr, this, y);
-  }
-
-  public void setZ(float z) {
-    gdxBulletJNI.btVector3_setZ(swigCPtr, this, z);
-  }
-
-  public void setW(float w) {
-    gdxBulletJNI.btVector3_setW(swigCPtr, this, w);
-  }
-
-  public float x() {
-    return gdxBulletJNI.btVector3_x(swigCPtr, this);
-  }
-
-  public float y() {
-    return gdxBulletJNI.btVector3_y(swigCPtr, this);
-  }
-
-  public float z() {
-    return gdxBulletJNI.btVector3_z(swigCPtr, this);
-  }
-
-  public float w() {
-    return gdxBulletJNI.btVector3_w(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btVector3 (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btVector3 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btVector3(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_floats (float[] value) {
+               gdxBulletJNI.btVector3_m_floats_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_floats () {
+               return gdxBulletJNI.btVector3_m_floats_get(swigCPtr, this);
+       }
+
+       public btVector3 () {
+               this(gdxBulletJNI.new_btVector3__SWIG_0(), true);
+       }
+
+       public btVector3 (float x, float y, float z) {
+               this(gdxBulletJNI.new_btVector3__SWIG_1(x, y, z), true);
+       }
+
+       public float dot (Vector3 v) {
+               return gdxBulletJNI.btVector3_dot(swigCPtr, this, v);
+       }
+
+       public float length2 () {
+               return gdxBulletJNI.btVector3_length2(swigCPtr, this);
+       }
+
+       public float length () {
+               return gdxBulletJNI.btVector3_length(swigCPtr, this);
+       }
+
+       public float distance2 (Vector3 v) {
+               return gdxBulletJNI.btVector3_distance2(swigCPtr, this, v);
+       }
+
+       public float distance (Vector3 v) {
+               return gdxBulletJNI.btVector3_distance(swigCPtr, this, v);
+       }
+
+       public Vector3 safeNormalize () {
+               return gdxBulletJNI.btVector3_safeNormalize(swigCPtr, this);
+       }
+
+       public Vector3 normalize () {
+               return gdxBulletJNI.btVector3_normalize(swigCPtr, this);
+       }
+
+       public Vector3 normalized () {
+               return gdxBulletJNI.btVector3_normalized(swigCPtr, this);
+       }
+
+       public Vector3 rotate (Vector3 wAxis, float angle) {
+               return gdxBulletJNI.btVector3_rotate(swigCPtr, this, wAxis, angle);
+       }
+
+       public float angle (Vector3 v) {
+               return gdxBulletJNI.btVector3_angle(swigCPtr, this, v);
+       }
+
+       public Vector3 absolute () {
+               return gdxBulletJNI.btVector3_absolute(swigCPtr, this);
+       }
+
+       public Vector3 cross (Vector3 v) {
+               return gdxBulletJNI.btVector3_cross(swigCPtr, this, v);
+       }
+
+       public float triple (Vector3 v1, Vector3 v2) {
+               return gdxBulletJNI.btVector3_triple(swigCPtr, this, v1, v2);
+       }
+
+       public int minAxis () {
+               return gdxBulletJNI.btVector3_minAxis(swigCPtr, this);
+       }
+
+       public int maxAxis () {
+               return gdxBulletJNI.btVector3_maxAxis(swigCPtr, this);
+       }
+
+       public int furthestAxis () {
+               return gdxBulletJNI.btVector3_furthestAxis(swigCPtr, this);
+       }
+
+       public int closestAxis () {
+               return gdxBulletJNI.btVector3_closestAxis(swigCPtr, this);
+       }
+
+       public void setInterpolate3 (Vector3 v0, Vector3 v1, float rt) {
+               gdxBulletJNI.btVector3_setInterpolate3(swigCPtr, this, v0, v1, rt);
+       }
+
+       public Vector3 lerp (Vector3 v, float t) {
+               return gdxBulletJNI.btVector3_lerp(swigCPtr, this, v, t);
+       }
+
+       public float getX () {
+               return gdxBulletJNI.btVector3_getX(swigCPtr, this);
+       }
+
+       public float getY () {
+               return gdxBulletJNI.btVector3_getY(swigCPtr, this);
+       }
 
-  public void setMax(Vector3 other) {
-    gdxBulletJNI.btVector3_setMax(swigCPtr, this, other);
-  }
+       public float getZ () {
+               return gdxBulletJNI.btVector3_getZ(swigCPtr, this);
+       }
 
-  public void setMin(Vector3 other) {
-    gdxBulletJNI.btVector3_setMin(swigCPtr, this, other);
-  }
+       public void setX (float x) {
+               gdxBulletJNI.btVector3_setX(swigCPtr, this, x);
+       }
 
-  public void setValue(float x, float y, float z) {
-    gdxBulletJNI.btVector3_setValue(swigCPtr, this, x, y, z);
-  }
+       public void setY (float y) {
+               gdxBulletJNI.btVector3_setY(swigCPtr, this, y);
+       }
 
-  public void getSkewSymmetricMatrix(btVector3 v0, btVector3 v1, btVector3 v2) {
-    gdxBulletJNI.btVector3_getSkewSymmetricMatrix(swigCPtr, this, btVector3.getCPtr(v0), v0, btVector3.getCPtr(v1), v1, btVector3.getCPtr(v2), v2);
-  }
+       public void setZ (float z) {
+               gdxBulletJNI.btVector3_setZ(swigCPtr, this, z);
+       }
 
-  public void setZero() {
-    gdxBulletJNI.btVector3_setZero(swigCPtr, this);
-  }
+       public void setW (float w) {
+               gdxBulletJNI.btVector3_setW(swigCPtr, this, w);
+       }
 
-  public boolean isZero() {
-    return gdxBulletJNI.btVector3_isZero(swigCPtr, this);
-  }
+       public float x () {
+               return gdxBulletJNI.btVector3_x(swigCPtr, this);
+       }
 
-  public boolean fuzzyZero() {
-    return gdxBulletJNI.btVector3_fuzzyZero(swigCPtr, this);
-  }
+       public float y () {
+               return gdxBulletJNI.btVector3_y(swigCPtr, this);
+       }
 
-  public void serialize(btVector3FloatData dataOut) {
-    gdxBulletJNI.btVector3_serialize(swigCPtr, this, btVector3FloatData.getCPtr(dataOut), dataOut);
-  }
+       public float z () {
+               return gdxBulletJNI.btVector3_z(swigCPtr, this);
+       }
 
-  public void deSerialize(btVector3FloatData dataIn) {
-    gdxBulletJNI.btVector3_deSerialize(swigCPtr, this, btVector3FloatData.getCPtr(dataIn), dataIn);
-  }
+       public float w () {
+               return gdxBulletJNI.btVector3_w(swigCPtr, this);
+       }
 
-  public void serializeFloat(btVector3FloatData dataOut) {
-    gdxBulletJNI.btVector3_serializeFloat(swigCPtr, this, btVector3FloatData.getCPtr(dataOut), dataOut);
-  }
+       public void setMax (Vector3 other) {
+               gdxBulletJNI.btVector3_setMax(swigCPtr, this, other);
+       }
 
-  public void deSerializeFloat(btVector3FloatData dataIn) {
-    gdxBulletJNI.btVector3_deSerializeFloat(swigCPtr, this, btVector3FloatData.getCPtr(dataIn), dataIn);
-  }
+       public void setMin (Vector3 other) {
+               gdxBulletJNI.btVector3_setMin(swigCPtr, this, other);
+       }
 
-  public void serializeDouble(btVector3DoubleData dataOut) {
-    gdxBulletJNI.btVector3_serializeDouble(swigCPtr, this, btVector3DoubleData.getCPtr(dataOut), dataOut);
-  }
+       public void setValue (float x, float y, float z) {
+               gdxBulletJNI.btVector3_setValue(swigCPtr, this, x, y, z);
+       }
 
-  public void deSerializeDouble(btVector3DoubleData dataIn) {
-    gdxBulletJNI.btVector3_deSerializeDouble(swigCPtr, this, btVector3DoubleData.getCPtr(dataIn), dataIn);
-  }
+       public void getSkewSymmetricMatrix (btVector3 v0, btVector3 v1, btVector3 v2) {
+               gdxBulletJNI.btVector3_getSkewSymmetricMatrix(swigCPtr, this, btVector3.getCPtr(v0), v0, btVector3.getCPtr(v1), v1,
+                       btVector3.getCPtr(v2), v2);
+       }
+
+       public void setZero () {
+               gdxBulletJNI.btVector3_setZero(swigCPtr, this);
+       }
+
+       public boolean isZero () {
+               return gdxBulletJNI.btVector3_isZero(swigCPtr, this);
+       }
+
+       public boolean fuzzyZero () {
+               return gdxBulletJNI.btVector3_fuzzyZero(swigCPtr, this);
+       }
+
+       public void serialize (btVector3FloatData dataOut) {
+               gdxBulletJNI.btVector3_serialize(swigCPtr, this, btVector3FloatData.getCPtr(dataOut), dataOut);
+       }
+
+       public void deSerialize (btVector3FloatData dataIn) {
+               gdxBulletJNI.btVector3_deSerialize(swigCPtr, this, btVector3FloatData.getCPtr(dataIn), dataIn);
+       }
+
+       public void serializeFloat (btVector3FloatData dataOut) {
+               gdxBulletJNI.btVector3_serializeFloat(swigCPtr, this, btVector3FloatData.getCPtr(dataOut), dataOut);
+       }
+
+       public void deSerializeFloat (btVector3FloatData dataIn) {
+               gdxBulletJNI.btVector3_deSerializeFloat(swigCPtr, this, btVector3FloatData.getCPtr(dataIn), dataIn);
+       }
+
+       public void serializeDouble (btVector3DoubleData dataOut) {
+               gdxBulletJNI.btVector3_serializeDouble(swigCPtr, this, btVector3DoubleData.getCPtr(dataOut), dataOut);
+       }
+
+       public void deSerializeDouble (btVector3DoubleData dataIn) {
+               gdxBulletJNI.btVector3_deSerializeDouble(swigCPtr, this, btVector3DoubleData.getCPtr(dataIn), dataIn);
+       }
 
 }
index 24d9a99..3c7e465 100644 (file)
@@ -8,47 +8,43 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btVector3DoubleData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btVector3DoubleData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btVector3DoubleData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btVector3DoubleData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_floats(double[] value) {
-    gdxBulletJNI.btVector3DoubleData_m_floats_set(swigCPtr, this, value);
-  }
-
-  public double[] getM_floats() {
-    return gdxBulletJNI.btVector3DoubleData_m_floats_get(swigCPtr, this);
-  }
-
-  public btVector3DoubleData() {
-    this(gdxBulletJNI.new_btVector3DoubleData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btVector3DoubleData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btVector3DoubleData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btVector3DoubleData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_floats (double[] value) {
+               gdxBulletJNI.btVector3DoubleData_m_floats_set(swigCPtr, this, value);
+       }
+
+       public double[] getM_floats () {
+               return gdxBulletJNI.btVector3DoubleData_m_floats_get(swigCPtr, this);
+       }
+
+       public btVector3DoubleData () {
+               this(gdxBulletJNI.new_btVector3DoubleData(), true);
+       }
 
 }
index 566482b..58fd82b 100644 (file)
@@ -8,47 +8,43 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btVector3FloatData {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btVector3FloatData(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btVector3FloatData obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btVector3FloatData(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_floats(float[] value) {
-    gdxBulletJNI.btVector3FloatData_m_floats_set(swigCPtr, this, value);
-  }
-
-  public float[] getM_floats() {
-    return gdxBulletJNI.btVector3FloatData_m_floats_get(swigCPtr, this);
-  }
-
-  public btVector3FloatData() {
-    this(gdxBulletJNI.new_btVector3FloatData(), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btVector3FloatData (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btVector3FloatData obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btVector3FloatData(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_floats (float[] value) {
+               gdxBulletJNI.btVector3FloatData_m_floats_set(swigCPtr, this, value);
+       }
+
+       public float[] getM_floats () {
+               return gdxBulletJNI.btVector3FloatData_m_floats_get(swigCPtr, this);
+       }
+
+       public btVector3FloatData () {
+               this(gdxBulletJNI.new_btVector3FloatData(), true);
+       }
 
 }
index 4f1df1e..b2a831a 100644 (file)
@@ -8,67 +8,63 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class btVector4 extends btVector3 {
-  private long swigCPtr;
-
-  protected btVector4(long cPtr, boolean cMemoryOwn) {
-    super(gdxBulletJNI.btVector4_SWIGUpcast(cPtr), cMemoryOwn);
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btVector4 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btVector4(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-    super.delete();
-  }
-
-  public btVector4() {
-    this(gdxBulletJNI.new_btVector4__SWIG_0(), true);
-  }
-
-  public btVector4(float x, float y, float z, float w) {
-    this(gdxBulletJNI.new_btVector4__SWIG_1(x, y, z, w), true);
-  }
-
-  public btVector4 absolute4() {
-    return new btVector4(gdxBulletJNI.btVector4_absolute4(swigCPtr, this), true);
-  }
-
-  public float getW() {
-    return gdxBulletJNI.btVector4_getW(swigCPtr, this);
-  }
-
-  public int maxAxis4() {
-    return gdxBulletJNI.btVector4_maxAxis4(swigCPtr, this);
-  }
-
-  public int minAxis4() {
-    return gdxBulletJNI.btVector4_minAxis4(swigCPtr, this);
-  }
-
-  public int closestAxis4() {
-    return gdxBulletJNI.btVector4_closestAxis4(swigCPtr, this);
-  }
-
-  public void setValue(float x, float y, float z, float w) {
-    gdxBulletJNI.btVector4_setValue(swigCPtr, this, x, y, z, w);
-  }
+       private long swigCPtr;
+
+       protected btVector4 (long cPtr, boolean cMemoryOwn) {
+               super(gdxBulletJNI.btVector4_SWIGUpcast(cPtr), cMemoryOwn);
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btVector4 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btVector4(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+               super.delete();
+       }
+
+       public btVector4 () {
+               this(gdxBulletJNI.new_btVector4__SWIG_0(), true);
+       }
+
+       public btVector4 (float x, float y, float z, float w) {
+               this(gdxBulletJNI.new_btVector4__SWIG_1(x, y, z, w), true);
+       }
+
+       public btVector4 absolute4 () {
+               return new btVector4(gdxBulletJNI.btVector4_absolute4(swigCPtr, this), true);
+       }
+
+       public float getW () {
+               return gdxBulletJNI.btVector4_getW(swigCPtr, this);
+       }
+
+       public int maxAxis4 () {
+               return gdxBulletJNI.btVector4_maxAxis4(swigCPtr, this);
+       }
+
+       public int minAxis4 () {
+               return gdxBulletJNI.btVector4_minAxis4(swigCPtr, this);
+       }
+
+       public int closestAxis4 () {
+               return gdxBulletJNI.btVector4_closestAxis4(swigCPtr, this);
+       }
+
+       public void setValue (float x, float y, float z, float w) {
+               gdxBulletJNI.btVector4_setValue(swigCPtr, this, x, y, z, w);
+       }
 
 }
index eb33618..63dc76e 100644 (file)
 package com.badlogic.gdx.physics.bullet;
 
 import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
 
 public class btVoronoiSimplexSolver {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected btVoronoiSimplexSolver(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(btVoronoiSimplexSolver obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_btVoronoiSimplexSolver(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setM_numVertices(int value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_numVertices_set(swigCPtr, this, value);
-  }
-
-  public int getM_numVertices() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_m_numVertices_get(swigCPtr, this);
-  }
-
-  public void setM_simplexVectorW(btVector3 value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_simplexVectorW_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_simplexVectorW() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_simplexVectorW_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_simplexPointsP(btVector3 value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsP_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_simplexPointsP() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsP_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_simplexPointsQ(btVector3 value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsQ_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_simplexPointsQ() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsQ_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_cachedP1(btVector3 value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP1_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_cachedP1() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP1_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_cachedP2(btVector3 value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP2_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_cachedP2() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP2_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_cachedV(btVector3 value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_cachedV_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_cachedV() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedV_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_lastW(btVector3 value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_lastW_set(swigCPtr, this, btVector3.getCPtr(value), value);
-  }
-
-  public btVector3 getM_lastW() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_lastW_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btVector3(cPtr, false);
-  }
-
-  public void setM_equalVertexThreshold(float value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_equalVertexThreshold_set(swigCPtr, this, value);
-  }
-
-  public float getM_equalVertexThreshold() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_m_equalVertexThreshold_get(swigCPtr, this);
-  }
-
-  public void setM_cachedValidClosest(boolean value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_cachedValidClosest_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_cachedValidClosest() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_m_cachedValidClosest_get(swigCPtr, this);
-  }
-
-  public void setM_cachedBC(btSubSimplexClosestResult value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_cachedBC_set(swigCPtr, this, btSubSimplexClosestResult.getCPtr(value), value);
-  }
-
-  public btSubSimplexClosestResult getM_cachedBC() {
-    long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedBC_get(swigCPtr, this);
-    return (cPtr == 0) ? null : new btSubSimplexClosestResult(cPtr, false);
-  }
-
-  public void setM_needsUpdate(boolean value) {
-    gdxBulletJNI.btVoronoiSimplexSolver_m_needsUpdate_set(swigCPtr, this, value);
-  }
-
-  public boolean getM_needsUpdate() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_m_needsUpdate_get(swigCPtr, this);
-  }
-
-  public void removeVertex(int index) {
-    gdxBulletJNI.btVoronoiSimplexSolver_removeVertex(swigCPtr, this, index);
-  }
-
-  public void reduceVertices(btUsageBitfield usedVerts) {
-    gdxBulletJNI.btVoronoiSimplexSolver_reduceVertices(swigCPtr, this, btUsageBitfield.getCPtr(usedVerts), usedVerts);
-  }
-
-  public boolean updateClosestVectorAndPoints() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_updateClosestVectorAndPoints(swigCPtr, this);
-  }
-
-  public boolean closestPtPointTetrahedron(Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d, btSubSimplexClosestResult finalResult) {
-    return gdxBulletJNI.btVoronoiSimplexSolver_closestPtPointTetrahedron(swigCPtr, this, p, a, b, c, d, btSubSimplexClosestResult.getCPtr(finalResult), finalResult);
-  }
-
-  public int pointOutsideOfPlane(Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d) {
-    return gdxBulletJNI.btVoronoiSimplexSolver_pointOutsideOfPlane(swigCPtr, this, p, a, b, c, d);
-  }
-
-  public boolean closestPtPointTriangle(Vector3 p, Vector3 a, Vector3 b, Vector3 c, btSubSimplexClosestResult result) {
-    return gdxBulletJNI.btVoronoiSimplexSolver_closestPtPointTriangle(swigCPtr, this, p, a, b, c, btSubSimplexClosestResult.getCPtr(result), result);
-  }
-
-  public btVoronoiSimplexSolver() {
-    this(gdxBulletJNI.new_btVoronoiSimplexSolver(), true);
-  }
-
-  public void reset() {
-    gdxBulletJNI.btVoronoiSimplexSolver_reset(swigCPtr, this);
-  }
-
-  public void addVertex(Vector3 w, Vector3 p, Vector3 q) {
-    gdxBulletJNI.btVoronoiSimplexSolver_addVertex(swigCPtr, this, w, p, q);
-  }
-
-  public void setEqualVertexThreshold(float threshold) {
-    gdxBulletJNI.btVoronoiSimplexSolver_setEqualVertexThreshold(swigCPtr, this, threshold);
-  }
-
-  public float getEqualVertexThreshold() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_getEqualVertexThreshold(swigCPtr, this);
-  }
-
-  public boolean closest(Vector3 v) {
-    return gdxBulletJNI.btVoronoiSimplexSolver_closest(swigCPtr, this, v);
-  }
-
-  public float maxVertex() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_maxVertex(swigCPtr, this);
-  }
-
-  public boolean fullSimplex() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_fullSimplex(swigCPtr, this);
-  }
-
-  public int getSimplex(btVector3 pBuf, btVector3 qBuf, btVector3 yBuf) {
-    return gdxBulletJNI.btVoronoiSimplexSolver_getSimplex(swigCPtr, this, btVector3.getCPtr(pBuf), pBuf, btVector3.getCPtr(qBuf), qBuf, btVector3.getCPtr(yBuf), yBuf);
-  }
-
-  public boolean inSimplex(Vector3 w) {
-    return gdxBulletJNI.btVoronoiSimplexSolver_inSimplex(swigCPtr, this, w);
-  }
-
-  public void backup_closest(Vector3 v) {
-    gdxBulletJNI.btVoronoiSimplexSolver_backup_closest(swigCPtr, this, v);
-  }
-
-  public boolean emptySimplex() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_emptySimplex(swigCPtr, this);
-  }
-
-  public void compute_points(Vector3 p1, Vector3 p2) {
-    gdxBulletJNI.btVoronoiSimplexSolver_compute_points(swigCPtr, this, p1, p2);
-  }
-
-  public int numVertices() {
-    return gdxBulletJNI.btVoronoiSimplexSolver_numVertices(swigCPtr, this);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected btVoronoiSimplexSolver (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (btVoronoiSimplexSolver obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_btVoronoiSimplexSolver(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setM_numVertices (int value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_numVertices_set(swigCPtr, this, value);
+       }
+
+       public int getM_numVertices () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_m_numVertices_get(swigCPtr, this);
+       }
+
+       public void setM_simplexVectorW (btVector3 value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_simplexVectorW_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_simplexVectorW () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_simplexVectorW_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_simplexPointsP (btVector3 value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsP_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_simplexPointsP () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsP_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_simplexPointsQ (btVector3 value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsQ_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_simplexPointsQ () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_simplexPointsQ_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_cachedP1 (btVector3 value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP1_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_cachedP1 () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP1_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_cachedP2 (btVector3 value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP2_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_cachedP2 () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedP2_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_cachedV (btVector3 value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_cachedV_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_cachedV () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedV_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_lastW (btVector3 value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_lastW_set(swigCPtr, this, btVector3.getCPtr(value), value);
+       }
+
+       public btVector3 getM_lastW () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_lastW_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btVector3(cPtr, false);
+       }
+
+       public void setM_equalVertexThreshold (float value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_equalVertexThreshold_set(swigCPtr, this, value);
+       }
+
+       public float getM_equalVertexThreshold () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_m_equalVertexThreshold_get(swigCPtr, this);
+       }
+
+       public void setM_cachedValidClosest (boolean value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_cachedValidClosest_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_cachedValidClosest () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_m_cachedValidClosest_get(swigCPtr, this);
+       }
+
+       public void setM_cachedBC (btSubSimplexClosestResult value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_cachedBC_set(swigCPtr, this, btSubSimplexClosestResult.getCPtr(value), value);
+       }
+
+       public btSubSimplexClosestResult getM_cachedBC () {
+               long cPtr = gdxBulletJNI.btVoronoiSimplexSolver_m_cachedBC_get(swigCPtr, this);
+               return (cPtr == 0) ? null : new btSubSimplexClosestResult(cPtr, false);
+       }
+
+       public void setM_needsUpdate (boolean value) {
+               gdxBulletJNI.btVoronoiSimplexSolver_m_needsUpdate_set(swigCPtr, this, value);
+       }
+
+       public boolean getM_needsUpdate () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_m_needsUpdate_get(swigCPtr, this);
+       }
+
+       public void removeVertex (int index) {
+               gdxBulletJNI.btVoronoiSimplexSolver_removeVertex(swigCPtr, this, index);
+       }
+
+       public void reduceVertices (btUsageBitfield usedVerts) {
+               gdxBulletJNI.btVoronoiSimplexSolver_reduceVertices(swigCPtr, this, btUsageBitfield.getCPtr(usedVerts), usedVerts);
+       }
+
+       public boolean updateClosestVectorAndPoints () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_updateClosestVectorAndPoints(swigCPtr, this);
+       }
+
+       public boolean closestPtPointTetrahedron (Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d,
+               btSubSimplexClosestResult finalResult) {
+               return gdxBulletJNI.btVoronoiSimplexSolver_closestPtPointTetrahedron(swigCPtr, this, p, a, b, c, d,
+                       btSubSimplexClosestResult.getCPtr(finalResult), finalResult);
+       }
+
+       public int pointOutsideOfPlane (Vector3 p, Vector3 a, Vector3 b, Vector3 c, Vector3 d) {
+               return gdxBulletJNI.btVoronoiSimplexSolver_pointOutsideOfPlane(swigCPtr, this, p, a, b, c, d);
+       }
+
+       public boolean closestPtPointTriangle (Vector3 p, Vector3 a, Vector3 b, Vector3 c, btSubSimplexClosestResult result) {
+               return gdxBulletJNI.btVoronoiSimplexSolver_closestPtPointTriangle(swigCPtr, this, p, a, b, c,
+                       btSubSimplexClosestResult.getCPtr(result), result);
+       }
+
+       public btVoronoiSimplexSolver () {
+               this(gdxBulletJNI.new_btVoronoiSimplexSolver(), true);
+       }
+
+       public void reset () {
+               gdxBulletJNI.btVoronoiSimplexSolver_reset(swigCPtr, this);
+       }
+
+       public void addVertex (Vector3 w, Vector3 p, Vector3 q) {
+               gdxBulletJNI.btVoronoiSimplexSolver_addVertex(swigCPtr, this, w, p, q);
+       }
+
+       public void setEqualVertexThreshold (float threshold) {
+               gdxBulletJNI.btVoronoiSimplexSolver_setEqualVertexThreshold(swigCPtr, this, threshold);
+       }
+
+       public float getEqualVertexThreshold () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_getEqualVertexThreshold(swigCPtr, this);
+       }
+
+       public boolean closest (Vector3 v) {
+               return gdxBulletJNI.btVoronoiSimplexSolver_closest(swigCPtr, this, v);
+       }
+
+       public float maxVertex () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_maxVertex(swigCPtr, this);
+       }
+
+       public boolean fullSimplex () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_fullSimplex(swigCPtr, this);
+       }
+
+       public int getSimplex (btVector3 pBuf, btVector3 qBuf, btVector3 yBuf) {
+               return gdxBulletJNI.btVoronoiSimplexSolver_getSimplex(swigCPtr, this, btVector3.getCPtr(pBuf), pBuf,
+                       btVector3.getCPtr(qBuf), qBuf, btVector3.getCPtr(yBuf), yBuf);
+       }
+
+       public boolean inSimplex (Vector3 w) {
+               return gdxBulletJNI.btVoronoiSimplexSolver_inSimplex(swigCPtr, this, w);
+       }
+
+       public void backup_closest (Vector3 v) {
+               gdxBulletJNI.btVoronoiSimplexSolver_backup_closest(swigCPtr, this, v);
+       }
+
+       public boolean emptySimplex () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_emptySimplex(swigCPtr, this);
+       }
+
+       public void compute_points (Vector3 p1, Vector3 p2) {
+               gdxBulletJNI.btVoronoiSimplexSolver_compute_points(swigCPtr, this, p1, p2);
+       }
+
+       public int numVertices () {
+               return gdxBulletJNI.btVoronoiSimplexSolver_numVertices(swigCPtr, this);
+       }
 
 }
index ecebaa1..93e151b 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
 import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Vector3;
 
 public class gdxBullet implements gdxBulletConstants {
-  public static int btGetVersion() {
-    return gdxBulletJNI.btGetVersion();
-  }
-
-  public static float btSqrt(float y) {
-    return gdxBulletJNI.btSqrt(y);
-  }
-
-  public static float btFabs(float x) {
-    return gdxBulletJNI.btFabs(x);
-  }
-
-  public static float btCos(float x) {
-    return gdxBulletJNI.btCos(x);
-  }
-
-  public static float btSin(float x) {
-    return gdxBulletJNI.btSin(x);
-  }
-
-  public static float btTan(float x) {
-    return gdxBulletJNI.btTan(x);
-  }
-
-  public static float btAcos(float x) {
-    return gdxBulletJNI.btAcos(x);
-  }
-
-  public static float btAsin(float x) {
-    return gdxBulletJNI.btAsin(x);
-  }
-
-  public static float btAtan(float x) {
-    return gdxBulletJNI.btAtan(x);
-  }
-
-  public static float btAtan2(float x, float y) {
-    return gdxBulletJNI.btAtan2(x, y);
-  }
-
-  public static float btExp(float x) {
-    return gdxBulletJNI.btExp(x);
-  }
-
-  public static float btLog(float x) {
-    return gdxBulletJNI.btLog(x);
-  }
-
-  public static float btPow(float x, float y) {
-    return gdxBulletJNI.btPow(x, y);
-  }
+       public static int btGetVersion () {
+               return gdxBulletJNI.btGetVersion();
+       }
 
-  public static float btFmod(float x, float y) {
-    return gdxBulletJNI.btFmod(x, y);
-  }
+       public static float btSqrt (float y) {
+               return gdxBulletJNI.btSqrt(y);
+       }
 
-  public static float btAtan2Fast(float y, float x) {
-    return gdxBulletJNI.btAtan2Fast(y, x);
-  }
+       public static float btFabs (float x) {
+               return gdxBulletJNI.btFabs(x);
+       }
 
-  public static boolean btFuzzyZero(float x) {
-    return gdxBulletJNI.btFuzzyZero(x);
-  }
+       public static float btCos (float x) {
+               return gdxBulletJNI.btCos(x);
+       }
 
-  public static boolean btEqual(float a, float eps) {
-    return gdxBulletJNI.btEqual(a, eps);
-  }
+       public static float btSin (float x) {
+               return gdxBulletJNI.btSin(x);
+       }
 
-  public static boolean btGreaterEqual(float a, float eps) {
-    return gdxBulletJNI.btGreaterEqual(a, eps);
-  }
+       public static float btTan (float x) {
+               return gdxBulletJNI.btTan(x);
+       }
 
-  public static int btIsNegative(float x) {
-    return gdxBulletJNI.btIsNegative(x);
-  }
+       public static float btAcos (float x) {
+               return gdxBulletJNI.btAcos(x);
+       }
 
-  public static float btRadians(float x) {
-    return gdxBulletJNI.btRadians(x);
-  }
+       public static float btAsin (float x) {
+               return gdxBulletJNI.btAsin(x);
+       }
 
-  public static float btDegrees(float x) {
-    return gdxBulletJNI.btDegrees(x);
-  }
+       public static float btAtan (float x) {
+               return gdxBulletJNI.btAtan(x);
+       }
 
-  public static float btFsel(float a, float b, float c) {
-    return gdxBulletJNI.btFsel(a, b, c);
-  }
+       public static float btAtan2 (float x, float y) {
+               return gdxBulletJNI.btAtan2(x, y);
+       }
 
-  public static boolean btMachineIsLittleEndian() {
-    return gdxBulletJNI.btMachineIsLittleEndian();
-  }
+       public static float btExp (float x) {
+               return gdxBulletJNI.btExp(x);
+       }
 
-  public static long btSelect(long condition, long valueIfConditionNonZero, long valueIfConditionZero) {
-    return gdxBulletJNI.btSelect__SWIG_0(condition, valueIfConditionNonZero, valueIfConditionZero);
-  }
+       public static float btLog (float x) {
+               return gdxBulletJNI.btLog(x);
+       }
 
-  public static int btSelect(long condition, int valueIfConditionNonZero, int valueIfConditionZero) {
-    return gdxBulletJNI.btSelect__SWIG_1(condition, valueIfConditionNonZero, valueIfConditionZero);
-  }
+       public static float btPow (float x, float y) {
+               return gdxBulletJNI.btPow(x, y);
+       }
 
-  public static float btSelect(long condition, float valueIfConditionNonZero, float valueIfConditionZero) {
-    return gdxBulletJNI.btSelect__SWIG_2(condition, valueIfConditionNonZero, valueIfConditionZero);
-  }
+       public static float btFmod (float x, float y) {
+               return gdxBulletJNI.btFmod(x, y);
+       }
 
-  public static long btSwapEndian(long val) {
-    return gdxBulletJNI.btSwapEndian__SWIG_0(val);
-  }
+       public static float btAtan2Fast (float y, float x) {
+               return gdxBulletJNI.btAtan2Fast(y, x);
+       }
 
-  public static int btSwapEndian(int val) {
-    return gdxBulletJNI.btSwapEndian__SWIG_1(val);
-  }
+       public static boolean btFuzzyZero (float x) {
+               return gdxBulletJNI.btFuzzyZero(x);
+       }
 
-  public static int btSwapEndian(short val) {
-    return gdxBulletJNI.btSwapEndian__SWIG_3(val);
-  }
+       public static boolean btEqual (float a, float eps) {
+               return gdxBulletJNI.btEqual(a, eps);
+       }
 
-  public static long btSwapEndianFloat(float d) {
-    return gdxBulletJNI.btSwapEndianFloat(d);
-  }
-
-  public static float btUnswapEndianFloat(long a) {
-    return gdxBulletJNI.btUnswapEndianFloat(a);
-  }
-
-  public static void btSwapEndianDouble(double d, SWIGTYPE_p_unsigned_char dst) {
-    gdxBulletJNI.btSwapEndianDouble(d, SWIGTYPE_p_unsigned_char.getCPtr(dst));
-  }
-
-  public static double btUnswapEndianDouble(SWIGTYPE_p_unsigned_char src) {
-    return gdxBulletJNI.btUnswapEndianDouble(SWIGTYPE_p_unsigned_char.getCPtr(src));
-  }
-
-  public static float btNormalizeAngle(float angleInRadians) {
-    return gdxBulletJNI.btNormalizeAngle(angleInRadians);
-  }
-
-  public static float btDot(Vector3 v1, Vector3 v2) {
-    return gdxBulletJNI.btDot(v1, v2);
-  }
-
-  public static float btDistance2(Vector3 v1, Vector3 v2) {
-    return gdxBulletJNI.btDistance2(v1, v2);
-  }
-
-  public static float btDistance(Vector3 v1, Vector3 v2) {
-    return gdxBulletJNI.btDistance(v1, v2);
-  }
-
-  public static float btAngle(Vector3 v1, Vector3 v2) {
-    return gdxBulletJNI.btAngle(v1, v2);
-  }
-
-  public static Vector3 btCross(Vector3 v1, Vector3 v2) {
-       return gdxBulletJNI.btCross(v1, v2);
-}
-
-  public static float btTriple(Vector3 v1, Vector3 v2, Vector3 v3) {
-    return gdxBulletJNI.btTriple(v1, v2, v3);
-  }
-
-  public static Vector3 lerp(Vector3 v1, Vector3 v2, float t) {
-       return gdxBulletJNI.lerp(v1, v2, t);
-}
+       public static boolean btGreaterEqual (float a, float eps) {
+               return gdxBulletJNI.btGreaterEqual(a, eps);
+       }
 
-  public static void btSwapScalarEndian(float sourceVal, SWIGTYPE_p_float destVal) {
-    gdxBulletJNI.btSwapScalarEndian(sourceVal, SWIGTYPE_p_float.getCPtr(destVal));
-  }
+       public static int btIsNegative (float x) {
+               return gdxBulletJNI.btIsNegative(x);
+       }
 
-  public static void btSwapVector3Endian(Vector3 sourceVec, Vector3 destVec) {
-    gdxBulletJNI.btSwapVector3Endian(sourceVec, destVec);
-  }
+       public static float btRadians (float x) {
+               return gdxBulletJNI.btRadians(x);
+       }
 
-  public static void btUnSwapVector3Endian(Vector3 vector) {
-    gdxBulletJNI.btUnSwapVector3Endian(vector);
-  }
+       public static float btDegrees (float x) {
+               return gdxBulletJNI.btDegrees(x);
+       }
 
-  public static float dot(Quaternion q1, Quaternion q2) {
-    return gdxBulletJNI.dot(q1, q2);
-  }
-
-  public static float length(Quaternion q) {
-    return gdxBulletJNI.length(q);
-  }
-
-  public static float angle(Quaternion q1, Quaternion q2) {
-    return gdxBulletJNI.angle(q1, q2);
-  }
-
-  public static Quaternion inverse(Quaternion q) {
-       return gdxBulletJNI.inverse(q);
-}
-
-  public static Quaternion slerp(Quaternion q1, Quaternion q2, float t) {
-       return gdxBulletJNI.slerp(q1, q2, t);
-}
-
-  public static Vector3 quatRotate(Quaternion rotation, Vector3 v) {
-       return gdxBulletJNI.quatRotate(rotation, v);
-}
-
-  public static Quaternion shortestArcQuat(Vector3 v0, Vector3 v1) {
-       return gdxBulletJNI.shortestArcQuat(v0, v1);
-}
-
-  public static Quaternion shortestArcQuatNormalize2(Vector3 v0, Vector3 v1) {
-       return gdxBulletJNI.shortestArcQuatNormalize2(v0, v1);
-}
-
-  public static void AabbExpand(Vector3 aabbMin, Vector3 aabbMax, Vector3 expansionMin, Vector3 expansionMax) {
-    gdxBulletJNI.AabbExpand(aabbMin, aabbMax, expansionMin, expansionMax);
-  }
-
-  public static boolean TestPointAgainstAabb2(Vector3 aabbMin1, Vector3 aabbMax1, Vector3 point) {
-    return gdxBulletJNI.TestPointAgainstAabb2(aabbMin1, aabbMax1, point);
-  }
-
-  public static boolean TestAabbAgainstAabb2(Vector3 aabbMin1, Vector3 aabbMax1, Vector3 aabbMin2, Vector3 aabbMax2) {
-    return gdxBulletJNI.TestAabbAgainstAabb2(aabbMin1, aabbMax1, aabbMin2, aabbMax2);
-  }
-
-  public static boolean TestTriangleAgainstAabb2(btVector3 vertices, Vector3 aabbMin, Vector3 aabbMax) {
-    return gdxBulletJNI.TestTriangleAgainstAabb2(btVector3.getCPtr(vertices), vertices, aabbMin, aabbMax);
-  }
-
-  public static int btOutcode(Vector3 p, Vector3 halfExtent) {
-    return gdxBulletJNI.btOutcode(p, halfExtent);
-  }
-
-  public static boolean btRayAabb2(Vector3 rayFrom, Vector3 rayInvDirection, long[] raySign, btVector3 bounds, SWIGTYPE_p_float tmin, float lambda_min, float lambda_max) {
-    return gdxBulletJNI.btRayAabb2(rayFrom, rayInvDirection, raySign, btVector3.getCPtr(bounds), bounds, SWIGTYPE_p_float.getCPtr(tmin), lambda_min, lambda_max);
-  }
-
-  public static boolean btRayAabb(Vector3 rayFrom, Vector3 rayTo, Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_float param, Vector3 normal) {
-    return gdxBulletJNI.btRayAabb(rayFrom, rayTo, aabbMin, aabbMax, SWIGTYPE_p_float.getCPtr(param), normal);
-  }
-
-  public static void btTransformAabb(Vector3 halfExtents, float margin, btTransform t, Vector3 aabbMinOut, Vector3 aabbMaxOut) {
-    gdxBulletJNI.btTransformAabb__SWIG_0(halfExtents, margin, btTransform.getCPtr(t), t, aabbMinOut, aabbMaxOut);
-  }
-
-  public static void btTransformAabb(Vector3 localAabbMin, Vector3 localAabbMax, float margin, btTransform trans, Vector3 aabbMinOut, Vector3 aabbMaxOut) {
-    gdxBulletJNI.btTransformAabb__SWIG_1(localAabbMin, localAabbMax, margin, btTransform.getCPtr(trans), trans, aabbMinOut, aabbMaxOut);
-  }
-
-  public static long testQuantizedAabbAgainstQuantizedAabb(SWIGTYPE_p_unsigned_short aabbMin1, SWIGTYPE_p_unsigned_short aabbMax1, SWIGTYPE_p_unsigned_short aabbMin2, SWIGTYPE_p_unsigned_short aabbMax2) {
-    return gdxBulletJNI.testQuantizedAabbAgainstQuantizedAabb(SWIGTYPE_p_unsigned_short.getCPtr(aabbMin1), SWIGTYPE_p_unsigned_short.getCPtr(aabbMax1), SWIGTYPE_p_unsigned_short.getCPtr(aabbMin2), SWIGTYPE_p_unsigned_short.getCPtr(aabbMax2));
-  }
-
-  public static void GEN_srand(long seed) {
-    gdxBulletJNI.GEN_srand(seed);
-  }
-
-  public static long GEN_rand() {
-    return gdxBulletJNI.GEN_rand();
-  }
-
-  public static Vector3 btAabbSupport(Vector3 halfExtents, Vector3 supportDir) {
-       return gdxBulletJNI.btAabbSupport(halfExtents, supportDir);
-}
+       public static float btFsel (float a, float b, float c) {
+               return gdxBulletJNI.btFsel(a, b, c);
+       }
 
-  public static void GrahamScanConvexHull2D(SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t originalPoints, SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t hull) {
-    gdxBulletJNI.GrahamScanConvexHull2D(SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t.getCPtr(originalPoints), SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t.getCPtr(hull));
-  }
+       public static boolean btMachineIsLittleEndian () {
+               return gdxBulletJNI.btMachineIsLittleEndian();
+       }
 
-  public static SWIGTYPE_p_void btAlignedAllocInternal(long size, int alignment) {
-    long cPtr = gdxBulletJNI.btAlignedAllocInternal(size, alignment);
-    return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
-  }
+       public static long btSelect (long condition, long valueIfConditionNonZero, long valueIfConditionZero) {
+               return gdxBulletJNI.btSelect__SWIG_0(condition, valueIfConditionNonZero, valueIfConditionZero);
+       }
 
-  public static void btAlignedFreeInternal(SWIGTYPE_p_void ptr) {
-    gdxBulletJNI.btAlignedFreeInternal(SWIGTYPE_p_void.getCPtr(ptr));
-  }
+       public static int btSelect (long condition, int valueIfConditionNonZero, int valueIfConditionZero) {
+               return gdxBulletJNI.btSelect__SWIG_1(condition, valueIfConditionNonZero, valueIfConditionZero);
+       }
 
-  public static void btAlignedAllocSetCustom(SWIGTYPE_p_f_size_t__p_void allocFunc, SWIGTYPE_p_f_p_void__void freeFunc) {
-    gdxBulletJNI.btAlignedAllocSetCustom(SWIGTYPE_p_f_size_t__p_void.getCPtr(allocFunc), SWIGTYPE_p_f_p_void__void.getCPtr(freeFunc));
-  }
+       public static float btSelect (long condition, float valueIfConditionNonZero, float valueIfConditionZero) {
+               return gdxBulletJNI.btSelect__SWIG_2(condition, valueIfConditionNonZero, valueIfConditionZero);
+       }
 
-  public static void btAlignedAllocSetCustomAligned(SWIGTYPE_p_f_size_t_int__p_void allocFunc, SWIGTYPE_p_f_p_void__void freeFunc) {
-    gdxBulletJNI.btAlignedAllocSetCustomAligned(SWIGTYPE_p_f_size_t_int__p_void.getCPtr(allocFunc), SWIGTYPE_p_f_p_void__void.getCPtr(freeFunc));
-  }
+       public static long btSwapEndian (long val) {
+               return gdxBulletJNI.btSwapEndian__SWIG_0(val);
+       }
 
-  public static int getBT_HASH_NULL() {
-    return gdxBulletJNI.BT_HASH_NULL_get();
-  }
+       public static int btSwapEndian (int val) {
+               return gdxBulletJNI.btSwapEndian__SWIG_1(val);
+       }
 
-  public static boolean Intersect(btDbvtAabbMm a, btDbvtAabbMm b) {
-    return gdxBulletJNI.Intersect__SWIG_0(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
-  }
+       public static int btSwapEndian (short val) {
+               return gdxBulletJNI.btSwapEndian__SWIG_3(val);
+       }
 
-  public static boolean Intersect(btDbvtAabbMm a, Vector3 b) {
-    return gdxBulletJNI.Intersect__SWIG_1(btDbvtAabbMm.getCPtr(a), a, b);
-  }
+       public static long btSwapEndianFloat (float d) {
+               return gdxBulletJNI.btSwapEndianFloat(d);
+       }
 
-  public static float Proximity(btDbvtAabbMm a, btDbvtAabbMm b) {
-    return gdxBulletJNI.Proximity(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
-  }
+       public static float btUnswapEndianFloat (long a) {
+               return gdxBulletJNI.btUnswapEndianFloat(a);
+       }
 
-  public static int Select(btDbvtAabbMm o, btDbvtAabbMm a, btDbvtAabbMm b) {
-    return gdxBulletJNI.Select(btDbvtAabbMm.getCPtr(o), o, btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
-  }
+       public static void btSwapEndianDouble (double d, SWIGTYPE_p_unsigned_char dst) {
+               gdxBulletJNI.btSwapEndianDouble(d, SWIGTYPE_p_unsigned_char.getCPtr(dst));
+       }
 
-  public static void Merge(btDbvtAabbMm a, btDbvtAabbMm b, btDbvtAabbMm r) {
-    gdxBulletJNI.Merge(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b, btDbvtAabbMm.getCPtr(r), r);
-  }
+       public static double btUnswapEndianDouble (SWIGTYPE_p_unsigned_char src) {
+               return gdxBulletJNI.btUnswapEndianDouble(SWIGTYPE_p_unsigned_char.getCPtr(src));
+       }
 
-  public static boolean NotEqual(btDbvtAabbMm a, btDbvtAabbMm b) {
-    return gdxBulletJNI.NotEqual(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
-  }
+       public static float btNormalizeAngle (float angleInRadians) {
+               return gdxBulletJNI.btNormalizeAngle(angleInRadians);
+       }
 
-  public static void setGOverlappingPairs(int value) {
-    gdxBulletJNI.gOverlappingPairs_set(value);
-  }
+       public static float btDot (Vector3 v1, Vector3 v2) {
+               return gdxBulletJNI.btDot(v1, v2);
+       }
 
-  public static int getGOverlappingPairs() {
-    return gdxBulletJNI.gOverlappingPairs_get();
-  }
+       public static float btDistance2 (Vector3 v1, Vector3 v2) {
+               return gdxBulletJNI.btDistance2(v1, v2);
+       }
 
-  public static void setGRemovePairs(int value) {
-    gdxBulletJNI.gRemovePairs_set(value);
-  }
-
-  public static int getGRemovePairs() {
-    return gdxBulletJNI.gRemovePairs_get();
-  }
-
-  public static void setGAddedPairs(int value) {
-    gdxBulletJNI.gAddedPairs_set(value);
-  }
-
-  public static int getGAddedPairs() {
-    return gdxBulletJNI.gAddedPairs_get();
-  }
-
-  public static void setGFindPairs(int value) {
-    gdxBulletJNI.gFindPairs_set(value);
-  }
-
-  public static int getGFindPairs() {
-    return gdxBulletJNI.gFindPairs_get();
-  }
-
-  public static int getBT_NULL_PAIR() {
-    return gdxBulletJNI.BT_NULL_PAIR_get();
-  }
-
-  public static void setGDeactivationTime(float value) {
-    gdxBulletJNI.gDeactivationTime_set(value);
-  }
-
-  public static float getGDeactivationTime() {
-    return gdxBulletJNI.gDeactivationTime_get();
-  }
-
-  public static void setGDisableDeactivation(boolean value) {
-    gdxBulletJNI.gDisableDeactivation_set(value);
-  }
-
-  public static boolean getGDisableDeactivation() {
-    return gdxBulletJNI.gDisableDeactivation_get();
-  }
-
-  public static void setGContactAddedCallback(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool value) {
-    gdxBulletJNI.gContactAddedCallback_set(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool.getCPtr(value));
-  }
-
-  public static SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool getGContactAddedCallback() {
-    long cPtr = gdxBulletJNI.gContactAddedCallback_get();
-    return (cPtr == 0) ? null : new SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool(cPtr, false);
-  }
-
-  public static void btGenerateInternalEdgeInfo(btBvhTriangleMeshShape trimeshShape, btTriangleInfoMap triangleInfoMap) {
-    gdxBulletJNI.btGenerateInternalEdgeInfo(btBvhTriangleMeshShape.getCPtr(trimeshShape), trimeshShape, btTriangleInfoMap.getCPtr(triangleInfoMap), triangleInfoMap);
-  }
-
-  public static void btAdjustInternalEdgeContacts(btManifoldPoint cp, btCollisionObject trimeshColObj0, btCollisionObject otherColObj1, int partId0, int index0, int normalAdjustFlags) {
-    gdxBulletJNI.btAdjustInternalEdgeContacts__SWIG_0(btManifoldPoint.getCPtr(cp), cp, btCollisionObject.getCPtr(trimeshColObj0), trimeshColObj0, btCollisionObject.getCPtr(otherColObj1), otherColObj1, partId0, index0, normalAdjustFlags);
-  }
-
-  public static void btAdjustInternalEdgeContacts(btManifoldPoint cp, btCollisionObject trimeshColObj0, btCollisionObject otherColObj1, int partId0, int index0) {
-    gdxBulletJNI.btAdjustInternalEdgeContacts__SWIG_1(btManifoldPoint.getCPtr(cp), cp, btCollisionObject.getCPtr(trimeshColObj0), trimeshColObj0, btCollisionObject.getCPtr(otherColObj1), otherColObj1, partId0, index0);
-  }
-
-  public static void setGContactBreakingThreshold(float value) {
-    gdxBulletJNI.gContactBreakingThreshold_set(value);
-  }
-
-  public static float getGContactBreakingThreshold() {
-    return gdxBulletJNI.gContactBreakingThreshold_get();
-  }
-
-  public static void setGContactDestroyedCallback(SWIGTYPE_p_f_p_void__bool value) {
-    gdxBulletJNI.gContactDestroyedCallback_set(SWIGTYPE_p_f_p_void__bool.getCPtr(value));
-  }
-
-  public static SWIGTYPE_p_f_p_void__bool getGContactDestroyedCallback() {
-    long cPtr = gdxBulletJNI.gContactDestroyedCallback_get();
-    return (cPtr == 0) ? null : new SWIGTYPE_p_f_p_void__bool(cPtr, false);
-  }
-
-  public static void setGContactProcessedCallback(SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool value) {
-    gdxBulletJNI.gContactProcessedCallback_set(SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool.getCPtr(value));
-  }
-
-  public static SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool getGContactProcessedCallback() {
-    long cPtr = gdxBulletJNI.gContactProcessedCallback_get();
-    return (cPtr == 0) ? null : new SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool(cPtr, false);
-  }
-
-  public static float btAdjustAngleToLimits(float angleInRadians, float angleLowerLimitInRadians, float angleUpperLimitInRadians) {
-    return gdxBulletJNI.btAdjustAngleToLimits(angleInRadians, angleLowerLimitInRadians, angleUpperLimitInRadians);
-  }
-
-  public static float resolveSingleCollision(btRigidBody body1, btCollisionObject colObj2, Vector3 contactPositionWorld, Vector3 contactNormalOnB, btContactSolverInfo solverInfo, float distance) {
-    return gdxBulletJNI.resolveSingleCollision(btRigidBody.getCPtr(body1), body1, btCollisionObject.getCPtr(colObj2), colObj2, contactPositionWorld, contactNormalOnB, btContactSolverInfo.getCPtr(solverInfo), solverInfo, distance);
-  }
-
-  public static void resolveSingleBilateral(btRigidBody body1, Vector3 pos1, btRigidBody body2, Vector3 pos2, float distance, Vector3 normal, SWIGTYPE_p_float impulse, float timeStep) {
-    gdxBulletJNI.resolveSingleBilateral(btRigidBody.getCPtr(body1), body1, pos1, btRigidBody.getCPtr(body2), body2, pos2, distance, normal, SWIGTYPE_p_float.getCPtr(impulse), timeStep);
-  }
+       public static float btDistance (Vector3 v1, Vector3 v2) {
+               return gdxBulletJNI.btDistance(v1, v2);
+       }
+
+       public static float btAngle (Vector3 v1, Vector3 v2) {
+               return gdxBulletJNI.btAngle(v1, v2);
+       }
+
+       public static Vector3 btCross (Vector3 v1, Vector3 v2) {
+               return gdxBulletJNI.btCross(v1, v2);
+       }
+
+       public static float btTriple (Vector3 v1, Vector3 v2, Vector3 v3) {
+               return gdxBulletJNI.btTriple(v1, v2, v3);
+       }
+
+       public static Vector3 lerp (Vector3 v1, Vector3 v2, float t) {
+               return gdxBulletJNI.lerp(v1, v2, t);
+       }
+
+       public static void btSwapScalarEndian (float sourceVal, SWIGTYPE_p_float destVal) {
+               gdxBulletJNI.btSwapScalarEndian(sourceVal, SWIGTYPE_p_float.getCPtr(destVal));
+       }
+
+       public static void btSwapVector3Endian (Vector3 sourceVec, Vector3 destVec) {
+               gdxBulletJNI.btSwapVector3Endian(sourceVec, destVec);
+       }
+
+       public static void btUnSwapVector3Endian (Vector3 vector) {
+               gdxBulletJNI.btUnSwapVector3Endian(vector);
+       }
+
+       public static float dot (Quaternion q1, Quaternion q2) {
+               return gdxBulletJNI.dot(q1, q2);
+       }
+
+       public static float length (Quaternion q) {
+               return gdxBulletJNI.length(q);
+       }
+
+       public static float angle (Quaternion q1, Quaternion q2) {
+               return gdxBulletJNI.angle(q1, q2);
+       }
+
+       public static Quaternion inverse (Quaternion q) {
+               return gdxBulletJNI.inverse(q);
+       }
+
+       public static Quaternion slerp (Quaternion q1, Quaternion q2, float t) {
+               return gdxBulletJNI.slerp(q1, q2, t);
+       }
+
+       public static Vector3 quatRotate (Quaternion rotation, Vector3 v) {
+               return gdxBulletJNI.quatRotate(rotation, v);
+       }
+
+       public static Quaternion shortestArcQuat (Vector3 v0, Vector3 v1) {
+               return gdxBulletJNI.shortestArcQuat(v0, v1);
+       }
+
+       public static Quaternion shortestArcQuatNormalize2 (Vector3 v0, Vector3 v1) {
+               return gdxBulletJNI.shortestArcQuatNormalize2(v0, v1);
+       }
+
+       public static void AabbExpand (Vector3 aabbMin, Vector3 aabbMax, Vector3 expansionMin, Vector3 expansionMax) {
+               gdxBulletJNI.AabbExpand(aabbMin, aabbMax, expansionMin, expansionMax);
+       }
+
+       public static boolean TestPointAgainstAabb2 (Vector3 aabbMin1, Vector3 aabbMax1, Vector3 point) {
+               return gdxBulletJNI.TestPointAgainstAabb2(aabbMin1, aabbMax1, point);
+       }
+
+       public static boolean TestAabbAgainstAabb2 (Vector3 aabbMin1, Vector3 aabbMax1, Vector3 aabbMin2, Vector3 aabbMax2) {
+               return gdxBulletJNI.TestAabbAgainstAabb2(aabbMin1, aabbMax1, aabbMin2, aabbMax2);
+       }
+
+       public static boolean TestTriangleAgainstAabb2 (btVector3 vertices, Vector3 aabbMin, Vector3 aabbMax) {
+               return gdxBulletJNI.TestTriangleAgainstAabb2(btVector3.getCPtr(vertices), vertices, aabbMin, aabbMax);
+       }
+
+       public static int btOutcode (Vector3 p, Vector3 halfExtent) {
+               return gdxBulletJNI.btOutcode(p, halfExtent);
+       }
+
+       public static boolean btRayAabb2 (Vector3 rayFrom, Vector3 rayInvDirection, long[] raySign, btVector3 bounds,
+               SWIGTYPE_p_float tmin, float lambda_min, float lambda_max) {
+               return gdxBulletJNI.btRayAabb2(rayFrom, rayInvDirection, raySign, btVector3.getCPtr(bounds), bounds,
+                       SWIGTYPE_p_float.getCPtr(tmin), lambda_min, lambda_max);
+       }
+
+       public static boolean btRayAabb (Vector3 rayFrom, Vector3 rayTo, Vector3 aabbMin, Vector3 aabbMax, SWIGTYPE_p_float param,
+               Vector3 normal) {
+               return gdxBulletJNI.btRayAabb(rayFrom, rayTo, aabbMin, aabbMax, SWIGTYPE_p_float.getCPtr(param), normal);
+       }
+
+       public static void btTransformAabb (Vector3 halfExtents, float margin, btTransform t, Vector3 aabbMinOut, Vector3 aabbMaxOut) {
+               gdxBulletJNI.btTransformAabb__SWIG_0(halfExtents, margin, btTransform.getCPtr(t), t, aabbMinOut, aabbMaxOut);
+       }
+
+       public static void btTransformAabb (Vector3 localAabbMin, Vector3 localAabbMax, float margin, btTransform trans,
+               Vector3 aabbMinOut, Vector3 aabbMaxOut) {
+               gdxBulletJNI.btTransformAabb__SWIG_1(localAabbMin, localAabbMax, margin, btTransform.getCPtr(trans), trans, aabbMinOut,
+                       aabbMaxOut);
+       }
+
+       public static long testQuantizedAabbAgainstQuantizedAabb (SWIGTYPE_p_unsigned_short aabbMin1,
+               SWIGTYPE_p_unsigned_short aabbMax1, SWIGTYPE_p_unsigned_short aabbMin2, SWIGTYPE_p_unsigned_short aabbMax2) {
+               return gdxBulletJNI.testQuantizedAabbAgainstQuantizedAabb(SWIGTYPE_p_unsigned_short.getCPtr(aabbMin1),
+                       SWIGTYPE_p_unsigned_short.getCPtr(aabbMax1), SWIGTYPE_p_unsigned_short.getCPtr(aabbMin2),
+                       SWIGTYPE_p_unsigned_short.getCPtr(aabbMax2));
+       }
+
+       public static void GEN_srand (long seed) {
+               gdxBulletJNI.GEN_srand(seed);
+       }
+
+       public static long GEN_rand () {
+               return gdxBulletJNI.GEN_rand();
+       }
+
+       public static Vector3 btAabbSupport (Vector3 halfExtents, Vector3 supportDir) {
+               return gdxBulletJNI.btAabbSupport(halfExtents, supportDir);
+       }
+
+       public static void GrahamScanConvexHull2D (SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t originalPoints,
+               SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t hull) {
+               gdxBulletJNI.GrahamScanConvexHull2D(SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t.getCPtr(originalPoints),
+                       SWIGTYPE_p_btAlignedObjectArrayT_GrahamVector2_t.getCPtr(hull));
+       }
+
+       public static SWIGTYPE_p_void btAlignedAllocInternal (long size, int alignment) {
+               long cPtr = gdxBulletJNI.btAlignedAllocInternal(size, alignment);
+               return (cPtr == 0) ? null : new SWIGTYPE_p_void(cPtr, false);
+       }
+
+       public static void btAlignedFreeInternal (SWIGTYPE_p_void ptr) {
+               gdxBulletJNI.btAlignedFreeInternal(SWIGTYPE_p_void.getCPtr(ptr));
+       }
+
+       public static void btAlignedAllocSetCustom (SWIGTYPE_p_f_size_t__p_void allocFunc, SWIGTYPE_p_f_p_void__void freeFunc) {
+               gdxBulletJNI.btAlignedAllocSetCustom(SWIGTYPE_p_f_size_t__p_void.getCPtr(allocFunc),
+                       SWIGTYPE_p_f_p_void__void.getCPtr(freeFunc));
+       }
+
+       public static void btAlignedAllocSetCustomAligned (SWIGTYPE_p_f_size_t_int__p_void allocFunc,
+               SWIGTYPE_p_f_p_void__void freeFunc) {
+               gdxBulletJNI.btAlignedAllocSetCustomAligned(SWIGTYPE_p_f_size_t_int__p_void.getCPtr(allocFunc),
+                       SWIGTYPE_p_f_p_void__void.getCPtr(freeFunc));
+       }
+
+       public static int getBT_HASH_NULL () {
+               return gdxBulletJNI.BT_HASH_NULL_get();
+       }
+
+       public static boolean Intersect (btDbvtAabbMm a, btDbvtAabbMm b) {
+               return gdxBulletJNI.Intersect__SWIG_0(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
+       }
+
+       public static boolean Intersect (btDbvtAabbMm a, Vector3 b) {
+               return gdxBulletJNI.Intersect__SWIG_1(btDbvtAabbMm.getCPtr(a), a, b);
+       }
+
+       public static float Proximity (btDbvtAabbMm a, btDbvtAabbMm b) {
+               return gdxBulletJNI.Proximity(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
+       }
+
+       public static int Select (btDbvtAabbMm o, btDbvtAabbMm a, btDbvtAabbMm b) {
+               return gdxBulletJNI.Select(btDbvtAabbMm.getCPtr(o), o, btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
+       }
+
+       public static void Merge (btDbvtAabbMm a, btDbvtAabbMm b, btDbvtAabbMm r) {
+               gdxBulletJNI.Merge(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b, btDbvtAabbMm.getCPtr(r), r);
+       }
+
+       public static boolean NotEqual (btDbvtAabbMm a, btDbvtAabbMm b) {
+               return gdxBulletJNI.NotEqual(btDbvtAabbMm.getCPtr(a), a, btDbvtAabbMm.getCPtr(b), b);
+       }
+
+       public static void setGOverlappingPairs (int value) {
+               gdxBulletJNI.gOverlappingPairs_set(value);
+       }
+
+       public static int getGOverlappingPairs () {
+               return gdxBulletJNI.gOverlappingPairs_get();
+       }
+
+       public static void setGRemovePairs (int value) {
+               gdxBulletJNI.gRemovePairs_set(value);
+       }
+
+       public static int getGRemovePairs () {
+               return gdxBulletJNI.gRemovePairs_get();
+       }
+
+       public static void setGAddedPairs (int value) {
+               gdxBulletJNI.gAddedPairs_set(value);
+       }
+
+       public static int getGAddedPairs () {
+               return gdxBulletJNI.gAddedPairs_get();
+       }
+
+       public static void setGFindPairs (int value) {
+               gdxBulletJNI.gFindPairs_set(value);
+       }
+
+       public static int getGFindPairs () {
+               return gdxBulletJNI.gFindPairs_get();
+       }
+
+       public static int getBT_NULL_PAIR () {
+               return gdxBulletJNI.BT_NULL_PAIR_get();
+       }
+
+       public static void setGDeactivationTime (float value) {
+               gdxBulletJNI.gDeactivationTime_set(value);
+       }
+
+       public static float getGDeactivationTime () {
+               return gdxBulletJNI.gDeactivationTime_get();
+       }
+
+       public static void setGDisableDeactivation (boolean value) {
+               gdxBulletJNI.gDisableDeactivation_set(value);
+       }
+
+       public static boolean getGDisableDeactivation () {
+               return gdxBulletJNI.gDisableDeactivation_get();
+       }
+
+       public static void setGContactAddedCallback (
+               SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool value) {
+               gdxBulletJNI
+                       .gContactAddedCallback_set(SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool
+                               .getCPtr(value));
+       }
+
+       public static SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool getGContactAddedCallback () {
+               long cPtr = gdxBulletJNI.gContactAddedCallback_get();
+               return (cPtr == 0) ? null
+                       : new SWIGTYPE_p_f_r_btManifoldPoint_p_q_const__btCollisionObject_int_int_p_q_const__btCollisionObject_int_int__bool(
+                               cPtr, false);
+       }
+
+       public static void btGenerateInternalEdgeInfo (btBvhTriangleMeshShape trimeshShape, btTriangleInfoMap triangleInfoMap) {
+               gdxBulletJNI.btGenerateInternalEdgeInfo(btBvhTriangleMeshShape.getCPtr(trimeshShape), trimeshShape,
+                       btTriangleInfoMap.getCPtr(triangleInfoMap), triangleInfoMap);
+       }
+
+       public static void btAdjustInternalEdgeContacts (btManifoldPoint cp, btCollisionObject trimeshColObj0,
+               btCollisionObject otherColObj1, int partId0, int index0, int normalAdjustFlags) {
+               gdxBulletJNI.btAdjustInternalEdgeContacts__SWIG_0(btManifoldPoint.getCPtr(cp), cp,
+                       btCollisionObject.getCPtr(trimeshColObj0), trimeshColObj0, btCollisionObject.getCPtr(otherColObj1), otherColObj1,
+                       partId0, index0, normalAdjustFlags);
+       }
+
+       public static void btAdjustInternalEdgeContacts (btManifoldPoint cp, btCollisionObject trimeshColObj0,
+               btCollisionObject otherColObj1, int partId0, int index0) {
+               gdxBulletJNI.btAdjustInternalEdgeContacts__SWIG_1(btManifoldPoint.getCPtr(cp), cp,
+                       btCollisionObject.getCPtr(trimeshColObj0), trimeshColObj0, btCollisionObject.getCPtr(otherColObj1), otherColObj1,
+                       partId0, index0);
+       }
+
+       public static void setGContactBreakingThreshold (float value) {
+               gdxBulletJNI.gContactBreakingThreshold_set(value);
+       }
+
+       public static float getGContactBreakingThreshold () {
+               return gdxBulletJNI.gContactBreakingThreshold_get();
+       }
+
+       public static void setGContactDestroyedCallback (SWIGTYPE_p_f_p_void__bool value) {
+               gdxBulletJNI.gContactDestroyedCallback_set(SWIGTYPE_p_f_p_void__bool.getCPtr(value));
+       }
+
+       public static SWIGTYPE_p_f_p_void__bool getGContactDestroyedCallback () {
+               long cPtr = gdxBulletJNI.gContactDestroyedCallback_get();
+               return (cPtr == 0) ? null : new SWIGTYPE_p_f_p_void__bool(cPtr, false);
+       }
+
+       public static void setGContactProcessedCallback (SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool value) {
+               gdxBulletJNI.gContactProcessedCallback_set(SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool.getCPtr(value));
+       }
+
+       public static SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool getGContactProcessedCallback () {
+               long cPtr = gdxBulletJNI.gContactProcessedCallback_get();
+               return (cPtr == 0) ? null : new SWIGTYPE_p_f_r_btManifoldPoint_p_void_p_void__bool(cPtr, false);
+       }
+
+       public static float btAdjustAngleToLimits (float angleInRadians, float angleLowerLimitInRadians, float angleUpperLimitInRadians) {
+               return gdxBulletJNI.btAdjustAngleToLimits(angleInRadians, angleLowerLimitInRadians, angleUpperLimitInRadians);
+       }
+
+       public static float resolveSingleCollision (btRigidBody body1, btCollisionObject colObj2, Vector3 contactPositionWorld,
+               Vector3 contactNormalOnB, btContactSolverInfo solverInfo, float distance) {
+               return gdxBulletJNI.resolveSingleCollision(btRigidBody.getCPtr(body1), body1, btCollisionObject.getCPtr(colObj2), colObj2,
+                       contactPositionWorld, contactNormalOnB, btContactSolverInfo.getCPtr(solverInfo), solverInfo, distance);
+       }
+
+       public static void resolveSingleBilateral (btRigidBody body1, Vector3 pos1, btRigidBody body2, Vector3 pos2, float distance,
+               Vector3 normal, SWIGTYPE_p_float impulse, float timeStep) {
+               gdxBulletJNI.resolveSingleBilateral(btRigidBody.getCPtr(body1), body1, pos1, btRigidBody.getCPtr(body2), body2, pos2,
+                       distance, normal, SWIGTYPE_p_float.getCPtr(impulse), timeStep);
+       }
 
 }
index 31c959f..556e081 100644 (file)
@@ -8,57 +8,53 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public interface gdxBulletConstants {
-  public final static int BT_BULLET_VERSION = 280;
-  public final static double BT_LARGE_FLOAT = 1e18;
-  public final static String btVector3DataName = "btVector3FloatData";
-  public final static int USE_BANCHLESS = 1;
-  public final static int BT_USE_PLACEMENT_NEW = 1;
-  public final static int DBVT_IMPL_GENERIC = 0;
-  public final static int DBVT_IMPL_SSE = 1;
-  public final static int DBVT_USE_TEMPLATE = 0;
-  public final static int DBVT_USE_INTRINSIC_SSE = 1;
-  public final static int DBVT_USE_MEMMOVE = 1;
-  public final static int DBVT_ENABLE_BENCHMARK = 0;
-  public final static int DBVT_SELECT_IMPL = 0;
-  public final static int DBVT_MERGE_IMPL = 0;
-  public final static int DBVT_INT0_IMPL = 0;
-  public final static String btQuantizedBvhDataName = "btQuantizedBvhFloatData";
-  public final static int MAX_SUBTREE_SIZE_IN_BYTES = 2048;
-  public final static int MAX_NUM_PARTS_IN_BITS = 10;
-  public final static int DBVT_BP_PROFILE = 0;
-  public final static int DBVT_BP_PREVENTFALSEUPDATE = 0;
-  public final static int DBVT_BP_ACCURATESLEEPING = 0;
-  public final static int DBVT_BP_ENABLE_BENCHMARK = 0;
-  public final static int USE_OVERLAP_TEST_ON_REMOVES = 1;
-  public final static int MAX_PREFERRED_PENETRATION_DIRECTIONS = 10;
-  public final static int TRI_INFO_V0V1_CONVEX = 1;
-  public final static int TRI_INFO_V1V2_CONVEX = 2;
-  public final static int TRI_INFO_V2V0_CONVEX = 4;
-  public final static int TRI_INFO_V0V1_SWAP_NORMALB = 8;
-  public final static int TRI_INFO_V1V2_SWAP_NORMALB = 16;
-  public final static int TRI_INFO_V2V0_SWAP_NORMALB = 32;
-  public final static int TEST_INTERNAL_OBJECTS = 1;
-  public final static int ACTIVE_TAG = 1;
-  public final static int ISLAND_SLEEPING = 2;
-  public final static int WANTS_DEACTIVATION = 3;
-  public final static int DISABLE_DEACTIVATION = 4;
-  public final static int DISABLE_SIMULATION = 5;
-  public final static String btCollisionObjectDataName = "btCollisionObjectFloatData";
-  public final static String btRigidBodyDataName = "btRigidBodyFloatData";
-  public final static int USE_PATH_COMPRESSION = 1;
-  public final static int STATIC_SIMULATION_ISLAND_OPTIMIZATION = 1;
-  public final static int USE_DISPATCH_REGISTRY_ARRAY = 1;
-  public final static int MANIFOLD_CACHE_SIZE = 4;
-  public final static int VORONOI_SIMPLEX_MAX_VERTS = 5;
-  public final static double VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD = 0.0001;
-  public final static int NO_VIRTUAL_INTERFACE = 1;
-  public final static String btPoint2PointConstraintDataName = "btPoint2PointConstraintFloatData";
-  public final static int BT_6DOF_FLAGS_AXIS_SHIFT = 3;
-  public final static int _BT_USE_CENTER_LIMIT_ = 1;
-  public final static String btHingeConstraintDataName = "btHingeConstraintFloatData";
+       public final static int BT_BULLET_VERSION = 280;
+       public final static double BT_LARGE_FLOAT = 1e18;
+       public final static String btVector3DataName = "btVector3FloatData";
+       public final static int USE_BANCHLESS = 1;
+       public final static int BT_USE_PLACEMENT_NEW = 1;
+       public final static int DBVT_IMPL_GENERIC = 0;
+       public final static int DBVT_IMPL_SSE = 1;
+       public final static int DBVT_USE_TEMPLATE = 0;
+       public final static int DBVT_USE_INTRINSIC_SSE = 1;
+       public final static int DBVT_USE_MEMMOVE = 1;
+       public final static int DBVT_ENABLE_BENCHMARK = 0;
+       public final static int DBVT_SELECT_IMPL = 0;
+       public final static int DBVT_MERGE_IMPL = 0;
+       public final static int DBVT_INT0_IMPL = 0;
+       public final static String btQuantizedBvhDataName = "btQuantizedBvhFloatData";
+       public final static int MAX_SUBTREE_SIZE_IN_BYTES = 2048;
+       public final static int MAX_NUM_PARTS_IN_BITS = 10;
+       public final static int DBVT_BP_PROFILE = 0;
+       public final static int DBVT_BP_PREVENTFALSEUPDATE = 0;
+       public final static int DBVT_BP_ACCURATESLEEPING = 0;
+       public final static int DBVT_BP_ENABLE_BENCHMARK = 0;
+       public final static int USE_OVERLAP_TEST_ON_REMOVES = 1;
+       public final static int MAX_PREFERRED_PENETRATION_DIRECTIONS = 10;
+       public final static int TRI_INFO_V0V1_CONVEX = 1;
+       public final static int TRI_INFO_V1V2_CONVEX = 2;
+       public final static int TRI_INFO_V2V0_CONVEX = 4;
+       public final static int TRI_INFO_V0V1_SWAP_NORMALB = 8;
+       public final static int TRI_INFO_V1V2_SWAP_NORMALB = 16;
+       public final static int TRI_INFO_V2V0_SWAP_NORMALB = 32;
+       public final static int TEST_INTERNAL_OBJECTS = 1;
+       public final static int ACTIVE_TAG = 1;
+       public final static int ISLAND_SLEEPING = 2;
+       public final static int WANTS_DEACTIVATION = 3;
+       public final static int DISABLE_DEACTIVATION = 4;
+       public final static int DISABLE_SIMULATION = 5;
+       public final static String btCollisionObjectDataName = "btCollisionObjectFloatData";
+       public final static String btRigidBodyDataName = "btRigidBodyFloatData";
+       public final static int USE_PATH_COMPRESSION = 1;
+       public final static int STATIC_SIMULATION_ISLAND_OPTIMIZATION = 1;
+       public final static int USE_DISPATCH_REGISTRY_ARRAY = 1;
+       public final static int MANIFOLD_CACHE_SIZE = 4;
+       public final static int VORONOI_SIMPLEX_MAX_VERTS = 5;
+       public final static double VORONOI_DEFAULT_EQUAL_VERTEX_THRESHOLD = 0.0001;
+       public final static int NO_VIRTUAL_INTERFACE = 1;
+       public final static String btPoint2PointConstraintDataName = "btPoint2PointConstraintFloatData";
+       public final static int BT_6DOF_FLAGS_AXIS_SHIFT = 3;
+       public final static int _BT_USE_CENTER_LIMIT_ = 1;
+       public final static String btHingeConstraintDataName = "btHingeConstraintFloatData";
 }
index 4d7a5ee..4ef376f 100644 (file)
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
 import com.badlogic.gdx.math.Matrix3;
+import com.badlogic.gdx.math.Quaternion;
+import com.badlogic.gdx.math.Vector3;
 import com.badlogic.gdx.utils.Pool;
 
 public class gdxBulletJNI {
 
+       // Used to avoid allocation when returning from Java
+       private final static Vector3 _RET_VECTOR3 = new Vector3(0, 0, 0);
+       private final static Quaternion _RET_QUATERNION = new Quaternion(0, 0, 0, 0);
+       private final static Matrix3 _RET_MATRIX3 = new Matrix3();
 
-  // Used to avoid allocation when returning from Java
-  private final static Vector3 _RET_VECTOR3 = new Vector3(0, 0, 0);
-  private final static Quaternion _RET_QUATERNION = new Quaternion(0, 0, 0, 0);
-  private final static Matrix3 _RET_MATRIX3 = new Matrix3();
-  
-  // Used to avoid allocation for parameters in director calls into Java
-  public static final Pool<Vector3> _DIR_VECTOR3 = new Pool<Vector3>() {
-    @Override
-       protected Vector3 newObject() {
-      return new Vector3();
-       }
-  };
-  public static final Pool<Quaternion> _DIR_QUATERNION = new Pool<Quaternion>() {
-    @Override
-       protected Quaternion newObject() {
-      return new Quaternion(0, 0, 0, 0);
-       }
-  };
-  public static final Pool<Matrix3> _DIR_MATRIX3 = new Pool<Matrix3>() {
-    @Override
-       protected Matrix3 newObject() {
-      return new Matrix3();
+       // Used to avoid allocation for parameters in director calls into Java
+       public static final Pool<Vector3> _DIR_VECTOR3 = new Pool<Vector3>() {
+               @Override
+               protected Vector3 newObject () {
+                       return new Vector3();
+               }
+       };
+       public static final Pool<Quaternion> _DIR_QUATERNION = new Pool<Quaternion>() {
+               @Override
+               protected Quaternion newObject () {
+                       return new Quaternion(0, 0, 0, 0);
+               }
+       };
+       public static final Pool<Matrix3> _DIR_MATRIX3 = new Pool<Matrix3>() {
+               @Override
+               protected Matrix3 newObject () {
+                       return new Matrix3();
+               }
+       };
+
+       public final static native int btGetVersion ();
+
+       public final static native float btSqrt (float jarg1);
+
+       public final static native float btFabs (float jarg1);
+
+       public final static native float btCos (float jarg1);
+
+       public final static native float btSin (float jarg1);
+
+       public final static native float btTan (float jarg1);
+
+       public final static native float btAcos (float jarg1);
+
+       public final static native float btAsin (float jarg1);
+
+       public final static native float btAtan (float jarg1);
+
+       public final static native float btAtan2 (float jarg1, float jarg2);
+
+       public final static native float btExp (float jarg1);
+
+       public final static native float btLog (float jarg1);
+
+       public final static native float btPow (float jarg1, float jarg2);
+
+       public final static native float btFmod (float jarg1, float jarg2);
+
+       public final static native float btAtan2Fast (float jarg1, float jarg2);
+
+       public final static native boolean btFuzzyZero (float jarg1);
+
+       public final static native boolean btEqual (float jarg1, float jarg2);
+
+       public final static native boolean btGreaterEqual (float jarg1, float jarg2);
+
+       public final static native int btIsNegative (float jarg1);
+
+       public final static native float btRadians (float jarg1);
+
+       public final static native float btDegrees (float jarg1);
+
+       public final static native float btFsel (float jarg1, float jarg2, float jarg3);
+
+       public final static native boolean btMachineIsLittleEndian ();
+
+       public final static native long btSelect__SWIG_0 (long jarg1, long jarg2, long jarg3);
+
+       public final static native int btSelect__SWIG_1 (long jarg1, int jarg2, int jarg3);
+
+       public final static native float btSelect__SWIG_2 (long jarg1, float jarg2, float jarg3);
+
+       public final static native long btSwapEndian__SWIG_0 (long jarg1);
+
+       public final static native int btSwapEndian__SWIG_1 (int jarg1);
+
+       public final static native int btSwapEndian__SWIG_3 (short jarg1);
+
+       public final static native long btSwapEndianFloat (float jarg1);
+
+       public final static native float btUnswapEndianFloat (long jarg1);
+
+       public final static native void btSwapEndianDouble (double jarg1, long jarg2);
+
+       public final static native double btUnswapEndianDouble (long jarg1);
+
+       public final static native float btNormalizeAngle (float jarg1);
+
+       public final static native long new_btTypedObject (int jarg1);
+
+       public final static native void btTypedObject_m_objectType_set (long jarg1, btTypedObject jarg1_, int jarg2);
+
+       public final static native int btTypedObject_m_objectType_get (long jarg1, btTypedObject jarg1_);
+
+       public final static native int btTypedObject_getObjectType (long jarg1, btTypedObject jarg1_);
+
+       public final static native void delete_btTypedObject (long jarg1);
+
+       public final static native void btVector3_m_floats_set (long jarg1, btVector3 jarg1_, float[] jarg2);
+
+       public final static native float[] btVector3_m_floats_get (long jarg1, btVector3 jarg1_);
+
+       public final static native long new_btVector3__SWIG_0 ();
+
+       public final static native long new_btVector3__SWIG_1 (float jarg1, float jarg2, float jarg3);
+
+       public final static native float btVector3_dot (long jarg1, btVector3 jarg1_, Vector3 jarg2);
+
+       public final static native float btVector3_length2 (long jarg1, btVector3 jarg1_);
+
+       public final static native float btVector3_length (long jarg1, btVector3 jarg1_);
+
+       public final static native float btVector3_distance2 (long jarg1, btVector3 jarg1_, Vector3 jarg2);
+
+       public final static native float btVector3_distance (long jarg1, btVector3 jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btVector3_safeNormalize (long jarg1, btVector3 jarg1_);
+
+       public final static native Vector3 btVector3_normalize (long jarg1, btVector3 jarg1_);
+
+       public final static native Vector3 btVector3_normalized (long jarg1, btVector3 jarg1_);
+
+       public final static native Vector3 btVector3_rotate (long jarg1, btVector3 jarg1_, Vector3 jarg2, float jarg3);
+
+       public final static native float btVector3_angle (long jarg1, btVector3 jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btVector3_absolute (long jarg1, btVector3 jarg1_);
+
+       public final static native Vector3 btVector3_cross (long jarg1, btVector3 jarg1_, Vector3 jarg2);
+
+       public final static native float btVector3_triple (long jarg1, btVector3 jarg1_, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native int btVector3_minAxis (long jarg1, btVector3 jarg1_);
+
+       public final static native int btVector3_maxAxis (long jarg1, btVector3 jarg1_);
+
+       public final static native int btVector3_furthestAxis (long jarg1, btVector3 jarg1_);
+
+       public final static native int btVector3_closestAxis (long jarg1, btVector3 jarg1_);
+
+       public final static native void btVector3_setInterpolate3 (long jarg1, btVector3 jarg1_, Vector3 jarg2, Vector3 jarg3,
+               float jarg4);
+
+       public final static native Vector3 btVector3_lerp (long jarg1, btVector3 jarg1_, Vector3 jarg2, float jarg3);
+
+       public final static native float btVector3_getX (long jarg1, btVector3 jarg1_);
+
+       public final static native float btVector3_getY (long jarg1, btVector3 jarg1_);
+
+       public final static native float btVector3_getZ (long jarg1, btVector3 jarg1_);
+
+       public final static native void btVector3_setX (long jarg1, btVector3 jarg1_, float jarg2);
+
+       public final static native void btVector3_setY (long jarg1, btVector3 jarg1_, float jarg2);
+
+       public final static native void btVector3_setZ (long jarg1, btVector3 jarg1_, float jarg2);
+
+       public final static native void btVector3_setW (long jarg1, btVector3 jarg1_, float jarg2);
+
+       public final static native float btVector3_x (long jarg1, btVector3 jarg1_);
+
+       public final static native float btVector3_y (long jarg1, btVector3 jarg1_);
+
+       public final static native float btVector3_z (long jarg1, btVector3 jarg1_);
+
+       public final static native float btVector3_w (long jarg1, btVector3 jarg1_);
+
+       public final static native void btVector3_setMax (long jarg1, btVector3 jarg1_, Vector3 jarg2);
+
+       public final static native void btVector3_setMin (long jarg1, btVector3 jarg1_, Vector3 jarg2);
+
+       public final static native void btVector3_setValue (long jarg1, btVector3 jarg1_, float jarg2, float jarg3, float jarg4);
+
+       public final static native void btVector3_getSkewSymmetricMatrix (long jarg1, btVector3 jarg1_, long jarg2, btVector3 jarg2_,
+               long jarg3, btVector3 jarg3_, long jarg4, btVector3 jarg4_);
+
+       public final static native void btVector3_setZero (long jarg1, btVector3 jarg1_);
+
+       public final static native boolean btVector3_isZero (long jarg1, btVector3 jarg1_);
+
+       public final static native boolean btVector3_fuzzyZero (long jarg1, btVector3 jarg1_);
+
+       public final static native void btVector3_serialize (long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native void btVector3_deSerialize (long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native void btVector3_serializeFloat (long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native void btVector3_deSerializeFloat (long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native void btVector3_serializeDouble (long jarg1, btVector3 jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native void btVector3_deSerializeDouble (long jarg1, btVector3 jarg1_, long jarg2,
+               btVector3DoubleData jarg2_);
+
+       public final static native void delete_btVector3 (long jarg1);
+
+       public final static native float btDot (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native float btDistance2 (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native float btDistance (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native float btAngle (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native Vector3 btCross (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native float btTriple (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native Vector3 lerp (Vector3 jarg1, Vector3 jarg2, float jarg3);
+
+       public final static native long new_btVector4__SWIG_0 ();
+
+       public final static native long new_btVector4__SWIG_1 (float jarg1, float jarg2, float jarg3, float jarg4);
+
+       public final static native long btVector4_absolute4 (long jarg1, btVector4 jarg1_);
+
+       public final static native float btVector4_getW (long jarg1, btVector4 jarg1_);
+
+       public final static native int btVector4_maxAxis4 (long jarg1, btVector4 jarg1_);
+
+       public final static native int btVector4_minAxis4 (long jarg1, btVector4 jarg1_);
+
+       public final static native int btVector4_closestAxis4 (long jarg1, btVector4 jarg1_);
+
+       public final static native void btVector4_setValue (long jarg1, btVector4 jarg1_, float jarg2, float jarg3, float jarg4,
+               float jarg5);
+
+       public final static native void delete_btVector4 (long jarg1);
+
+       public final static native void btSwapScalarEndian (float jarg1, long jarg2);
+
+       public final static native void btSwapVector3Endian (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native void btUnSwapVector3Endian (Vector3 jarg1);
+
+       public final static native void btVector3FloatData_m_floats_set (long jarg1, btVector3FloatData jarg1_, float[] jarg2);
+
+       public final static native float[] btVector3FloatData_m_floats_get (long jarg1, btVector3FloatData jarg1_);
+
+       public final static native long new_btVector3FloatData ();
+
+       public final static native void delete_btVector3FloatData (long jarg1);
+
+       public final static native void btVector3DoubleData_m_floats_set (long jarg1, btVector3DoubleData jarg1_, double[] jarg2);
+
+       public final static native double[] btVector3DoubleData_m_floats_get (long jarg1, btVector3DoubleData jarg1_);
+
+       public final static native long new_btVector3DoubleData ();
+
+       public final static native void delete_btVector3DoubleData (long jarg1);
+
+       public final static native long new_btQuaternion__SWIG_0 ();
+
+       public final static native long new_btQuaternion__SWIG_1 (float jarg1, float jarg2, float jarg3, float jarg4);
+
+       public final static native long new_btQuaternion__SWIG_2 (Vector3 jarg1, float jarg2);
+
+       public final static native long new_btQuaternion__SWIG_3 (float jarg1, float jarg2, float jarg3);
+
+       public final static native void btQuaternion_setRotation (long jarg1, btQuaternion jarg1_, Vector3 jarg2, float jarg3);
+
+       public final static native void btQuaternion_setEuler (long jarg1, btQuaternion jarg1_, float jarg2, float jarg3, float jarg4);
+
+       public final static native void btQuaternion_setEulerZYX (long jarg1, btQuaternion jarg1_, float jarg2, float jarg3,
+               float jarg4);
+
+       public final static native float btQuaternion_dot (long jarg1, btQuaternion jarg1_, Quaternion jarg2);
+
+       public final static native float btQuaternion_length2 (long jarg1, btQuaternion jarg1_);
+
+       public final static native float btQuaternion_length (long jarg1, btQuaternion jarg1_);
+
+       public final static native Quaternion btQuaternion_normalize (long jarg1, btQuaternion jarg1_);
+
+       public final static native Quaternion btQuaternion_normalized (long jarg1, btQuaternion jarg1_);
+
+       public final static native float btQuaternion_angle (long jarg1, btQuaternion jarg1_, Quaternion jarg2);
+
+       public final static native float btQuaternion_getAngle (long jarg1, btQuaternion jarg1_);
+
+       public final static native Vector3 btQuaternion_getAxis (long jarg1, btQuaternion jarg1_);
+
+       public final static native Quaternion btQuaternion_inverse (long jarg1, btQuaternion jarg1_);
+
+       public final static native Quaternion btQuaternion_farthest (long jarg1, btQuaternion jarg1_, Quaternion jarg2);
+
+       public final static native Quaternion btQuaternion_nearest (long jarg1, btQuaternion jarg1_, Quaternion jarg2);
+
+       public final static native Quaternion btQuaternion_slerp (long jarg1, btQuaternion jarg1_, Quaternion jarg2, float jarg3);
+
+       public final static native Quaternion btQuaternion_getIdentity ();
+
+       public final static native float btQuaternion_getW (long jarg1, btQuaternion jarg1_);
+
+       public final static native void delete_btQuaternion (long jarg1);
+
+       public final static native float dot (Quaternion jarg1, Quaternion jarg2);
+
+       public final static native float length (Quaternion jarg1);
+
+       public final static native float angle (Quaternion jarg1, Quaternion jarg2);
+
+       public final static native Quaternion inverse (Quaternion jarg1);
+
+       public final static native Quaternion slerp (Quaternion jarg1, Quaternion jarg2, float jarg3);
+
+       public final static native Vector3 quatRotate (Quaternion jarg1, Vector3 jarg2);
+
+       public final static native Quaternion shortestArcQuat (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native Quaternion shortestArcQuatNormalize2 (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native void AabbExpand (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native boolean TestPointAgainstAabb2 (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native boolean TestAabbAgainstAabb2 (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native boolean TestTriangleAgainstAabb2 (long jarg1, btVector3 jarg1_, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native int btOutcode (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native boolean btRayAabb2 (Vector3 jarg1, Vector3 jarg2, long[] jarg3, long jarg4, btVector3 jarg4_,
+               long jarg5, float jarg6, float jarg7);
+
+       public final static native boolean btRayAabb (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, long jarg5,
+               Vector3 jarg6);
+
+       public final static native void btTransformAabb__SWIG_0 (Vector3 jarg1, float jarg2, long jarg3, btTransform jarg3_,
+               Vector3 jarg4, Vector3 jarg5);
+
+       public final static native void btTransformAabb__SWIG_1 (Vector3 jarg1, Vector3 jarg2, float jarg3, long jarg4,
+               btTransform jarg4_, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native long testQuantizedAabbAgainstQuantizedAabb (long jarg1, long jarg2, long jarg3, long jarg4);
+
+       public final static native void delete_btIDebugDraw (long jarg1);
+
+       public final static native void btIDebugDraw_drawLine__SWIG_0 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawLine__SWIG_1 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               Vector3 jarg4, Vector3 jarg5);
+
+       public final static native void btIDebugDraw_drawLineSwigExplicitbtIDebugDraw__SWIG_1 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
+
+       public final static native void btIDebugDraw_drawSphere__SWIG_0 (long jarg1, btIDebugDraw jarg1_, float jarg2, long jarg3,
+               btTransform jarg3_, Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_0 (long jarg1, btIDebugDraw jarg1_,
+               float jarg2, long jarg3, btTransform jarg3_, Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawSphere__SWIG_1 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, float jarg3,
+               Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_1 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, float jarg3, Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawTriangle__SWIG_0 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, float jarg9);
+
+       public final static native void btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_0 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, float jarg9);
+
+       public final static native void btIDebugDraw_drawTriangle__SWIG_1 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, float jarg6);
+
+       public final static native void btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_1 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, float jarg6);
+
+       public final static native void btIDebugDraw_drawContactPoint (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               float jarg4, int jarg5, Vector3 jarg6);
+
+       public final static native void btIDebugDraw_reportErrorWarning (long jarg1, btIDebugDraw jarg1_, String jarg2);
+
+       public final static native void btIDebugDraw_draw3dText (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, String jarg3);
+
+       public final static native void btIDebugDraw_setDebugMode (long jarg1, btIDebugDraw jarg1_, int jarg2);
+
+       public final static native int btIDebugDraw_getDebugMode (long jarg1, btIDebugDraw jarg1_);
+
+       public final static native void btIDebugDraw_drawAabb (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawAabbSwigExplicitbtIDebugDraw (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawTransform (long jarg1, btIDebugDraw jarg1_, long jarg2, btTransform jarg2_,
+               float jarg3);
+
+       public final static native void btIDebugDraw_drawTransformSwigExplicitbtIDebugDraw (long jarg1, btIDebugDraw jarg1_,
+               long jarg2, btTransform jarg2_, float jarg3);
+
+       public final static native void btIDebugDraw_drawArc__SWIG_0 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9, boolean jarg10, float jarg11);
+
+       public final static native void btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_0 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9,
+               boolean jarg10, float jarg11);
+
+       public final static native void btIDebugDraw_drawArc__SWIG_1 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9, boolean jarg10);
+
+       public final static native void btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_1 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9,
+               boolean jarg10);
+
+       public final static native void btIDebugDraw_drawSpherePatch__SWIG_0 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9, Vector3 jarg10, float jarg11);
+
+       public final static native void btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_0 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9,
+               Vector3 jarg10, float jarg11);
+
+       public final static native void btIDebugDraw_drawSpherePatch__SWIG_1 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9, Vector3 jarg10);
+
+       public final static native void btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_1 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9, Vector3 jarg10);
+
+       public final static native void btIDebugDraw_drawBox__SWIG_0 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_0 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btIDebugDraw_drawBox__SWIG_1 (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3,
+               long jarg4, btTransform jarg4_, Vector3 jarg5);
+
+       public final static native void btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_1 (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, Vector3 jarg3, long jarg4, btTransform jarg4_, Vector3 jarg5);
+
+       public final static native void btIDebugDraw_drawCapsule (long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3,
+               int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
+
+       public final static native void btIDebugDraw_drawCapsuleSwigExplicitbtIDebugDraw (long jarg1, btIDebugDraw jarg1_,
+               float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
+
+       public final static native void btIDebugDraw_drawCylinder (long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3,
+               int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
+
+       public final static native void btIDebugDraw_drawCylinderSwigExplicitbtIDebugDraw (long jarg1, btIDebugDraw jarg1_,
+               float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
+
+       public final static native void btIDebugDraw_drawCone (long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3, int jarg4,
+               long jarg5, btTransform jarg5_, Vector3 jarg6);
+
+       public final static native void btIDebugDraw_drawConeSwigExplicitbtIDebugDraw (long jarg1, btIDebugDraw jarg1_, float jarg2,
+               float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
+
+       public final static native void btIDebugDraw_drawPlane (long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, float jarg3,
+               long jarg4, btTransform jarg4_, Vector3 jarg5);
+
+       public final static native void btIDebugDraw_drawPlaneSwigExplicitbtIDebugDraw (long jarg1, btIDebugDraw jarg1_,
+               Vector3 jarg2, float jarg3, long jarg4, btTransform jarg4_, Vector3 jarg5);
+
+       public final static native long new_btIDebugDraw ();
+
+       public final static native void btIDebugDraw_director_connect (btIDebugDraw obj, long cptr, boolean mem_own,
+               boolean weak_global);
+
+       public final static native void btIDebugDraw_change_ownership (btIDebugDraw obj, long cptr, boolean take_or_release);
+
+       public final static native void btGeometryUtil_getPlaneEquationsFromVertices (long jarg1, long jarg2);
+
+       public final static native void btGeometryUtil_getVerticesFromPlaneEquations (long jarg1, long jarg2);
+
+       public final static native boolean btGeometryUtil_isInside (long jarg1, Vector3 jarg2, float jarg3);
+
+       public final static native boolean btGeometryUtil_isPointInsidePlanes (long jarg1, Vector3 jarg2, float jarg3);
+
+       public final static native boolean btGeometryUtil_areVerticesBehindPlane (Vector3 jarg1, long jarg2, float jarg3);
+
+       public final static native long new_btGeometryUtil ();
+
+       public final static native void delete_btGeometryUtil (long jarg1);
+
+       public final static native void GEN_srand (long jarg1);
+
+       public final static native long GEN_rand ();
+
+       public final static native long new_btTransform__SWIG_0 ();
+
+       public final static native long new_btTransform__SWIG_1 (Quaternion jarg1, Vector3 jarg2);
+
+       public final static native long new_btTransform__SWIG_2 (Quaternion jarg1);
+
+       public final static native long new_btTransform__SWIG_3 (Matrix3 jarg1, Vector3 jarg2);
+
+       public final static native long new_btTransform__SWIG_4 (Matrix3 jarg1);
+
+       public final static native long new_btTransform__SWIG_5 (long jarg1, btTransform jarg1_);
+
+       public final static native void btTransform_mult (long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_, long jarg3,
+               btTransform jarg3_);
+
+       public final static native Matrix3 btTransform_getBasis__SWIG_0 (long jarg1, btTransform jarg1_);
+
+       public final static native Vector3 btTransform_getOrigin__SWIG_0 (long jarg1, btTransform jarg1_);
+
+       public final static native Quaternion btTransform_getRotation (long jarg1, btTransform jarg1_);
+
+       public final static native void btTransform_setFromOpenGLMatrix (long jarg1, btTransform jarg1_, float[] jarg2);
+
+       public final static native void btTransform_getOpenGLMatrix (long jarg1, btTransform jarg1_, float[] jarg2);
+
+       public final static native void btTransform_setOrigin (long jarg1, btTransform jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btTransform_invXform (long jarg1, btTransform jarg1_, Vector3 jarg2);
+
+       public final static native void btTransform_setBasis (long jarg1, btTransform jarg1_, Matrix3 jarg2);
+
+       public final static native void btTransform_setRotation (long jarg1, btTransform jarg1_, Quaternion jarg2);
+
+       public final static native void btTransform_setIdentity (long jarg1, btTransform jarg1_);
+
+       public final static native long btTransform_inverse (long jarg1, btTransform jarg1_);
+
+       public final static native long btTransform_inverseTimes (long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native long btTransform_getIdentity ();
+
+       public final static native void btTransform_serialize (long jarg1, btTransform jarg1_, long jarg2, btTransformFloatData jarg2_);
+
+       public final static native void btTransform_serializeFloat (long jarg1, btTransform jarg1_, long jarg2,
+               btTransformFloatData jarg2_);
+
+       public final static native void btTransform_deSerialize (long jarg1, btTransform jarg1_, long jarg2,
+               btTransformFloatData jarg2_);
+
+       public final static native void btTransform_deSerializeDouble (long jarg1, btTransform jarg1_, long jarg2,
+               btTransformDoubleData jarg2_);
+
+       public final static native void btTransform_deSerializeFloat (long jarg1, btTransform jarg1_, long jarg2,
+               btTransformFloatData jarg2_);
+
+       public final static native void delete_btTransform (long jarg1);
+
+       public final static native void btTransformFloatData_m_basis_set (long jarg1, btTransformFloatData jarg1_, long jarg2);
+
+       public final static native long btTransformFloatData_m_basis_get (long jarg1, btTransformFloatData jarg1_);
+
+       public final static native void btTransformFloatData_m_origin_set (long jarg1, btTransformFloatData jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btTransformFloatData_m_origin_get (long jarg1, btTransformFloatData jarg1_);
+
+       public final static native long new_btTransformFloatData ();
+
+       public final static native void delete_btTransformFloatData (long jarg1);
+
+       public final static native void btTransformDoubleData_m_basis_set (long jarg1, btTransformDoubleData jarg1_, long jarg2);
+
+       public final static native long btTransformDoubleData_m_basis_get (long jarg1, btTransformDoubleData jarg1_);
+
+       public final static native void btTransformDoubleData_m_origin_set (long jarg1, btTransformDoubleData jarg1_, long jarg2,
+               btVector3DoubleData jarg2_);
+
+       public final static native long btTransformDoubleData_m_origin_get (long jarg1, btTransformDoubleData jarg1_);
+
+       public final static native long new_btTransformDoubleData ();
+
+       public final static native void delete_btTransformDoubleData (long jarg1);
+
+       public final static native Vector3 btAabbSupport (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native void btTransformUtil_integrateTransform (long jarg1, btTransform jarg1_, Vector3 jarg2,
+               Vector3 jarg3, float jarg4, long jarg5, btTransform jarg5_);
+
+       public final static native void btTransformUtil_calculateVelocityQuaternion (Vector3 jarg1, Vector3 jarg2, Quaternion jarg3,
+               Quaternion jarg4, float jarg5, Vector3 jarg6, Vector3 jarg7);
+
+       public final static native void btTransformUtil_calculateDiffAxisAngleQuaternion (Quaternion jarg1, Quaternion jarg2,
+               Vector3 jarg3, long jarg4);
+
+       public final static native void btTransformUtil_calculateVelocity (long jarg1, btTransform jarg1_, long jarg2,
+               btTransform jarg2_, float jarg3, Vector3 jarg4, Vector3 jarg5);
+
+       public final static native void btTransformUtil_calculateDiffAxisAngle (long jarg1, btTransform jarg1_, long jarg2,
+               btTransform jarg2_, Vector3 jarg3, long jarg4);
+
+       public final static native long new_btTransformUtil ();
+
+       public final static native void delete_btTransformUtil (long jarg1);
+
+       public final static native long new_btConvexSeparatingDistanceUtil (float jarg1, float jarg2);
+
+       public final static native float btConvexSeparatingDistanceUtil_getConservativeSeparatingDistance (long jarg1,
+               btConvexSeparatingDistanceUtil jarg1_);
+
+       public final static native void btConvexSeparatingDistanceUtil_updateSeparatingDistance (long jarg1,
+               btConvexSeparatingDistanceUtil jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native void btConvexSeparatingDistanceUtil_initSeparatingDistance (long jarg1,
+               btConvexSeparatingDistanceUtil jarg1_, Vector3 jarg2, float jarg3, long jarg4, btTransform jarg4_, long jarg5,
+               btTransform jarg5_);
+
+       public final static native void delete_btConvexSeparatingDistanceUtil (long jarg1);
+
+       public final static native void delete_btMotionState (long jarg1);
+
+       public final static native void btMotionState_getWorldTransform (long jarg1, btMotionState jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native void btMotionState_setWorldTransform (long jarg1, btMotionState jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native void btDefaultMotionState_m_graphicsWorldTrans_set (long jarg1, btDefaultMotionState jarg1_,
+               long jarg2, btTransform jarg2_);
+
+       public final static native long btDefaultMotionState_m_graphicsWorldTrans_get (long jarg1, btDefaultMotionState jarg1_);
+
+       public final static native void btDefaultMotionState_m_centerOfMassOffset_set (long jarg1, btDefaultMotionState jarg1_,
+               long jarg2, btTransform jarg2_);
+
+       public final static native long btDefaultMotionState_m_centerOfMassOffset_get (long jarg1, btDefaultMotionState jarg1_);
+
+       public final static native void btDefaultMotionState_m_startWorldTrans_set (long jarg1, btDefaultMotionState jarg1_,
+               long jarg2, btTransform jarg2_);
+
+       public final static native long btDefaultMotionState_m_startWorldTrans_get (long jarg1, btDefaultMotionState jarg1_);
+
+       public final static native void btDefaultMotionState_m_userPointer_set (long jarg1, btDefaultMotionState jarg1_, long jarg2);
+
+       public final static native long btDefaultMotionState_m_userPointer_get (long jarg1, btDefaultMotionState jarg1_);
+
+       public final static native long new_btDefaultMotionState__SWIG_0 (long jarg1, btTransform jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native long new_btDefaultMotionState__SWIG_1 (long jarg1, btTransform jarg1_);
+
+       public final static native long new_btDefaultMotionState__SWIG_2 ();
+
+       public final static native void btDefaultMotionState_getGraphicsWorldTrans (long jarg1, btDefaultMotionState jarg1_,
+               long jarg2, btTransform jarg2_);
+
+       public final static native void btDefaultMotionState_getCenterOfMassOffset (long jarg1, btDefaultMotionState jarg1_,
+               long jarg2, btTransform jarg2_);
+
+       public final static native void btDefaultMotionState_getStartWorldTrans (long jarg1, btDefaultMotionState jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native void delete_btDefaultMotionState (long jarg1);
+
+       public final static native long new_HullResult ();
+
+       public final static native void HullResult_mPolygons_set (long jarg1, HullResult jarg1_, boolean jarg2);
+
+       public final static native boolean HullResult_mPolygons_get (long jarg1, HullResult jarg1_);
+
+       public final static native void HullResult_mNumOutputVertices_set (long jarg1, HullResult jarg1_, long jarg2);
+
+       public final static native long HullResult_mNumOutputVertices_get (long jarg1, HullResult jarg1_);
+
+       public final static native void HullResult_m_OutputVertices_set (long jarg1, HullResult jarg1_, long jarg2);
+
+       public final static native long HullResult_m_OutputVertices_get (long jarg1, HullResult jarg1_);
+
+       public final static native void HullResult_mNumFaces_set (long jarg1, HullResult jarg1_, long jarg2);
+
+       public final static native long HullResult_mNumFaces_get (long jarg1, HullResult jarg1_);
+
+       public final static native void HullResult_mNumIndices_set (long jarg1, HullResult jarg1_, long jarg2);
+
+       public final static native long HullResult_mNumIndices_get (long jarg1, HullResult jarg1_);
+
+       public final static native void HullResult_m_Indices_set (long jarg1, HullResult jarg1_, long jarg2);
+
+       public final static native long HullResult_m_Indices_get (long jarg1, HullResult jarg1_);
+
+       public final static native void delete_HullResult (long jarg1);
+
+       public final static native long new_HullDesc__SWIG_0 ();
+
+       public final static native long new_HullDesc__SWIG_1 (int jarg1, long jarg2, long jarg3, btVector3 jarg3_, long jarg4);
+
+       public final static native long new_HullDesc__SWIG_2 (int jarg1, long jarg2, long jarg3, btVector3 jarg3_);
+
+       public final static native boolean HullDesc_HasHullFlag (long jarg1, HullDesc jarg1_, int jarg2);
+
+       public final static native void HullDesc_SetHullFlag (long jarg1, HullDesc jarg1_, int jarg2);
+
+       public final static native void HullDesc_ClearHullFlag (long jarg1, HullDesc jarg1_, int jarg2);
+
+       public final static native void HullDesc_mFlags_set (long jarg1, HullDesc jarg1_, long jarg2);
+
+       public final static native long HullDesc_mFlags_get (long jarg1, HullDesc jarg1_);
+
+       public final static native void HullDesc_mVcount_set (long jarg1, HullDesc jarg1_, long jarg2);
+
+       public final static native long HullDesc_mVcount_get (long jarg1, HullDesc jarg1_);
+
+       public final static native void HullDesc_mVertices_set (long jarg1, HullDesc jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long HullDesc_mVertices_get (long jarg1, HullDesc jarg1_);
+
+       public final static native void HullDesc_mVertexStride_set (long jarg1, HullDesc jarg1_, long jarg2);
+
+       public final static native long HullDesc_mVertexStride_get (long jarg1, HullDesc jarg1_);
+
+       public final static native void HullDesc_mNormalEpsilon_set (long jarg1, HullDesc jarg1_, float jarg2);
+
+       public final static native float HullDesc_mNormalEpsilon_get (long jarg1, HullDesc jarg1_);
+
+       public final static native void HullDesc_mMaxVertices_set (long jarg1, HullDesc jarg1_, long jarg2);
+
+       public final static native long HullDesc_mMaxVertices_get (long jarg1, HullDesc jarg1_);
+
+       public final static native void HullDesc_mMaxFaces_set (long jarg1, HullDesc jarg1_, long jarg2);
+
+       public final static native long HullDesc_mMaxFaces_get (long jarg1, HullDesc jarg1_);
+
+       public final static native void delete_HullDesc (long jarg1);
+
+       public final static native void btPlane_normal_set (long jarg1, btPlane jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btPlane_normal_get (long jarg1, btPlane jarg1_);
+
+       public final static native void btPlane_dist_set (long jarg1, btPlane jarg1_, float jarg2);
+
+       public final static native float btPlane_dist_get (long jarg1, btPlane jarg1_);
+
+       public final static native long new_btPlane__SWIG_0 (Vector3 jarg1, float jarg2);
+
+       public final static native long new_btPlane__SWIG_1 ();
+
+       public final static native void delete_btPlane (long jarg1);
+
+       public final static native long new_ConvexH__SWIG_0 ();
+
+       public final static native void delete_ConvexH (long jarg1);
+
+       public final static native void ConvexH_vertices_set (long jarg1, ConvexH jarg1_, long jarg2);
+
+       public final static native long ConvexH_vertices_get (long jarg1, ConvexH jarg1_);
+
+       public final static native void ConvexH_edges_set (long jarg1, ConvexH jarg1_, long jarg2);
+
+       public final static native long ConvexH_edges_get (long jarg1, ConvexH jarg1_);
+
+       public final static native void ConvexH_facets_set (long jarg1, ConvexH jarg1_, long jarg2);
+
+       public final static native long ConvexH_facets_get (long jarg1, ConvexH jarg1_);
+
+       public final static native long new_ConvexH__SWIG_1 (int jarg1, int jarg2, int jarg3);
+
+       public final static native void int4_x_set (long jarg1, int4 jarg1_, int jarg2);
+
+       public final static native int int4_x_get (long jarg1, int4 jarg1_);
+
+       public final static native void int4_y_set (long jarg1, int4 jarg1_, int jarg2);
+
+       public final static native int int4_y_get (long jarg1, int4 jarg1_);
+
+       public final static native void int4_z_set (long jarg1, int4 jarg1_, int jarg2);
+
+       public final static native int int4_z_get (long jarg1, int4 jarg1_);
+
+       public final static native void int4_w_set (long jarg1, int4 jarg1_, int jarg2);
+
+       public final static native int int4_w_get (long jarg1, int4 jarg1_);
+
+       public final static native long new_int4__SWIG_0 ();
+
+       public final static native long new_int4__SWIG_1 (int jarg1, int jarg2, int jarg3, int jarg4);
+
+       public final static native void delete_int4 (long jarg1);
+
+       public final static native long new_PHullResult ();
+
+       public final static native void PHullResult_mVcount_set (long jarg1, PHullResult jarg1_, long jarg2);
+
+       public final static native long PHullResult_mVcount_get (long jarg1, PHullResult jarg1_);
+
+       public final static native void PHullResult_mIndexCount_set (long jarg1, PHullResult jarg1_, long jarg2);
+
+       public final static native long PHullResult_mIndexCount_get (long jarg1, PHullResult jarg1_);
+
+       public final static native void PHullResult_mFaceCount_set (long jarg1, PHullResult jarg1_, long jarg2);
+
+       public final static native long PHullResult_mFaceCount_get (long jarg1, PHullResult jarg1_);
+
+       public final static native void PHullResult_mVertices_set (long jarg1, PHullResult jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long PHullResult_mVertices_get (long jarg1, PHullResult jarg1_);
+
+       public final static native void PHullResult_m_Indices_set (long jarg1, PHullResult jarg1_, long jarg2);
+
+       public final static native long PHullResult_m_Indices_get (long jarg1, PHullResult jarg1_);
+
+       public final static native void delete_PHullResult (long jarg1);
+
+       public final static native void HullLibrary_m_vertexIndexMapping_set (long jarg1, HullLibrary jarg1_, long jarg2);
+
+       public final static native long HullLibrary_m_vertexIndexMapping_get (long jarg1, HullLibrary jarg1_);
+
+       public final static native int HullLibrary_CreateConvexHull (long jarg1, HullLibrary jarg1_, long jarg2, HullDesc jarg2_,
+               long jarg3, HullResult jarg3_);
+
+       public final static native int HullLibrary_ReleaseResult (long jarg1, HullLibrary jarg1_, long jarg2, HullResult jarg2_);
+
+       public final static native long new_HullLibrary ();
+
+       public final static native void delete_HullLibrary (long jarg1);
+
+       public final static native long new_GrahamVector2 (Vector3 jarg1, int jarg2);
+
+       public final static native void GrahamVector2_m_angle_set (long jarg1, GrahamVector2 jarg1_, float jarg2);
+
+       public final static native float GrahamVector2_m_angle_get (long jarg1, GrahamVector2 jarg1_);
+
+       public final static native void GrahamVector2_m_orgIndex_set (long jarg1, GrahamVector2 jarg1_, int jarg2);
+
+       public final static native int GrahamVector2_m_orgIndex_get (long jarg1, GrahamVector2 jarg1_);
+
+       public final static native void delete_GrahamVector2 (long jarg1);
+
+       public final static native void btAngleCompareFunc_m_anchor_set (long jarg1, btAngleCompareFunc jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btAngleCompareFunc_m_anchor_get (long jarg1, btAngleCompareFunc jarg1_);
+
+       public final static native long new_btAngleCompareFunc (Vector3 jarg1);
+
+       public final static native void delete_btAngleCompareFunc (long jarg1);
+
+       public final static native void GrahamScanConvexHull2D (long jarg1, long jarg2);
+
+       public final static native long new_btPoolAllocator (int jarg1, int jarg2);
+
+       public final static native void delete_btPoolAllocator (long jarg1);
+
+       public final static native int btPoolAllocator_getFreeCount (long jarg1, btPoolAllocator jarg1_);
+
+       public final static native int btPoolAllocator_getUsedCount (long jarg1, btPoolAllocator jarg1_);
+
+       public final static native int btPoolAllocator_getMaxCount (long jarg1, btPoolAllocator jarg1_);
+
+       public final static native long btPoolAllocator_allocate (long jarg1, btPoolAllocator jarg1_, int jarg2);
+
+       public final static native boolean btPoolAllocator_validPtr (long jarg1, btPoolAllocator jarg1_, long jarg2);
+
+       public final static native void btPoolAllocator_freeMemory (long jarg1, btPoolAllocator jarg1_, long jarg2);
+
+       public final static native int btPoolAllocator_getElementSize (long jarg1, btPoolAllocator jarg1_);
+
+       public final static native long btPoolAllocator_getPoolAddress__SWIG_0 (long jarg1, btPoolAllocator jarg1_);
+
+       public final static native void btConvexHullComputer_vertices_set (long jarg1, btConvexHullComputer jarg1_, long jarg2);
+
+       public final static native long btConvexHullComputer_vertices_get (long jarg1, btConvexHullComputer jarg1_);
+
+       public final static native void btConvexHullComputer_edges_set (long jarg1, btConvexHullComputer jarg1_, long jarg2);
+
+       public final static native long btConvexHullComputer_edges_get (long jarg1, btConvexHullComputer jarg1_);
+
+       public final static native void btConvexHullComputer_faces_set (long jarg1, btConvexHullComputer jarg1_, long jarg2);
+
+       public final static native long btConvexHullComputer_faces_get (long jarg1, btConvexHullComputer jarg1_);
+
+       public final static native float btConvexHullComputer_compute__SWIG_0 (long jarg1, btConvexHullComputer jarg1_, long jarg2,
+               int jarg3, int jarg4, float jarg5, float jarg6);
+
+       public final static native float btConvexHullComputer_compute__SWIG_1 (long jarg1, btConvexHullComputer jarg1_, long jarg2,
+               int jarg3, int jarg4, float jarg5, float jarg6);
+
+       public final static native long new_btConvexHullComputer ();
+
+       public final static native void delete_btConvexHullComputer (long jarg1);
+
+       public final static native long new_btGEN_Link__SWIG_0 ();
+
+       public final static native long new_btGEN_Link__SWIG_1 (long jarg1, btGEN_Link jarg1_, long jarg2, btGEN_Link jarg2_);
+
+       public final static native long btGEN_Link_getNext (long jarg1, btGEN_Link jarg1_);
+
+       public final static native long btGEN_Link_getPrev (long jarg1, btGEN_Link jarg1_);
+
+       public final static native boolean btGEN_Link_isHead (long jarg1, btGEN_Link jarg1_);
+
+       public final static native boolean btGEN_Link_isTail (long jarg1, btGEN_Link jarg1_);
+
+       public final static native void btGEN_Link_insertBefore (long jarg1, btGEN_Link jarg1_, long jarg2, btGEN_Link jarg2_);
+
+       public final static native void btGEN_Link_insertAfter (long jarg1, btGEN_Link jarg1_, long jarg2, btGEN_Link jarg2_);
+
+       public final static native void btGEN_Link_remove (long jarg1, btGEN_Link jarg1_);
+
+       public final static native void delete_btGEN_Link (long jarg1);
+
+       public final static native long new_btGEN_List ();
+
+       public final static native long btGEN_List_getHead (long jarg1, btGEN_List jarg1_);
+
+       public final static native long btGEN_List_getTail (long jarg1, btGEN_List jarg1_);
+
+       public final static native void btGEN_List_addHead (long jarg1, btGEN_List jarg1_, long jarg2, btGEN_Link jarg2_);
+
+       public final static native void btGEN_List_addTail (long jarg1, btGEN_List jarg1_, long jarg2, btGEN_Link jarg2_);
+
+       public final static native void delete_btGEN_List (long jarg1);
+
+       public final static native long btAlignedAllocInternal (long jarg1, int jarg2);
+
+       public final static native void btAlignedFreeInternal (long jarg1);
+
+       public final static native void btAlignedAllocSetCustom (long jarg1, long jarg2);
+
+       public final static native void btAlignedAllocSetCustomAligned (long jarg1, long jarg2);
+
+       public final static native void btHashString_m_string_set (long jarg1, btHashString jarg1_, String jarg2);
+
+       public final static native String btHashString_m_string_get (long jarg1, btHashString jarg1_);
+
+       public final static native void btHashString_m_hash_set (long jarg1, btHashString jarg1_, long jarg2);
+
+       public final static native long btHashString_m_hash_get (long jarg1, btHashString jarg1_);
+
+       public final static native long btHashString_getHash (long jarg1, btHashString jarg1_);
+
+       public final static native long new_btHashString (String jarg1);
+
+       public final static native int btHashString_portableStringCompare (long jarg1, btHashString jarg1_, String jarg2, String jarg3);
+
+       public final static native boolean btHashString_equals (long jarg1, btHashString jarg1_, long jarg2, btHashString jarg2_);
+
+       public final static native void delete_btHashString (long jarg1);
+
+       public final static native int BT_HASH_NULL_get ();
+
+       public final static native long new_btHashInt (int jarg1);
+
+       public final static native int btHashInt_getUid1 (long jarg1, btHashInt jarg1_);
+
+       public final static native void btHashInt_setUid1 (long jarg1, btHashInt jarg1_, int jarg2);
+
+       public final static native boolean btHashInt_equals (long jarg1, btHashInt jarg1_, long jarg2, btHashInt jarg2_);
+
+       public final static native long btHashInt_getHash (long jarg1, btHashInt jarg1_);
+
+       public final static native void delete_btHashInt (long jarg1);
+
+       public final static native long new_btHashPtr (long jarg1);
+
+       public final static native long btHashPtr_getPointer (long jarg1, btHashPtr jarg1_);
+
+       public final static native boolean btHashPtr_equals (long jarg1, btHashPtr jarg1_, long jarg2, btHashPtr jarg2_);
+
+       public final static native long btHashPtr_getHash (long jarg1, btHashPtr jarg1_);
+
+       public final static native void delete_btHashPtr (long jarg1);
+
+       public final static native void btBlock_previous_set (long jarg1, btBlock jarg1_, long jarg2, btBlock jarg2_);
+
+       public final static native long btBlock_previous_get (long jarg1, btBlock jarg1_);
+
+       public final static native void btBlock_address_set (long jarg1, btBlock jarg1_, long jarg2);
+
+       public final static native long btBlock_address_get (long jarg1, btBlock jarg1_);
+
+       public final static native long new_btBlock ();
+
+       public final static native void delete_btBlock (long jarg1);
+
+       public final static native long new_btStackAlloc (long jarg1);
+
+       public final static native void delete_btStackAlloc (long jarg1);
+
+       public final static native void btStackAlloc_create (long jarg1, btStackAlloc jarg1_, long jarg2);
+
+       public final static native void btStackAlloc_destroy (long jarg1, btStackAlloc jarg1_);
+
+       public final static native int btStackAlloc_getAvailableMemory (long jarg1, btStackAlloc jarg1_);
+
+       public final static native long btStackAlloc_allocate (long jarg1, btStackAlloc jarg1_, long jarg2);
+
+       public final static native long btStackAlloc_beginBlock (long jarg1, btStackAlloc jarg1_);
+
+       public final static native void btStackAlloc_endBlock (long jarg1, btStackAlloc jarg1_, long jarg2, btBlock jarg2_);
+
+       public final static native void delete_Result (long jarg1);
+
+       public final static native void Result_setShapeIdentifiersA (long jarg1, Result jarg1_, int jarg2, int jarg3);
+
+       public final static native void Result_setShapeIdentifiersB (long jarg1, Result jarg1_, int jarg2, int jarg3);
+
+       public final static native void Result_addContactPoint (long jarg1, Result jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
+
+       public final static native long new_ClosestPointInput ();
+
+       public final static native void ClosestPointInput_m_transformA_set (long jarg1, ClosestPointInput jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native long ClosestPointInput_m_transformA_get (long jarg1, ClosestPointInput jarg1_);
+
+       public final static native void ClosestPointInput_m_transformB_set (long jarg1, ClosestPointInput jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native long ClosestPointInput_m_transformB_get (long jarg1, ClosestPointInput jarg1_);
+
+       public final static native void ClosestPointInput_m_maximumDistanceSquared_set (long jarg1, ClosestPointInput jarg1_,
+               float jarg2);
+
+       public final static native float ClosestPointInput_m_maximumDistanceSquared_get (long jarg1, ClosestPointInput jarg1_);
+
+       public final static native void ClosestPointInput_m_stackAlloc_set (long jarg1, ClosestPointInput jarg1_, long jarg2,
+               btStackAlloc jarg2_);
+
+       public final static native long ClosestPointInput_m_stackAlloc_get (long jarg1, ClosestPointInput jarg1_);
+
+       public final static native void delete_ClosestPointInput (long jarg1);
+
+       public final static native void btBroadphaseProxy_m_clientObject_set (long jarg1, btBroadphaseProxy jarg1_, long jarg2);
+
+       public final static native long btBroadphaseProxy_m_clientObject_get (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native void btBroadphaseProxy_m_collisionFilterGroup_set (long jarg1, btBroadphaseProxy jarg1_, short jarg2);
+
+       public final static native short btBroadphaseProxy_m_collisionFilterGroup_get (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native void btBroadphaseProxy_m_collisionFilterMask_set (long jarg1, btBroadphaseProxy jarg1_, short jarg2);
+
+       public final static native short btBroadphaseProxy_m_collisionFilterMask_get (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native void btBroadphaseProxy_m_multiSapParentProxy_set (long jarg1, btBroadphaseProxy jarg1_, long jarg2);
+
+       public final static native long btBroadphaseProxy_m_multiSapParentProxy_get (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native void btBroadphaseProxy_m_uniqueId_set (long jarg1, btBroadphaseProxy jarg1_, int jarg2);
+
+       public final static native int btBroadphaseProxy_m_uniqueId_get (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native void btBroadphaseProxy_m_aabbMin_set (long jarg1, btBroadphaseProxy jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btBroadphaseProxy_m_aabbMin_get (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native void btBroadphaseProxy_m_aabbMax_set (long jarg1, btBroadphaseProxy jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btBroadphaseProxy_m_aabbMax_get (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native int btBroadphaseProxy_getUid (long jarg1, btBroadphaseProxy jarg1_);
+
+       public final static native long new_btBroadphaseProxy__SWIG_0 ();
+
+       public final static native long new_btBroadphaseProxy__SWIG_1 (Vector3 jarg1, Vector3 jarg2, long jarg3, short jarg4,
+               short jarg5, long jarg6);
+
+       public final static native long new_btBroadphaseProxy__SWIG_2 (Vector3 jarg1, Vector3 jarg2, long jarg3, short jarg4,
+               short jarg5);
+
+       public final static native boolean btBroadphaseProxy_isPolyhedral (int jarg1);
+
+       public final static native boolean btBroadphaseProxy_isConvex (int jarg1);
+
+       public final static native boolean btBroadphaseProxy_isNonMoving (int jarg1);
+
+       public final static native boolean btBroadphaseProxy_isConcave (int jarg1);
+
+       public final static native boolean btBroadphaseProxy_isCompound (int jarg1);
+
+       public final static native boolean btBroadphaseProxy_isSoftBody (int jarg1);
+
+       public final static native boolean btBroadphaseProxy_isInfinite (int jarg1);
+
+       public final static native boolean btBroadphaseProxy_isConvex2d (int jarg1);
+
+       public final static native void delete_btBroadphaseProxy (long jarg1);
+
+       public final static native long new_btBroadphasePair__SWIG_0 ();
+
+       public final static native long new_btBroadphasePair__SWIG_1 (long jarg1, btBroadphasePair jarg1_);
+
+       public final static native long new_btBroadphasePair__SWIG_2 (long jarg1, btBroadphaseProxy jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_);
+
+       public final static native void btBroadphasePair_m_pProxy0_set (long jarg1, btBroadphasePair jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_);
+
+       public final static native long btBroadphasePair_m_pProxy0_get (long jarg1, btBroadphasePair jarg1_);
+
+       public final static native void btBroadphasePair_m_pProxy1_set (long jarg1, btBroadphasePair jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_);
+
+       public final static native long btBroadphasePair_m_pProxy1_get (long jarg1, btBroadphasePair jarg1_);
+
+       public final static native void btBroadphasePair_m_algorithm_set (long jarg1, btBroadphasePair jarg1_, long jarg2,
+               btCollisionAlgorithm jarg2_);
+
+       public final static native long btBroadphasePair_m_algorithm_get (long jarg1, btBroadphasePair jarg1_);
+
+       public final static native void delete_btBroadphasePair (long jarg1);
+
+       public final static native long new_btBroadphasePairSortPredicate ();
+
+       public final static native void delete_btBroadphasePairSortPredicate (long jarg1);
+
+       public final static native void delete_btBroadphaseAabbCallback (long jarg1);
+
+       public final static native boolean btBroadphaseAabbCallback_process (long jarg1, btBroadphaseAabbCallback jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_);
+
+       public final static native void btBroadphaseRayCallback_m_rayDirectionInverse_set (long jarg1, btBroadphaseRayCallback jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btBroadphaseRayCallback_m_rayDirectionInverse_get (long jarg1, btBroadphaseRayCallback jarg1_);
+
+       public final static native void btBroadphaseRayCallback_m_signs_set (long jarg1, btBroadphaseRayCallback jarg1_, long[] jarg2);
+
+       public final static native long[] btBroadphaseRayCallback_m_signs_get (long jarg1, btBroadphaseRayCallback jarg1_);
+
+       public final static native void btBroadphaseRayCallback_m_lambda_max_set (long jarg1, btBroadphaseRayCallback jarg1_,
+               float jarg2);
+
+       public final static native float btBroadphaseRayCallback_m_lambda_max_get (long jarg1, btBroadphaseRayCallback jarg1_);
+
+       public final static native void delete_btBroadphaseRayCallback (long jarg1);
+
+       public final static native void delete_btBroadphaseInterface (long jarg1);
+
+       public final static native long btBroadphaseInterface_createProxy (long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2,
+               Vector3 jarg3, int jarg4, long jarg5, short jarg6, short jarg7, long jarg8, btDispatcher jarg8_, long jarg9);
+
+       public final static native void btBroadphaseInterface_destroyProxy (long jarg1, btBroadphaseInterface jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native void btBroadphaseInterface_setAabb (long jarg1, btBroadphaseInterface jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_, Vector3 jarg3, Vector3 jarg4, long jarg5, btDispatcher jarg5_);
+
+       public final static native void btBroadphaseInterface_getAabb (long jarg1, btBroadphaseInterface jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btBroadphaseInterface_rayTest__SWIG_0 (long jarg1, btBroadphaseInterface jarg1_,
+               Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btBroadphaseInterface_rayTest__SWIG_1 (long jarg1, btBroadphaseInterface jarg1_,
+               Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
+
+       public final static native void btBroadphaseInterface_rayTest__SWIG_2 (long jarg1, btBroadphaseInterface jarg1_,
+               Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
+
+       public final static native void btBroadphaseInterface_aabbTest (long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseAabbCallback jarg4_);
+
+       public final static native void btBroadphaseInterface_calculateOverlappingPairs (long jarg1, btBroadphaseInterface jarg1_,
+               long jarg2, btDispatcher jarg2_);
+
+       public final static native long btBroadphaseInterface_getOverlappingPairCache__SWIG_0 (long jarg1, btBroadphaseInterface jarg1_);
+
+       public final static native void btBroadphaseInterface_getBroadphaseAabb (long jarg1, btBroadphaseInterface jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btBroadphaseInterface_resetPool (long jarg1, btBroadphaseInterface jarg1_, long jarg2,
+               btDispatcher jarg2_);
+
+       public final static native void btBroadphaseInterface_printStats (long jarg1, btBroadphaseInterface jarg1_);
+
+       public final static native Vector3 btDbvtAabbMm_Center (long jarg1, btDbvtAabbMm jarg1_);
+
+       public final static native Vector3 btDbvtAabbMm_Lengths (long jarg1, btDbvtAabbMm jarg1_);
+
+       public final static native Vector3 btDbvtAabbMm_Extents (long jarg1, btDbvtAabbMm jarg1_);
+
+       public final static native Vector3 btDbvtAabbMm_Mins (long jarg1, btDbvtAabbMm jarg1_);
+
+       public final static native Vector3 btDbvtAabbMm_Maxs (long jarg1, btDbvtAabbMm jarg1_);
+
+       public final static native long btDbvtAabbMm_FromCE (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native long btDbvtAabbMm_FromCR (Vector3 jarg1, float jarg2);
+
+       public final static native long btDbvtAabbMm_FromMM (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native long btDbvtAabbMm_FromPoints__SWIG_0 (long jarg1, btVector3 jarg1_, int jarg2);
+
+       public final static native long btDbvtAabbMm_FromPoints__SWIG_1 (long jarg1, int jarg2);
+
+       public final static native void btDbvtAabbMm_Expand (long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2);
+
+       public final static native void btDbvtAabbMm_SignedExpand (long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2);
+
+       public final static native boolean btDbvtAabbMm_Contain (long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
+
+       public final static native int btDbvtAabbMm_Classify (long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2, float jarg3, int jarg4);
+
+       public final static native float btDbvtAabbMm_ProjectMinimum (long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2, long jarg3);
+
+       public final static native boolean Intersect__SWIG_0 (long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
+
+       public final static native boolean Intersect__SWIG_1 (long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2);
+
+       public final static native float Proximity (long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
+
+       public final static native int Select (long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_, long jarg3,
+               btDbvtAabbMm jarg3_);
+
+       public final static native void Merge (long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_, long jarg3,
+               btDbvtAabbMm jarg3_);
+
+       public final static native boolean NotEqual (long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
+
+       public final static native long new_btDbvtAabbMm ();
+
+       public final static native void delete_btDbvtAabbMm (long jarg1);
+
+       public final static native void btDbvtNode_volume_set (long jarg1, btDbvtNode jarg1_, long jarg2, btDbvtAabbMm jarg2_);
+
+       public final static native long btDbvtNode_volume_get (long jarg1, btDbvtNode jarg1_);
+
+       public final static native void btDbvtNode_parent_set (long jarg1, btDbvtNode jarg1_, long jarg2, btDbvtNode jarg2_);
+
+       public final static native long btDbvtNode_parent_get (long jarg1, btDbvtNode jarg1_);
+
+       public final static native boolean btDbvtNode_isleaf (long jarg1, btDbvtNode jarg1_);
+
+       public final static native boolean btDbvtNode_isinternal (long jarg1, btDbvtNode jarg1_);
+
+       public final static native long new_btDbvtNode ();
+
+       public final static native void delete_btDbvtNode (long jarg1);
+
+       public final static native void btDbvt_m_root_set (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
+
+       public final static native long btDbvt_m_root_get (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_m_free_set (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
+
+       public final static native long btDbvt_m_free_get (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_m_lkhd_set (long jarg1, btDbvt jarg1_, int jarg2);
+
+       public final static native int btDbvt_m_lkhd_get (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_m_leaves_set (long jarg1, btDbvt jarg1_, int jarg2);
+
+       public final static native int btDbvt_m_leaves_get (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_m_opath_set (long jarg1, btDbvt jarg1_, long jarg2);
+
+       public final static native long btDbvt_m_opath_get (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_m_stkStack_set (long jarg1, btDbvt jarg1_, long jarg2);
+
+       public final static native long btDbvt_m_stkStack_get (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_m_rayTestStack_set (long jarg1, btDbvt jarg1_, long jarg2);
+
+       public final static native long btDbvt_m_rayTestStack_get (long jarg1, btDbvt jarg1_);
+
+       public final static native long new_btDbvt ();
+
+       public final static native void delete_btDbvt (long jarg1);
+
+       public final static native void btDbvt_clear (long jarg1, btDbvt jarg1_);
+
+       public final static native boolean btDbvt_empty (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_optimizeBottomUp (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_optimizeTopDown__SWIG_0 (long jarg1, btDbvt jarg1_, int jarg2);
+
+       public final static native void btDbvt_optimizeTopDown__SWIG_1 (long jarg1, btDbvt jarg1_);
+
+       public final static native void btDbvt_optimizeIncremental (long jarg1, btDbvt jarg1_, int jarg2);
+
+       public final static native long btDbvt_insert (long jarg1, btDbvt jarg1_, long jarg2, btDbvtAabbMm jarg2_, long jarg3);
+
+       public final static native void btDbvt_update__SWIG_0 (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, int jarg3);
+
+       public final static native void btDbvt_update__SWIG_1 (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
+
+       public final static native void btDbvt_update__SWIG_2 (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3,
+               btDbvtAabbMm jarg3_);
+
+       public final static native boolean btDbvt_update__SWIG_3 (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_,
+               long jarg3, btDbvtAabbMm jarg3_, Vector3 jarg4, float jarg5);
+
+       public final static native boolean btDbvt_update__SWIG_4 (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_,
+               long jarg3, btDbvtAabbMm jarg3_, Vector3 jarg4);
+
+       public final static native boolean btDbvt_update__SWIG_5 (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_,
+               long jarg3, btDbvtAabbMm jarg3_, float jarg4);
+
+       public final static native void btDbvt_remove (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
+
+       public final static native void btDbvt_write (long jarg1, btDbvt jarg1_, long jarg2);
+
+       public final static native void btDbvt_clone__SWIG_0 (long jarg1, btDbvt jarg1_, long jarg2, btDbvt jarg2_, long jarg3);
+
+       public final static native void btDbvt_clone__SWIG_1 (long jarg1, btDbvt jarg1_, long jarg2, btDbvt jarg2_);
+
+       public final static native int btDbvt_maxdepth (long jarg1, btDbvtNode jarg1_);
+
+       public final static native int btDbvt_countLeaves (long jarg1, btDbvtNode jarg1_);
+
+       public final static native void btDbvt_extractLeaves (long jarg1, btDbvtNode jarg1_, long jarg2);
+
+       public final static native void btDbvt_benchmark ();
+
+       public final static native void btDbvt_enumNodes (long jarg1, btDbvtNode jarg1_, long jarg2);
+
+       public final static native void btDbvt_enumLeaves (long jarg1, btDbvtNode jarg1_, long jarg2);
+
+       public final static native void btDbvt_collideTT (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3,
+               btDbvtNode jarg3_, long jarg4);
+
+       public final static native void btDbvt_collideTTpersistentStack (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_,
+               long jarg3, btDbvtNode jarg3_, long jarg4);
+
+       public final static native void btDbvt_collideTV (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3,
+               btDbvtAabbMm jarg3_, long jarg4);
+
+       public final static native void btDbvt_rayTest (long jarg1, btDbvtNode jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4);
+
+       public final static native void btDbvt_rayTestInternal (long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, long[] jarg6, float jarg7, Vector3 jarg8, Vector3 jarg9, long jarg10);
+
+       public final static native void btDbvt_collideKDOP (long jarg1, btDbvtNode jarg1_, long jarg2, btVector3 jarg2_,
+               float[] jarg3, int jarg4, long jarg5);
+
+       public final static native void btDbvt_collideOCL__SWIG_0 (long jarg1, btDbvtNode jarg1_, long jarg2, btVector3 jarg2_,
+               float[] jarg3, Vector3 jarg4, int jarg5, long jarg6, boolean jarg7);
+
+       public final static native void btDbvt_collideOCL__SWIG_1 (long jarg1, btDbvtNode jarg1_, long jarg2, btVector3 jarg2_,
+               float[] jarg3, Vector3 jarg4, int jarg5, long jarg6);
+
+       public final static native void btDbvt_collideTU (long jarg1, btDbvtNode jarg1_, long jarg2);
+
+       public final static native int btDbvt_nearest (long jarg1, long jarg2, float jarg3, int jarg4, int jarg5);
+
+       public final static native int btDbvt_allocate (long jarg1, long jarg2, long jarg3);
+
+       public final static native void btQuantizedBvhNode_m_quantizedAabbMin_set (long jarg1, btQuantizedBvhNode jarg1_, int[] jarg2);
+
+       public final static native int[] btQuantizedBvhNode_m_quantizedAabbMin_get (long jarg1, btQuantizedBvhNode jarg1_);
+
+       public final static native void btQuantizedBvhNode_m_quantizedAabbMax_set (long jarg1, btQuantizedBvhNode jarg1_, int[] jarg2);
+
+       public final static native int[] btQuantizedBvhNode_m_quantizedAabbMax_get (long jarg1, btQuantizedBvhNode jarg1_);
+
+       public final static native void btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_set (long jarg1, btQuantizedBvhNode jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_get (long jarg1, btQuantizedBvhNode jarg1_);
+
+       public final static native boolean btQuantizedBvhNode_isLeafNode (long jarg1, btQuantizedBvhNode jarg1_);
+
+       public final static native int btQuantizedBvhNode_getEscapeIndex (long jarg1, btQuantizedBvhNode jarg1_);
+
+       public final static native int btQuantizedBvhNode_getTriangleIndex (long jarg1, btQuantizedBvhNode jarg1_);
+
+       public final static native int btQuantizedBvhNode_getPartId (long jarg1, btQuantizedBvhNode jarg1_);
+
+       public final static native long new_btQuantizedBvhNode ();
+
+       public final static native void delete_btQuantizedBvhNode (long jarg1);
+
+       public final static native void btOptimizedBvhNode_m_aabbMinOrg_set (long jarg1, btOptimizedBvhNode jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btOptimizedBvhNode_m_aabbMinOrg_get (long jarg1, btOptimizedBvhNode jarg1_);
+
+       public final static native void btOptimizedBvhNode_m_aabbMaxOrg_set (long jarg1, btOptimizedBvhNode jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btOptimizedBvhNode_m_aabbMaxOrg_get (long jarg1, btOptimizedBvhNode jarg1_);
+
+       public final static native void btOptimizedBvhNode_m_escapeIndex_set (long jarg1, btOptimizedBvhNode jarg1_, int jarg2);
+
+       public final static native int btOptimizedBvhNode_m_escapeIndex_get (long jarg1, btOptimizedBvhNode jarg1_);
+
+       public final static native void btOptimizedBvhNode_m_subPart_set (long jarg1, btOptimizedBvhNode jarg1_, int jarg2);
+
+       public final static native int btOptimizedBvhNode_m_subPart_get (long jarg1, btOptimizedBvhNode jarg1_);
+
+       public final static native void btOptimizedBvhNode_m_triangleIndex_set (long jarg1, btOptimizedBvhNode jarg1_, int jarg2);
+
+       public final static native int btOptimizedBvhNode_m_triangleIndex_get (long jarg1, btOptimizedBvhNode jarg1_);
+
+       public final static native void btOptimizedBvhNode_m_padding_set (long jarg1, btOptimizedBvhNode jarg1_, String jarg2);
+
+       public final static native String btOptimizedBvhNode_m_padding_get (long jarg1, btOptimizedBvhNode jarg1_);
+
+       public final static native long new_btOptimizedBvhNode ();
+
+       public final static native void delete_btOptimizedBvhNode (long jarg1);
+
+       public final static native void btBvhSubtreeInfo_m_quantizedAabbMin_set (long jarg1, btBvhSubtreeInfo jarg1_, int[] jarg2);
+
+       public final static native int[] btBvhSubtreeInfo_m_quantizedAabbMin_get (long jarg1, btBvhSubtreeInfo jarg1_);
+
+       public final static native void btBvhSubtreeInfo_m_quantizedAabbMax_set (long jarg1, btBvhSubtreeInfo jarg1_, int[] jarg2);
+
+       public final static native int[] btBvhSubtreeInfo_m_quantizedAabbMax_get (long jarg1, btBvhSubtreeInfo jarg1_);
+
+       public final static native void btBvhSubtreeInfo_m_rootNodeIndex_set (long jarg1, btBvhSubtreeInfo jarg1_, int jarg2);
+
+       public final static native int btBvhSubtreeInfo_m_rootNodeIndex_get (long jarg1, btBvhSubtreeInfo jarg1_);
+
+       public final static native void btBvhSubtreeInfo_m_subtreeSize_set (long jarg1, btBvhSubtreeInfo jarg1_, int jarg2);
+
+       public final static native int btBvhSubtreeInfo_m_subtreeSize_get (long jarg1, btBvhSubtreeInfo jarg1_);
+
+       public final static native void btBvhSubtreeInfo_m_padding_set (long jarg1, btBvhSubtreeInfo jarg1_, int[] jarg2);
+
+       public final static native int[] btBvhSubtreeInfo_m_padding_get (long jarg1, btBvhSubtreeInfo jarg1_);
+
+       public final static native long new_btBvhSubtreeInfo ();
+
+       public final static native void btBvhSubtreeInfo_setAabbFromQuantizeNode (long jarg1, btBvhSubtreeInfo jarg1_, long jarg2,
+               btQuantizedBvhNode jarg2_);
+
+       public final static native void delete_btBvhSubtreeInfo (long jarg1);
+
+       public final static native void delete_btNodeOverlapCallback (long jarg1);
+
+       public final static native void btNodeOverlapCallback_processNode (long jarg1, btNodeOverlapCallback jarg1_, int jarg2,
+               int jarg3);
+
+       public final static native long new_btQuantizedBvh ();
+
+       public final static native void delete_btQuantizedBvh (long jarg1);
+
+       public final static native void btQuantizedBvh_setQuantizationValues__SWIG_0 (long jarg1, btQuantizedBvh jarg1_,
+               Vector3 jarg2, Vector3 jarg3, float jarg4);
+
+       public final static native void btQuantizedBvh_setQuantizationValues__SWIG_1 (long jarg1, btQuantizedBvh jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native long btQuantizedBvh_getLeafNodeArray (long jarg1, btQuantizedBvh jarg1_);
+
+       public final static native void btQuantizedBvh_buildInternal (long jarg1, btQuantizedBvh jarg1_);
+
+       public final static native void btQuantizedBvh_reportAabbOverlappingNodex (long jarg1, btQuantizedBvh jarg1_, long jarg2,
+               btNodeOverlapCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btQuantizedBvh_reportRayOverlappingNodex (long jarg1, btQuantizedBvh jarg1_, long jarg2,
+               btNodeOverlapCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btQuantizedBvh_reportBoxCastOverlappingNodex (long jarg1, btQuantizedBvh jarg1_, long jarg2,
+               btNodeOverlapCallback jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btQuantizedBvh_quantize (long jarg1, btQuantizedBvh jarg1_, long jarg2, Vector3 jarg3,
+               int jarg4);
+
+       public final static native void btQuantizedBvh_quantizeWithClamp (long jarg1, btQuantizedBvh jarg1_, long jarg2,
+               Vector3 jarg3, int jarg4);
+
+       public final static native Vector3 btQuantizedBvh_unQuantize (long jarg1, btQuantizedBvh jarg1_, long jarg2);
+
+       public final static native void btQuantizedBvh_setTraversalMode (long jarg1, btQuantizedBvh jarg1_, int jarg2);
+
+       public final static native long btQuantizedBvh_getQuantizedNodeArray (long jarg1, btQuantizedBvh jarg1_);
+
+       public final static native long btQuantizedBvh_getSubtreeInfoArray (long jarg1, btQuantizedBvh jarg1_);
+
+       public final static native long btQuantizedBvh_calculateSerializeBufferSize (long jarg1, btQuantizedBvh jarg1_);
+
+       public final static native boolean btQuantizedBvh_serialize__SWIG_0 (long jarg1, btQuantizedBvh jarg1_, long jarg2,
+               long jarg3, boolean jarg4);
+
+       public final static native long btQuantizedBvh_deSerializeInPlace (long jarg1, long jarg2, boolean jarg3);
+
+       public final static native long btQuantizedBvh_getAlignmentSerializationPadding ();
+
+       public final static native int btQuantizedBvh_calculateSerializeBufferSizeNew (long jarg1, btQuantizedBvh jarg1_);
+
+       public final static native String btQuantizedBvh_serialize__SWIG_1 (long jarg1, btQuantizedBvh jarg1_, long jarg2, long jarg3);
+
+       public final static native void btQuantizedBvh_deSerializeFloat (long jarg1, btQuantizedBvh jarg1_, long jarg2,
+               btQuantizedBvhFloatData jarg2_);
+
+       public final static native void btQuantizedBvh_deSerializeDouble (long jarg1, btQuantizedBvh jarg1_, long jarg2,
+               btQuantizedBvhDoubleData jarg2_);
+
+       public final static native boolean btQuantizedBvh_isQuantized (long jarg1, btQuantizedBvh jarg1_);
+
+       public final static native void btBvhSubtreeInfoData_m_rootNodeIndex_set (long jarg1, btBvhSubtreeInfoData jarg1_, int jarg2);
+
+       public final static native int btBvhSubtreeInfoData_m_rootNodeIndex_get (long jarg1, btBvhSubtreeInfoData jarg1_);
+
+       public final static native void btBvhSubtreeInfoData_m_subtreeSize_set (long jarg1, btBvhSubtreeInfoData jarg1_, int jarg2);
+
+       public final static native int btBvhSubtreeInfoData_m_subtreeSize_get (long jarg1, btBvhSubtreeInfoData jarg1_);
+
+       public final static native void btBvhSubtreeInfoData_m_quantizedAabbMin_set (long jarg1, btBvhSubtreeInfoData jarg1_,
+               int[] jarg2);
+
+       public final static native int[] btBvhSubtreeInfoData_m_quantizedAabbMin_get (long jarg1, btBvhSubtreeInfoData jarg1_);
+
+       public final static native void btBvhSubtreeInfoData_m_quantizedAabbMax_set (long jarg1, btBvhSubtreeInfoData jarg1_,
+               int[] jarg2);
+
+       public final static native int[] btBvhSubtreeInfoData_m_quantizedAabbMax_get (long jarg1, btBvhSubtreeInfoData jarg1_);
+
+       public final static native long new_btBvhSubtreeInfoData ();
+
+       public final static native void delete_btBvhSubtreeInfoData (long jarg1);
+
+       public final static native void btOptimizedBvhNodeFloatData_m_aabbMinOrg_set (long jarg1, btOptimizedBvhNodeFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btOptimizedBvhNodeFloatData_m_aabbMinOrg_get (long jarg1, btOptimizedBvhNodeFloatData jarg1_);
+
+       public final static native void btOptimizedBvhNodeFloatData_m_aabbMaxOrg_set (long jarg1, btOptimizedBvhNodeFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btOptimizedBvhNodeFloatData_m_aabbMaxOrg_get (long jarg1, btOptimizedBvhNodeFloatData jarg1_);
+
+       public final static native void btOptimizedBvhNodeFloatData_m_escapeIndex_set (long jarg1, btOptimizedBvhNodeFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btOptimizedBvhNodeFloatData_m_escapeIndex_get (long jarg1, btOptimizedBvhNodeFloatData jarg1_);
+
+       public final static native void btOptimizedBvhNodeFloatData_m_subPart_set (long jarg1, btOptimizedBvhNodeFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btOptimizedBvhNodeFloatData_m_subPart_get (long jarg1, btOptimizedBvhNodeFloatData jarg1_);
+
+       public final static native void btOptimizedBvhNodeFloatData_m_triangleIndex_set (long jarg1,
+               btOptimizedBvhNodeFloatData jarg1_, int jarg2);
+
+       public final static native int btOptimizedBvhNodeFloatData_m_triangleIndex_get (long jarg1, btOptimizedBvhNodeFloatData jarg1_);
+
+       public final static native void btOptimizedBvhNodeFloatData_m_pad_set (long jarg1, btOptimizedBvhNodeFloatData jarg1_,
+               String jarg2);
+
+       public final static native String btOptimizedBvhNodeFloatData_m_pad_get (long jarg1, btOptimizedBvhNodeFloatData jarg1_);
+
+       public final static native long new_btOptimizedBvhNodeFloatData ();
+
+       public final static native void delete_btOptimizedBvhNodeFloatData (long jarg1);
+
+       public final static native void btOptimizedBvhNodeDoubleData_m_aabbMinOrg_set (long jarg1,
+               btOptimizedBvhNodeDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btOptimizedBvhNodeDoubleData_m_aabbMinOrg_get (long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
+
+       public final static native void btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_set (long jarg1,
+               btOptimizedBvhNodeDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_get (long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
+
+       public final static native void btOptimizedBvhNodeDoubleData_m_escapeIndex_set (long jarg1,
+               btOptimizedBvhNodeDoubleData jarg1_, int jarg2);
+
+       public final static native int btOptimizedBvhNodeDoubleData_m_escapeIndex_get (long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
+
+       public final static native void btOptimizedBvhNodeDoubleData_m_subPart_set (long jarg1, btOptimizedBvhNodeDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btOptimizedBvhNodeDoubleData_m_subPart_get (long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
+
+       public final static native void btOptimizedBvhNodeDoubleData_m_triangleIndex_set (long jarg1,
+               btOptimizedBvhNodeDoubleData jarg1_, int jarg2);
+
+       public final static native int btOptimizedBvhNodeDoubleData_m_triangleIndex_get (long jarg1,
+               btOptimizedBvhNodeDoubleData jarg1_);
+
+       public final static native void btOptimizedBvhNodeDoubleData_m_pad_set (long jarg1, btOptimizedBvhNodeDoubleData jarg1_,
+               String jarg2);
+
+       public final static native String btOptimizedBvhNodeDoubleData_m_pad_get (long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
+
+       public final static native long new_btOptimizedBvhNodeDoubleData ();
+
+       public final static native void delete_btOptimizedBvhNodeDoubleData (long jarg1);
+
+       public final static native void btQuantizedBvhNodeData_m_quantizedAabbMin_set (long jarg1, btQuantizedBvhNodeData jarg1_,
+               int[] jarg2);
+
+       public final static native int[] btQuantizedBvhNodeData_m_quantizedAabbMin_get (long jarg1, btQuantizedBvhNodeData jarg1_);
+
+       public final static native void btQuantizedBvhNodeData_m_quantizedAabbMax_set (long jarg1, btQuantizedBvhNodeData jarg1_,
+               int[] jarg2);
+
+       public final static native int[] btQuantizedBvhNodeData_m_quantizedAabbMax_get (long jarg1, btQuantizedBvhNodeData jarg1_);
+
+       public final static native void btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_set (long jarg1,
+               btQuantizedBvhNodeData jarg1_, int jarg2);
+
+       public final static native int btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_get (long jarg1,
+               btQuantizedBvhNodeData jarg1_);
+
+       public final static native long new_btQuantizedBvhNodeData ();
+
+       public final static native void delete_btQuantizedBvhNodeData (long jarg1);
+
+       public final static native void btQuantizedBvhFloatData_m_bvhAabbMin_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btQuantizedBvhFloatData_m_bvhAabbMin_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_bvhAabbMax_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btQuantizedBvhFloatData_m_bvhAabbMax_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_bvhQuantization_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btQuantizedBvhFloatData_m_bvhQuantization_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_curNodeIndex_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhFloatData_m_curNodeIndex_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_useQuantization_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhFloatData_m_useQuantization_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_numContiguousLeafNodes_set (long jarg1,
+               btQuantizedBvhFloatData jarg1_, int jarg2);
+
+       public final static native int btQuantizedBvhFloatData_m_numContiguousLeafNodes_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_set (long jarg1,
+               btQuantizedBvhFloatData jarg1_, int jarg2);
+
+       public final static native int btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_get (long jarg1,
+               btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_contiguousNodesPtr_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               long jarg2, btOptimizedBvhNodeFloatData jarg2_);
+
+       public final static native long btQuantizedBvhFloatData_m_contiguousNodesPtr_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_set (long jarg1,
+               btQuantizedBvhFloatData jarg1_, long jarg2, btQuantizedBvhNodeData jarg2_);
+
+       public final static native long btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_get (long jarg1,
+               btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_subTreeInfoPtr_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               long jarg2, btBvhSubtreeInfoData jarg2_);
+
+       public final static native long btQuantizedBvhFloatData_m_subTreeInfoPtr_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_traversalMode_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhFloatData_m_traversalMode_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native void btQuantizedBvhFloatData_m_numSubtreeHeaders_set (long jarg1, btQuantizedBvhFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhFloatData_m_numSubtreeHeaders_get (long jarg1, btQuantizedBvhFloatData jarg1_);
+
+       public final static native long new_btQuantizedBvhFloatData ();
+
+       public final static native void delete_btQuantizedBvhFloatData (long jarg1);
+
+       public final static native void btQuantizedBvhDoubleData_m_bvhAabbMin_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btQuantizedBvhDoubleData_m_bvhAabbMin_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_bvhAabbMax_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btQuantizedBvhDoubleData_m_bvhAabbMax_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_bvhQuantization_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btQuantizedBvhDoubleData_m_bvhQuantization_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_curNodeIndex_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhDoubleData_m_curNodeIndex_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_useQuantization_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhDoubleData_m_useQuantization_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_numContiguousLeafNodes_set (long jarg1,
+               btQuantizedBvhDoubleData jarg1_, int jarg2);
+
+       public final static native int btQuantizedBvhDoubleData_m_numContiguousLeafNodes_get (long jarg1,
+               btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_set (long jarg1,
+               btQuantizedBvhDoubleData jarg1_, int jarg2);
+
+       public final static native int btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_get (long jarg1,
+               btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_contiguousNodesPtr_set (long jarg1,
+               btQuantizedBvhDoubleData jarg1_, long jarg2, btOptimizedBvhNodeDoubleData jarg2_);
+
+       public final static native long btQuantizedBvhDoubleData_m_contiguousNodesPtr_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_set (long jarg1,
+               btQuantizedBvhDoubleData jarg1_, long jarg2, btQuantizedBvhNodeData jarg2_);
+
+       public final static native long btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_get (long jarg1,
+               btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_traversalMode_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhDoubleData_m_traversalMode_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_numSubtreeHeaders_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btQuantizedBvhDoubleData_m_numSubtreeHeaders_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native void btQuantizedBvhDoubleData_m_subTreeInfoPtr_set (long jarg1, btQuantizedBvhDoubleData jarg1_,
+               long jarg2, btBvhSubtreeInfoData jarg2_);
+
+       public final static native long btQuantizedBvhDoubleData_m_subTreeInfoPtr_get (long jarg1, btQuantizedBvhDoubleData jarg1_);
+
+       public final static native long new_btQuantizedBvhDoubleData ();
+
+       public final static native void delete_btQuantizedBvhDoubleData (long jarg1);
+
+       public final static native void btDbvtProxy_leaf_set (long jarg1, btDbvtProxy jarg1_, long jarg2, btDbvtNode jarg2_);
+
+       public final static native long btDbvtProxy_leaf_get (long jarg1, btDbvtProxy jarg1_);
+
+       public final static native void btDbvtProxy_links_set (long jarg1, btDbvtProxy jarg1_, long jarg2);
+
+       public final static native long btDbvtProxy_links_get (long jarg1, btDbvtProxy jarg1_);
+
+       public final static native void btDbvtProxy_stage_set (long jarg1, btDbvtProxy jarg1_, int jarg2);
+
+       public final static native int btDbvtProxy_stage_get (long jarg1, btDbvtProxy jarg1_);
+
+       public final static native long new_btDbvtProxy (Vector3 jarg1, Vector3 jarg2, long jarg3, short jarg4, short jarg5);
+
+       public final static native void delete_btDbvtProxy (long jarg1);
+
+       public final static native void btDbvtBroadphase_m_sets_set (long jarg1, btDbvtBroadphase jarg1_, long jarg2, btDbvt jarg2_);
+
+       public final static native long btDbvtBroadphase_m_sets_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_stageRoots_set (long jarg1, btDbvtBroadphase jarg1_, long jarg2);
+
+       public final static native long btDbvtBroadphase_m_stageRoots_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_paircache_set (long jarg1, btDbvtBroadphase jarg1_, long jarg2,
+               btOverlappingPairCache jarg2_);
+
+       public final static native long btDbvtBroadphase_m_paircache_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_prediction_set (long jarg1, btDbvtBroadphase jarg1_, float jarg2);
+
+       public final static native float btDbvtBroadphase_m_prediction_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_stageCurrent_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_stageCurrent_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_fupdates_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_fupdates_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_dupdates_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_dupdates_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_cupdates_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_cupdates_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_newpairs_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_newpairs_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_fixedleft_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_fixedleft_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_updates_call_set (long jarg1, btDbvtBroadphase jarg1_, long jarg2);
+
+       public final static native long btDbvtBroadphase_m_updates_call_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_updates_done_set (long jarg1, btDbvtBroadphase jarg1_, long jarg2);
+
+       public final static native long btDbvtBroadphase_m_updates_done_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_updates_ratio_set (long jarg1, btDbvtBroadphase jarg1_, float jarg2);
+
+       public final static native float btDbvtBroadphase_m_updates_ratio_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_pid_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_pid_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_cid_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_cid_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_gid_set (long jarg1, btDbvtBroadphase jarg1_, int jarg2);
+
+       public final static native int btDbvtBroadphase_m_gid_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_releasepaircache_set (long jarg1, btDbvtBroadphase jarg1_, boolean jarg2);
+
+       public final static native boolean btDbvtBroadphase_m_releasepaircache_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_deferedcollide_set (long jarg1, btDbvtBroadphase jarg1_, boolean jarg2);
+
+       public final static native boolean btDbvtBroadphase_m_deferedcollide_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_m_needcleanup_set (long jarg1, btDbvtBroadphase jarg1_, boolean jarg2);
+
+       public final static native boolean btDbvtBroadphase_m_needcleanup_get (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native long new_btDbvtBroadphase__SWIG_0 (long jarg1, btOverlappingPairCache jarg1_);
+
+       public final static native long new_btDbvtBroadphase__SWIG_1 ();
+
+       public final static native void delete_btDbvtBroadphase (long jarg1);
+
+       public final static native void btDbvtBroadphase_collide (long jarg1, btDbvtBroadphase jarg1_, long jarg2, btDispatcher jarg2_);
+
+       public final static native void btDbvtBroadphase_optimize (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_rayTest__SWIG_0 (long jarg1, btDbvtBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btDbvtBroadphase_rayTest__SWIG_1 (long jarg1, btDbvtBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
+
+       public final static native void btDbvtBroadphase_rayTest__SWIG_2 (long jarg1, btDbvtBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
+
+       public final static native long btDbvtBroadphase_getOverlappingPairCache__SWIG_0 (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_performDeferredRemoval (long jarg1, btDbvtBroadphase jarg1_, long jarg2,
+               btDispatcher jarg2_);
+
+       public final static native void btDbvtBroadphase_setVelocityPrediction (long jarg1, btDbvtBroadphase jarg1_, float jarg2);
+
+       public final static native float btDbvtBroadphase_getVelocityPrediction (long jarg1, btDbvtBroadphase jarg1_);
+
+       public final static native void btDbvtBroadphase_setAabbForceUpdate (long jarg1, btDbvtBroadphase jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_, Vector3 jarg3, Vector3 jarg4, long jarg5, btDispatcher jarg5_);
+
+       public final static native void btDbvtBroadphase_benchmark (long jarg1, btBroadphaseInterface jarg1_);
+
+       public final static native void btSimpleBroadphaseProxy_m_nextFree_set (long jarg1, btSimpleBroadphaseProxy jarg1_, int jarg2);
+
+       public final static native int btSimpleBroadphaseProxy_m_nextFree_get (long jarg1, btSimpleBroadphaseProxy jarg1_);
+
+       public final static native long new_btSimpleBroadphaseProxy__SWIG_0 ();
+
+       public final static native long new_btSimpleBroadphaseProxy__SWIG_1 (Vector3 jarg1, Vector3 jarg2, int jarg3, long jarg4,
+               short jarg5, short jarg6, long jarg7);
+
+       public final static native void btSimpleBroadphaseProxy_SetNextFree (long jarg1, btSimpleBroadphaseProxy jarg1_, int jarg2);
+
+       public final static native int btSimpleBroadphaseProxy_GetNextFree (long jarg1, btSimpleBroadphaseProxy jarg1_);
+
+       public final static native void delete_btSimpleBroadphaseProxy (long jarg1);
+
+       public final static native long new_btSimpleBroadphase__SWIG_0 (int jarg1, long jarg2, btOverlappingPairCache jarg2_);
+
+       public final static native long new_btSimpleBroadphase__SWIG_1 (int jarg1);
+
+       public final static native long new_btSimpleBroadphase__SWIG_2 ();
+
+       public final static native void delete_btSimpleBroadphase (long jarg1);
+
+       public final static native boolean btSimpleBroadphase_aabbOverlap (long jarg1, btSimpleBroadphaseProxy jarg1_, long jarg2,
+               btSimpleBroadphaseProxy jarg2_);
+
+       public final static native void btSimpleBroadphase_rayTest__SWIG_0 (long jarg1, btSimpleBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btSimpleBroadphase_rayTest__SWIG_1 (long jarg1, btSimpleBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
+
+       public final static native void btSimpleBroadphase_rayTest__SWIG_2 (long jarg1, btSimpleBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
+
+       public final static native long btSimpleBroadphase_getOverlappingPairCache__SWIG_0 (long jarg1, btSimpleBroadphase jarg1_);
+
+       public final static native boolean btSimpleBroadphase_testAabbOverlap (long jarg1, btSimpleBroadphase jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native long btMultiSapBroadphase_getBroadphaseArray__SWIG_0 (long jarg1, btMultiSapBroadphase jarg1_);
+
+       public final static native void delete_btMultiSapBroadphase (long jarg1);
+
+       public final static native void btMultiSapBroadphase_rayTest__SWIG_0 (long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btMultiSapBroadphase_rayTest__SWIG_1 (long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
+
+       public final static native void btMultiSapBroadphase_rayTest__SWIG_2 (long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
+
+       public final static native void btMultiSapBroadphase_addToChildBroadphase (long jarg1, btMultiSapBroadphase jarg1_,
+               long jarg2, long jarg3, btBroadphaseProxy jarg3_, long jarg4, btBroadphaseInterface jarg4_);
+
+       public final static native boolean btMultiSapBroadphase_testAabbOverlap (long jarg1, btMultiSapBroadphase jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native long btMultiSapBroadphase_getOverlappingPairCache__SWIG_0 (long jarg1, btMultiSapBroadphase jarg1_);
+
+       public final static native void btMultiSapBroadphase_buildTree (long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2,
+               Vector3 jarg3);
+
+       public final static native void btMultiSapBroadphase_quicksort (long jarg1, btMultiSapBroadphase jarg1_, long jarg2,
+               int jarg3, int jarg4);
+
+       public final static native long new_btCollisionAlgorithmConstructionInfo__SWIG_0 ();
+
+       public final static native long new_btCollisionAlgorithmConstructionInfo__SWIG_1 (long jarg1, btDispatcher jarg1_, int jarg2);
+
+       public final static native void btCollisionAlgorithmConstructionInfo_m_dispatcher1_set (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_, long jarg2, btDispatcher jarg2_);
+
+       public final static native long btCollisionAlgorithmConstructionInfo_m_dispatcher1_get (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_);
+
+       public final static native void btCollisionAlgorithmConstructionInfo_m_manifold_set (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_, long jarg2, btPersistentManifold jarg2_);
+
+       public final static native long btCollisionAlgorithmConstructionInfo_m_manifold_get (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_);
+
+       public final static native void delete_btCollisionAlgorithmConstructionInfo (long jarg1);
+
+       public final static native void delete_btCollisionAlgorithm (long jarg1);
+
+       public final static native void btCollisionAlgorithm_processCollision (long jarg1, btCollisionAlgorithm jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btDispatcherInfo jarg4_, long jarg5,
+               btManifoldResult jarg5_);
+
+       public final static native float btCollisionAlgorithm_calculateTimeOfImpact (long jarg1, btCollisionAlgorithm jarg1_,
+               long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btDispatcherInfo jarg4_,
+               long jarg5, btManifoldResult jarg5_);
+
+       public final static native void btCollisionAlgorithm_getAllContactManifolds (long jarg1, btCollisionAlgorithm jarg1_,
+               long jarg2);
+
+       public final static native void delete_btOverlappingPairCallback (long jarg1);
+
+       public final static native long btOverlappingPairCallback_addOverlappingPair (long jarg1, btOverlappingPairCallback jarg1_,
+               long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native long btOverlappingPairCallback_removeOverlappingPair (long jarg1, btOverlappingPairCallback jarg1_,
+               long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_, long jarg4, btDispatcher jarg4_);
+
+       public final static native void btOverlappingPairCallback_removeOverlappingPairsContainingProxy (long jarg1,
+               btOverlappingPairCallback jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native void gOverlappingPairs_set (int jarg1);
+
+       public final static native int gOverlappingPairs_get ();
+
+       public final static native long new_btAxisSweep3__SWIG_0 (Vector3 jarg1, Vector3 jarg2, int jarg3, long jarg4,
+               btOverlappingPairCache jarg4_, boolean jarg5);
+
+       public final static native long new_btAxisSweep3__SWIG_1 (Vector3 jarg1, Vector3 jarg2, int jarg3, long jarg4,
+               btOverlappingPairCache jarg4_);
+
+       public final static native long new_btAxisSweep3__SWIG_2 (Vector3 jarg1, Vector3 jarg2, int jarg3);
+
+       public final static native long new_btAxisSweep3__SWIG_3 (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native void delete_btAxisSweep3 (long jarg1);
+
+       public final static native long new_bt32BitAxisSweep3__SWIG_0 (Vector3 jarg1, Vector3 jarg2, long jarg3, long jarg4,
+               btOverlappingPairCache jarg4_, boolean jarg5);
+
+       public final static native long new_bt32BitAxisSweep3__SWIG_1 (Vector3 jarg1, Vector3 jarg2, long jarg3, long jarg4,
+               btOverlappingPairCache jarg4_);
+
+       public final static native long new_bt32BitAxisSweep3__SWIG_2 (Vector3 jarg1, Vector3 jarg2, long jarg3);
+
+       public final static native long new_bt32BitAxisSweep3__SWIG_3 (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native void delete_bt32BitAxisSweep3 (long jarg1);
+
+       public final static native long new_btDispatcherInfo ();
+
+       public final static native void btDispatcherInfo_m_timeStep_set (long jarg1, btDispatcherInfo jarg1_, float jarg2);
+
+       public final static native float btDispatcherInfo_m_timeStep_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_stepCount_set (long jarg1, btDispatcherInfo jarg1_, int jarg2);
+
+       public final static native int btDispatcherInfo_m_stepCount_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_dispatchFunc_set (long jarg1, btDispatcherInfo jarg1_, int jarg2);
+
+       public final static native int btDispatcherInfo_m_dispatchFunc_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_timeOfImpact_set (long jarg1, btDispatcherInfo jarg1_, float jarg2);
+
+       public final static native float btDispatcherInfo_m_timeOfImpact_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_useContinuous_set (long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
+
+       public final static native boolean btDispatcherInfo_m_useContinuous_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_debugDraw_set (long jarg1, btDispatcherInfo jarg1_, long jarg2,
+               btIDebugDraw jarg2_);
+
+       public final static native long btDispatcherInfo_m_debugDraw_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_enableSatConvex_set (long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
+
+       public final static native boolean btDispatcherInfo_m_enableSatConvex_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_enableSPU_set (long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
+
+       public final static native boolean btDispatcherInfo_m_enableSPU_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_useEpa_set (long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
+
+       public final static native boolean btDispatcherInfo_m_useEpa_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_allowedCcdPenetration_set (long jarg1, btDispatcherInfo jarg1_, float jarg2);
+
+       public final static native float btDispatcherInfo_m_allowedCcdPenetration_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_useConvexConservativeDistanceUtil_set (long jarg1, btDispatcherInfo jarg1_,
+               boolean jarg2);
+
+       public final static native boolean btDispatcherInfo_m_useConvexConservativeDistanceUtil_get (long jarg1,
+               btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_convexConservativeDistanceThreshold_set (long jarg1,
+               btDispatcherInfo jarg1_, float jarg2);
+
+       public final static native float btDispatcherInfo_m_convexConservativeDistanceThreshold_get (long jarg1,
+               btDispatcherInfo jarg1_);
+
+       public final static native void btDispatcherInfo_m_stackAllocator_set (long jarg1, btDispatcherInfo jarg1_, long jarg2,
+               btStackAlloc jarg2_);
+
+       public final static native long btDispatcherInfo_m_stackAllocator_get (long jarg1, btDispatcherInfo jarg1_);
+
+       public final static native void delete_btDispatcherInfo (long jarg1);
+
+       public final static native void delete_btDispatcher (long jarg1);
+
+       public final static native long btDispatcher_findAlgorithm__SWIG_0 (long jarg1, btDispatcher jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btPersistentManifold jarg4_);
+
+       public final static native long btDispatcher_findAlgorithm__SWIG_1 (long jarg1, btDispatcher jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
+
+       public final static native long btDispatcher_getNewManifold (long jarg1, btDispatcher jarg1_, long jarg2, long jarg3);
+
+       public final static native void btDispatcher_releaseManifold (long jarg1, btDispatcher jarg1_, long jarg2,
+               btPersistentManifold jarg2_);
+
+       public final static native void btDispatcher_clearManifold (long jarg1, btDispatcher jarg1_, long jarg2,
+               btPersistentManifold jarg2_);
+
+       public final static native boolean btDispatcher_needsCollision (long jarg1, btDispatcher jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
+
+       public final static native boolean btDispatcher_needsResponse (long jarg1, btDispatcher jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
+
+       public final static native void btDispatcher_dispatchAllCollisionPairs (long jarg1, btDispatcher jarg1_, long jarg2,
+               btOverlappingPairCache jarg2_, long jarg3, btDispatcherInfo jarg3_, long jarg4, btDispatcher jarg4_);
+
+       public final static native int btDispatcher_getNumManifolds (long jarg1, btDispatcher jarg1_);
+
+       public final static native long btDispatcher_getManifoldByIndexInternal (long jarg1, btDispatcher jarg1_, int jarg2);
+
+       public final static native long btDispatcher_getInternalManifoldPointer (long jarg1, btDispatcher jarg1_);
+
+       public final static native long btDispatcher_getInternalManifoldPool__SWIG_0 (long jarg1, btDispatcher jarg1_);
+
+       public final static native long btDispatcher_allocateCollisionAlgorithm (long jarg1, btDispatcher jarg1_, int jarg2);
+
+       public final static native void btDispatcher_freeCollisionAlgorithm (long jarg1, btDispatcher jarg1_, long jarg2);
+
+       public final static native void delete_btOverlapCallback (long jarg1);
+
+       public final static native boolean btOverlapCallback_processOverlap (long jarg1, btOverlapCallback jarg1_, long jarg2,
+               btBroadphasePair jarg2_);
+
+       public final static native void delete_btOverlapFilterCallback (long jarg1);
+
+       public final static native boolean btOverlapFilterCallback_needBroadphaseCollision (long jarg1,
+               btOverlapFilterCallback jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native void gRemovePairs_set (int jarg1);
+
+       public final static native int gRemovePairs_get ();
+
+       public final static native void gAddedPairs_set (int jarg1);
+
+       public final static native int gAddedPairs_get ();
+
+       public final static native void gFindPairs_set (int jarg1);
+
+       public final static native int gFindPairs_get ();
+
+       public final static native int BT_NULL_PAIR_get ();
+
+       public final static native void delete_btOverlappingPairCache (long jarg1);
+
+       public final static native long btOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0 (long jarg1,
+               btOverlappingPairCache jarg1_);
+
+       public final static native long btOverlappingPairCache_getOverlappingPairArray (long jarg1, btOverlappingPairCache jarg1_);
+
+       public final static native void btOverlappingPairCache_cleanOverlappingPair (long jarg1, btOverlappingPairCache jarg1_,
+               long jarg2, btBroadphasePair jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native int btOverlappingPairCache_getNumOverlappingPairs (long jarg1, btOverlappingPairCache jarg1_);
+
+       public final static native void btOverlappingPairCache_cleanProxyFromPairs (long jarg1, btOverlappingPairCache jarg1_,
+               long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native void btOverlappingPairCache_setOverlapFilterCallback (long jarg1, btOverlappingPairCache jarg1_,
+               long jarg2, btOverlapFilterCallback jarg2_);
+
+       public final static native void btOverlappingPairCache_processAllOverlappingPairs (long jarg1, btOverlappingPairCache jarg1_,
+               long jarg2, btOverlapCallback jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native long btOverlappingPairCache_findPair (long jarg1, btOverlappingPairCache jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native boolean btOverlappingPairCache_hasDeferredRemoval (long jarg1, btOverlappingPairCache jarg1_);
+
+       public final static native void btOverlappingPairCache_setInternalGhostPairCallback (long jarg1,
+               btOverlappingPairCache jarg1_, long jarg2, btOverlappingPairCallback jarg2_);
+
+       public final static native void btOverlappingPairCache_sortOverlappingPairs (long jarg1, btOverlappingPairCache jarg1_,
+               long jarg2, btDispatcher jarg2_);
+
+       public final static native long new_btHashedOverlappingPairCache ();
+
+       public final static native void delete_btHashedOverlappingPairCache (long jarg1);
+
+       public final static native boolean btHashedOverlappingPairCache_needsBroadphaseCollision (long jarg1,
+               btHashedOverlappingPairCache jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native long btHashedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0 (long jarg1,
+               btHashedOverlappingPairCache jarg1_);
+
+       public final static native long btHashedOverlappingPairCache_getOverlappingPairArray__SWIG_0 (long jarg1,
+               btHashedOverlappingPairCache jarg1_);
+
+       public final static native int btHashedOverlappingPairCache_GetCount (long jarg1, btHashedOverlappingPairCache jarg1_);
+
+       public final static native long btHashedOverlappingPairCache_getOverlapFilterCallback (long jarg1,
+               btHashedOverlappingPairCache jarg1_);
+
+       public final static native long new_btSortedOverlappingPairCache ();
+
+       public final static native void delete_btSortedOverlappingPairCache (long jarg1);
+
+       public final static native boolean btSortedOverlappingPairCache_needsBroadphaseCollision (long jarg1,
+               btSortedOverlappingPairCache jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native long btSortedOverlappingPairCache_getOverlappingPairArray__SWIG_0 (long jarg1,
+               btSortedOverlappingPairCache jarg1_);
+
+       public final static native long btSortedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0 (long jarg1,
+               btSortedOverlappingPairCache jarg1_);
+
+       public final static native long btSortedOverlappingPairCache_getOverlapFilterCallback (long jarg1,
+               btSortedOverlappingPairCache jarg1_);
+
+       public final static native long btNullPairCache_getOverlappingPairArrayPtr__SWIG_0 (long jarg1, btNullPairCache jarg1_);
+
+       public final static native long new_btNullPairCache ();
+
+       public final static native void delete_btNullPairCache (long jarg1);
+
+       public final static native void delete_btCollisionShape (long jarg1);
+
+       public final static native void btCollisionShape_getAabb (long jarg1, btCollisionShape jarg1_, long jarg2, btTransform jarg2_,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btCollisionShape_getBoundingSphere (long jarg1, btCollisionShape jarg1_, Vector3 jarg2,
+               long jarg3);
+
+       public final static native float btCollisionShape_getAngularMotionDisc (long jarg1, btCollisionShape jarg1_);
+
+       public final static native float btCollisionShape_getContactBreakingThreshold (long jarg1, btCollisionShape jarg1_, float jarg2);
+
+       public final static native void btCollisionShape_calculateTemporalAabb (long jarg1, btCollisionShape jarg1_, long jarg2,
+               btTransform jarg2_, Vector3 jarg3, Vector3 jarg4, float jarg5, Vector3 jarg6, Vector3 jarg7);
+
+       public final static native boolean btCollisionShape_isPolyhedral (long jarg1, btCollisionShape jarg1_);
+
+       public final static native boolean btCollisionShape_isConvex2d (long jarg1, btCollisionShape jarg1_);
+
+       public final static native boolean btCollisionShape_isConvex (long jarg1, btCollisionShape jarg1_);
+
+       public final static native boolean btCollisionShape_isNonMoving (long jarg1, btCollisionShape jarg1_);
+
+       public final static native boolean btCollisionShape_isConcave (long jarg1, btCollisionShape jarg1_);
+
+       public final static native boolean btCollisionShape_isCompound (long jarg1, btCollisionShape jarg1_);
+
+       public final static native boolean btCollisionShape_isSoftBody (long jarg1, btCollisionShape jarg1_);
+
+       public final static native boolean btCollisionShape_isInfinite (long jarg1, btCollisionShape jarg1_);
+
+       public final static native void btCollisionShape_setLocalScaling (long jarg1, btCollisionShape jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btCollisionShape_getLocalScaling (long jarg1, btCollisionShape jarg1_);
+
+       public final static native void btCollisionShape_calculateLocalInertia (long jarg1, btCollisionShape jarg1_, float jarg2,
+               Vector3 jarg3);
+
+       public final static native String btCollisionShape_getName (long jarg1, btCollisionShape jarg1_);
+
+       public final static native int btCollisionShape_getShapeType (long jarg1, btCollisionShape jarg1_);
+
+       public final static native void btCollisionShape_setMargin (long jarg1, btCollisionShape jarg1_, float jarg2);
+
+       public final static native float btCollisionShape_getMargin (long jarg1, btCollisionShape jarg1_);
+
+       public final static native void btCollisionShape_setUserPointer (long jarg1, btCollisionShape jarg1_, long jarg2);
+
+       public final static native long btCollisionShape_getUserPointer (long jarg1, btCollisionShape jarg1_);
+
+       public final static native int btCollisionShape_calculateSerializeBufferSize (long jarg1, btCollisionShape jarg1_);
+
+       public final static native String btCollisionShape_serialize (long jarg1, btCollisionShape jarg1_, long jarg2, long jarg3);
+
+       public final static native void btCollisionShape_serializeSingleShape (long jarg1, btCollisionShape jarg1_, long jarg2);
+
+       public final static native void btCollisionShapeData_m_name_set (long jarg1, btCollisionShapeData jarg1_, String jarg2);
+
+       public final static native String btCollisionShapeData_m_name_get (long jarg1, btCollisionShapeData jarg1_);
+
+       public final static native void btCollisionShapeData_m_shapeType_set (long jarg1, btCollisionShapeData jarg1_, int jarg2);
+
+       public final static native int btCollisionShapeData_m_shapeType_get (long jarg1, btCollisionShapeData jarg1_);
+
+       public final static native void btCollisionShapeData_m_padding_set (long jarg1, btCollisionShapeData jarg1_, String jarg2);
+
+       public final static native String btCollisionShapeData_m_padding_get (long jarg1, btCollisionShapeData jarg1_);
+
+       public final static native long new_btCollisionShapeData ();
+
+       public final static native void delete_btCollisionShapeData (long jarg1);
+
+       public final static native void delete_btConvexShape (long jarg1);
+
+       public final static native Vector3 btConvexShape_localGetSupportingVertex (long jarg1, btConvexShape jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btConvexShape_localGetSupportingVertexWithoutMargin (long jarg1, btConvexShape jarg1_,
+               Vector3 jarg2);
+
+       public final static native Vector3 btConvexShape_localGetSupportVertexWithoutMarginNonVirtual (long jarg1,
+               btConvexShape jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btConvexShape_localGetSupportVertexNonVirtual (long jarg1, btConvexShape jarg1_,
+               Vector3 jarg2);
+
+       public final static native float btConvexShape_getMarginNonVirtual (long jarg1, btConvexShape jarg1_);
+
+       public final static native void btConvexShape_getAabbNonVirtual (long jarg1, btConvexShape jarg1_, long jarg2,
+               btTransform jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btConvexShape_project (long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_,
+               Vector3 jarg3, long jarg4, long jarg5);
+
+       public final static native void btConvexShape_batchedUnitVectorGetSupportingVertexWithoutMargin (long jarg1,
+               btConvexShape jarg1_, long jarg2, btVector3 jarg2_, long jarg3, btVector3 jarg3_, int jarg4);
+
+       public final static native void btConvexShape_getAabbSlow (long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native int btConvexShape_getNumPreferredPenetrationDirections (long jarg1, btConvexShape jarg1_);
+
+       public final static native void btConvexShape_getPreferredPenetrationDirection (long jarg1, btConvexShape jarg1_, int jarg2,
+               Vector3 jarg3);
+
+       public final static native void delete_btConvexInternalShape (long jarg1);
+
+       public final static native Vector3 btConvexInternalShape_getImplicitShapeDimensions (long jarg1, btConvexInternalShape jarg1_);
+
+       public final static native void btConvexInternalShape_setImplicitShapeDimensions (long jarg1, btConvexInternalShape jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btConvexInternalShape_setSafeMargin__SWIG_0 (long jarg1, btConvexInternalShape jarg1_,
+               float jarg2, float jarg3);
+
+       public final static native void btConvexInternalShape_setSafeMargin__SWIG_1 (long jarg1, btConvexInternalShape jarg1_,
+               float jarg2);
+
+       public final static native void btConvexInternalShape_setSafeMargin__SWIG_2 (long jarg1, btConvexInternalShape jarg1_,
+               Vector3 jarg2, float jarg3);
+
+       public final static native void btConvexInternalShape_setSafeMargin__SWIG_3 (long jarg1, btConvexInternalShape jarg1_,
+               Vector3 jarg2);
+
+       public final static native Vector3 btConvexInternalShape_getLocalScalingNV (long jarg1, btConvexInternalShape jarg1_);
+
+       public final static native float btConvexInternalShape_getMarginNV (long jarg1, btConvexInternalShape jarg1_);
+
+       public final static native void btConvexInternalShapeData_m_collisionShapeData_set (long jarg1,
+               btConvexInternalShapeData jarg1_, long jarg2, btCollisionShapeData jarg2_);
+
+       public final static native long btConvexInternalShapeData_m_collisionShapeData_get (long jarg1,
+               btConvexInternalShapeData jarg1_);
+
+       public final static native void btConvexInternalShapeData_m_localScaling_set (long jarg1, btConvexInternalShapeData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btConvexInternalShapeData_m_localScaling_get (long jarg1, btConvexInternalShapeData jarg1_);
+
+       public final static native void btConvexInternalShapeData_m_implicitShapeDimensions_set (long jarg1,
+               btConvexInternalShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btConvexInternalShapeData_m_implicitShapeDimensions_get (long jarg1,
+               btConvexInternalShapeData jarg1_);
+
+       public final static native void btConvexInternalShapeData_m_collisionMargin_set (long jarg1, btConvexInternalShapeData jarg1_,
+               float jarg2);
+
+       public final static native float btConvexInternalShapeData_m_collisionMargin_get (long jarg1, btConvexInternalShapeData jarg1_);
+
+       public final static native void btConvexInternalShapeData_m_padding_set (long jarg1, btConvexInternalShapeData jarg1_,
+               int jarg2);
+
+       public final static native int btConvexInternalShapeData_m_padding_get (long jarg1, btConvexInternalShapeData jarg1_);
+
+       public final static native long new_btConvexInternalShapeData ();
+
+       public final static native void delete_btConvexInternalShapeData (long jarg1);
+
+       public final static native void btConvexInternalAabbCachingShape_recalcLocalAabb (long jarg1,
+               btConvexInternalAabbCachingShape jarg1_);
+
+       public final static native void delete_btConvexInternalAabbCachingShape (long jarg1);
+
+       public final static native void delete_btPolyhedralConvexShape (long jarg1);
+
+       public final static native boolean btPolyhedralConvexShape_initializePolyhedralFeatures (long jarg1,
+               btPolyhedralConvexShape jarg1_);
+
+       public final static native long btPolyhedralConvexShape_getConvexPolyhedron (long jarg1, btPolyhedralConvexShape jarg1_);
+
+       public final static native int btPolyhedralConvexShape_getNumVertices (long jarg1, btPolyhedralConvexShape jarg1_);
+
+       public final static native int btPolyhedralConvexShape_getNumEdges (long jarg1, btPolyhedralConvexShape jarg1_);
+
+       public final static native void btPolyhedralConvexShape_getEdge (long jarg1, btPolyhedralConvexShape jarg1_, int jarg2,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btPolyhedralConvexShape_getVertex (long jarg1, btPolyhedralConvexShape jarg1_, int jarg2,
+               Vector3 jarg3);
+
+       public final static native int btPolyhedralConvexShape_getNumPlanes (long jarg1, btPolyhedralConvexShape jarg1_);
+
+       public final static native void btPolyhedralConvexShape_getPlane (long jarg1, btPolyhedralConvexShape jarg1_, Vector3 jarg2,
+               Vector3 jarg3, int jarg4);
+
+       public final static native boolean btPolyhedralConvexShape_isInside (long jarg1, btPolyhedralConvexShape jarg1_,
+               Vector3 jarg2, float jarg3);
+
+       public final static native void btPolyhedralConvexAabbCachingShape_getNonvirtualAabb (long jarg1,
+               btPolyhedralConvexAabbCachingShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, Vector3 jarg4, float jarg5);
+
+       public final static native void btPolyhedralConvexAabbCachingShape_recalcLocalAabb (long jarg1,
+               btPolyhedralConvexAabbCachingShape jarg1_);
+
+       public final static native void delete_btPolyhedralConvexAabbCachingShape (long jarg1);
+
+       public final static native void delete_btConcaveShape (long jarg1);
+
+       public final static native void btConcaveShape_processAllTriangles (long jarg1, btConcaveShape jarg1_, long jarg2,
+               btTriangleCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void delete_btTriangleCallback (long jarg1);
+
+       public final static native void btTriangleCallback_processTriangle (long jarg1, btTriangleCallback jarg1_, long jarg2,
+               btVector3 jarg2_, int jarg3, int jarg4);
+
+       public final static native void delete_btInternalTriangleIndexCallback (long jarg1);
+
+       public final static native void btInternalTriangleIndexCallback_internalProcessTriangleIndex (long jarg1,
+               btInternalTriangleIndexCallback jarg1_, long jarg2, btVector3 jarg2_, int jarg3, int jarg4);
+
+       public final static native long new_btTriangleInfo ();
+
+       public final static native void btTriangleInfo_m_flags_set (long jarg1, btTriangleInfo jarg1_, int jarg2);
+
+       public final static native int btTriangleInfo_m_flags_get (long jarg1, btTriangleInfo jarg1_);
+
+       public final static native void btTriangleInfo_m_edgeV0V1Angle_set (long jarg1, btTriangleInfo jarg1_, float jarg2);
+
+       public final static native float btTriangleInfo_m_edgeV0V1Angle_get (long jarg1, btTriangleInfo jarg1_);
+
+       public final static native void btTriangleInfo_m_edgeV1V2Angle_set (long jarg1, btTriangleInfo jarg1_, float jarg2);
+
+       public final static native float btTriangleInfo_m_edgeV1V2Angle_get (long jarg1, btTriangleInfo jarg1_);
+
+       public final static native void btTriangleInfo_m_edgeV2V0Angle_set (long jarg1, btTriangleInfo jarg1_, float jarg2);
+
+       public final static native float btTriangleInfo_m_edgeV2V0Angle_get (long jarg1, btTriangleInfo jarg1_);
+
+       public final static native void delete_btTriangleInfo (long jarg1);
+
+       public final static native void btTriangleInfoMap_m_convexEpsilon_set (long jarg1, btTriangleInfoMap jarg1_, float jarg2);
+
+       public final static native float btTriangleInfoMap_m_convexEpsilon_get (long jarg1, btTriangleInfoMap jarg1_);
+
+       public final static native void btTriangleInfoMap_m_planarEpsilon_set (long jarg1, btTriangleInfoMap jarg1_, float jarg2);
+
+       public final static native float btTriangleInfoMap_m_planarEpsilon_get (long jarg1, btTriangleInfoMap jarg1_);
+
+       public final static native void btTriangleInfoMap_m_equalVertexThreshold_set (long jarg1, btTriangleInfoMap jarg1_, float jarg2);
+
+       public final static native float btTriangleInfoMap_m_equalVertexThreshold_get (long jarg1, btTriangleInfoMap jarg1_);
+
+       public final static native void btTriangleInfoMap_m_edgeDistanceThreshold_set (long jarg1, btTriangleInfoMap jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleInfoMap_m_edgeDistanceThreshold_get (long jarg1, btTriangleInfoMap jarg1_);
+
+       public final static native void btTriangleInfoMap_m_maxEdgeAngleThreshold_set (long jarg1, btTriangleInfoMap jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleInfoMap_m_maxEdgeAngleThreshold_get (long jarg1, btTriangleInfoMap jarg1_);
+
+       public final static native void btTriangleInfoMap_m_zeroAreaThreshold_set (long jarg1, btTriangleInfoMap jarg1_, float jarg2);
+
+       public final static native float btTriangleInfoMap_m_zeroAreaThreshold_get (long jarg1, btTriangleInfoMap jarg1_);
+
+       public final static native long new_btTriangleInfoMap ();
+
+       public final static native void delete_btTriangleInfoMap (long jarg1);
+
+       public final static native int btTriangleInfoMap_calculateSerializeBufferSize (long jarg1, btTriangleInfoMap jarg1_);
+
+       public final static native String btTriangleInfoMap_serialize (long jarg1, btTriangleInfoMap jarg1_, long jarg2, long jarg3);
+
+       public final static native void btTriangleInfoMap_deSerialize (long jarg1, btTriangleInfoMap jarg1_, long jarg2,
+               btTriangleInfoMapData jarg2_);
+
+       public final static native void btTriangleInfoData_m_flags_set (long jarg1, btTriangleInfoData jarg1_, int jarg2);
+
+       public final static native int btTriangleInfoData_m_flags_get (long jarg1, btTriangleInfoData jarg1_);
+
+       public final static native void btTriangleInfoData_m_edgeV0V1Angle_set (long jarg1, btTriangleInfoData jarg1_, float jarg2);
+
+       public final static native float btTriangleInfoData_m_edgeV0V1Angle_get (long jarg1, btTriangleInfoData jarg1_);
+
+       public final static native void btTriangleInfoData_m_edgeV1V2Angle_set (long jarg1, btTriangleInfoData jarg1_, float jarg2);
+
+       public final static native float btTriangleInfoData_m_edgeV1V2Angle_get (long jarg1, btTriangleInfoData jarg1_);
+
+       public final static native void btTriangleInfoData_m_edgeV2V0Angle_set (long jarg1, btTriangleInfoData jarg1_, float jarg2);
+
+       public final static native float btTriangleInfoData_m_edgeV2V0Angle_get (long jarg1, btTriangleInfoData jarg1_);
+
+       public final static native long new_btTriangleInfoData ();
+
+       public final static native void delete_btTriangleInfoData (long jarg1);
+
+       public final static native void btTriangleInfoMapData_m_hashTablePtr_set (long jarg1, btTriangleInfoMapData jarg1_, long jarg2);
+
+       public final static native long btTriangleInfoMapData_m_hashTablePtr_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_nextPtr_set (long jarg1, btTriangleInfoMapData jarg1_, long jarg2);
+
+       public final static native long btTriangleInfoMapData_m_nextPtr_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_valueArrayPtr_set (long jarg1, btTriangleInfoMapData jarg1_,
+               long jarg2, btTriangleInfoData jarg2_);
+
+       public final static native long btTriangleInfoMapData_m_valueArrayPtr_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_keyArrayPtr_set (long jarg1, btTriangleInfoMapData jarg1_, long jarg2);
+
+       public final static native long btTriangleInfoMapData_m_keyArrayPtr_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_convexEpsilon_set (long jarg1, btTriangleInfoMapData jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleInfoMapData_m_convexEpsilon_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_planarEpsilon_set (long jarg1, btTriangleInfoMapData jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleInfoMapData_m_planarEpsilon_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_equalVertexThreshold_set (long jarg1, btTriangleInfoMapData jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleInfoMapData_m_equalVertexThreshold_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_edgeDistanceThreshold_set (long jarg1, btTriangleInfoMapData jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleInfoMapData_m_edgeDistanceThreshold_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_zeroAreaThreshold_set (long jarg1, btTriangleInfoMapData jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleInfoMapData_m_zeroAreaThreshold_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_nextSize_set (long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
+
+       public final static native int btTriangleInfoMapData_m_nextSize_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_hashTableSize_set (long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
+
+       public final static native int btTriangleInfoMapData_m_hashTableSize_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_numValues_set (long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
+
+       public final static native int btTriangleInfoMapData_m_numValues_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_numKeys_set (long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
+
+       public final static native int btTriangleInfoMapData_m_numKeys_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native void btTriangleInfoMapData_m_padding_set (long jarg1, btTriangleInfoMapData jarg1_, String jarg2);
+
+       public final static native String btTriangleInfoMapData_m_padding_get (long jarg1, btTriangleInfoMapData jarg1_);
+
+       public final static native long new_btTriangleInfoMapData ();
+
+       public final static native void delete_btTriangleInfoMapData (long jarg1);
+
+       public final static native long new_btStaticPlaneShape (Vector3 jarg1, float jarg2);
+
+       public final static native void delete_btStaticPlaneShape (long jarg1);
+
+       public final static native Vector3 btStaticPlaneShape_getPlaneNormal (long jarg1, btStaticPlaneShape jarg1_);
+
+       public final static native float btStaticPlaneShape_getPlaneConstant (long jarg1, btStaticPlaneShape jarg1_);
+
+       public final static native void btStaticPlaneShapeData_m_collisionShapeData_set (long jarg1, btStaticPlaneShapeData jarg1_,
+               long jarg2, btCollisionShapeData jarg2_);
+
+       public final static native long btStaticPlaneShapeData_m_collisionShapeData_get (long jarg1, btStaticPlaneShapeData jarg1_);
+
+       public final static native void btStaticPlaneShapeData_m_localScaling_set (long jarg1, btStaticPlaneShapeData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btStaticPlaneShapeData_m_localScaling_get (long jarg1, btStaticPlaneShapeData jarg1_);
+
+       public final static native void btStaticPlaneShapeData_m_planeNormal_set (long jarg1, btStaticPlaneShapeData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btStaticPlaneShapeData_m_planeNormal_get (long jarg1, btStaticPlaneShapeData jarg1_);
+
+       public final static native void btStaticPlaneShapeData_m_planeConstant_set (long jarg1, btStaticPlaneShapeData jarg1_,
+               float jarg2);
+
+       public final static native float btStaticPlaneShapeData_m_planeConstant_get (long jarg1, btStaticPlaneShapeData jarg1_);
+
+       public final static native void btStaticPlaneShapeData_m_pad_set (long jarg1, btStaticPlaneShapeData jarg1_, String jarg2);
+
+       public final static native String btStaticPlaneShapeData_m_pad_get (long jarg1, btStaticPlaneShapeData jarg1_);
+
+       public final static native long new_btStaticPlaneShapeData ();
+
+       public final static native void delete_btStaticPlaneShapeData (long jarg1);
+
+       public final static native long new_btHeightfieldTerrainShape__SWIG_0 (int jarg1, int jarg2, long jarg3, float jarg4,
+               float jarg5, float jarg6, int jarg7, int jarg8, boolean jarg9);
+
+       public final static native long new_btHeightfieldTerrainShape__SWIG_1 (int jarg1, int jarg2, long jarg3, float jarg4,
+               int jarg5, boolean jarg6, boolean jarg7);
+
+       public final static native void delete_btHeightfieldTerrainShape (long jarg1);
+
+       public final static native void btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_0 (long jarg1,
+               btHeightfieldTerrainShape jarg1_, boolean jarg2);
+
+       public final static native void btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_1 (long jarg1,
+               btHeightfieldTerrainShape jarg1_);
+
+       public final static native void delete_btTriangleMeshShape (long jarg1);
+
+       public final static native Vector3 btTriangleMeshShape_localGetSupportingVertex (long jarg1, btTriangleMeshShape jarg1_,
+               Vector3 jarg2);
+
+       public final static native Vector3 btTriangleMeshShape_localGetSupportingVertexWithoutMargin (long jarg1,
+               btTriangleMeshShape jarg1_, Vector3 jarg2);
+
+       public final static native void btTriangleMeshShape_recalcLocalAabb (long jarg1, btTriangleMeshShape jarg1_);
+
+       public final static native long btTriangleMeshShape_getMeshInterface__SWIG_0 (long jarg1, btTriangleMeshShape jarg1_);
+
+       public final static native Vector3 btTriangleMeshShape_getLocalAabbMin (long jarg1, btTriangleMeshShape jarg1_);
+
+       public final static native Vector3 btTriangleMeshShape_getLocalAabbMax (long jarg1, btTriangleMeshShape jarg1_);
+
+       public final static native long new_btBvhTriangleMeshShape__SWIG_0 (long jarg1, btStridingMeshInterface jarg1_, boolean jarg2,
+               boolean jarg3);
+
+       public final static native long new_btBvhTriangleMeshShape__SWIG_1 (long jarg1, btStridingMeshInterface jarg1_, boolean jarg2);
+
+       public final static native long new_btBvhTriangleMeshShape__SWIG_2 (long jarg1, btStridingMeshInterface jarg1_, boolean jarg2,
+               Vector3 jarg3, Vector3 jarg4, boolean jarg5);
+
+       public final static native long new_btBvhTriangleMeshShape__SWIG_3 (long jarg1, btStridingMeshInterface jarg1_, boolean jarg2,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void delete_btBvhTriangleMeshShape (long jarg1);
+
+       public final static native boolean btBvhTriangleMeshShape_getOwnsBvh (long jarg1, btBvhTriangleMeshShape jarg1_);
+
+       public final static native void btBvhTriangleMeshShape_performRaycast (long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2,
+               btTriangleCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btBvhTriangleMeshShape_performConvexcast (long jarg1, btBvhTriangleMeshShape jarg1_,
+               long jarg2, btTriangleCallback jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btBvhTriangleMeshShape_refitTree (long jarg1, btBvhTriangleMeshShape jarg1_, Vector3 jarg2,
+               Vector3 jarg3);
+
+       public final static native void btBvhTriangleMeshShape_partialRefitTree (long jarg1, btBvhTriangleMeshShape jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native long btBvhTriangleMeshShape_getOptimizedBvh (long jarg1, btBvhTriangleMeshShape jarg1_);
+
+       public final static native void btBvhTriangleMeshShape_setOptimizedBvh__SWIG_0 (long jarg1, btBvhTriangleMeshShape jarg1_,
+               long jarg2, btOptimizedBvh jarg2_, Vector3 jarg3);
+
+       public final static native void btBvhTriangleMeshShape_setOptimizedBvh__SWIG_1 (long jarg1, btBvhTriangleMeshShape jarg1_,
+               long jarg2, btOptimizedBvh jarg2_);
+
+       public final static native void btBvhTriangleMeshShape_buildOptimizedBvh (long jarg1, btBvhTriangleMeshShape jarg1_);
+
+       public final static native boolean btBvhTriangleMeshShape_usesQuantizedAabbCompression (long jarg1,
+               btBvhTriangleMeshShape jarg1_);
+
+       public final static native void btBvhTriangleMeshShape_setTriangleInfoMap (long jarg1, btBvhTriangleMeshShape jarg1_,
+               long jarg2, btTriangleInfoMap jarg2_);
+
+       public final static native long btBvhTriangleMeshShape_getTriangleInfoMap__SWIG_0 (long jarg1, btBvhTriangleMeshShape jarg1_);
+
+       public final static native void btBvhTriangleMeshShape_serializeSingleBvh (long jarg1, btBvhTriangleMeshShape jarg1_,
+               long jarg2);
+
+       public final static native void btBvhTriangleMeshShape_serializeSingleTriangleInfoMap (long jarg1,
+               btBvhTriangleMeshShape jarg1_, long jarg2);
+
+       public final static native void btTriangleMeshShapeData_m_collisionShapeData_set (long jarg1, btTriangleMeshShapeData jarg1_,
+               long jarg2, btCollisionShapeData jarg2_);
+
+       public final static native long btTriangleMeshShapeData_m_collisionShapeData_get (long jarg1, btTriangleMeshShapeData jarg1_);
+
+       public final static native void btTriangleMeshShapeData_m_meshInterface_set (long jarg1, btTriangleMeshShapeData jarg1_,
+               long jarg2, btStridingMeshInterfaceData jarg2_);
+
+       public final static native long btTriangleMeshShapeData_m_meshInterface_get (long jarg1, btTriangleMeshShapeData jarg1_);
+
+       public final static native void btTriangleMeshShapeData_m_quantizedFloatBvh_set (long jarg1, btTriangleMeshShapeData jarg1_,
+               long jarg2, btQuantizedBvhFloatData jarg2_);
+
+       public final static native long btTriangleMeshShapeData_m_quantizedFloatBvh_get (long jarg1, btTriangleMeshShapeData jarg1_);
+
+       public final static native void btTriangleMeshShapeData_m_quantizedDoubleBvh_set (long jarg1, btTriangleMeshShapeData jarg1_,
+               long jarg2, btQuantizedBvhDoubleData jarg2_);
+
+       public final static native long btTriangleMeshShapeData_m_quantizedDoubleBvh_get (long jarg1, btTriangleMeshShapeData jarg1_);
+
+       public final static native void btTriangleMeshShapeData_m_triangleInfoMap_set (long jarg1, btTriangleMeshShapeData jarg1_,
+               long jarg2, btTriangleInfoMapData jarg2_);
+
+       public final static native long btTriangleMeshShapeData_m_triangleInfoMap_get (long jarg1, btTriangleMeshShapeData jarg1_);
+
+       public final static native void btTriangleMeshShapeData_m_collisionMargin_set (long jarg1, btTriangleMeshShapeData jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleMeshShapeData_m_collisionMargin_get (long jarg1, btTriangleMeshShapeData jarg1_);
+
+       public final static native void btTriangleMeshShapeData_m_pad3_set (long jarg1, btTriangleMeshShapeData jarg1_, String jarg2);
+
+       public final static native String btTriangleMeshShapeData_m_pad3_get (long jarg1, btTriangleMeshShapeData jarg1_);
+
+       public final static native long new_btTriangleMeshShapeData ();
+
+       public final static native void delete_btTriangleMeshShapeData (long jarg1);
+
+       public final static native Vector3 btBoxShape_getHalfExtentsWithMargin (long jarg1, btBoxShape jarg1_);
+
+       public final static native Vector3 btBoxShape_getHalfExtentsWithoutMargin (long jarg1, btBoxShape jarg1_);
+
+       public final static native long new_btBoxShape (Vector3 jarg1);
+
+       public final static native void btBoxShape_getPlaneEquation (long jarg1, btBoxShape jarg1_, long jarg2, btVector4 jarg2_,
+               int jarg3);
+
+       public final static native void delete_btBoxShape (long jarg1);
+
+       public final static native long new_btCapsuleShape__SWIG_1 (float jarg1, float jarg2);
+
+       public final static native int btCapsuleShape_getUpAxis (long jarg1, btCapsuleShape jarg1_);
+
+       public final static native float btCapsuleShape_getRadius (long jarg1, btCapsuleShape jarg1_);
+
+       public final static native float btCapsuleShape_getHalfHeight (long jarg1, btCapsuleShape jarg1_);
+
+       public final static native void delete_btCapsuleShape (long jarg1);
+
+       public final static native long new_btCapsuleShapeX (float jarg1, float jarg2);
+
+       public final static native void delete_btCapsuleShapeX (long jarg1);
+
+       public final static native long new_btCapsuleShapeZ (float jarg1, float jarg2);
+
+       public final static native void delete_btCapsuleShapeZ (long jarg1);
+
+       public final static native void btCapsuleShapeData_m_convexInternalShapeData_set (long jarg1, btCapsuleShapeData jarg1_,
+               long jarg2, btConvexInternalShapeData jarg2_);
+
+       public final static native long btCapsuleShapeData_m_convexInternalShapeData_get (long jarg1, btCapsuleShapeData jarg1_);
+
+       public final static native void btCapsuleShapeData_m_upAxis_set (long jarg1, btCapsuleShapeData jarg1_, int jarg2);
+
+       public final static native int btCapsuleShapeData_m_upAxis_get (long jarg1, btCapsuleShapeData jarg1_);
+
+       public final static native void btCapsuleShapeData_m_padding_set (long jarg1, btCapsuleShapeData jarg1_, String jarg2);
+
+       public final static native String btCapsuleShapeData_m_padding_get (long jarg1, btCapsuleShapeData jarg1_);
+
+       public final static native long new_btCapsuleShapeData ();
+
+       public final static native void delete_btCapsuleShapeData (long jarg1);
+
+       public final static native Vector3 btBox2dShape_getHalfExtentsWithMargin (long jarg1, btBox2dShape jarg1_);
+
+       public final static native Vector3 btBox2dShape_getHalfExtentsWithoutMargin (long jarg1, btBox2dShape jarg1_);
+
+       public final static native long new_btBox2dShape (Vector3 jarg1);
+
+       public final static native int btBox2dShape_getVertexCount (long jarg1, btBox2dShape jarg1_);
+
+       public final static native long btBox2dShape_getVertices (long jarg1, btBox2dShape jarg1_);
+
+       public final static native long btBox2dShape_getNormals (long jarg1, btBox2dShape jarg1_);
+
+       public final static native Vector3 btBox2dShape_getCentroid (long jarg1, btBox2dShape jarg1_);
+
+       public final static native void btBox2dShape_getPlaneEquation (long jarg1, btBox2dShape jarg1_, long jarg2, btVector4 jarg2_,
+               int jarg3);
+
+       public final static native void delete_btBox2dShape (long jarg1);
+
+       public final static native void btTriangleShape_m_vertices1_set (long jarg1, btTriangleShape jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btTriangleShape_m_vertices1_get (long jarg1, btTriangleShape jarg1_);
+
+       public final static native Vector3 btTriangleShape_getVertexPtr__SWIG_0 (long jarg1, btTriangleShape jarg1_, int jarg2);
+
+       public final static native long new_btTriangleShape__SWIG_0 ();
+
+       public final static native long new_btTriangleShape__SWIG_1 (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btTriangleShape_calcNormal (long jarg1, btTriangleShape jarg1_, Vector3 jarg2);
+
+       public final static native void btTriangleShape_getPlaneEquation (long jarg1, btTriangleShape jarg1_, int jarg2,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void delete_btTriangleShape (long jarg1);
+
+       public final static native long new_btShapeHull (long jarg1, btConvexShape jarg1_);
+
+       public final static native void delete_btShapeHull (long jarg1);
+
+       public final static native boolean btShapeHull_buildHull (long jarg1, btShapeHull jarg1_, float jarg2);
+
+       public final static native int btShapeHull_numTriangles (long jarg1, btShapeHull jarg1_);
+
+       public final static native int btShapeHull_numVertices (long jarg1, btShapeHull jarg1_);
+
+       public final static native int btShapeHull_numIndices (long jarg1, btShapeHull jarg1_);
+
+       public final static native long btShapeHull_getVertexPointer (long jarg1, btShapeHull jarg1_);
+
+       public final static native long btShapeHull_getIndexPointer (long jarg1, btShapeHull jarg1_);
+
+       public final static native long new_btSphereShape (float jarg1);
+
+       public final static native float btSphereShape_getRadius (long jarg1, btSphereShape jarg1_);
+
+       public final static native void btSphereShape_setUnscaledRadius (long jarg1, btSphereShape jarg1_, float jarg2);
+
+       public final static native void delete_btSphereShape (long jarg1);
+
+       public final static native long new_btMultiSphereShape (long jarg1, btVector3 jarg1_, float[] jarg2, int jarg3);
+
+       public final static native int btMultiSphereShape_getSphereCount (long jarg1, btMultiSphereShape jarg1_);
+
+       public final static native Vector3 btMultiSphereShape_getSpherePosition (long jarg1, btMultiSphereShape jarg1_, int jarg2);
+
+       public final static native float btMultiSphereShape_getSphereRadius (long jarg1, btMultiSphereShape jarg1_, int jarg2);
+
+       public final static native void delete_btMultiSphereShape (long jarg1);
+
+       public final static native void btPositionAndRadius_m_pos_set (long jarg1, btPositionAndRadius jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btPositionAndRadius_m_pos_get (long jarg1, btPositionAndRadius jarg1_);
+
+       public final static native void btPositionAndRadius_m_radius_set (long jarg1, btPositionAndRadius jarg1_, float jarg2);
+
+       public final static native float btPositionAndRadius_m_radius_get (long jarg1, btPositionAndRadius jarg1_);
+
+       public final static native long new_btPositionAndRadius ();
+
+       public final static native void delete_btPositionAndRadius (long jarg1);
+
+       public final static native void btMultiSphereShapeData_m_convexInternalShapeData_set (long jarg1,
+               btMultiSphereShapeData jarg1_, long jarg2, btConvexInternalShapeData jarg2_);
+
+       public final static native long btMultiSphereShapeData_m_convexInternalShapeData_get (long jarg1, btMultiSphereShapeData jarg1_);
+
+       public final static native void btMultiSphereShapeData_m_localPositionArrayPtr_set (long jarg1, btMultiSphereShapeData jarg1_,
+               long jarg2, btPositionAndRadius jarg2_);
+
+       public final static native long btMultiSphereShapeData_m_localPositionArrayPtr_get (long jarg1, btMultiSphereShapeData jarg1_);
+
+       public final static native void btMultiSphereShapeData_m_localPositionArraySize_set (long jarg1,
+               btMultiSphereShapeData jarg1_, int jarg2);
+
+       public final static native int btMultiSphereShapeData_m_localPositionArraySize_get (long jarg1, btMultiSphereShapeData jarg1_);
+
+       public final static native void btMultiSphereShapeData_m_padding_set (long jarg1, btMultiSphereShapeData jarg1_, String jarg2);
+
+       public final static native String btMultiSphereShapeData_m_padding_get (long jarg1, btMultiSphereShapeData jarg1_);
+
+       public final static native long new_btMultiSphereShapeData ();
+
+       public final static native void delete_btMultiSphereShapeData (long jarg1);
+
+       public final static native void delete_btStridingMeshInterface (long jarg1);
+
+       public final static native void btStridingMeshInterface_InternalProcessAllTriangles (long jarg1,
+               btStridingMeshInterface jarg1_, long jarg2, btInternalTriangleIndexCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btStridingMeshInterface_calculateAabbBruteForce (long jarg1, btStridingMeshInterface jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btStridingMeshInterface_getLockedVertexIndexBase__SWIG_0 (long jarg1,
+               btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9, int jarg10);
+
+       public final static native void btStridingMeshInterface_getLockedVertexIndexBase__SWIG_1 (long jarg1,
+               btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9);
+
+       public final static native void btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_0 (long jarg1,
+               btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9, int jarg10);
+
+       public final static native void btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_1 (long jarg1,
+               btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9);
+
+       public final static native void btStridingMeshInterface_unLockVertexBase (long jarg1, btStridingMeshInterface jarg1_, int jarg2);
+
+       public final static native void btStridingMeshInterface_unLockReadOnlyVertexBase (long jarg1, btStridingMeshInterface jarg1_,
+               int jarg2);
+
+       public final static native int btStridingMeshInterface_getNumSubParts (long jarg1, btStridingMeshInterface jarg1_);
+
+       public final static native void btStridingMeshInterface_preallocateVertices (long jarg1, btStridingMeshInterface jarg1_,
+               int jarg2);
+
+       public final static native void btStridingMeshInterface_preallocateIndices (long jarg1, btStridingMeshInterface jarg1_,
+               int jarg2);
+
+       public final static native boolean btStridingMeshInterface_hasPremadeAabb (long jarg1, btStridingMeshInterface jarg1_);
+
+       public final static native void btStridingMeshInterface_setPremadeAabb (long jarg1, btStridingMeshInterface jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btStridingMeshInterface_getPremadeAabb (long jarg1, btStridingMeshInterface jarg1_,
+               long jarg2, btVector3 jarg2_, long jarg3, btVector3 jarg3_);
+
+       public final static native Vector3 btStridingMeshInterface_getScaling (long jarg1, btStridingMeshInterface jarg1_);
+
+       public final static native void btStridingMeshInterface_setScaling (long jarg1, btStridingMeshInterface jarg1_, Vector3 jarg2);
+
+       public final static native int btStridingMeshInterface_calculateSerializeBufferSize (long jarg1, btStridingMeshInterface jarg1_);
+
+       public final static native String btStridingMeshInterface_serialize (long jarg1, btStridingMeshInterface jarg1_, long jarg2,
+               long jarg3);
+
+       public final static native void btIntIndexData_m_value_set (long jarg1, btIntIndexData jarg1_, int jarg2);
+
+       public final static native int btIntIndexData_m_value_get (long jarg1, btIntIndexData jarg1_);
+
+       public final static native long new_btIntIndexData ();
+
+       public final static native void delete_btIntIndexData (long jarg1);
+
+       public final static native void btShortIntIndexData_m_value_set (long jarg1, btShortIntIndexData jarg1_, short jarg2);
+
+       public final static native short btShortIntIndexData_m_value_get (long jarg1, btShortIntIndexData jarg1_);
+
+       public final static native void btShortIntIndexData_m_pad_set (long jarg1, btShortIntIndexData jarg1_, String jarg2);
+
+       public final static native String btShortIntIndexData_m_pad_get (long jarg1, btShortIntIndexData jarg1_);
+
+       public final static native long new_btShortIntIndexData ();
+
+       public final static native void delete_btShortIntIndexData (long jarg1);
+
+       public final static native void btShortIntIndexTripletData_m_values_set (long jarg1, btShortIntIndexTripletData jarg1_,
+               short[] jarg2);
+
+       public final static native short[] btShortIntIndexTripletData_m_values_get (long jarg1, btShortIntIndexTripletData jarg1_);
+
+       public final static native void btShortIntIndexTripletData_m_pad_set (long jarg1, btShortIntIndexTripletData jarg1_,
+               String jarg2);
+
+       public final static native String btShortIntIndexTripletData_m_pad_get (long jarg1, btShortIntIndexTripletData jarg1_);
+
+       public final static native long new_btShortIntIndexTripletData ();
+
+       public final static native void delete_btShortIntIndexTripletData (long jarg1);
+
+       public final static native void btCharIndexTripletData_m_values_set (long jarg1, btCharIndexTripletData jarg1_, short[] jarg2);
+
+       public final static native short[] btCharIndexTripletData_m_values_get (long jarg1, btCharIndexTripletData jarg1_);
+
+       public final static native void btCharIndexTripletData_m_pad_set (long jarg1, btCharIndexTripletData jarg1_, char jarg2);
+
+       public final static native char btCharIndexTripletData_m_pad_get (long jarg1, btCharIndexTripletData jarg1_);
+
+       public final static native long new_btCharIndexTripletData ();
+
+       public final static native void delete_btCharIndexTripletData (long jarg1);
+
+       public final static native void btMeshPartData_m_vertices3f_set (long jarg1, btMeshPartData jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btMeshPartData_m_vertices3f_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native void btMeshPartData_m_vertices3d_set (long jarg1, btMeshPartData jarg1_, long jarg2,
+               btVector3DoubleData jarg2_);
+
+       public final static native long btMeshPartData_m_vertices3d_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native void btMeshPartData_m_indices32_set (long jarg1, btMeshPartData jarg1_, long jarg2,
+               btIntIndexData jarg2_);
+
+       public final static native long btMeshPartData_m_indices32_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native void btMeshPartData_m_3indices16_set (long jarg1, btMeshPartData jarg1_, long jarg2,
+               btShortIntIndexTripletData jarg2_);
+
+       public final static native long btMeshPartData_m_3indices16_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native void btMeshPartData_m_3indices8_set (long jarg1, btMeshPartData jarg1_, long jarg2,
+               btCharIndexTripletData jarg2_);
+
+       public final static native long btMeshPartData_m_3indices8_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native void btMeshPartData_m_indices16_set (long jarg1, btMeshPartData jarg1_, long jarg2,
+               btShortIntIndexData jarg2_);
+
+       public final static native long btMeshPartData_m_indices16_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native void btMeshPartData_m_numTriangles_set (long jarg1, btMeshPartData jarg1_, int jarg2);
+
+       public final static native int btMeshPartData_m_numTriangles_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native void btMeshPartData_m_numVertices_set (long jarg1, btMeshPartData jarg1_, int jarg2);
+
+       public final static native int btMeshPartData_m_numVertices_get (long jarg1, btMeshPartData jarg1_);
+
+       public final static native long new_btMeshPartData ();
+
+       public final static native void delete_btMeshPartData (long jarg1);
+
+       public final static native void btStridingMeshInterfaceData_m_meshPartsPtr_set (long jarg1,
+               btStridingMeshInterfaceData jarg1_, long jarg2, btMeshPartData jarg2_);
+
+       public final static native long btStridingMeshInterfaceData_m_meshPartsPtr_get (long jarg1, btStridingMeshInterfaceData jarg1_);
+
+       public final static native void btStridingMeshInterfaceData_m_scaling_set (long jarg1, btStridingMeshInterfaceData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btStridingMeshInterfaceData_m_scaling_get (long jarg1, btStridingMeshInterfaceData jarg1_);
+
+       public final static native void btStridingMeshInterfaceData_m_numMeshParts_set (long jarg1,
+               btStridingMeshInterfaceData jarg1_, int jarg2);
+
+       public final static native int btStridingMeshInterfaceData_m_numMeshParts_get (long jarg1, btStridingMeshInterfaceData jarg1_);
+
+       public final static native void btStridingMeshInterfaceData_m_padding_set (long jarg1, btStridingMeshInterfaceData jarg1_,
+               String jarg2);
+
+       public final static native String btStridingMeshInterfaceData_m_padding_get (long jarg1, btStridingMeshInterfaceData jarg1_);
+
+       public final static native long new_btStridingMeshInterfaceData ();
+
+       public final static native void delete_btStridingMeshInterfaceData (long jarg1);
+
+       public final static native long new_btMinkowskiSumShape (long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_);
+
+       public final static native void btMinkowskiSumShape_setTransformA (long jarg1, btMinkowskiSumShape jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native void btMinkowskiSumShape_setTransformB (long jarg1, btMinkowskiSumShape jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native long btMinkowskiSumShape_getTransformA (long jarg1, btMinkowskiSumShape jarg1_);
+
+       public final static native long btMinkowskiSumShape_GetTransformB (long jarg1, btMinkowskiSumShape jarg1_);
+
+       public final static native long btMinkowskiSumShape_getShapeA (long jarg1, btMinkowskiSumShape jarg1_);
+
+       public final static native long btMinkowskiSumShape_getShapeB (long jarg1, btMinkowskiSumShape jarg1_);
+
+       public final static native void delete_btMinkowskiSumShape (long jarg1);
+
+       public final static native void btFace_m_indices_set (long jarg1, btFace jarg1_, long jarg2);
+
+       public final static native long btFace_m_indices_get (long jarg1, btFace jarg1_);
+
+       public final static native void btFace_m_plane_set (long jarg1, btFace jarg1_, float[] jarg2);
+
+       public final static native float[] btFace_m_plane_get (long jarg1, btFace jarg1_);
+
+       public final static native long new_btFace ();
+
+       public final static native void delete_btFace (long jarg1);
+
+       public final static native long new_btConvexPolyhedron ();
+
+       public final static native void delete_btConvexPolyhedron (long jarg1);
+
+       public final static native void btConvexPolyhedron_m_vertices_set (long jarg1, btConvexPolyhedron jarg1_, long jarg2);
+
+       public final static native long btConvexPolyhedron_m_vertices_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_m_faces_set (long jarg1, btConvexPolyhedron jarg1_, long jarg2);
+
+       public final static native long btConvexPolyhedron_m_faces_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_m_uniqueEdges_set (long jarg1, btConvexPolyhedron jarg1_, long jarg2);
+
+       public final static native long btConvexPolyhedron_m_uniqueEdges_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_m_localCenter_set (long jarg1, btConvexPolyhedron jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btConvexPolyhedron_m_localCenter_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_m_extents_set (long jarg1, btConvexPolyhedron jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btConvexPolyhedron_m_extents_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_m_radius_set (long jarg1, btConvexPolyhedron jarg1_, float jarg2);
+
+       public final static native float btConvexPolyhedron_m_radius_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_mC_set (long jarg1, btConvexPolyhedron jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btConvexPolyhedron_mC_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_mE_set (long jarg1, btConvexPolyhedron jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btConvexPolyhedron_mE_get (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_initialize (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native boolean btConvexPolyhedron_testContainment (long jarg1, btConvexPolyhedron jarg1_);
+
+       public final static native void btConvexPolyhedron_project (long jarg1, btConvexPolyhedron jarg1_, long jarg2,
+               btTransform jarg2_, Vector3 jarg3, long jarg4, long jarg5);
+
+       public final static native long new_btOptimizedBvh ();
+
+       public final static native void delete_btOptimizedBvh (long jarg1);
+
+       public final static native void btOptimizedBvh_build (long jarg1, btOptimizedBvh jarg1_, long jarg2,
+               btStridingMeshInterface jarg2_, boolean jarg3, Vector3 jarg4, Vector3 jarg5);
+
+       public final static native void btOptimizedBvh_refit (long jarg1, btOptimizedBvh jarg1_, long jarg2,
+               btStridingMeshInterface jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btOptimizedBvh_refitPartial (long jarg1, btOptimizedBvh jarg1_, long jarg2,
+               btStridingMeshInterface jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btOptimizedBvh_updateBvhNodes (long jarg1, btOptimizedBvh jarg1_, long jarg2,
+               btStridingMeshInterface jarg2_, int jarg3, int jarg4, int jarg5);
+
+       public final static native boolean btOptimizedBvh_serializeInPlace (long jarg1, btOptimizedBvh jarg1_, long jarg2, long jarg3,
+               boolean jarg4);
+
+       public final static native long btOptimizedBvh_deSerializeInPlace (long jarg1, long jarg2, boolean jarg3);
+
+       public final static native void btTriangle_m_vertex0_set (long jarg1, btTriangle jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btTriangle_m_vertex0_get (long jarg1, btTriangle jarg1_);
+
+       public final static native void btTriangle_m_vertex1_set (long jarg1, btTriangle jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btTriangle_m_vertex1_get (long jarg1, btTriangle jarg1_);
+
+       public final static native void btTriangle_m_vertex2_set (long jarg1, btTriangle jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btTriangle_m_vertex2_get (long jarg1, btTriangle jarg1_);
+
+       public final static native void btTriangle_m_partId_set (long jarg1, btTriangle jarg1_, int jarg2);
+
+       public final static native int btTriangle_m_partId_get (long jarg1, btTriangle jarg1_);
+
+       public final static native void btTriangle_m_triangleIndex_set (long jarg1, btTriangle jarg1_, int jarg2);
+
+       public final static native int btTriangle_m_triangleIndex_get (long jarg1, btTriangle jarg1_);
+
+       public final static native long new_btTriangle ();
+
+       public final static native void delete_btTriangle (long jarg1);
+
+       public final static native int btTriangleBuffer_getNumTriangles (long jarg1, btTriangleBuffer jarg1_);
+
+       public final static native long btTriangleBuffer_getTriangle (long jarg1, btTriangleBuffer jarg1_, int jarg2);
+
+       public final static native void btTriangleBuffer_clearBuffer (long jarg1, btTriangleBuffer jarg1_);
+
+       public final static native long new_btTriangleBuffer ();
+
+       public final static native void delete_btTriangleBuffer (long jarg1);
+
+       public final static native void btIndexedMesh_m_numTriangles_set (long jarg1, btIndexedMesh jarg1_, int jarg2);
+
+       public final static native int btIndexedMesh_m_numTriangles_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native void btIndexedMesh_m_triangleIndexBase_set (long jarg1, btIndexedMesh jarg1_, long jarg2);
+
+       public final static native long btIndexedMesh_m_triangleIndexBase_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native void btIndexedMesh_m_triangleIndexStride_set (long jarg1, btIndexedMesh jarg1_, int jarg2);
+
+       public final static native int btIndexedMesh_m_triangleIndexStride_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native void btIndexedMesh_m_numVertices_set (long jarg1, btIndexedMesh jarg1_, int jarg2);
+
+       public final static native int btIndexedMesh_m_numVertices_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native void btIndexedMesh_m_vertexBase_set (long jarg1, btIndexedMesh jarg1_, long jarg2);
+
+       public final static native long btIndexedMesh_m_vertexBase_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native void btIndexedMesh_m_vertexStride_set (long jarg1, btIndexedMesh jarg1_, int jarg2);
+
+       public final static native int btIndexedMesh_m_vertexStride_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native void btIndexedMesh_m_indexType_set (long jarg1, btIndexedMesh jarg1_, int jarg2);
+
+       public final static native int btIndexedMesh_m_indexType_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native void btIndexedMesh_m_vertexType_set (long jarg1, btIndexedMesh jarg1_, int jarg2);
+
+       public final static native int btIndexedMesh_m_vertexType_get (long jarg1, btIndexedMesh jarg1_);
+
+       public final static native long new_btIndexedMesh ();
+
+       public final static native void delete_btIndexedMesh (long jarg1);
+
+       public final static native long new_btTriangleIndexVertexArray__SWIG_0 ();
+
+       public final static native void delete_btTriangleIndexVertexArray (long jarg1);
+
+       public final static native long new_btTriangleIndexVertexArray__SWIG_1 (int jarg1, long jarg2, int jarg3, int jarg4,
+               float[] jarg5, int jarg6);
+
+       public final static native void btTriangleIndexVertexArray_addIndexedMesh__SWIG_0 (long jarg1,
+               btTriangleIndexVertexArray jarg1_, long jarg2, btIndexedMesh jarg2_, int jarg3);
+
+       public final static native void btTriangleIndexVertexArray_addIndexedMesh__SWIG_1 (long jarg1,
+               btTriangleIndexVertexArray jarg1_, long jarg2, btIndexedMesh jarg2_);
+
+       public final static native void btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_0 (long jarg1,
+               btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9, int jarg10);
+
+       public final static native void btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_1 (long jarg1,
+               btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9);
+
+       public final static native void btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_0 (long jarg1,
+               btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9, int jarg10);
+
+       public final static native void btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_1 (long jarg1,
+               btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8,
+               long jarg9);
+
+       public final static native long btTriangleIndexVertexArray_getIndexedMeshArray__SWIG_0 (long jarg1,
+               btTriangleIndexVertexArray jarg1_);
+
+       public final static native void btMaterial_m_friction_set (long jarg1, btMaterial jarg1_, float jarg2);
+
+       public final static native float btMaterial_m_friction_get (long jarg1, btMaterial jarg1_);
+
+       public final static native void btMaterial_m_restitution_set (long jarg1, btMaterial jarg1_, float jarg2);
+
+       public final static native float btMaterial_m_restitution_get (long jarg1, btMaterial jarg1_);
+
+       public final static native void btMaterial_pad_set (long jarg1, btMaterial jarg1_, int[] jarg2);
+
+       public final static native int[] btMaterial_pad_get (long jarg1, btMaterial jarg1_);
+
+       public final static native long new_btMaterial__SWIG_0 ();
+
+       public final static native long new_btMaterial__SWIG_1 (float jarg1, float jarg2);
+
+       public final static native void delete_btMaterial (long jarg1);
+
+       public final static native long new_btScaledBvhTriangleMeshShape (long jarg1, btBvhTriangleMeshShape jarg1_, Vector3 jarg2);
+
+       public final static native void delete_btScaledBvhTriangleMeshShape (long jarg1);
+
+       public final static native long btScaledBvhTriangleMeshShape_getChildShape__SWIG_0 (long jarg1,
+               btScaledBvhTriangleMeshShape jarg1_);
+
+       public final static native void btScaledTriangleMeshShapeData_m_trimeshShapeData_set (long jarg1,
+               btScaledTriangleMeshShapeData jarg1_, long jarg2, btTriangleMeshShapeData jarg2_);
+
+       public final static native long btScaledTriangleMeshShapeData_m_trimeshShapeData_get (long jarg1,
+               btScaledTriangleMeshShapeData jarg1_);
+
+       public final static native void btScaledTriangleMeshShapeData_m_localScaling_set (long jarg1,
+               btScaledTriangleMeshShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btScaledTriangleMeshShapeData_m_localScaling_get (long jarg1,
+               btScaledTriangleMeshShapeData jarg1_);
+
+       public final static native long new_btScaledTriangleMeshShapeData ();
+
+       public final static native void delete_btScaledTriangleMeshShapeData (long jarg1);
+
+       public final static native long new_btConvexHullShape__SWIG_0 (float[] jarg1, int jarg2, int jarg3);
+
+       public final static native long new_btConvexHullShape__SWIG_1 (float[] jarg1, int jarg2);
+
+       public final static native long new_btConvexHullShape__SWIG_2 (float[] jarg1);
+
+       public final static native long new_btConvexHullShape__SWIG_3 ();
+
+       public final static native void btConvexHullShape_addPoint (long jarg1, btConvexHullShape jarg1_, Vector3 jarg2);
+
+       public final static native long btConvexHullShape_getUnscaledPoints__SWIG_0 (long jarg1, btConvexHullShape jarg1_);
+
+       public final static native long btConvexHullShape_getPoints (long jarg1, btConvexHullShape jarg1_);
+
+       public final static native Vector3 btConvexHullShape_getScaledPoint (long jarg1, btConvexHullShape jarg1_, int jarg2);
+
+       public final static native int btConvexHullShape_getNumPoints (long jarg1, btConvexHullShape jarg1_);
+
+       public final static native void delete_btConvexHullShape (long jarg1);
+
+       public final static native void btConvexHullShapeData_m_convexInternalShapeData_set (long jarg1, btConvexHullShapeData jarg1_,
+               long jarg2, btConvexInternalShapeData jarg2_);
+
+       public final static native long btConvexHullShapeData_m_convexInternalShapeData_get (long jarg1, btConvexHullShapeData jarg1_);
+
+       public final static native void btConvexHullShapeData_m_unscaledPointsFloatPtr_set (long jarg1, btConvexHullShapeData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btConvexHullShapeData_m_unscaledPointsFloatPtr_get (long jarg1, btConvexHullShapeData jarg1_);
+
+       public final static native void btConvexHullShapeData_m_unscaledPointsDoublePtr_set (long jarg1, btConvexHullShapeData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btConvexHullShapeData_m_unscaledPointsDoublePtr_get (long jarg1, btConvexHullShapeData jarg1_);
+
+       public final static native void btConvexHullShapeData_m_numUnscaledPoints_set (long jarg1, btConvexHullShapeData jarg1_,
+               int jarg2);
+
+       public final static native int btConvexHullShapeData_m_numUnscaledPoints_get (long jarg1, btConvexHullShapeData jarg1_);
+
+       public final static native void btConvexHullShapeData_m_padding3_set (long jarg1, btConvexHullShapeData jarg1_, String jarg2);
+
+       public final static native String btConvexHullShapeData_m_padding3_get (long jarg1, btConvexHullShapeData jarg1_);
+
+       public final static native long new_btConvexHullShapeData ();
+
+       public final static native void delete_btConvexHullShapeData (long jarg1);
+
+       public final static native void btMaterialProperties_m_numMaterials_set (long jarg1, btMaterialProperties jarg1_, int jarg2);
+
+       public final static native int btMaterialProperties_m_numMaterials_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native void btMaterialProperties_m_materialBase_set (long jarg1, btMaterialProperties jarg1_, long jarg2);
+
+       public final static native long btMaterialProperties_m_materialBase_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native void btMaterialProperties_m_materialStride_set (long jarg1, btMaterialProperties jarg1_, int jarg2);
+
+       public final static native int btMaterialProperties_m_materialStride_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native void btMaterialProperties_m_materialType_set (long jarg1, btMaterialProperties jarg1_, int jarg2);
+
+       public final static native int btMaterialProperties_m_materialType_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native void btMaterialProperties_m_numTriangles_set (long jarg1, btMaterialProperties jarg1_, int jarg2);
+
+       public final static native int btMaterialProperties_m_numTriangles_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native void btMaterialProperties_m_triangleMaterialsBase_set (long jarg1, btMaterialProperties jarg1_,
+               long jarg2);
+
+       public final static native long btMaterialProperties_m_triangleMaterialsBase_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native void btMaterialProperties_m_triangleMaterialStride_set (long jarg1, btMaterialProperties jarg1_,
+               int jarg2);
+
+       public final static native int btMaterialProperties_m_triangleMaterialStride_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native void btMaterialProperties_m_triangleType_set (long jarg1, btMaterialProperties jarg1_, int jarg2);
+
+       public final static native int btMaterialProperties_m_triangleType_get (long jarg1, btMaterialProperties jarg1_);
+
+       public final static native long new_btMaterialProperties ();
+
+       public final static native void delete_btMaterialProperties (long jarg1);
+
+       public final static native long new_btTriangleIndexVertexMaterialArray__SWIG_0 ();
+
+       public final static native long new_btTriangleIndexVertexMaterialArray__SWIG_1 (int jarg1, long jarg2, int jarg3, int jarg4,
+               float[] jarg5, int jarg6, int jarg7, long jarg8, int jarg9, long jarg10, int jarg11);
+
+       public final static native void delete_btTriangleIndexVertexMaterialArray (long jarg1);
+
+       public final static native void btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_0 (long jarg1,
+               btTriangleIndexVertexMaterialArray jarg1_, long jarg2, btMaterialProperties jarg2_, int jarg3);
+
+       public final static native void btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_1 (long jarg1,
+               btTriangleIndexVertexMaterialArray jarg1_, long jarg2, btMaterialProperties jarg2_);
+
+       public final static native void btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_0 (long jarg1,
+               btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7,
+               long jarg8, long jarg9, int jarg10);
+
+       public final static native void btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_1 (long jarg1,
+               btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7,
+               long jarg8, long jarg9);
+
+       public final static native void btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_0 (long jarg1,
+               btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7,
+               long jarg8, long jarg9, int jarg10);
+
+       public final static native void btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_1 (long jarg1,
+               btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7,
+               long jarg8, long jarg9);
+
+       public final static native Vector3 btCylinderShape_getHalfExtentsWithMargin (long jarg1, btCylinderShape jarg1_);
+
+       public final static native Vector3 btCylinderShape_getHalfExtentsWithoutMargin (long jarg1, btCylinderShape jarg1_);
+
+       public final static native long new_btCylinderShape (Vector3 jarg1);
+
+       public final static native int btCylinderShape_getUpAxis (long jarg1, btCylinderShape jarg1_);
+
+       public final static native float btCylinderShape_getRadius (long jarg1, btCylinderShape jarg1_);
+
+       public final static native void delete_btCylinderShape (long jarg1);
+
+       public final static native long new_btCylinderShapeX (Vector3 jarg1);
+
+       public final static native void delete_btCylinderShapeX (long jarg1);
+
+       public final static native long new_btCylinderShapeZ (Vector3 jarg1);
+
+       public final static native void delete_btCylinderShapeZ (long jarg1);
+
+       public final static native void btCylinderShapeData_m_convexInternalShapeData_set (long jarg1, btCylinderShapeData jarg1_,
+               long jarg2, btConvexInternalShapeData jarg2_);
+
+       public final static native long btCylinderShapeData_m_convexInternalShapeData_get (long jarg1, btCylinderShapeData jarg1_);
+
+       public final static native void btCylinderShapeData_m_upAxis_set (long jarg1, btCylinderShapeData jarg1_, int jarg2);
+
+       public final static native int btCylinderShapeData_m_upAxis_get (long jarg1, btCylinderShapeData jarg1_);
+
+       public final static native void btCylinderShapeData_m_padding_set (long jarg1, btCylinderShapeData jarg1_, String jarg2);
+
+       public final static native String btCylinderShapeData_m_padding_get (long jarg1, btCylinderShapeData jarg1_);
+
+       public final static native long new_btCylinderShapeData ();
+
+       public final static native void delete_btCylinderShapeData (long jarg1);
+
+       public final static native void btTriangleMesh_m_weldingThreshold_set (long jarg1, btTriangleMesh jarg1_, float jarg2);
+
+       public final static native float btTriangleMesh_m_weldingThreshold_get (long jarg1, btTriangleMesh jarg1_);
+
+       public final static native long new_btTriangleMesh__SWIG_0 (boolean jarg1, boolean jarg2);
+
+       public final static native long new_btTriangleMesh__SWIG_1 (boolean jarg1);
+
+       public final static native long new_btTriangleMesh__SWIG_2 ();
+
+       public final static native boolean btTriangleMesh_getUse32bitIndices (long jarg1, btTriangleMesh jarg1_);
+
+       public final static native boolean btTriangleMesh_getUse4componentVertices (long jarg1, btTriangleMesh jarg1_);
+
+       public final static native void btTriangleMesh_addTriangle__SWIG_0 (long jarg1, btTriangleMesh jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4, boolean jarg5);
+
+       public final static native void btTriangleMesh_addTriangle__SWIG_1 (long jarg1, btTriangleMesh jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native int btTriangleMesh_getNumTriangles (long jarg1, btTriangleMesh jarg1_);
+
+       public final static native int btTriangleMesh_findOrAddVertex (long jarg1, btTriangleMesh jarg1_, Vector3 jarg2, boolean jarg3);
+
+       public final static native void btTriangleMesh_addIndex (long jarg1, btTriangleMesh jarg1_, int jarg2);
+
+       public final static native void delete_btTriangleMesh (long jarg1);
+
+       public final static native long new_btConeShape (float jarg1, float jarg2);
+
+       public final static native float btConeShape_getRadius (long jarg1, btConeShape jarg1_);
+
+       public final static native float btConeShape_getHeight (long jarg1, btConeShape jarg1_);
+
+       public final static native void btConeShape_setConeUpIndex (long jarg1, btConeShape jarg1_, int jarg2);
+
+       public final static native int btConeShape_getConeUpIndex (long jarg1, btConeShape jarg1_);
+
+       public final static native void delete_btConeShape (long jarg1);
+
+       public final static native long new_btConeShapeX (float jarg1, float jarg2);
+
+       public final static native void delete_btConeShapeX (long jarg1);
+
+       public final static native long new_btConeShapeZ (float jarg1, float jarg2);
+
+       public final static native void delete_btConeShapeZ (long jarg1);
+
+       public final static native long new_btConvexTriangleMeshShape__SWIG_0 (long jarg1, btStridingMeshInterface jarg1_,
+               boolean jarg2);
+
+       public final static native long new_btConvexTriangleMeshShape__SWIG_1 (long jarg1, btStridingMeshInterface jarg1_);
+
+       public final static native long btConvexTriangleMeshShape_getMeshInterface__SWIG_0 (long jarg1,
+               btConvexTriangleMeshShape jarg1_);
+
+       public final static native void btConvexTriangleMeshShape_calculatePrincipalAxisTransform (long jarg1,
+               btConvexTriangleMeshShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, long jarg4);
+
+       public final static native void delete_btConvexTriangleMeshShape (long jarg1);
+
+       public final static native long new_btEmptyShape ();
+
+       public final static native void delete_btEmptyShape (long jarg1);
+
+       public final static native long new_btMultimaterialTriangleMeshShape__SWIG_0 (long jarg1, btStridingMeshInterface jarg1_,
+               boolean jarg2, boolean jarg3);
+
+       public final static native long new_btMultimaterialTriangleMeshShape__SWIG_1 (long jarg1, btStridingMeshInterface jarg1_,
+               boolean jarg2);
+
+       public final static native long new_btMultimaterialTriangleMeshShape__SWIG_2 (long jarg1, btStridingMeshInterface jarg1_,
+               boolean jarg2, Vector3 jarg3, Vector3 jarg4, boolean jarg5);
+
+       public final static native long new_btMultimaterialTriangleMeshShape__SWIG_3 (long jarg1, btStridingMeshInterface jarg1_,
+               boolean jarg2, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void delete_btMultimaterialTriangleMeshShape (long jarg1);
+
+       public final static native long btMultimaterialTriangleMeshShape_getMaterialProperties (long jarg1,
+               btMultimaterialTriangleMeshShape jarg1_, int jarg2, int jarg3);
+
+       public final static native long new_btBU_Simplex1to4__SWIG_0 ();
+
+       public final static native long new_btBU_Simplex1to4__SWIG_1 (Vector3 jarg1);
+
+       public final static native long new_btBU_Simplex1to4__SWIG_2 (Vector3 jarg1, Vector3 jarg2);
+
+       public final static native long new_btBU_Simplex1to4__SWIG_3 (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native long new_btBU_Simplex1to4__SWIG_4 (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btBU_Simplex1to4_reset (long jarg1, btBU_Simplex1to4 jarg1_);
+
+       public final static native void btBU_Simplex1to4_addVertex (long jarg1, btBU_Simplex1to4 jarg1_, Vector3 jarg2);
+
+       public final static native int btBU_Simplex1to4_getIndex (long jarg1, btBU_Simplex1to4 jarg1_, int jarg2);
+
+       public final static native void delete_btBU_Simplex1to4 (long jarg1);
+
+       public final static native long new_btUniformScalingShape (long jarg1, btConvexShape jarg1_, float jarg2);
+
+       public final static native void delete_btUniformScalingShape (long jarg1);
+
+       public final static native float btUniformScalingShape_getUniformScalingFactor (long jarg1, btUniformScalingShape jarg1_);
+
+       public final static native long btUniformScalingShape_getChildShape__SWIG_0 (long jarg1, btUniformScalingShape jarg1_);
+
+       public final static native void btCompoundShapeChild_m_transform_set (long jarg1, btCompoundShapeChild jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native long btCompoundShapeChild_m_transform_get (long jarg1, btCompoundShapeChild jarg1_);
+
+       public final static native void btCompoundShapeChild_m_childShape_set (long jarg1, btCompoundShapeChild jarg1_, long jarg2,
+               btCollisionShape jarg2_);
+
+       public final static native long btCompoundShapeChild_m_childShape_get (long jarg1, btCompoundShapeChild jarg1_);
+
+       public final static native void btCompoundShapeChild_m_childShapeType_set (long jarg1, btCompoundShapeChild jarg1_, int jarg2);
+
+       public final static native int btCompoundShapeChild_m_childShapeType_get (long jarg1, btCompoundShapeChild jarg1_);
+
+       public final static native void btCompoundShapeChild_m_childMargin_set (long jarg1, btCompoundShapeChild jarg1_, float jarg2);
+
+       public final static native float btCompoundShapeChild_m_childMargin_get (long jarg1, btCompoundShapeChild jarg1_);
+
+       public final static native void btCompoundShapeChild_m_node_set (long jarg1, btCompoundShapeChild jarg1_, long jarg2,
+               btDbvtNode jarg2_);
+
+       public final static native long btCompoundShapeChild_m_node_get (long jarg1, btCompoundShapeChild jarg1_);
+
+       public final static native long new_btCompoundShapeChild ();
+
+       public final static native void delete_btCompoundShapeChild (long jarg1);
+
+       public final static native long new_btCompoundShape__SWIG_0 (boolean jarg1);
+
+       public final static native long new_btCompoundShape__SWIG_1 ();
+
+       public final static native void delete_btCompoundShape (long jarg1);
+
+       public final static native void btCompoundShape_addChildShape (long jarg1, btCompoundShape jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btCollisionShape jarg3_);
+
+       public final static native void btCompoundShape_removeChildShape (long jarg1, btCompoundShape jarg1_, long jarg2,
+               btCollisionShape jarg2_);
+
+       public final static native void btCompoundShape_removeChildShapeByIndex (long jarg1, btCompoundShape jarg1_, int jarg2);
+
+       public final static native int btCompoundShape_getNumChildShapes (long jarg1, btCompoundShape jarg1_);
+
+       public final static native long btCompoundShape_getChildShape__SWIG_0 (long jarg1, btCompoundShape jarg1_, int jarg2);
+
+       public final static native long btCompoundShape_getChildTransform__SWIG_0 (long jarg1, btCompoundShape jarg1_, int jarg2);
+
+       public final static native void btCompoundShape_updateChildTransform__SWIG_0 (long jarg1, btCompoundShape jarg1_, int jarg2,
+               long jarg3, btTransform jarg3_, boolean jarg4);
+
+       public final static native void btCompoundShape_updateChildTransform__SWIG_1 (long jarg1, btCompoundShape jarg1_, int jarg2,
+               long jarg3, btTransform jarg3_);
+
+       public final static native long btCompoundShape_getChildList (long jarg1, btCompoundShape jarg1_);
+
+       public final static native void btCompoundShape_recalculateLocalAabb (long jarg1, btCompoundShape jarg1_);
+
+       public final static native long btCompoundShape_getDynamicAabbTree__SWIG_0 (long jarg1, btCompoundShape jarg1_);
+
+       public final static native void btCompoundShape_createAabbTreeFromChildren (long jarg1, btCompoundShape jarg1_);
+
+       public final static native void btCompoundShape_calculatePrincipalAxisTransform (long jarg1, btCompoundShape jarg1_,
+               float[] jarg2, long jarg3, btTransform jarg3_, Vector3 jarg4);
+
+       public final static native int btCompoundShape_getUpdateRevision (long jarg1, btCompoundShape jarg1_);
+
+       public final static native void btCompoundShapeChildData_m_transform_set (long jarg1, btCompoundShapeChildData jarg1_,
+               long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btCompoundShapeChildData_m_transform_get (long jarg1, btCompoundShapeChildData jarg1_);
+
+       public final static native void btCompoundShapeChildData_m_childShape_set (long jarg1, btCompoundShapeChildData jarg1_,
+               long jarg2, btCollisionShapeData jarg2_);
+
+       public final static native long btCompoundShapeChildData_m_childShape_get (long jarg1, btCompoundShapeChildData jarg1_);
+
+       public final static native void btCompoundShapeChildData_m_childShapeType_set (long jarg1, btCompoundShapeChildData jarg1_,
+               int jarg2);
+
+       public final static native int btCompoundShapeChildData_m_childShapeType_get (long jarg1, btCompoundShapeChildData jarg1_);
+
+       public final static native void btCompoundShapeChildData_m_childMargin_set (long jarg1, btCompoundShapeChildData jarg1_,
+               float jarg2);
+
+       public final static native float btCompoundShapeChildData_m_childMargin_get (long jarg1, btCompoundShapeChildData jarg1_);
+
+       public final static native long new_btCompoundShapeChildData ();
+
+       public final static native void delete_btCompoundShapeChildData (long jarg1);
+
+       public final static native void btCompoundShapeData_m_collisionShapeData_set (long jarg1, btCompoundShapeData jarg1_,
+               long jarg2, btCollisionShapeData jarg2_);
+
+       public final static native long btCompoundShapeData_m_collisionShapeData_get (long jarg1, btCompoundShapeData jarg1_);
+
+       public final static native void btCompoundShapeData_m_childShapePtr_set (long jarg1, btCompoundShapeData jarg1_, long jarg2,
+               btCompoundShapeChildData jarg2_);
+
+       public final static native long btCompoundShapeData_m_childShapePtr_get (long jarg1, btCompoundShapeData jarg1_);
+
+       public final static native void btCompoundShapeData_m_numChildShapes_set (long jarg1, btCompoundShapeData jarg1_, int jarg2);
+
+       public final static native int btCompoundShapeData_m_numChildShapes_get (long jarg1, btCompoundShapeData jarg1_);
+
+       public final static native void btCompoundShapeData_m_collisionMargin_set (long jarg1, btCompoundShapeData jarg1_, float jarg2);
+
+       public final static native float btCompoundShapeData_m_collisionMargin_get (long jarg1, btCompoundShapeData jarg1_);
+
+       public final static native long new_btCompoundShapeData ();
+
+       public final static native void delete_btCompoundShapeData (long jarg1);
+
+       public final static native long new_btConvexPointCloudShape__SWIG_0 ();
+
+       public final static native long new_btConvexPointCloudShape__SWIG_1 (long jarg1, btVector3 jarg1_, int jarg2, Vector3 jarg3,
+               boolean jarg4);
+
+       public final static native long new_btConvexPointCloudShape__SWIG_2 (long jarg1, btVector3 jarg1_, int jarg2, Vector3 jarg3);
+
+       public final static native void btConvexPointCloudShape_setPoints__SWIG_0 (long jarg1, btConvexPointCloudShape jarg1_,
+               long jarg2, btVector3 jarg2_, int jarg3, boolean jarg4, Vector3 jarg5);
+
+       public final static native void btConvexPointCloudShape_setPoints__SWIG_1 (long jarg1, btConvexPointCloudShape jarg1_,
+               long jarg2, btVector3 jarg2_, int jarg3, boolean jarg4);
+
+       public final static native void btConvexPointCloudShape_setPoints__SWIG_2 (long jarg1, btConvexPointCloudShape jarg1_,
+               long jarg2, btVector3 jarg2_, int jarg3);
+
+       public final static native long btConvexPointCloudShape_getUnscaledPoints__SWIG_0 (long jarg1, btConvexPointCloudShape jarg1_);
+
+       public final static native int btConvexPointCloudShape_getNumPoints (long jarg1, btConvexPointCloudShape jarg1_);
+
+       public final static native Vector3 btConvexPointCloudShape_getScaledPoint (long jarg1, btConvexPointCloudShape jarg1_,
+               int jarg2);
+
+       public final static native void delete_btConvexPointCloudShape (long jarg1);
+
+       public final static native long new_btConvex2dShape (long jarg1, btConvexShape jarg1_);
+
+       public final static native void delete_btConvex2dShape (long jarg1);
+
+       public final static native long btConvex2dShape_getChildShape__SWIG_0 (long jarg1, btConvex2dShape jarg1_);
+
+       public final static native boolean btCollisionObject_mergesSimulationIslands (long jarg1, btCollisionObject jarg1_);
+
+       public final static native Vector3 btCollisionObject_getAnisotropicFriction__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setAnisotropicFriction (long jarg1, btCollisionObject jarg1_, Vector3 jarg2);
+
+       public final static native boolean btCollisionObject_hasAnisotropicFriction (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setContactProcessingThreshold (long jarg1, btCollisionObject jarg1_,
+               float jarg2);
+
+       public final static native float btCollisionObject_getContactProcessingThreshold (long jarg1, btCollisionObject jarg1_);
+
+       public final static native boolean btCollisionObject_isStaticObject (long jarg1, btCollisionObject jarg1_);
+
+       public final static native boolean btCollisionObject_isKinematicObject (long jarg1, btCollisionObject jarg1_);
+
+       public final static native boolean btCollisionObject_isStaticOrKinematicObject (long jarg1, btCollisionObject jarg1_);
+
+       public final static native boolean btCollisionObject_hasContactResponse (long jarg1, btCollisionObject jarg1_);
+
+       public final static native long new_btCollisionObject ();
+
+       public final static native void delete_btCollisionObject (long jarg1);
+
+       public final static native void btCollisionObject_setCollisionShape (long jarg1, btCollisionObject jarg1_, long jarg2,
+               btCollisionShape jarg2_);
+
+       public final static native long btCollisionObject_getCollisionShape__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native long btCollisionObject_getRootCollisionShape__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_internalSetTemporaryCollisionShape (long jarg1, btCollisionObject jarg1_,
+               long jarg2, btCollisionShape jarg2_);
+
+       public final static native long btCollisionObject_internalGetExtensionPointer (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_internalSetExtensionPointer (long jarg1, btCollisionObject jarg1_, long jarg2);
+
+       public final static native int btCollisionObject_getActivationState (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setActivationState (long jarg1, btCollisionObject jarg1_, int jarg2);
+
+       public final static native void btCollisionObject_setDeactivationTime (long jarg1, btCollisionObject jarg1_, float jarg2);
+
+       public final static native float btCollisionObject_getDeactivationTime (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_forceActivationState (long jarg1, btCollisionObject jarg1_, int jarg2);
+
+       public final static native void btCollisionObject_activate__SWIG_0 (long jarg1, btCollisionObject jarg1_, boolean jarg2);
+
+       public final static native void btCollisionObject_activate__SWIG_1 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native boolean btCollisionObject_isActive (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setRestitution (long jarg1, btCollisionObject jarg1_, float jarg2);
+
+       public final static native float btCollisionObject_getRestitution (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setFriction (long jarg1, btCollisionObject jarg1_, float jarg2);
+
+       public final static native float btCollisionObject_getFriction (long jarg1, btCollisionObject jarg1_);
+
+       public final static native int btCollisionObject_getInternalType (long jarg1, btCollisionObject jarg1_);
+
+       public final static native long btCollisionObject_getWorldTransform__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setWorldTransform (long jarg1, btCollisionObject jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native long btCollisionObject_getBroadphaseHandle__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setBroadphaseHandle (long jarg1, btCollisionObject jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_);
+
+       public final static native long btCollisionObject_getInterpolationWorldTransform__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setInterpolationWorldTransform (long jarg1, btCollisionObject jarg1_,
+               long jarg2, btTransform jarg2_);
+
+       public final static native void btCollisionObject_setInterpolationLinearVelocity (long jarg1, btCollisionObject jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btCollisionObject_setInterpolationAngularVelocity (long jarg1, btCollisionObject jarg1_,
+               Vector3 jarg2);
+
+       public final static native Vector3 btCollisionObject_getInterpolationLinearVelocity__SWIG_0 (long jarg1,
+               btCollisionObject jarg1_);
+
+       public final static native Vector3 btCollisionObject_getInterpolationAngularVelocity__SWIG_0 (long jarg1,
+               btCollisionObject jarg1_);
+
+       public final static native int btCollisionObject_getIslandTag (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setIslandTag (long jarg1, btCollisionObject jarg1_, int jarg2);
+
+       public final static native int btCollisionObject_getCompanionId (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setCompanionId (long jarg1, btCollisionObject jarg1_, int jarg2);
+
+       public final static native float btCollisionObject_getHitFraction (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setHitFraction (long jarg1, btCollisionObject jarg1_, float jarg2);
+
+       public final static native int btCollisionObject_getCollisionFlags (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setCollisionFlags (long jarg1, btCollisionObject jarg1_, int jarg2);
+
+       public final static native float btCollisionObject_getCcdSweptSphereRadius (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setCcdSweptSphereRadius (long jarg1, btCollisionObject jarg1_, float jarg2);
+
+       public final static native float btCollisionObject_getCcdMotionThreshold (long jarg1, btCollisionObject jarg1_);
+
+       public final static native float btCollisionObject_getCcdSquareMotionThreshold (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setCcdMotionThreshold (long jarg1, btCollisionObject jarg1_, float jarg2);
+
+       public final static native long btCollisionObject_getUserPointer (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btCollisionObject_setUserPointer (long jarg1, btCollisionObject jarg1_, long jarg2);
+
+       public final static native boolean btCollisionObject_checkCollideWith (long jarg1, btCollisionObject jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native int btCollisionObject_calculateSerializeBufferSize (long jarg1, btCollisionObject jarg1_);
+
+       public final static native String btCollisionObject_serialize (long jarg1, btCollisionObject jarg1_, long jarg2, long jarg3);
+
+       public final static native void btCollisionObject_serializeSingleObject (long jarg1, btCollisionObject jarg1_, long jarg2);
+
+       public final static native void btCollisionObject_getAnisotropicFriction__SWIG_1 (long jarg1, btCollisionObject jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btCollisionObject_getWorldTransform__SWIG_2 (long jarg1, btCollisionObject jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native void btCollisionObject_getInterpolationWorldTransform__SWIG_2 (long jarg1,
+               btCollisionObject jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native void btCollisionObject_getInterpolationLinearVelocity__SWIG_1 (long jarg1,
+               btCollisionObject jarg1_, Vector3 jarg2);
+
+       public final static native void btCollisionObject_getInterpolationAngularVelocity__SWIG_1 (long jarg1,
+               btCollisionObject jarg1_, Vector3 jarg2);
+
+       public final static native void btCollisionObjectDoubleData_m_broadphaseHandle_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2);
+
+       public final static native long btCollisionObjectDoubleData_m_broadphaseHandle_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_collisionShape_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2);
+
+       public final static native long btCollisionObjectDoubleData_m_collisionShape_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_rootCollisionShape_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2, btCollisionShapeData jarg2_);
+
+       public final static native long btCollisionObjectDoubleData_m_rootCollisionShape_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_name_set (long jarg1, btCollisionObjectDoubleData jarg1_,
+               String jarg2);
+
+       public final static native String btCollisionObjectDoubleData_m_name_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_worldTransform_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2, btTransformDoubleData jarg2_);
+
+       public final static native long btCollisionObjectDoubleData_m_worldTransform_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_interpolationWorldTransform_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2, btTransformDoubleData jarg2_);
+
+       public final static native long btCollisionObjectDoubleData_m_interpolationWorldTransform_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_interpolationLinearVelocity_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btCollisionObjectDoubleData_m_interpolationLinearVelocity_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_interpolationAngularVelocity_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btCollisionObjectDoubleData_m_interpolationAngularVelocity_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_anisotropicFriction_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btCollisionObjectDoubleData_m_anisotropicFriction_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_contactProcessingThreshold_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, double jarg2);
+
+       public final static native double btCollisionObjectDoubleData_m_contactProcessingThreshold_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_deactivationTime_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, double jarg2);
+
+       public final static native double btCollisionObjectDoubleData_m_deactivationTime_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_friction_set (long jarg1, btCollisionObjectDoubleData jarg1_,
+               double jarg2);
+
+       public final static native double btCollisionObjectDoubleData_m_friction_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_restitution_set (long jarg1, btCollisionObjectDoubleData jarg1_,
+               double jarg2);
+
+       public final static native double btCollisionObjectDoubleData_m_restitution_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_hitFraction_set (long jarg1, btCollisionObjectDoubleData jarg1_,
+               double jarg2);
+
+       public final static native double btCollisionObjectDoubleData_m_hitFraction_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_ccdSweptSphereRadius_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, double jarg2);
+
+       public final static native double btCollisionObjectDoubleData_m_ccdSweptSphereRadius_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_ccdMotionThreshold_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, double jarg2);
+
+       public final static native double btCollisionObjectDoubleData_m_ccdMotionThreshold_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_hasAnisotropicFriction_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectDoubleData_m_hasAnisotropicFriction_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_collisionFlags_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectDoubleData_m_collisionFlags_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_islandTag1_set (long jarg1, btCollisionObjectDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btCollisionObjectDoubleData_m_islandTag1_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_companionId_set (long jarg1, btCollisionObjectDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btCollisionObjectDoubleData_m_companionId_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_activationState1_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectDoubleData_m_activationState1_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_internalType_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectDoubleData_m_internalType_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_checkCollideWith_set (long jarg1,
+               btCollisionObjectDoubleData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectDoubleData_m_checkCollideWith_get (long jarg1,
+               btCollisionObjectDoubleData jarg1_);
+
+       public final static native void btCollisionObjectDoubleData_m_padding_set (long jarg1, btCollisionObjectDoubleData jarg1_,
+               String jarg2);
+
+       public final static native String btCollisionObjectDoubleData_m_padding_get (long jarg1, btCollisionObjectDoubleData jarg1_);
+
+       public final static native long new_btCollisionObjectDoubleData ();
+
+       public final static native void delete_btCollisionObjectDoubleData (long jarg1);
+
+       public final static native void btCollisionObjectFloatData_m_broadphaseHandle_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2);
+
+       public final static native long btCollisionObjectFloatData_m_broadphaseHandle_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_collisionShape_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2);
+
+       public final static native long btCollisionObjectFloatData_m_collisionShape_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_rootCollisionShape_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2, btCollisionShapeData jarg2_);
+
+       public final static native long btCollisionObjectFloatData_m_rootCollisionShape_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_name_set (long jarg1, btCollisionObjectFloatData jarg1_,
+               String jarg2);
+
+       public final static native String btCollisionObjectFloatData_m_name_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_worldTransform_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btCollisionObjectFloatData_m_worldTransform_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_interpolationWorldTransform_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btCollisionObjectFloatData_m_interpolationWorldTransform_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_interpolationLinearVelocity_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btCollisionObjectFloatData_m_interpolationLinearVelocity_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_interpolationAngularVelocity_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btCollisionObjectFloatData_m_interpolationAngularVelocity_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_anisotropicFriction_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btCollisionObjectFloatData_m_anisotropicFriction_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_contactProcessingThreshold_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, float jarg2);
+
+       public final static native float btCollisionObjectFloatData_m_contactProcessingThreshold_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_deactivationTime_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, float jarg2);
+
+       public final static native float btCollisionObjectFloatData_m_deactivationTime_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_friction_set (long jarg1, btCollisionObjectFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btCollisionObjectFloatData_m_friction_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_restitution_set (long jarg1, btCollisionObjectFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btCollisionObjectFloatData_m_restitution_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_hitFraction_set (long jarg1, btCollisionObjectFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btCollisionObjectFloatData_m_hitFraction_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_ccdSweptSphereRadius_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, float jarg2);
+
+       public final static native float btCollisionObjectFloatData_m_ccdSweptSphereRadius_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_ccdMotionThreshold_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, float jarg2);
+
+       public final static native float btCollisionObjectFloatData_m_ccdMotionThreshold_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_hasAnisotropicFriction_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectFloatData_m_hasAnisotropicFriction_get (long jarg1,
+               btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_collisionFlags_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectFloatData_m_collisionFlags_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_islandTag1_set (long jarg1, btCollisionObjectFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btCollisionObjectFloatData_m_islandTag1_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_companionId_set (long jarg1, btCollisionObjectFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btCollisionObjectFloatData_m_companionId_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_activationState1_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectFloatData_m_activationState1_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_internalType_set (long jarg1, btCollisionObjectFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btCollisionObjectFloatData_m_internalType_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native void btCollisionObjectFloatData_m_checkCollideWith_set (long jarg1,
+               btCollisionObjectFloatData jarg1_, int jarg2);
+
+       public final static native int btCollisionObjectFloatData_m_checkCollideWith_get (long jarg1, btCollisionObjectFloatData jarg1_);
+
+       public final static native long new_btCollisionObjectFloatData ();
+
+       public final static native void delete_btCollisionObjectFloatData (long jarg1);
+
+       public final static native void btRigidBodyConstructionInfo_m_mass_set (long jarg1, btRigidBodyConstructionInfo jarg1_,
+               float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_mass_get (long jarg1, btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_motionState_set (long jarg1, btRigidBodyConstructionInfo jarg1_,
+               long jarg2, btMotionState jarg2_);
+
+       public final static native long btRigidBodyConstructionInfo_m_motionState_get (long jarg1, btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_startWorldTransform_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native long btRigidBodyConstructionInfo_m_startWorldTransform_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_collisionShape_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, long jarg2, btCollisionShape jarg2_);
+
+       public final static native long btRigidBodyConstructionInfo_m_collisionShape_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_localInertia_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btRigidBodyConstructionInfo_m_localInertia_get (long jarg1, btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_linearDamping_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_linearDamping_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_angularDamping_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_angularDamping_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_friction_set (long jarg1, btRigidBodyConstructionInfo jarg1_,
+               float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_friction_get (long jarg1, btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_restitution_set (long jarg1, btRigidBodyConstructionInfo jarg1_,
+               float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_restitution_get (long jarg1, btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_linearSleepingThreshold_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_linearSleepingThreshold_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_angularSleepingThreshold_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_angularSleepingThreshold_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_additionalDamping_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, boolean jarg2);
+
+       public final static native boolean btRigidBodyConstructionInfo_m_additionalDamping_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_additionalDampingFactor_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_additionalDampingFactor_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native void btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_set (long jarg1,
+               btRigidBodyConstructionInfo jarg1_, float jarg2);
+
+       public final static native float btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_get (long jarg1,
+               btRigidBodyConstructionInfo jarg1_);
+
+       public final static native long new_btRigidBodyConstructionInfo__SWIG_0 (float jarg1, long jarg2, btMotionState jarg2_,
+               long jarg3, btCollisionShape jarg3_, Vector3 jarg4);
+
+       public final static native long new_btRigidBodyConstructionInfo__SWIG_1 (float jarg1, long jarg2, btMotionState jarg2_,
+               long jarg3, btCollisionShape jarg3_);
+
+       public final static native void delete_btRigidBodyConstructionInfo (long jarg1);
+
+       public final static native void gDeactivationTime_set (float jarg1);
+
+       public final static native float gDeactivationTime_get ();
+
+       public final static native void gDisableDeactivation_set (boolean jarg1);
+
+       public final static native boolean gDisableDeactivation_get ();
+
+       public final static native long new_btRigidBody__SWIG_0 (long jarg1, btRigidBodyConstructionInfo jarg1_);
+
+       public final static native long new_btRigidBody__SWIG_1 (float jarg1, long jarg2, btMotionState jarg2_, long jarg3,
+               btCollisionShape jarg3_, Vector3 jarg4);
+
+       public final static native long new_btRigidBody__SWIG_2 (float jarg1, long jarg2, btMotionState jarg2_, long jarg3,
+               btCollisionShape jarg3_);
+
+       public final static native void delete_btRigidBody (long jarg1);
+
+       public final static native void btRigidBody_proceedToTransform (long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native long btRigidBody_upcast__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native void btRigidBody_predictIntegratedTransform (long jarg1, btRigidBody jarg1_, float jarg2,
+               long jarg3, btTransform jarg3_);
+
+       public final static native void btRigidBody_saveKinematicState (long jarg1, btRigidBody jarg1_, float jarg2);
+
+       public final static native void btRigidBody_applyGravity (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setGravity (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btRigidBody_getGravity (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setDamping (long jarg1, btRigidBody jarg1_, float jarg2, float jarg3);
+
+       public final static native float btRigidBody_getLinearDamping (long jarg1, btRigidBody jarg1_);
+
+       public final static native float btRigidBody_getAngularDamping (long jarg1, btRigidBody jarg1_);
+
+       public final static native float btRigidBody_getLinearSleepingThreshold (long jarg1, btRigidBody jarg1_);
+
+       public final static native float btRigidBody_getAngularSleepingThreshold (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_applyDamping (long jarg1, btRigidBody jarg1_, float jarg2);
+
+       public final static native long btRigidBody_getCollisionShape__SWIG_0 (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setMassProps (long jarg1, btRigidBody jarg1_, float jarg2, Vector3 jarg3);
+
+       public final static native Vector3 btRigidBody_getLinearFactor (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setLinearFactor (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native float btRigidBody_getInvMass (long jarg1, btRigidBody jarg1_);
+
+       public final static native Matrix3 btRigidBody_getInvInertiaTensorWorld (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_integrateVelocities (long jarg1, btRigidBody jarg1_, float jarg2);
+
+       public final static native void btRigidBody_setCenterOfMassTransform (long jarg1, btRigidBody jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native void btRigidBody_applyCentralForce (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btRigidBody_getTotalForce (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getTotalTorque (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getInvInertiaDiagLocal (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setInvInertiaDiagLocal (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_setSleepingThresholds (long jarg1, btRigidBody jarg1_, float jarg2, float jarg3);
+
+       public final static native void btRigidBody_applyTorque (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_applyForce (long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btRigidBody_applyCentralImpulse (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_applyTorqueImpulse (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_applyImpulse (long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btRigidBody_clearForces (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_updateInertiaTensor (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getCenterOfMassPosition (long jarg1, btRigidBody jarg1_);
+
+       public final static native Quaternion btRigidBody_getOrientation (long jarg1, btRigidBody jarg1_);
+
+       public final static native long btRigidBody_getCenterOfMassTransform (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getLinearVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getAngularVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setLinearVelocity (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_setAngularVelocity (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btRigidBody_getVelocityInLocalPoint (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_translate (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_getAabb (long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native float btRigidBody_computeImpulseDenominator (long jarg1, btRigidBody jarg1_, Vector3 jarg2,
+               Vector3 jarg3);
+
+       public final static native float btRigidBody_computeAngularImpulseDenominator (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_updateDeactivation (long jarg1, btRigidBody jarg1_, float jarg2);
+
+       public final static native boolean btRigidBody_wantsSleeping (long jarg1, btRigidBody jarg1_);
+
+       public final static native long btRigidBody_getBroadphaseProxy__SWIG_0 (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setNewBroadphaseProxy (long jarg1, btRigidBody jarg1_, long jarg2,
+               btBroadphaseProxy jarg2_);
+
+       public final static native long btRigidBody_getMotionState__SWIG_0 (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setMotionState (long jarg1, btRigidBody jarg1_, long jarg2, btMotionState jarg2_);
+
+       public final static native void btRigidBody_m_contactSolverType_set (long jarg1, btRigidBody jarg1_, int jarg2);
+
+       public final static native int btRigidBody_m_contactSolverType_get (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_m_frictionSolverType_set (long jarg1, btRigidBody jarg1_, int jarg2);
+
+       public final static native int btRigidBody_m_frictionSolverType_get (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setAngularFactor__SWIG_0 (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_setAngularFactor__SWIG_1 (long jarg1, btRigidBody jarg1_, float jarg2);
+
+       public final static native Vector3 btRigidBody_getAngularFactor (long jarg1, btRigidBody jarg1_);
+
+       public final static native boolean btRigidBody_isInWorld (long jarg1, btRigidBody jarg1_);
+
+       public final static native boolean btRigidBody_checkCollideWithOverride (long jarg1, btRigidBody jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native void btRigidBody_addConstraintRef (long jarg1, btRigidBody jarg1_, long jarg2,
+               btTypedConstraint jarg2_);
+
+       public final static native void btRigidBody_removeConstraintRef (long jarg1, btRigidBody jarg1_, long jarg2,
+               btTypedConstraint jarg2_);
+
+       public final static native long btRigidBody_getConstraintRef (long jarg1, btRigidBody jarg1_, int jarg2);
+
+       public final static native int btRigidBody_getNumConstraintRefs (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_setFlags (long jarg1, btRigidBody jarg1_, int jarg2);
+
+       public final static native int btRigidBody_getFlags (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getDeltaLinearVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getDeltaAngularVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getPushVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_getTurnVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_internalGetDeltaLinearVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_internalGetDeltaAngularVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_internalGetAngularFactor (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_internalGetInvMass (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_internalGetPushVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native Vector3 btRigidBody_internalGetTurnVelocity (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_internalGetVelocityInLocalPointObsolete (long jarg1, btRigidBody jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btRigidBody_internalGetAngularVelocity (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btRigidBody_internalApplyImpulse (long jarg1, btRigidBody jarg1_, Vector3 jarg2,
+               Vector3 jarg3, float jarg4);
+
+       public final static native void btRigidBody_internalApplyPushImpulse (long jarg1, btRigidBody jarg1_, Vector3 jarg2,
+               Vector3 jarg3, float jarg4);
+
+       public final static native void btRigidBody_internalWritebackVelocity__SWIG_0 (long jarg1, btRigidBody jarg1_);
+
+       public final static native void btRigidBody_internalWritebackVelocity__SWIG_1 (long jarg1, btRigidBody jarg1_, float jarg2);
+
+       public final static native void btRigidBodyFloatData_m_collisionObjectData_set (long jarg1, btRigidBodyFloatData jarg1_,
+               long jarg2, btCollisionObjectFloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_collisionObjectData_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_invInertiaTensorWorld_set (long jarg1, btRigidBodyFloatData jarg1_,
+               long jarg2);
+
+       public final static native long btRigidBodyFloatData_m_invInertiaTensorWorld_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_linearVelocity_set (long jarg1, btRigidBodyFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_linearVelocity_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_angularVelocity_set (long jarg1, btRigidBodyFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_angularVelocity_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_angularFactor_set (long jarg1, btRigidBodyFloatData jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_angularFactor_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_linearFactor_set (long jarg1, btRigidBodyFloatData jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_linearFactor_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_gravity_set (long jarg1, btRigidBodyFloatData jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_gravity_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_gravity_acceleration_set (long jarg1, btRigidBodyFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_gravity_acceleration_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_invInertiaLocal_set (long jarg1, btRigidBodyFloatData jarg1_,
+               long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_invInertiaLocal_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_totalForce_set (long jarg1, btRigidBodyFloatData jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_totalForce_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_totalTorque_set (long jarg1, btRigidBodyFloatData jarg1_, long jarg2,
+               btVector3FloatData jarg2_);
+
+       public final static native long btRigidBodyFloatData_m_totalTorque_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_inverseMass_set (long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_inverseMass_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_linearDamping_set (long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_linearDamping_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_angularDamping_set (long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_angularDamping_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_additionalDampingFactor_set (long jarg1, btRigidBodyFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_additionalDampingFactor_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_set (long jarg1,
+               btRigidBodyFloatData jarg1_, float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_get (long jarg1,
+               btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_set (long jarg1,
+               btRigidBodyFloatData jarg1_, float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_get (long jarg1,
+               btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_additionalAngularDampingFactor_set (long jarg1,
+               btRigidBodyFloatData jarg1_, float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_additionalAngularDampingFactor_get (long jarg1,
+               btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_linearSleepingThreshold_set (long jarg1, btRigidBodyFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_linearSleepingThreshold_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_angularSleepingThreshold_set (long jarg1, btRigidBodyFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btRigidBodyFloatData_m_angularSleepingThreshold_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native void btRigidBodyFloatData_m_additionalDamping_set (long jarg1, btRigidBodyFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btRigidBodyFloatData_m_additionalDamping_get (long jarg1, btRigidBodyFloatData jarg1_);
+
+       public final static native long new_btRigidBodyFloatData ();
+
+       public final static native void delete_btRigidBodyFloatData (long jarg1);
+
+       public final static native void btRigidBodyDoubleData_m_collisionObjectData_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2, btCollisionObjectDoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_collisionObjectData_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_invInertiaTensorWorld_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2);
+
+       public final static native long btRigidBodyDoubleData_m_invInertiaTensorWorld_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_linearVelocity_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_linearVelocity_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_angularVelocity_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_angularVelocity_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_angularFactor_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_angularFactor_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_linearFactor_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_linearFactor_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_gravity_set (long jarg1, btRigidBodyDoubleData jarg1_, long jarg2,
+               btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_gravity_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_gravity_acceleration_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_gravity_acceleration_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_invInertiaLocal_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_invInertiaLocal_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_totalForce_set (long jarg1, btRigidBodyDoubleData jarg1_, long jarg2,
+               btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_totalForce_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_totalTorque_set (long jarg1, btRigidBodyDoubleData jarg1_, long jarg2,
+               btVector3DoubleData jarg2_);
+
+       public final static native long btRigidBodyDoubleData_m_totalTorque_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_inverseMass_set (long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_inverseMass_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_linearDamping_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_linearDamping_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_angularDamping_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_angularDamping_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_additionalDampingFactor_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_additionalDampingFactor_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_set (long jarg1,
+               btRigidBodyDoubleData jarg1_, double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_get (long jarg1,
+               btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_set (long jarg1,
+               btRigidBodyDoubleData jarg1_, double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_get (long jarg1,
+               btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_additionalAngularDampingFactor_set (long jarg1,
+               btRigidBodyDoubleData jarg1_, double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_additionalAngularDampingFactor_get (long jarg1,
+               btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_linearSleepingThreshold_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_linearSleepingThreshold_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_angularSleepingThreshold_set (long jarg1,
+               btRigidBodyDoubleData jarg1_, double jarg2);
+
+       public final static native double btRigidBodyDoubleData_m_angularSleepingThreshold_get (long jarg1,
+               btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_additionalDamping_set (long jarg1, btRigidBodyDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btRigidBodyDoubleData_m_additionalDamping_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native void btRigidBodyDoubleData_m_padding_set (long jarg1, btRigidBodyDoubleData jarg1_, String jarg2);
+
+       public final static native String btRigidBodyDoubleData_m_padding_get (long jarg1, btRigidBodyDoubleData jarg1_);
+
+       public final static native long new_btRigidBodyDoubleData ();
+
+       public final static native void delete_btRigidBodyDoubleData (long jarg1);
+
+       public final static native long new_btEmptyAlgorithm (long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
+
+       public final static native void delete_btEmptyAlgorithm (long jarg1);
+
+       public final static native void delete_btActivatingCollisionAlgorithm (long jarg1);
+
+       public final static native void btConvexTriangleCallback_m_triangleCount_set (long jarg1, btConvexTriangleCallback jarg1_,
+               int jarg2);
+
+       public final static native int btConvexTriangleCallback_m_triangleCount_get (long jarg1, btConvexTriangleCallback jarg1_);
+
+       public final static native void btConvexTriangleCallback_m_manifoldPtr_set (long jarg1, btConvexTriangleCallback jarg1_,
+               long jarg2, btPersistentManifold jarg2_);
+
+       public final static native long btConvexTriangleCallback_m_manifoldPtr_get (long jarg1, btConvexTriangleCallback jarg1_);
+
+       public final static native long new_btConvexTriangleCallback (long jarg1, btDispatcher jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, boolean jarg4);
+
+       public final static native void btConvexTriangleCallback_setTimeStepAndCounters (long jarg1, btConvexTriangleCallback jarg1_,
+               float jarg2, long jarg3, btDispatcherInfo jarg3_, long jarg4, btManifoldResult jarg4_);
+
+       public final static native void delete_btConvexTriangleCallback (long jarg1);
+
+       public final static native void btConvexTriangleCallback_clearCache (long jarg1, btConvexTriangleCallback jarg1_);
+
+       public final static native Vector3 btConvexTriangleCallback_getAabbMin (long jarg1, btConvexTriangleCallback jarg1_);
+
+       public final static native Vector3 btConvexTriangleCallback_getAabbMax (long jarg1, btConvexTriangleCallback jarg1_);
+
+       public final static native long new_btConvexConcaveCollisionAlgorithm (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_,
+               boolean jarg4);
+
+       public final static native void delete_btConvexConcaveCollisionAlgorithm (long jarg1);
+
+       public final static native void btConvexConcaveCollisionAlgorithm_clearCache (long jarg1,
+               btConvexConcaveCollisionAlgorithm jarg1_);
+
+       public final static native long new_btConvexPlaneCollisionAlgorithm (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_,
+               boolean jarg5, int jarg6, int jarg7);
+
+       public final static native void delete_btConvexPlaneCollisionAlgorithm (long jarg1);
+
+       public final static native void btConvexPlaneCollisionAlgorithm_collideSingleContact (long jarg1,
+               btConvexPlaneCollisionAlgorithm jarg1_, Quaternion jarg2, long jarg3, btCollisionObject jarg3_, long jarg4,
+               btCollisionObject jarg4_, long jarg5, btDispatcherInfo jarg5_, long jarg6, btManifoldResult jarg6_);
+
+       public final static native void delete_btCollisionConfiguration (long jarg1);
+
+       public final static native long btCollisionConfiguration_getPersistentManifoldPool (long jarg1, btCollisionConfiguration jarg1_);
+
+       public final static native long btCollisionConfiguration_getCollisionAlgorithmPool (long jarg1, btCollisionConfiguration jarg1_);
+
+       public final static native long btCollisionConfiguration_getStackAllocator (long jarg1, btCollisionConfiguration jarg1_);
+
+       public final static native long btCollisionConfiguration_getCollisionAlgorithmCreateFunc (long jarg1,
+               btCollisionConfiguration jarg1_, int jarg2, int jarg3);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_stackAlloc_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, long jarg2, btStackAlloc jarg2_);
+
+       public final static native long btDefaultCollisionConstructionInfo_m_stackAlloc_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_persistentManifoldPool_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, long jarg2, btPoolAllocator jarg2_);
+
+       public final static native long btDefaultCollisionConstructionInfo_m_persistentManifoldPool_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, long jarg2, btPoolAllocator jarg2_);
+
+       public final static native long btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, int jarg2);
+
+       public final static native int btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, int jarg2);
+
+       public final static native int btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, int jarg2);
+
+       public final static native int btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, int jarg2);
+
+       public final static native int btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native void btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_set (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_, int jarg2);
+
+       public final static native int btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_get (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native long new_btDefaultCollisionConstructionInfo ();
+
+       public final static native void delete_btDefaultCollisionConstructionInfo (long jarg1);
+
+       public final static native long new_btDefaultCollisionConfiguration__SWIG_0 (long jarg1,
+               btDefaultCollisionConstructionInfo jarg1_);
+
+       public final static native long new_btDefaultCollisionConfiguration__SWIG_1 ();
+
+       public final static native void delete_btDefaultCollisionConfiguration (long jarg1);
+
+       public final static native long btDefaultCollisionConfiguration_getSimplexSolver (long jarg1,
+               btDefaultCollisionConfiguration jarg1_);
+
+       public final static native void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_0 (long jarg1,
+               btDefaultCollisionConfiguration jarg1_, int jarg2, int jarg3);
+
+       public final static native void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_1 (long jarg1,
+               btDefaultCollisionConfiguration jarg1_, int jarg2);
+
+       public final static native void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_2 (long jarg1,
+               btDefaultCollisionConfiguration jarg1_);
+
+       public final static native void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_0 (long jarg1,
+               btDefaultCollisionConfiguration jarg1_, int jarg2, int jarg3);
+
+       public final static native void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_1 (long jarg1,
+               btDefaultCollisionConfiguration jarg1_, int jarg2);
+
+       public final static native void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_2 (long jarg1,
+               btDefaultCollisionConfiguration jarg1_);
+
+       public final static native void gContactAddedCallback_set (long jarg1);
+
+       public final static native long gContactAddedCallback_get ();
+
+       public final static native long new_btManifoldResult__SWIG_0 ();
+
+       public final static native long new_btManifoldResult__SWIG_1 (long jarg1, btCollisionObject jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native void delete_btManifoldResult (long jarg1);
+
+       public final static native void btManifoldResult_setPersistentManifold (long jarg1, btManifoldResult jarg1_, long jarg2,
+               btPersistentManifold jarg2_);
+
+       public final static native long btManifoldResult_getPersistentManifold__SWIG_0 (long jarg1, btManifoldResult jarg1_);
+
+       public final static native void btManifoldResult_setShapeIdentifiersA (long jarg1, btManifoldResult jarg1_, int jarg2,
+               int jarg3);
+
+       public final static native void btManifoldResult_setShapeIdentifiersB (long jarg1, btManifoldResult jarg1_, int jarg2,
+               int jarg3);
+
+       public final static native void btManifoldResult_addContactPoint (long jarg1, btManifoldResult jarg1_, Vector3 jarg2,
+               Vector3 jarg3, float jarg4);
+
+       public final static native void btManifoldResult_refreshContactPoints (long jarg1, btManifoldResult jarg1_);
+
+       public final static native long btManifoldResult_getBody0Internal (long jarg1, btManifoldResult jarg1_);
+
+       public final static native long btManifoldResult_getBody1Internal (long jarg1, btManifoldResult jarg1_);
+
+       public final static native long new_btSphereSphereCollisionAlgorithm__SWIG_0 (long jarg1, btPersistentManifold jarg1_,
+               long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4,
+               btCollisionObject jarg4_);
+
+       public final static native long new_btSphereSphereCollisionAlgorithm__SWIG_1 (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_);
+
+       public final static native void delete_btSphereSphereCollisionAlgorithm (long jarg1);
+
+       public final static native long new_btBoxBoxCollisionAlgorithm__SWIG_0 (long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
+
+       public final static native long new_btBoxBoxCollisionAlgorithm__SWIG_1 (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_);
+
+       public final static native void delete_btBoxBoxCollisionAlgorithm (long jarg1);
+
+       public final static native void btCollisionAlgorithmCreateFunc_m_swapped_set (long jarg1,
+               btCollisionAlgorithmCreateFunc jarg1_, boolean jarg2);
+
+       public final static native boolean btCollisionAlgorithmCreateFunc_m_swapped_get (long jarg1,
+               btCollisionAlgorithmCreateFunc jarg1_);
+
+       public final static native long new_btCollisionAlgorithmCreateFunc ();
+
+       public final static native void delete_btCollisionAlgorithmCreateFunc (long jarg1);
+
+       public final static native long btCollisionAlgorithmCreateFunc_CreateCollisionAlgorithm (long jarg1,
+               btCollisionAlgorithmCreateFunc jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3,
+               btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_);
+
+       public final static native long new_btBox2dBox2dCollisionAlgorithm__SWIG_0 (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_);
+
+       public final static native long new_btBox2dBox2dCollisionAlgorithm__SWIG_1 (long jarg1, btPersistentManifold jarg1_,
+               long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4,
+               btCollisionObject jarg4_);
+
+       public final static native void delete_btBox2dBox2dCollisionAlgorithm (long jarg1);
+
+       public final static native void btElement_m_id_set (long jarg1, btElement jarg1_, int jarg2);
+
+       public final static native int btElement_m_id_get (long jarg1, btElement jarg1_);
+
+       public final static native void btElement_m_sz_set (long jarg1, btElement jarg1_, int jarg2);
+
+       public final static native int btElement_m_sz_get (long jarg1, btElement jarg1_);
+
+       public final static native long new_btElement ();
+
+       public final static native void delete_btElement (long jarg1);
+
+       public final static native long new_btUnionFind ();
+
+       public final static native void delete_btUnionFind (long jarg1);
+
+       public final static native void btUnionFind_sortIslands (long jarg1, btUnionFind jarg1_);
+
+       public final static native void btUnionFind_reset (long jarg1, btUnionFind jarg1_, int jarg2);
+
+       public final static native int btUnionFind_getNumElements (long jarg1, btUnionFind jarg1_);
+
+       public final static native boolean btUnionFind_isRoot (long jarg1, btUnionFind jarg1_, int jarg2);
+
+       public final static native long btUnionFind_getElement__SWIG_0 (long jarg1, btUnionFind jarg1_, int jarg2);
+
+       public final static native void btUnionFind_allocate (long jarg1, btUnionFind jarg1_, int jarg2);
+
+       public final static native void btUnionFind_Free (long jarg1, btUnionFind jarg1_);
+
+       public final static native int btUnionFind_find__SWIG_0 (long jarg1, btUnionFind jarg1_, int jarg2, int jarg3);
+
+       public final static native void btUnionFind_unite (long jarg1, btUnionFind jarg1_, int jarg2, int jarg3);
+
+       public final static native int btUnionFind_find__SWIG_1 (long jarg1, btUnionFind jarg1_, int jarg2);
+
+       public final static native long new_btSphereTriangleCollisionAlgorithm__SWIG_0 (long jarg1, btPersistentManifold jarg1_,
+               long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4,
+               btCollisionObject jarg4_, boolean jarg5);
+
+       public final static native long new_btSphereTriangleCollisionAlgorithm__SWIG_1 (long jarg1,
+               btCollisionAlgorithmConstructionInfo jarg1_);
+
+       public final static native void delete_btSphereTriangleCollisionAlgorithm (long jarg1);
+
+       public final static native long new_btSimulationIslandManager ();
+
+       public final static native void delete_btSimulationIslandManager (long jarg1);
+
+       public final static native void btSimulationIslandManager_initUnionFind (long jarg1, btSimulationIslandManager jarg1_,
+               int jarg2);
+
+       public final static native long btSimulationIslandManager_getUnionFind (long jarg1, btSimulationIslandManager jarg1_);
+
+       public final static native void btSimulationIslandManager_updateActivationState (long jarg1, btSimulationIslandManager jarg1_,
+               long jarg2, btCollisionWorld jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native void btSimulationIslandManager_storeIslandActivationState (long jarg1,
+               btSimulationIslandManager jarg1_, long jarg2, btCollisionWorld jarg2_);
+
+       public final static native void btSimulationIslandManager_findUnions (long jarg1, btSimulationIslandManager jarg1_,
+               long jarg2, btDispatcher jarg2_, long jarg3, btCollisionWorld jarg3_);
+
+       public final static native void btSimulationIslandManager_buildAndProcessIslands (long jarg1,
+               btSimulationIslandManager jarg1_, long jarg2, btDispatcher jarg2_, long jarg3, btCollisionWorld jarg3_, long jarg4);
+
+       public final static native void btSimulationIslandManager_buildIslands (long jarg1, btSimulationIslandManager jarg1_,
+               long jarg2, btDispatcher jarg2_, long jarg3, btCollisionWorld jarg3_);
+
+       public final static native boolean btSimulationIslandManager_getSplitIslands (long jarg1, btSimulationIslandManager jarg1_);
+
+       public final static native void btSimulationIslandManager_setSplitIslands (long jarg1, btSimulationIslandManager jarg1_,
+               boolean jarg2);
+
+       public final static native long new_btGhostObject ();
+
+       public final static native void delete_btGhostObject (long jarg1);
+
+       public final static native void btGhostObject_convexSweepTest__SWIG_0 (long jarg1, btGhostObject jarg1_, long jarg2,
+               btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5, float jarg6);
+
+       public final static native void btGhostObject_convexSweepTest__SWIG_1 (long jarg1, btGhostObject jarg1_, long jarg2,
+               btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5);
+
+       public final static native void btGhostObject_rayTest (long jarg1, btGhostObject jarg1_, Vector3 jarg2, Vector3 jarg3,
+               long jarg4);
+
+       public final static native void btGhostObject_addOverlappingObjectInternal__SWIG_0 (long jarg1, btGhostObject jarg1_,
+               long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native void btGhostObject_addOverlappingObjectInternal__SWIG_1 (long jarg1, btGhostObject jarg1_,
+               long jarg2, btBroadphaseProxy jarg2_);
+
+       public final static native void btGhostObject_removeOverlappingObjectInternal__SWIG_0 (long jarg1, btGhostObject jarg1_,
+               long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_, long jarg4, btBroadphaseProxy jarg4_);
+
+       public final static native void btGhostObject_removeOverlappingObjectInternal__SWIG_1 (long jarg1, btGhostObject jarg1_,
+               long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native int btGhostObject_getNumOverlappingObjects (long jarg1, btGhostObject jarg1_);
+
+       public final static native long btGhostObject_getOverlappingObject__SWIG_0 (long jarg1, btGhostObject jarg1_, int jarg2);
+
+       public final static native long btGhostObject_getOverlappingPairs__SWIG_0 (long jarg1, btGhostObject jarg1_);
+
+       public final static native long btGhostObject_upcast__SWIG_0 (long jarg1, btCollisionObject jarg1_);
+
+       public final static native long new_btPairCachingGhostObject ();
+
+       public final static native void delete_btPairCachingGhostObject (long jarg1);
+
+       public final static native void btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_0 (long jarg1,
+               btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
+
+       public final static native void btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_1 (long jarg1,
+               btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_);
+
+       public final static native void btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_0 (long jarg1,
+               btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_, long jarg4,
+               btBroadphaseProxy jarg4_);
+
+       public final static native void btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_1 (long jarg1,
+               btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
+
+       public final static native long btPairCachingGhostObject_getOverlappingPairCache (long jarg1, btPairCachingGhostObject jarg1_);
+
+       public final static native long new_btGhostPairCallback ();
+
+       public final static native void delete_btGhostPairCallback (long jarg1);
+
+       public final static native long new_btCollisionWorld (long jarg1, btDispatcher jarg1_, long jarg2,
+               btBroadphaseInterface jarg2_, long jarg3, btCollisionConfiguration jarg3_);
+
+       public final static native void delete_btCollisionWorld (long jarg1);
+
+       public final static native void btCollisionWorld_setBroadphase (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btBroadphaseInterface jarg2_);
+
+       public final static native long btCollisionWorld_getBroadphase__SWIG_0 (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native long btCollisionWorld_getPairCache (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native long btCollisionWorld_getDispatcher__SWIG_0 (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native void btCollisionWorld_updateSingleAabb (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native void btCollisionWorld_updateAabbs (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native void btCollisionWorld_setDebugDrawer (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btIDebugDraw jarg2_);
+
+       public final static native long btCollisionWorld_getDebugDrawer (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native void btCollisionWorld_debugDrawWorld (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native void btCollisionWorld_debugDrawObject (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btCollisionShape jarg3_, Vector3 jarg4);
+
+       public final static native int btCollisionWorld_getNumCollisionObjects (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native void btCollisionWorld_rayTest (long jarg1, btCollisionWorld jarg1_, Vector3 jarg2, Vector3 jarg3,
+               long jarg4);
+
+       public final static native void btCollisionWorld_convexSweepTest__SWIG_0 (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5, float jarg6);
+
+       public final static native void btCollisionWorld_convexSweepTest__SWIG_1 (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5);
+
+       public final static native void btCollisionWorld_contactTest (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3);
+
+       public final static native void btCollisionWorld_contactPairTest (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4);
+
+       public final static native void btCollisionWorld_rayTestSingle (long jarg1, btTransform jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionShape jarg4_, long jarg5,
+               btTransform jarg5_, long jarg6);
+
+       public final static native void btCollisionWorld_objectQuerySingle (long jarg1, btConvexShape jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_, long jarg4, btCollisionObject jarg4_, long jarg5,
+               btCollisionShape jarg5_, long jarg6, btTransform jarg6_, long jarg7, float jarg8);
+
+       public final static native void btCollisionWorld_addCollisionObject__SWIG_0 (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btCollisionObject jarg2_, short jarg3, short jarg4);
+
+       public final static native void btCollisionWorld_addCollisionObject__SWIG_1 (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btCollisionObject jarg2_, short jarg3);
+
+       public final static native void btCollisionWorld_addCollisionObject__SWIG_2 (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native long btCollisionWorld_getCollisionObjectArray__SWIG_0 (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native void btCollisionWorld_removeCollisionObject (long jarg1, btCollisionWorld jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native void btCollisionWorld_performDiscreteCollisionDetection (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native long btCollisionWorld_getDispatchInfo__SWIG_0 (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native boolean btCollisionWorld_getForceUpdateAllAabbs (long jarg1, btCollisionWorld jarg1_);
+
+       public final static native void btCollisionWorld_setForceUpdateAllAabbs (long jarg1, btCollisionWorld jarg1_, boolean jarg2);
+
+       public final static native void btCollisionWorld_serialize (long jarg1, btCollisionWorld jarg1_, long jarg2);
+
+       public final static native long new_btConvex2dConvex2dAlgorithm (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_,
+               long jarg5, long jarg6, btConvexPenetrationDepthSolver jarg6_, int jarg7, int jarg8);
+
+       public final static native void delete_btConvex2dConvex2dAlgorithm (long jarg1);
+
+       public final static native void btConvex2dConvex2dAlgorithm_setLowLevelOfDetail (long jarg1,
+               btConvex2dConvex2dAlgorithm jarg1_, boolean jarg2);
+
+       public final static native long btConvex2dConvex2dAlgorithm_getManifold (long jarg1, btConvex2dConvex2dAlgorithm jarg1_);
+
+       public final static native void btBoxBoxDetector_m_box1_set (long jarg1, btBoxBoxDetector jarg1_, long jarg2, btBoxShape jarg2_);
+
+       public final static native long btBoxBoxDetector_m_box1_get (long jarg1, btBoxBoxDetector jarg1_);
+
+       public final static native void btBoxBoxDetector_m_box2_set (long jarg1, btBoxBoxDetector jarg1_, long jarg2, btBoxShape jarg2_);
+
+       public final static native long btBoxBoxDetector_m_box2_get (long jarg1, btBoxBoxDetector jarg1_);
+
+       public final static native long new_btBoxBoxDetector (long jarg1, btBoxShape jarg1_, long jarg2, btBoxShape jarg2_);
+
+       public final static native void delete_btBoxBoxDetector (long jarg1);
+
+       public final static native void btBoxBoxDetector_getClosestPoints__SWIG_0 (long jarg1, btBoxBoxDetector jarg1_, long jarg2,
+               ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_, boolean jarg5);
+
+       public final static native void btBoxBoxDetector_getClosestPoints__SWIG_1 (long jarg1, btBoxBoxDetector jarg1_, long jarg2,
+               ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
+
+       public final static native long new_btSphereBoxCollisionAlgorithm (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_,
+               boolean jarg5);
+
+       public final static native void delete_btSphereBoxCollisionAlgorithm (long jarg1);
+
+       public final static native float btSphereBoxCollisionAlgorithm_getSphereDistance (long jarg1,
+               btSphereBoxCollisionAlgorithm jarg1_, long jarg2, btCollisionObject jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5,
+               float jarg6);
+
+       public final static native float btSphereBoxCollisionAlgorithm_getSpherePenetration (long jarg1,
+               btSphereBoxCollisionAlgorithm jarg1_, long jarg2, btCollisionObject jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5,
+               float jarg6, Vector3 jarg7, Vector3 jarg8);
+
+       public final static native int btCollisionDispatcher_getDispatcherFlags (long jarg1, btCollisionDispatcher jarg1_);
+
+       public final static native void btCollisionDispatcher_setDispatcherFlags (long jarg1, btCollisionDispatcher jarg1_, int jarg2);
+
+       public final static native void btCollisionDispatcher_registerCollisionCreateFunc (long jarg1, btCollisionDispatcher jarg1_,
+               int jarg2, int jarg3, long jarg4, btCollisionAlgorithmCreateFunc jarg4_);
+
+       public final static native long btCollisionDispatcher_getManifoldByIndexInternal__SWIG_0 (long jarg1,
+               btCollisionDispatcher jarg1_, int jarg2);
+
+       public final static native long new_btCollisionDispatcher (long jarg1, btCollisionConfiguration jarg1_);
+
+       public final static native void delete_btCollisionDispatcher (long jarg1);
+
+       public final static native long btCollisionDispatcher_findAlgorithm__SWIG_0 (long jarg1, btCollisionDispatcher jarg1_,
+               long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btPersistentManifold jarg4_);
+
+       public final static native long btCollisionDispatcher_findAlgorithm__SWIG_1 (long jarg1, btCollisionDispatcher jarg1_,
+               long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
+
+       public final static native void btCollisionDispatcher_setNearCallback (long jarg1, btCollisionDispatcher jarg1_, long jarg2);
+
+       public final static native long btCollisionDispatcher_getNearCallback (long jarg1, btCollisionDispatcher jarg1_);
+
+       public final static native void btCollisionDispatcher_defaultNearCallback (long jarg1, btBroadphasePair jarg1_, long jarg2,
+               btCollisionDispatcher jarg2_, long jarg3, btDispatcherInfo jarg3_);
+
+       public final static native long btCollisionDispatcher_getCollisionConfiguration__SWIG_0 (long jarg1,
+               btCollisionDispatcher jarg1_);
+
+       public final static native void btCollisionDispatcher_setCollisionConfiguration (long jarg1, btCollisionDispatcher jarg1_,
+               long jarg2, btCollisionConfiguration jarg2_);
+
+       public final static native long btCollisionDispatcher_getInternalManifoldPool__SWIG_0 (long jarg1, btCollisionDispatcher jarg1_);
+
+       public final static native long new_btConvexConvexAlgorithm (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_,
+               long jarg5, long jarg6, btConvexPenetrationDepthSolver jarg6_, int jarg7, int jarg8);
+
+       public final static native void delete_btConvexConvexAlgorithm (long jarg1);
+
+       public final static native void btConvexConvexAlgorithm_setLowLevelOfDetail (long jarg1, btConvexConvexAlgorithm jarg1_,
+               boolean jarg2);
+
+       public final static native long btConvexConvexAlgorithm_getManifold (long jarg1, btConvexConvexAlgorithm jarg1_);
+
+       public final static native void SphereTriangleDetector_getClosestPoints__SWIG_0 (long jarg1, SphereTriangleDetector jarg1_,
+               long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_, boolean jarg5);
+
+       public final static native void SphereTriangleDetector_getClosestPoints__SWIG_1 (long jarg1, SphereTriangleDetector jarg1_,
+               long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
+
+       public final static native long new_SphereTriangleDetector (long jarg1, btSphereShape jarg1_, long jarg2,
+               btTriangleShape jarg2_, float jarg3);
+
+       public final static native void delete_SphereTriangleDetector (long jarg1);
+
+       public final static native boolean SphereTriangleDetector_collide (long jarg1, SphereTriangleDetector jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4, long jarg5, long jarg6, float jarg7);
+
+       public final static native void btGenerateInternalEdgeInfo (long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2,
+               btTriangleInfoMap jarg2_);
+
+       public final static native void btAdjustInternalEdgeContacts__SWIG_0 (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, int jarg4, int jarg5, int jarg6);
+
+       public final static native void btAdjustInternalEdgeContacts__SWIG_1 (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, int jarg4, int jarg5);
+
+       public final static native long new_btCompoundCollisionAlgorithm (long jarg1, btCollisionAlgorithmConstructionInfo jarg1_,
+               long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, boolean jarg4);
+
+       public final static native void delete_btCompoundCollisionAlgorithm (long jarg1);
+
+       public final static native void delete_btConvexCast (long jarg1);
+
+       public final static native boolean btConvexCast_calcTimeOfImpact (long jarg1, btConvexCast jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5, btTransform jarg5_,
+               long jarg6);
+
+       public final static native long new_btSubsimplexConvexCast (long jarg1, btConvexShape jarg1_, long jarg2,
+               btConvexShape jarg2_, long jarg3);
+
+       public final static native void delete_btSubsimplexConvexCast (long jarg1);
+
+       public final static native void btPolyhedralContactClipping_clipHullAgainstHull (Vector3 jarg1, long jarg2,
+               btConvexPolyhedron jarg2_, long jarg3, btConvexPolyhedron jarg3_, long jarg4, btTransform jarg4_, long jarg5,
+               btTransform jarg5_, float jarg6, float jarg7, long jarg8);
+
+       public final static native void btPolyhedralContactClipping_clipFaceAgainstHull (Vector3 jarg1, long jarg2,
+               btConvexPolyhedron jarg2_, long jarg3, btTransform jarg3_, long jarg4, float jarg5, float jarg6, long jarg7);
+
+       public final static native boolean btPolyhedralContactClipping_findSeparatingAxis (long jarg1, btConvexPolyhedron jarg1_,
+               long jarg2, btConvexPolyhedron jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5);
+
+       public final static native void btPolyhedralContactClipping_clipFace (long jarg1, long jarg2, Vector3 jarg3, float jarg4);
+
+       public final static native long new_btPolyhedralContactClipping ();
+
+       public final static native void delete_btPolyhedralContactClipping (long jarg1);
+
+       public final static native void gContactBreakingThreshold_set (float jarg1);
+
+       public final static native float gContactBreakingThreshold_get ();
+
+       public final static native void gContactDestroyedCallback_set (long jarg1);
+
+       public final static native long gContactDestroyedCallback_get ();
+
+       public final static native void gContactProcessedCallback_set (long jarg1);
+
+       public final static native long gContactProcessedCallback_get ();
+
+       public final static native void btPersistentManifold_m_companionIdA_set (long jarg1, btPersistentManifold jarg1_, int jarg2);
+
+       public final static native int btPersistentManifold_m_companionIdA_get (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native void btPersistentManifold_m_companionIdB_set (long jarg1, btPersistentManifold jarg1_, int jarg2);
+
+       public final static native int btPersistentManifold_m_companionIdB_get (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native void btPersistentManifold_m_index1a_set (long jarg1, btPersistentManifold jarg1_, int jarg2);
+
+       public final static native int btPersistentManifold_m_index1a_get (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native long new_btPersistentManifold__SWIG_0 ();
+
+       public final static native long new_btPersistentManifold__SWIG_1 (long jarg1, long jarg2, int jarg3, float jarg4, float jarg5);
+
+       public final static native long btPersistentManifold_getBody0__SWIG_0 (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native long btPersistentManifold_getBody1__SWIG_0 (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native void btPersistentManifold_setBodies (long jarg1, btPersistentManifold jarg1_, long jarg2, long jarg3);
+
+       public final static native void btPersistentManifold_clearUserCache (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btManifoldPoint jarg2_);
+
+       public final static native int btPersistentManifold_getNumContacts (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native long btPersistentManifold_getContactPoint__SWIG_0 (long jarg1, btPersistentManifold jarg1_,
+               int jarg2);
+
+       public final static native float btPersistentManifold_getContactBreakingThreshold (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native float btPersistentManifold_getContactProcessingThreshold (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native int btPersistentManifold_getCacheEntry (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btManifoldPoint jarg2_);
+
+       public final static native int btPersistentManifold_addManifoldPoint (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btManifoldPoint jarg2_);
+
+       public final static native void btPersistentManifold_removeContactPoint (long jarg1, btPersistentManifold jarg1_, int jarg2);
+
+       public final static native void btPersistentManifold_replaceContactPoint (long jarg1, btPersistentManifold jarg1_, long jarg2,
+               btManifoldPoint jarg2_, int jarg3);
+
+       public final static native boolean btPersistentManifold_validContactDistance (long jarg1, btPersistentManifold jarg1_,
+               long jarg2, btManifoldPoint jarg2_);
+
+       public final static native void btPersistentManifold_refreshContactPoints (long jarg1, btPersistentManifold jarg1_,
+               long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native void btPersistentManifold_clearManifold (long jarg1, btPersistentManifold jarg1_);
+
+       public final static native void delete_btPersistentManifold (long jarg1);
+
+       public final static native void btGjkPairDetector_m_lastUsedMethod_set (long jarg1, btGjkPairDetector jarg1_, int jarg2);
+
+       public final static native int btGjkPairDetector_m_lastUsedMethod_get (long jarg1, btGjkPairDetector jarg1_);
+
+       public final static native void btGjkPairDetector_m_curIter_set (long jarg1, btGjkPairDetector jarg1_, int jarg2);
+
+       public final static native int btGjkPairDetector_m_curIter_get (long jarg1, btGjkPairDetector jarg1_);
+
+       public final static native void btGjkPairDetector_m_degenerateSimplex_set (long jarg1, btGjkPairDetector jarg1_, int jarg2);
+
+       public final static native int btGjkPairDetector_m_degenerateSimplex_get (long jarg1, btGjkPairDetector jarg1_);
+
+       public final static native void btGjkPairDetector_m_catchDegeneracies_set (long jarg1, btGjkPairDetector jarg1_, int jarg2);
+
+       public final static native int btGjkPairDetector_m_catchDegeneracies_get (long jarg1, btGjkPairDetector jarg1_);
+
+       public final static native long new_btGjkPairDetector__SWIG_0 (long jarg1, btConvexShape jarg1_, long jarg2,
+               btConvexShape jarg2_, long jarg3, long jarg4, btConvexPenetrationDepthSolver jarg4_);
+
+       public final static native long new_btGjkPairDetector__SWIG_1 (long jarg1, btConvexShape jarg1_, long jarg2,
+               btConvexShape jarg2_, int jarg3, int jarg4, float jarg5, float jarg6, long jarg7, long jarg8,
+               btConvexPenetrationDepthSolver jarg8_);
+
+       public final static native void delete_btGjkPairDetector (long jarg1);
+
+       public final static native void btGjkPairDetector_getClosestPoints__SWIG_0 (long jarg1, btGjkPairDetector jarg1_, long jarg2,
+               ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_, boolean jarg5);
+
+       public final static native void btGjkPairDetector_getClosestPoints__SWIG_1 (long jarg1, btGjkPairDetector jarg1_, long jarg2,
+               ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
+
+       public final static native void btGjkPairDetector_getClosestPointsNonVirtual (long jarg1, btGjkPairDetector jarg1_,
+               long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
+
+       public final static native void btGjkPairDetector_setMinkowskiA (long jarg1, btGjkPairDetector jarg1_, long jarg2,
+               btConvexShape jarg2_);
+
+       public final static native void btGjkPairDetector_setMinkowskiB (long jarg1, btGjkPairDetector jarg1_, long jarg2,
+               btConvexShape jarg2_);
+
+       public final static native void btGjkPairDetector_setCachedSeperatingAxis (long jarg1, btGjkPairDetector jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btGjkPairDetector_getCachedSeparatingAxis (long jarg1, btGjkPairDetector jarg1_);
+
+       public final static native float btGjkPairDetector_getCachedSeparatingDistance (long jarg1, btGjkPairDetector jarg1_);
+
+       public final static native void btGjkPairDetector_setPenetrationDepthSolver (long jarg1, btGjkPairDetector jarg1_, long jarg2,
+               btConvexPenetrationDepthSolver jarg2_);
+
+       public final static native void btGjkPairDetector_setIgnoreMargin (long jarg1, btGjkPairDetector jarg1_, boolean jarg2);
+
+       public final static native void delete_btConvexPenetrationDepthSolver (long jarg1);
+
+       public final static native boolean btConvexPenetrationDepthSolver_calcPenDepth (long jarg1,
+               btConvexPenetrationDepthSolver jarg1_, long jarg2, long jarg3, btConvexShape jarg3_, long jarg4, btConvexShape jarg4_,
+               long jarg5, btTransform jarg5_, long jarg6, btTransform jarg6_, Vector3 jarg7, Vector3 jarg8, Vector3 jarg9, long jarg10,
+               btIDebugDraw jarg10_, long jarg11, btStackAlloc jarg11_);
+
+       public final static native long new_btMinkowskiPenetrationDepthSolver ();
+
+       public final static native void delete_btMinkowskiPenetrationDepthSolver (long jarg1);
+
+       public final static native long new_btGjkConvexCast (long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_,
+               long jarg3);
+
+       public final static native void delete_btGjkConvexCast (long jarg1);
+
+       public final static native void btConstraintRow_m_normal_set (long jarg1, btConstraintRow jarg1_, float[] jarg2);
+
+       public final static native float[] btConstraintRow_m_normal_get (long jarg1, btConstraintRow jarg1_);
+
+       public final static native void btConstraintRow_m_rhs_set (long jarg1, btConstraintRow jarg1_, float jarg2);
+
+       public final static native float btConstraintRow_m_rhs_get (long jarg1, btConstraintRow jarg1_);
+
+       public final static native void btConstraintRow_m_jacDiagInv_set (long jarg1, btConstraintRow jarg1_, float jarg2);
+
+       public final static native float btConstraintRow_m_jacDiagInv_get (long jarg1, btConstraintRow jarg1_);
+
+       public final static native void btConstraintRow_m_lowerLimit_set (long jarg1, btConstraintRow jarg1_, float jarg2);
+
+       public final static native float btConstraintRow_m_lowerLimit_get (long jarg1, btConstraintRow jarg1_);
+
+       public final static native void btConstraintRow_m_upperLimit_set (long jarg1, btConstraintRow jarg1_, float jarg2);
+
+       public final static native float btConstraintRow_m_upperLimit_get (long jarg1, btConstraintRow jarg1_);
+
+       public final static native void btConstraintRow_m_accumImpulse_set (long jarg1, btConstraintRow jarg1_, float jarg2);
+
+       public final static native float btConstraintRow_m_accumImpulse_get (long jarg1, btConstraintRow jarg1_);
+
+       public final static native long new_btConstraintRow ();
+
+       public final static native void delete_btConstraintRow (long jarg1);
+
+       public final static native long new_btManifoldPoint__SWIG_0 ();
+
+       public final static native long new_btManifoldPoint__SWIG_1 (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, float jarg4);
+
+       public final static native void btManifoldPoint_m_localPointA_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btManifoldPoint_m_localPointA_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_localPointB_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btManifoldPoint_m_localPointB_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_positionWorldOnB_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btManifoldPoint_m_positionWorldOnB_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_positionWorldOnA_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btManifoldPoint_m_positionWorldOnA_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_normalWorldOnB_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btManifoldPoint_m_normalWorldOnB_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_distance1_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_distance1_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_combinedFriction_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_combinedFriction_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_combinedRestitution_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_combinedRestitution_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_partId0_set (long jarg1, btManifoldPoint jarg1_, int jarg2);
+
+       public final static native int btManifoldPoint_m_partId0_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_partId1_set (long jarg1, btManifoldPoint jarg1_, int jarg2);
+
+       public final static native int btManifoldPoint_m_partId1_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_index0_set (long jarg1, btManifoldPoint jarg1_, int jarg2);
+
+       public final static native int btManifoldPoint_m_index0_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_index1_set (long jarg1, btManifoldPoint jarg1_, int jarg2);
+
+       public final static native int btManifoldPoint_m_index1_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_userPersistentData_set (long jarg1, btManifoldPoint jarg1_, long jarg2);
+
+       public final static native long btManifoldPoint_m_userPersistentData_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_appliedImpulse_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_appliedImpulse_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_lateralFrictionInitialized_set (long jarg1, btManifoldPoint jarg1_,
+               boolean jarg2);
+
+       public final static native boolean btManifoldPoint_m_lateralFrictionInitialized_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_appliedImpulseLateral1_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_appliedImpulseLateral1_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_appliedImpulseLateral2_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_appliedImpulseLateral2_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_contactMotion1_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_contactMotion1_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_contactMotion2_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_contactMotion2_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_contactCFM1_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_contactCFM1_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_contactCFM2_set (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_m_contactCFM2_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_lifeTime_set (long jarg1, btManifoldPoint jarg1_, int jarg2);
+
+       public final static native int btManifoldPoint_m_lifeTime_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_lateralFrictionDir1_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btManifoldPoint_m_lateralFrictionDir1_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_m_lateralFrictionDir2_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btManifoldPoint_m_lateralFrictionDir2_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_mConstraintRow_set (long jarg1, btManifoldPoint jarg1_, long jarg2,
+               btConstraintRow jarg2_);
+
+       public final static native long btManifoldPoint_mConstraintRow_get (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native float btManifoldPoint_getDistance (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native int btManifoldPoint_getLifeTime (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native Vector3 btManifoldPoint_getPositionWorldOnA (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native Vector3 btManifoldPoint_getPositionWorldOnB (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void btManifoldPoint_setDistance (long jarg1, btManifoldPoint jarg1_, float jarg2);
+
+       public final static native float btManifoldPoint_getAppliedImpulse (long jarg1, btManifoldPoint jarg1_);
+
+       public final static native void delete_btManifoldPoint (long jarg1);
+
+       public final static native long new_btContinuousConvexCollision__SWIG_0 (long jarg1, btConvexShape jarg1_, long jarg2,
+               btConvexShape jarg2_, long jarg3, long jarg4, btConvexPenetrationDepthSolver jarg4_);
+
+       public final static native long new_btContinuousConvexCollision__SWIG_1 (long jarg1, btConvexShape jarg1_, long jarg2,
+               btStaticPlaneShape jarg2_);
+
+       public final static native void delete_btContinuousConvexCollision (long jarg1);
+
+       public final static native void btTriangleRaycastCallback_m_from_set (long jarg1, btTriangleRaycastCallback jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTriangleRaycastCallback_m_from_get (long jarg1, btTriangleRaycastCallback jarg1_);
+
+       public final static native void btTriangleRaycastCallback_m_to_set (long jarg1, btTriangleRaycastCallback jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btTriangleRaycastCallback_m_to_get (long jarg1, btTriangleRaycastCallback jarg1_);
+
+       public final static native void btTriangleRaycastCallback_m_flags_set (long jarg1, btTriangleRaycastCallback jarg1_, long jarg2);
+
+       public final static native long btTriangleRaycastCallback_m_flags_get (long jarg1, btTriangleRaycastCallback jarg1_);
+
+       public final static native void btTriangleRaycastCallback_m_hitFraction_set (long jarg1, btTriangleRaycastCallback jarg1_,
+               float jarg2);
+
+       public final static native float btTriangleRaycastCallback_m_hitFraction_get (long jarg1, btTriangleRaycastCallback jarg1_);
+
+       public final static native float btTriangleRaycastCallback_reportHit (long jarg1, btTriangleRaycastCallback jarg1_,
+               Vector3 jarg2, float jarg3, int jarg4, int jarg5);
+
+       public final static native void delete_btTriangleRaycastCallback (long jarg1);
+
+       public final static native void btTriangleConvexcastCallback_m_convexShape_set (long jarg1,
+               btTriangleConvexcastCallback jarg1_, long jarg2, btConvexShape jarg2_);
+
+       public final static native long btTriangleConvexcastCallback_m_convexShape_get (long jarg1, btTriangleConvexcastCallback jarg1_);
+
+       public final static native void btTriangleConvexcastCallback_m_convexShapeFrom_set (long jarg1,
+               btTriangleConvexcastCallback jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native long btTriangleConvexcastCallback_m_convexShapeFrom_get (long jarg1,
+               btTriangleConvexcastCallback jarg1_);
+
+       public final static native void btTriangleConvexcastCallback_m_convexShapeTo_set (long jarg1,
+               btTriangleConvexcastCallback jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native long btTriangleConvexcastCallback_m_convexShapeTo_get (long jarg1,
+               btTriangleConvexcastCallback jarg1_);
+
+       public final static native void btTriangleConvexcastCallback_m_triangleToWorld_set (long jarg1,
+               btTriangleConvexcastCallback jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native long btTriangleConvexcastCallback_m_triangleToWorld_get (long jarg1,
+               btTriangleConvexcastCallback jarg1_);
+
+       public final static native void btTriangleConvexcastCallback_m_hitFraction_set (long jarg1,
+               btTriangleConvexcastCallback jarg1_, float jarg2);
+
+       public final static native float btTriangleConvexcastCallback_m_hitFraction_get (long jarg1,
+               btTriangleConvexcastCallback jarg1_);
+
+       public final static native void btTriangleConvexcastCallback_m_triangleCollisionMargin_set (long jarg1,
+               btTriangleConvexcastCallback jarg1_, float jarg2);
+
+       public final static native float btTriangleConvexcastCallback_m_triangleCollisionMargin_get (long jarg1,
+               btTriangleConvexcastCallback jarg1_);
+
+       public final static native void btTriangleConvexcastCallback_m_allowedPenetration_set (long jarg1,
+               btTriangleConvexcastCallback jarg1_, float jarg2);
+
+       public final static native float btTriangleConvexcastCallback_m_allowedPenetration_get (long jarg1,
+               btTriangleConvexcastCallback jarg1_);
+
+       public final static native float btTriangleConvexcastCallback_reportHit (long jarg1, btTriangleConvexcastCallback jarg1_,
+               Vector3 jarg2, Vector3 jarg3, float jarg4, int jarg5, int jarg6);
+
+       public final static native void delete_btTriangleConvexcastCallback (long jarg1);
+
+       public final static native int btGjkEpaSolver2_StackSizeRequirement ();
+
+       public final static native boolean btGjkEpaSolver2_Distance (long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_,
+               long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6);
+
+       public final static native boolean btGjkEpaSolver2_Penetration__SWIG_0 (long jarg1, btConvexShape jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6,
+               boolean jarg7);
+
+       public final static native boolean btGjkEpaSolver2_Penetration__SWIG_1 (long jarg1, btConvexShape jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6);
+
+       public final static native float btGjkEpaSolver2_SignedDistance__SWIG_0 (Vector3 jarg1, float jarg2, long jarg3,
+               btConvexShape jarg3_, long jarg4, btTransform jarg4_, long jarg5);
+
+       public final static native boolean btGjkEpaSolver2_SignedDistance__SWIG_1 (long jarg1, btConvexShape jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6);
+
+       public final static native long new_btGjkEpaSolver2 ();
+
+       public final static native void delete_btGjkEpaSolver2 (long jarg1);
+
+       public final static native long new_btGjkEpaPenetrationDepthSolver ();
+
+       public final static native void delete_btGjkEpaPenetrationDepthSolver (long jarg1);
+
+       public final static native void btPointCollector_m_normalOnBInWorld_set (long jarg1, btPointCollector jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btPointCollector_m_normalOnBInWorld_get (long jarg1, btPointCollector jarg1_);
+
+       public final static native void btPointCollector_m_pointInWorld_set (long jarg1, btPointCollector jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btPointCollector_m_pointInWorld_get (long jarg1, btPointCollector jarg1_);
+
+       public final static native void btPointCollector_m_distance_set (long jarg1, btPointCollector jarg1_, float jarg2);
+
+       public final static native float btPointCollector_m_distance_get (long jarg1, btPointCollector jarg1_);
+
+       public final static native void btPointCollector_m_hasResult_set (long jarg1, btPointCollector jarg1_, boolean jarg2);
+
+       public final static native boolean btPointCollector_m_hasResult_get (long jarg1, btPointCollector jarg1_);
+
+       public final static native long new_btPointCollector ();
+
+       public final static native void btPointCollector_setShapeIdentifiersA (long jarg1, btPointCollector jarg1_, int jarg2,
+               int jarg3);
+
+       public final static native void btPointCollector_setShapeIdentifiersB (long jarg1, btPointCollector jarg1_, int jarg2,
+               int jarg3);
+
+       public final static native void btPointCollector_addContactPoint (long jarg1, btPointCollector jarg1_, Vector3 jarg2,
+               Vector3 jarg3, float jarg4);
+
+       public final static native void delete_btPointCollector (long jarg1);
+
+       public final static native long new_btUsageBitfield ();
+
+       public final static native void btUsageBitfield_reset (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_usedVertexA_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_usedVertexA_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_usedVertexB_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_usedVertexB_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_usedVertexC_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_usedVertexC_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_usedVertexD_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_usedVertexD_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_unused1_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_unused1_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_unused2_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_unused2_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_unused3_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_unused3_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void btUsageBitfield_unused4_set (long jarg1, btUsageBitfield jarg1_, int jarg2);
+
+       public final static native int btUsageBitfield_unused4_get (long jarg1, btUsageBitfield jarg1_);
+
+       public final static native void delete_btUsageBitfield (long jarg1);
+
+       public final static native void btSubSimplexClosestResult_m_closestPointOnSimplex_set (long jarg1,
+               btSubSimplexClosestResult jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btSubSimplexClosestResult_m_closestPointOnSimplex_get (long jarg1,
+               btSubSimplexClosestResult jarg1_);
+
+       public final static native void btSubSimplexClosestResult_m_usedVertices_set (long jarg1, btSubSimplexClosestResult jarg1_,
+               long jarg2, btUsageBitfield jarg2_);
+
+       public final static native long btSubSimplexClosestResult_m_usedVertices_get (long jarg1, btSubSimplexClosestResult jarg1_);
+
+       public final static native void btSubSimplexClosestResult_m_barycentricCoords_set (long jarg1,
+               btSubSimplexClosestResult jarg1_, float[] jarg2);
+
+       public final static native float[] btSubSimplexClosestResult_m_barycentricCoords_get (long jarg1,
+               btSubSimplexClosestResult jarg1_);
+
+       public final static native void btSubSimplexClosestResult_m_degenerate_set (long jarg1, btSubSimplexClosestResult jarg1_,
+               boolean jarg2);
+
+       public final static native boolean btSubSimplexClosestResult_m_degenerate_get (long jarg1, btSubSimplexClosestResult jarg1_);
+
+       public final static native void btSubSimplexClosestResult_reset (long jarg1, btSubSimplexClosestResult jarg1_);
+
+       public final static native boolean btSubSimplexClosestResult_isValid (long jarg1, btSubSimplexClosestResult jarg1_);
+
+       public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_0 (long jarg1,
+               btSubSimplexClosestResult jarg1_, float jarg2, float jarg3, float jarg4, float jarg5);
+
+       public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_1 (long jarg1,
+               btSubSimplexClosestResult jarg1_, float jarg2, float jarg3, float jarg4);
+
+       public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_2 (long jarg1,
+               btSubSimplexClosestResult jarg1_, float jarg2, float jarg3);
+
+       public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_3 (long jarg1,
+               btSubSimplexClosestResult jarg1_, float jarg2);
+
+       public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_4 (long jarg1,
+               btSubSimplexClosestResult jarg1_);
+
+       public final static native long new_btSubSimplexClosestResult ();
+
+       public final static native void delete_btSubSimplexClosestResult (long jarg1);
+
+       public final static native void btVoronoiSimplexSolver_m_numVertices_set (long jarg1, btVoronoiSimplexSolver jarg1_, int jarg2);
+
+       public final static native int btVoronoiSimplexSolver_m_numVertices_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_simplexVectorW_set (long jarg1, btVoronoiSimplexSolver jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_simplexVectorW_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_simplexPointsP_set (long jarg1, btVoronoiSimplexSolver jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_simplexPointsP_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_simplexPointsQ_set (long jarg1, btVoronoiSimplexSolver jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_simplexPointsQ_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_cachedP1_set (long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_cachedP1_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_cachedP2_set (long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_cachedP2_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_cachedV_set (long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_cachedV_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_lastW_set (long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_lastW_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_equalVertexThreshold_set (long jarg1, btVoronoiSimplexSolver jarg1_,
+               float jarg2);
+
+       public final static native float btVoronoiSimplexSolver_m_equalVertexThreshold_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_cachedValidClosest_set (long jarg1, btVoronoiSimplexSolver jarg1_,
+               boolean jarg2);
+
+       public final static native boolean btVoronoiSimplexSolver_m_cachedValidClosest_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_cachedBC_set (long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2,
+               btSubSimplexClosestResult jarg2_);
+
+       public final static native long btVoronoiSimplexSolver_m_cachedBC_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_m_needsUpdate_set (long jarg1, btVoronoiSimplexSolver jarg1_,
+               boolean jarg2);
+
+       public final static native boolean btVoronoiSimplexSolver_m_needsUpdate_get (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_removeVertex (long jarg1, btVoronoiSimplexSolver jarg1_, int jarg2);
+
+       public final static native void btVoronoiSimplexSolver_reduceVertices (long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2,
+               btUsageBitfield jarg2_);
+
+       public final static native boolean btVoronoiSimplexSolver_updateClosestVectorAndPoints (long jarg1,
+               btVoronoiSimplexSolver jarg1_);
+
+       public final static native boolean btVoronoiSimplexSolver_closestPtPointTetrahedron (long jarg1,
+               btVoronoiSimplexSolver jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, long jarg7,
+               btSubSimplexClosestResult jarg7_);
+
+       public final static native int btVoronoiSimplexSolver_pointOutsideOfPlane (long jarg1, btVoronoiSimplexSolver jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native boolean btVoronoiSimplexSolver_closestPtPointTriangle (long jarg1, btVoronoiSimplexSolver jarg1_,
+               Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, long jarg6, btSubSimplexClosestResult jarg6_);
+
+       public final static native long new_btVoronoiSimplexSolver ();
+
+       public final static native void btVoronoiSimplexSolver_reset (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_addVertex (long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4);
+
+       public final static native void btVoronoiSimplexSolver_setEqualVertexThreshold (long jarg1, btVoronoiSimplexSolver jarg1_,
+               float jarg2);
+
+       public final static native float btVoronoiSimplexSolver_getEqualVertexThreshold (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native boolean btVoronoiSimplexSolver_closest (long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2);
+
+       public final static native float btVoronoiSimplexSolver_maxVertex (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native boolean btVoronoiSimplexSolver_fullSimplex (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native int btVoronoiSimplexSolver_getSimplex (long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2,
+               btVector3 jarg2_, long jarg3, btVector3 jarg3_, long jarg4, btVector3 jarg4_);
+
+       public final static native boolean btVoronoiSimplexSolver_inSimplex (long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2);
+
+       public final static native void btVoronoiSimplexSolver_backup_closest (long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2);
+
+       public final static native boolean btVoronoiSimplexSolver_emptySimplex (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void btVoronoiSimplexSolver_compute_points (long jarg1, btVoronoiSimplexSolver jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native int btVoronoiSimplexSolver_numVertices (long jarg1, btVoronoiSimplexSolver jarg1_);
+
+       public final static native void delete_btVoronoiSimplexSolver (long jarg1);
+
+       public final static native void btConstraintInfo2_fps_set (long jarg1, btConstraintInfo2 jarg1_, float jarg2);
+
+       public final static native float btConstraintInfo2_fps_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_erp_set (long jarg1, btConstraintInfo2 jarg1_, float jarg2);
+
+       public final static native float btConstraintInfo2_erp_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_J1linearAxis_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_m_J1linearAxis_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_J1angularAxis_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_m_J1angularAxis_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_J2linearAxis_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_m_J2linearAxis_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_J2angularAxis_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_m_J2angularAxis_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_rowskip_set (long jarg1, btConstraintInfo2 jarg1_, int jarg2);
+
+       public final static native int btConstraintInfo2_rowskip_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_constraintError_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_m_constraintError_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_cfm_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_cfm_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_lowerLimit_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_m_lowerLimit_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_upperLimit_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_m_upperLimit_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_findex_set (long jarg1, btConstraintInfo2 jarg1_, long jarg2);
+
+       public final static native long btConstraintInfo2_findex_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_numIterations_set (long jarg1, btConstraintInfo2 jarg1_, int jarg2);
+
+       public final static native int btConstraintInfo2_m_numIterations_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native void btConstraintInfo2_m_damping_set (long jarg1, btConstraintInfo2 jarg1_, float jarg2);
+
+       public final static native float btConstraintInfo2_m_damping_get (long jarg1, btConstraintInfo2 jarg1_);
+
+       public final static native long new_btConstraintInfo2 ();
+
+       public final static native void delete_btConstraintInfo2 (long jarg1);
+
+       public final static native void delete_btTypedConstraint (long jarg1);
+
+       public final static native long btTypedConstraint_getFixedBody ();
+
+       public final static native int btTypedConstraint_getOverrideNumSolverIterations (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setOverrideNumSolverIterations (long jarg1, btTypedConstraint jarg1_,
+               int jarg2);
+
+       public final static native void btTypedConstraint_buildJacobian (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setupSolverConstraint (long jarg1, btTypedConstraint jarg1_, long jarg2,
+               int jarg3, int jarg4, float jarg5);
+
+       public final static native void btTypedConstraint_getInfo1 (long jarg1, btTypedConstraint jarg1_, long jarg2);
+
+       public final static native void btTypedConstraint_getInfo2 (long jarg1, btTypedConstraint jarg1_, long jarg2,
+               btConstraintInfo2 jarg2_);
+
+       public final static native void btTypedConstraint_internalSetAppliedImpulse (long jarg1, btTypedConstraint jarg1_, float jarg2);
+
+       public final static native float btTypedConstraint_internalGetAppliedImpulse (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native float btTypedConstraint_getBreakingImpulseThreshold (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setBreakingImpulseThreshold (long jarg1, btTypedConstraint jarg1_,
+               float jarg2);
+
+       public final static native boolean btTypedConstraint_isEnabled (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setEnabled (long jarg1, btTypedConstraint jarg1_, boolean jarg2);
+
+       public final static native void btTypedConstraint_solveConstraintObsolete (long jarg1, btTypedConstraint jarg1_, long jarg2,
+               btRigidBody jarg2_, long jarg3, btRigidBody jarg3_, float jarg4);
+
+       public final static native long btTypedConstraint_getRigidBodyA__SWIG_0 (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native long btTypedConstraint_getRigidBodyB__SWIG_0 (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native int btTypedConstraint_getUserConstraintType (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setUserConstraintType (long jarg1, btTypedConstraint jarg1_, int jarg2);
+
+       public final static native void btTypedConstraint_setUserConstraintId (long jarg1, btTypedConstraint jarg1_, int jarg2);
+
+       public final static native int btTypedConstraint_getUserConstraintId (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setUserConstraintPtr (long jarg1, btTypedConstraint jarg1_, long jarg2);
+
+       public final static native long btTypedConstraint_getUserConstraintPtr (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native int btTypedConstraint_getUid (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native boolean btTypedConstraint_needsFeedback (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_enableFeedback (long jarg1, btTypedConstraint jarg1_, boolean jarg2);
+
+       public final static native float btTypedConstraint_getAppliedImpulse (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native int btTypedConstraint_getConstraintType (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setDbgDrawSize (long jarg1, btTypedConstraint jarg1_, float jarg2);
+
+       public final static native float btTypedConstraint_getDbgDrawSize (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native void btTypedConstraint_setParam__SWIG_0 (long jarg1, btTypedConstraint jarg1_, int jarg2,
+               float jarg3, int jarg4);
+
+       public final static native void btTypedConstraint_setParam__SWIG_1 (long jarg1, btTypedConstraint jarg1_, int jarg2,
+               float jarg3);
+
+       public final static native float btTypedConstraint_getParam__SWIG_0 (long jarg1, btTypedConstraint jarg1_, int jarg2, int jarg3);
+
+       public final static native float btTypedConstraint_getParam__SWIG_1 (long jarg1, btTypedConstraint jarg1_, int jarg2);
+
+       public final static native int btTypedConstraint_calculateSerializeBufferSize (long jarg1, btTypedConstraint jarg1_);
+
+       public final static native String btTypedConstraint_serialize (long jarg1, btTypedConstraint jarg1_, long jarg2, long jarg3);
+
+       public final static native float btAdjustAngleToLimits (float jarg1, float jarg2, float jarg3);
+
+       public final static native void btTypedConstraintData_m_rbA_set (long jarg1, btTypedConstraintData jarg1_, long jarg2,
+               btRigidBodyFloatData jarg2_);
+
+       public final static native long btTypedConstraintData_m_rbA_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_rbB_set (long jarg1, btTypedConstraintData jarg1_, long jarg2,
+               btRigidBodyFloatData jarg2_);
+
+       public final static native long btTypedConstraintData_m_rbB_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_name_set (long jarg1, btTypedConstraintData jarg1_, String jarg2);
+
+       public final static native String btTypedConstraintData_m_name_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_objectType_set (long jarg1, btTypedConstraintData jarg1_, int jarg2);
+
+       public final static native int btTypedConstraintData_m_objectType_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_userConstraintType_set (long jarg1, btTypedConstraintData jarg1_,
+               int jarg2);
+
+       public final static native int btTypedConstraintData_m_userConstraintType_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_userConstraintId_set (long jarg1, btTypedConstraintData jarg1_,
+               int jarg2);
+
+       public final static native int btTypedConstraintData_m_userConstraintId_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_needsFeedback_set (long jarg1, btTypedConstraintData jarg1_, int jarg2);
+
+       public final static native int btTypedConstraintData_m_needsFeedback_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_appliedImpulse_set (long jarg1, btTypedConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btTypedConstraintData_m_appliedImpulse_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_dbgDrawSize_set (long jarg1, btTypedConstraintData jarg1_, float jarg2);
+
+       public final static native float btTypedConstraintData_m_dbgDrawSize_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_set (long jarg1,
+               btTypedConstraintData jarg1_, int jarg2);
+
+       public final static native int btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_get (long jarg1,
+               btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_overrideNumSolverIterations_set (long jarg1,
+               btTypedConstraintData jarg1_, int jarg2);
+
+       public final static native int btTypedConstraintData_m_overrideNumSolverIterations_get (long jarg1,
+               btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_breakingImpulseThreshold_set (long jarg1,
+               btTypedConstraintData jarg1_, float jarg2);
+
+       public final static native float btTypedConstraintData_m_breakingImpulseThreshold_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native void btTypedConstraintData_m_isEnabled_set (long jarg1, btTypedConstraintData jarg1_, int jarg2);
+
+       public final static native int btTypedConstraintData_m_isEnabled_get (long jarg1, btTypedConstraintData jarg1_);
+
+       public final static native long new_btTypedConstraintData ();
+
+       public final static native void delete_btTypedConstraintData (long jarg1);
+
+       public final static native long new_btAngularLimit ();
+
+       public final static native void btAngularLimit_set__SWIG_0 (long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3,
+               float jarg4, float jarg5, float jarg6);
+
+       public final static native void btAngularLimit_set__SWIG_1 (long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3,
+               float jarg4, float jarg5);
+
+       public final static native void btAngularLimit_set__SWIG_2 (long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3,
+               float jarg4);
+
+       public final static native void btAngularLimit_set__SWIG_3 (long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3);
+
+       public final static native void btAngularLimit_test (long jarg1, btAngularLimit jarg1_, float jarg2);
+
+       public final static native float btAngularLimit_getSoftness (long jarg1, btAngularLimit jarg1_);
+
+       public final static native float btAngularLimit_getBiasFactor (long jarg1, btAngularLimit jarg1_);
+
+       public final static native float btAngularLimit_getRelaxationFactor (long jarg1, btAngularLimit jarg1_);
+
+       public final static native float btAngularLimit_getCorrection (long jarg1, btAngularLimit jarg1_);
+
+       public final static native float btAngularLimit_getSign (long jarg1, btAngularLimit jarg1_);
+
+       public final static native float btAngularLimit_getHalfRange (long jarg1, btAngularLimit jarg1_);
+
+       public final static native boolean btAngularLimit_isLimit (long jarg1, btAngularLimit jarg1_);
+
+       public final static native void btAngularLimit_fit (long jarg1, btAngularLimit jarg1_, long jarg2);
+
+       public final static native float btAngularLimit_getError (long jarg1, btAngularLimit jarg1_);
+
+       public final static native float btAngularLimit_getLow (long jarg1, btAngularLimit jarg1_);
+
+       public final static native float btAngularLimit_getHigh (long jarg1, btAngularLimit jarg1_);
+
+       public final static native void delete_btAngularLimit (long jarg1);
+
+       public final static native void delete_btDynamicsWorld (long jarg1);
+
+       public final static native int btDynamicsWorld_stepSimulation__SWIG_0 (long jarg1, btDynamicsWorld jarg1_, float jarg2,
+               int jarg3, float jarg4);
+
+       public final static native int btDynamicsWorld_stepSimulation__SWIG_1 (long jarg1, btDynamicsWorld jarg1_, float jarg2,
+               int jarg3);
+
+       public final static native int btDynamicsWorld_stepSimulation__SWIG_2 (long jarg1, btDynamicsWorld jarg1_, float jarg2);
+
+       public final static native void btDynamicsWorld_addConstraint__SWIG_0 (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btTypedConstraint jarg2_, boolean jarg3);
+
+       public final static native void btDynamicsWorld_addConstraint__SWIG_1 (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btTypedConstraint jarg2_);
+
+       public final static native void btDynamicsWorld_removeConstraint (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btTypedConstraint jarg2_);
+
+       public final static native void btDynamicsWorld_addAction (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btActionInterface jarg2_);
+
+       public final static native void btDynamicsWorld_removeAction (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btActionInterface jarg2_);
+
+       public final static native void btDynamicsWorld_setGravity (long jarg1, btDynamicsWorld jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btDynamicsWorld_getGravity (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native void btDynamicsWorld_synchronizeMotionStates (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native void btDynamicsWorld_addRigidBody__SWIG_0 (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btRigidBody jarg2_);
+
+       public final static native void btDynamicsWorld_addRigidBody__SWIG_1 (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btRigidBody jarg2_, short jarg3, short jarg4);
+
+       public final static native void btDynamicsWorld_removeRigidBody (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btRigidBody jarg2_);
+
+       public final static native void btDynamicsWorld_setConstraintSolver (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btConstraintSolver jarg2_);
+
+       public final static native long btDynamicsWorld_getConstraintSolver (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native int btDynamicsWorld_getNumConstraints (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native long btDynamicsWorld_getConstraint__SWIG_0 (long jarg1, btDynamicsWorld jarg1_, int jarg2);
+
+       public final static native int btDynamicsWorld_getWorldType (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native void btDynamicsWorld_clearForces (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native void btDynamicsWorld_setInternalTickCallback__SWIG_0 (long jarg1, btDynamicsWorld jarg1_,
+               long jarg2, long jarg3, boolean jarg4);
+
+       public final static native void btDynamicsWorld_setInternalTickCallback__SWIG_1 (long jarg1, btDynamicsWorld jarg1_,
+               long jarg2, long jarg3);
+
+       public final static native void btDynamicsWorld_setInternalTickCallback__SWIG_2 (long jarg1, btDynamicsWorld jarg1_, long jarg2);
+
+       public final static native void btDynamicsWorld_setWorldUserInfo (long jarg1, btDynamicsWorld jarg1_, long jarg2);
+
+       public final static native long btDynamicsWorld_getWorldUserInfo (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native long btDynamicsWorld_getSolverInfo (long jarg1, btDynamicsWorld jarg1_);
+
+       public final static native void btDynamicsWorld_addVehicle (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btActionInterface jarg2_);
+
+       public final static native void btDynamicsWorld_removeVehicle (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btActionInterface jarg2_);
+
+       public final static native void btDynamicsWorld_addCharacter (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btActionInterface jarg2_);
+
+       public final static native void btDynamicsWorld_removeCharacter (long jarg1, btDynamicsWorld jarg1_, long jarg2,
+               btActionInterface jarg2_);
+
+       public final static native long new_btSimpleDynamicsWorld (long jarg1, btDispatcher jarg1_, long jarg2,
+               btBroadphaseInterface jarg2_, long jarg3, btConstraintSolver jarg3_, long jarg4, btCollisionConfiguration jarg4_);
+
+       public final static native void delete_btSimpleDynamicsWorld (long jarg1);
+
+       public final static native int btSimpleDynamicsWorld_stepSimulation__SWIG_0 (long jarg1, btSimpleDynamicsWorld jarg1_,
+               float jarg2, int jarg3, float jarg4);
+
+       public final static native int btSimpleDynamicsWorld_stepSimulation__SWIG_1 (long jarg1, btSimpleDynamicsWorld jarg1_,
+               float jarg2, int jarg3);
+
+       public final static native int btSimpleDynamicsWorld_stepSimulation__SWIG_2 (long jarg1, btSimpleDynamicsWorld jarg1_,
+               float jarg2);
+
+       public final static native void btSimpleDynamicsWorld_addRigidBody__SWIG_0 (long jarg1, btSimpleDynamicsWorld jarg1_,
+               long jarg2, btRigidBody jarg2_);
+
+       public final static native void btSimpleDynamicsWorld_addRigidBody__SWIG_1 (long jarg1, btSimpleDynamicsWorld jarg1_,
+               long jarg2, btRigidBody jarg2_, short jarg3, short jarg4);
+
+       public final static native void delete_btActionInterface (long jarg1);
+
+       public final static native void btActionInterface_updateAction (long jarg1, btActionInterface jarg1_, long jarg2,
+               btCollisionWorld jarg2_, float jarg3);
+
+       public final static native void btActionInterface_debugDraw (long jarg1, btActionInterface jarg1_, long jarg2,
+               btIDebugDraw jarg2_);
+
+       public final static native long new_btDiscreteDynamicsWorld (long jarg1, btDispatcher jarg1_, long jarg2,
+               btBroadphaseInterface jarg2_, long jarg3, btConstraintSolver jarg3_, long jarg4, btCollisionConfiguration jarg4_);
+
+       public final static native void delete_btDiscreteDynamicsWorld (long jarg1);
+
+       public final static native int btDiscreteDynamicsWorld_stepSimulation__SWIG_0 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               float jarg2, int jarg3, float jarg4);
+
+       public final static native int btDiscreteDynamicsWorld_stepSimulation__SWIG_1 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               float jarg2, int jarg3);
+
+       public final static native int btDiscreteDynamicsWorld_stepSimulation__SWIG_2 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               float jarg2);
+
+       public final static native void btDiscreteDynamicsWorld_synchronizeSingleMotionState (long jarg1,
+               btDiscreteDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_);
+
+       public final static native void btDiscreteDynamicsWorld_addConstraint__SWIG_0 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               long jarg2, btTypedConstraint jarg2_, boolean jarg3);
+
+       public final static native void btDiscreteDynamicsWorld_addConstraint__SWIG_1 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               long jarg2, btTypedConstraint jarg2_);
+
+       public final static native long btDiscreteDynamicsWorld_getSimulationIslandManager__SWIG_0 (long jarg1,
+               btDiscreteDynamicsWorld jarg1_);
+
+       public final static native long btDiscreteDynamicsWorld_getCollisionWorld (long jarg1, btDiscreteDynamicsWorld jarg1_);
+
+       public final static native void btDiscreteDynamicsWorld_addCollisionObject__SWIG_0 (long jarg1,
+               btDiscreteDynamicsWorld jarg1_, long jarg2, btCollisionObject jarg2_, short jarg3, short jarg4);
+
+       public final static native void btDiscreteDynamicsWorld_addCollisionObject__SWIG_1 (long jarg1,
+               btDiscreteDynamicsWorld jarg1_, long jarg2, btCollisionObject jarg2_, short jarg3);
+
+       public final static native void btDiscreteDynamicsWorld_addCollisionObject__SWIG_2 (long jarg1,
+               btDiscreteDynamicsWorld jarg1_, long jarg2, btCollisionObject jarg2_);
+
+       public final static native void btDiscreteDynamicsWorld_addRigidBody__SWIG_0 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               long jarg2, btRigidBody jarg2_);
+
+       public final static native void btDiscreteDynamicsWorld_addRigidBody__SWIG_1 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               long jarg2, btRigidBody jarg2_, short jarg3, short jarg4);
+
+       public final static native void btDiscreteDynamicsWorld_debugDrawConstraint (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               long jarg2, btTypedConstraint jarg2_);
+
+       public final static native long btDiscreteDynamicsWorld_getConstraint__SWIG_0 (long jarg1, btDiscreteDynamicsWorld jarg1_,
+               int jarg2);
+
+       public final static native void btDiscreteDynamicsWorld_applyGravity (long jarg1, btDiscreteDynamicsWorld jarg1_);
+
+       public final static native void btDiscreteDynamicsWorld_setNumTasks (long jarg1, btDiscreteDynamicsWorld jarg1_, int jarg2);
+
+       public final static native void btDiscreteDynamicsWorld_updateVehicles (long jarg1, btDiscreteDynamicsWorld jarg1_, float jarg2);
+
+       public final static native void btDiscreteDynamicsWorld_setSynchronizeAllMotionStates (long jarg1,
+               btDiscreteDynamicsWorld jarg1_, boolean jarg2);
+
+       public final static native boolean btDiscreteDynamicsWorld_getSynchronizeAllMotionStates (long jarg1,
+               btDiscreteDynamicsWorld jarg1_);
+
+       public final static native void delete_btCharacterControllerInterface (long jarg1);
+
+       public final static native void btCharacterControllerInterface_setWalkDirection (long jarg1,
+               btCharacterControllerInterface jarg1_, Vector3 jarg2);
+
+       public final static native void btCharacterControllerInterface_setVelocityForTimeInterval (long jarg1,
+               btCharacterControllerInterface jarg1_, Vector3 jarg2, float jarg3);
+
+       public final static native void btCharacterControllerInterface_reset (long jarg1, btCharacterControllerInterface jarg1_);
+
+       public final static native void btCharacterControllerInterface_warp (long jarg1, btCharacterControllerInterface jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btCharacterControllerInterface_preStep (long jarg1, btCharacterControllerInterface jarg1_,
+               long jarg2, btCollisionWorld jarg2_);
+
+       public final static native void btCharacterControllerInterface_playerStep (long jarg1, btCharacterControllerInterface jarg1_,
+               long jarg2, btCollisionWorld jarg2_, float jarg3);
+
+       public final static native boolean btCharacterControllerInterface_canJump (long jarg1, btCharacterControllerInterface jarg1_);
+
+       public final static native void btCharacterControllerInterface_jump (long jarg1, btCharacterControllerInterface jarg1_);
+
+       public final static native boolean btCharacterControllerInterface_onGround (long jarg1, btCharacterControllerInterface jarg1_);
+
+       public final static native long new_btKinematicCharacterController__SWIG_0 (long jarg1, btPairCachingGhostObject jarg1_,
+               long jarg2, btConvexShape jarg2_, float jarg3, int jarg4);
+
+       public final static native long new_btKinematicCharacterController__SWIG_1 (long jarg1, btPairCachingGhostObject jarg1_,
+               long jarg2, btConvexShape jarg2_, float jarg3);
+
+       public final static native void delete_btKinematicCharacterController (long jarg1);
+
+       public final static native void btKinematicCharacterController_setUpAxis (long jarg1, btKinematicCharacterController jarg1_,
+               int jarg2);
+
+       public final static native void btKinematicCharacterController_setFallSpeed (long jarg1,
+               btKinematicCharacterController jarg1_, float jarg2);
+
+       public final static native void btKinematicCharacterController_setJumpSpeed (long jarg1,
+               btKinematicCharacterController jarg1_, float jarg2);
+
+       public final static native void btKinematicCharacterController_setMaxJumpHeight (long jarg1,
+               btKinematicCharacterController jarg1_, float jarg2);
+
+       public final static native void btKinematicCharacterController_setGravity (long jarg1, btKinematicCharacterController jarg1_,
+               float jarg2);
+
+       public final static native float btKinematicCharacterController_getGravity (long jarg1, btKinematicCharacterController jarg1_);
+
+       public final static native void btKinematicCharacterController_setMaxSlope (long jarg1, btKinematicCharacterController jarg1_,
+               float jarg2);
+
+       public final static native float btKinematicCharacterController_getMaxSlope (long jarg1, btKinematicCharacterController jarg1_);
+
+       public final static native long btKinematicCharacterController_getGhostObject (long jarg1,
+               btKinematicCharacterController jarg1_);
+
+       public final static native void btKinematicCharacterController_setUseGhostSweepTest (long jarg1,
+               btKinematicCharacterController jarg1_, boolean jarg2);
+
+       public final static native void btContactSolverInfoData_m_tau_set (long jarg1, btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_tau_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_damping_set (long jarg1, btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_damping_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_friction_set (long jarg1, btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_friction_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_timeStep_set (long jarg1, btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_timeStep_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_restitution_set (long jarg1, btContactSolverInfoData jarg1_,
+               float jarg2);
+
+       public final static native float btContactSolverInfoData_m_restitution_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_numIterations_set (long jarg1, btContactSolverInfoData jarg1_,
+               int jarg2);
+
+       public final static native int btContactSolverInfoData_m_numIterations_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_maxErrorReduction_set (long jarg1, btContactSolverInfoData jarg1_,
+               float jarg2);
+
+       public final static native float btContactSolverInfoData_m_maxErrorReduction_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_sor_set (long jarg1, btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_sor_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_erp_set (long jarg1, btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_erp_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_erp2_set (long jarg1, btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_erp2_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_globalCfm_set (long jarg1, btContactSolverInfoData jarg1_,
+               float jarg2);
+
+       public final static native float btContactSolverInfoData_m_globalCfm_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_splitImpulse_set (long jarg1, btContactSolverInfoData jarg1_,
+               int jarg2);
+
+       public final static native int btContactSolverInfoData_m_splitImpulse_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_splitImpulsePenetrationThreshold_set (long jarg1,
+               btContactSolverInfoData jarg1_, float jarg2);
+
+       public final static native float btContactSolverInfoData_m_splitImpulsePenetrationThreshold_get (long jarg1,
+               btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_linearSlop_set (long jarg1, btContactSolverInfoData jarg1_,
+               float jarg2);
+
+       public final static native float btContactSolverInfoData_m_linearSlop_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_warmstartingFactor_set (long jarg1, btContactSolverInfoData jarg1_,
+               float jarg2);
+
+       public final static native float btContactSolverInfoData_m_warmstartingFactor_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_solverMode_set (long jarg1, btContactSolverInfoData jarg1_, int jarg2);
+
+       public final static native int btContactSolverInfoData_m_solverMode_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_restingContactRestitutionThreshold_set (long jarg1,
+               btContactSolverInfoData jarg1_, int jarg2);
+
+       public final static native int btContactSolverInfoData_m_restingContactRestitutionThreshold_get (long jarg1,
+               btContactSolverInfoData jarg1_);
+
+       public final static native void btContactSolverInfoData_m_minimumSolverBatchSize_set (long jarg1,
+               btContactSolverInfoData jarg1_, int jarg2);
+
+       public final static native int btContactSolverInfoData_m_minimumSolverBatchSize_get (long jarg1, btContactSolverInfoData jarg1_);
+
+       public final static native long new_btContactSolverInfoData ();
+
+       public final static native void delete_btContactSolverInfoData (long jarg1);
+
+       public final static native long new_btContactSolverInfo ();
+
+       public final static native void delete_btContactSolverInfo (long jarg1);
+
+       public final static native void delete_btConstraintSolver (long jarg1);
+
+       public final static native void btConstraintSolver_prepareSolve (long jarg1, btConstraintSolver jarg1_, int jarg2, int jarg3);
+
+       public final static native float btConstraintSolver_solveGroup (long jarg1, btConstraintSolver jarg1_, long jarg2, int jarg3,
+               long jarg4, int jarg5, long jarg6, int jarg7, long jarg8, btContactSolverInfo jarg8_, long jarg9, btIDebugDraw jarg9_,
+               long jarg10, btStackAlloc jarg10_, long jarg11, btDispatcher jarg11_);
+
+       public final static native void btConstraintSolver_allSolved (long jarg1, btConstraintSolver jarg1_, long jarg2,
+               btContactSolverInfo jarg2_, long jarg3, btIDebugDraw jarg3_, long jarg4, btStackAlloc jarg4_);
+
+       public final static native void btConstraintSolver_reset (long jarg1, btConstraintSolver jarg1_);
+
+       public final static native long new_btSequentialImpulseConstraintSolver ();
+
+       public final static native void delete_btSequentialImpulseConstraintSolver (long jarg1);
+
+       public final static native long btSequentialImpulseConstraintSolver_btRand2 (long jarg1,
+               btSequentialImpulseConstraintSolver jarg1_);
+
+       public final static native int btSequentialImpulseConstraintSolver_btRandInt2 (long jarg1,
+               btSequentialImpulseConstraintSolver jarg1_, int jarg2);
+
+       public final static native void btSequentialImpulseConstraintSolver_setRandSeed (long jarg1,
+               btSequentialImpulseConstraintSolver jarg1_, long jarg2);
+
+       public final static native long btSequentialImpulseConstraintSolver_getRandSeed (long jarg1,
+               btSequentialImpulseConstraintSolver jarg1_);
+
+       public final static native void btSolverBodyObsolete_m_deltaLinearVelocity_set (long jarg1, btSolverBodyObsolete jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btSolverBodyObsolete_m_deltaLinearVelocity_get (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_m_deltaAngularVelocity_set (long jarg1, btSolverBodyObsolete jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btSolverBodyObsolete_m_deltaAngularVelocity_get (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_m_angularFactor_set (long jarg1, btSolverBodyObsolete jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btSolverBodyObsolete_m_angularFactor_get (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_m_invMass_set (long jarg1, btSolverBodyObsolete jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btSolverBodyObsolete_m_invMass_get (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_m_originalBody_set (long jarg1, btSolverBodyObsolete jarg1_, long jarg2,
+               btRigidBody jarg2_);
+
+       public final static native long btSolverBodyObsolete_m_originalBody_get (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_m_pushVelocity_set (long jarg1, btSolverBodyObsolete jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btSolverBodyObsolete_m_pushVelocity_get (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_m_turnVelocity_set (long jarg1, btSolverBodyObsolete jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btSolverBodyObsolete_m_turnVelocity_get (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_getVelocityInLocalPointObsolete (long jarg1, btSolverBodyObsolete jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void btSolverBodyObsolete_getAngularVelocity (long jarg1, btSolverBodyObsolete jarg1_, Vector3 jarg2);
+
+       public final static native void btSolverBodyObsolete_applyImpulse (long jarg1, btSolverBodyObsolete jarg1_, Vector3 jarg2,
+               Vector3 jarg3, float jarg4);
+
+       public final static native void btSolverBodyObsolete_internalApplyPushImpulse (long jarg1, btSolverBodyObsolete jarg1_,
+               Vector3 jarg2, Vector3 jarg3, float jarg4);
+
+       public final static native void btSolverBodyObsolete_writebackVelocity__SWIG_0 (long jarg1, btSolverBodyObsolete jarg1_);
+
+       public final static native void btSolverBodyObsolete_writebackVelocity__SWIG_1 (long jarg1, btSolverBodyObsolete jarg1_,
+               float jarg2);
+
+       public final static native long new_btSolverBodyObsolete ();
+
+       public final static native void delete_btSolverBodyObsolete (long jarg1);
+
+       public final static native long new_btSliderConstraint__SWIG_0 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
+
+       public final static native long new_btSliderConstraint__SWIG_1 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btTransform jarg2_, boolean jarg3);
+
+       public final static native void btSliderConstraint_getInfo1NonVirtual (long jarg1, btSliderConstraint jarg1_, long jarg2);
+
+       public final static native void btSliderConstraint_getInfo2NonVirtual (long jarg1, btSliderConstraint jarg1_, long jarg2,
+               btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6,
+               float jarg7, float jarg8);
+
+       public final static native long btSliderConstraint_getRigidBodyA (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native long btSliderConstraint_getRigidBodyB (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native long btSliderConstraint_getCalculatedTransformA (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native long btSliderConstraint_getCalculatedTransformB (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native long btSliderConstraint_getFrameOffsetA__SWIG_0 (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native long btSliderConstraint_getFrameOffsetB__SWIG_0 (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getLowerLinLimit (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setLowerLinLimit (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native float btSliderConstraint_getUpperLinLimit (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setUpperLinLimit (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native float btSliderConstraint_getLowerAngLimit (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setLowerAngLimit (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native float btSliderConstraint_getUpperAngLimit (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setUpperAngLimit (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native boolean btSliderConstraint_getUseLinearReferenceFrameA (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getSoftnessDirLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getRestitutionDirLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getDampingDirLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getSoftnessDirAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getRestitutionDirAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getDampingDirAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getSoftnessLimLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getRestitutionLimLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getDampingLimLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getSoftnessLimAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getRestitutionLimAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getDampingLimAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getSoftnessOrthoLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getRestitutionOrthoLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getDampingOrthoLin (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getSoftnessOrthoAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getRestitutionOrthoAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getDampingOrthoAng (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setSoftnessDirLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setRestitutionDirLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setDampingDirLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setSoftnessDirAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setRestitutionDirAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setDampingDirAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setSoftnessLimLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setRestitutionLimLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setDampingLimLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setSoftnessLimAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setRestitutionLimAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setDampingLimAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setSoftnessOrthoLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setRestitutionOrthoLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setDampingOrthoLin (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setSoftnessOrthoAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setRestitutionOrthoAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setDampingOrthoAng (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native void btSliderConstraint_setPoweredLinMotor (long jarg1, btSliderConstraint jarg1_, boolean jarg2);
+
+       public final static native boolean btSliderConstraint_getPoweredLinMotor (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setTargetLinMotorVelocity (long jarg1, btSliderConstraint jarg1_,
+               float jarg2);
+
+       public final static native float btSliderConstraint_getTargetLinMotorVelocity (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setMaxLinMotorForce (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native float btSliderConstraint_getMaxLinMotorForce (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setPoweredAngMotor (long jarg1, btSliderConstraint jarg1_, boolean jarg2);
+
+       public final static native boolean btSliderConstraint_getPoweredAngMotor (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setTargetAngMotorVelocity (long jarg1, btSliderConstraint jarg1_,
+               float jarg2);
+
+       public final static native float btSliderConstraint_getTargetAngMotorVelocity (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setMaxAngMotorForce (long jarg1, btSliderConstraint jarg1_, float jarg2);
+
+       public final static native float btSliderConstraint_getMaxAngMotorForce (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getLinearPos (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getAngularPos (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native boolean btSliderConstraint_getSolveLinLimit (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getLinDepth (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native boolean btSliderConstraint_getSolveAngLimit (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native float btSliderConstraint_getAngDepth (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_calculateTransforms (long jarg1, btSliderConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native void btSliderConstraint_testLinLimits (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_testAngLimits (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native Vector3 btSliderConstraint_getAncorInA (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native Vector3 btSliderConstraint_getAncorInB (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native boolean btSliderConstraint_getUseFrameOffset (long jarg1, btSliderConstraint jarg1_);
+
+       public final static native void btSliderConstraint_setUseFrameOffset (long jarg1, btSliderConstraint jarg1_, boolean jarg2);
+
+       public final static native void btSliderConstraint_setFrames (long jarg1, btSliderConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native void btSliderConstraint_setParam__SWIG_0 (long jarg1, btSliderConstraint jarg1_, int jarg2,
+               float jarg3, int jarg4);
+
+       public final static native void btSliderConstraint_setParam__SWIG_1 (long jarg1, btSliderConstraint jarg1_, int jarg2,
+               float jarg3);
+
+       public final static native float btSliderConstraint_getParam__SWIG_0 (long jarg1, btSliderConstraint jarg1_, int jarg2,
+               int jarg3);
+
+       public final static native float btSliderConstraint_getParam__SWIG_1 (long jarg1, btSliderConstraint jarg1_, int jarg2);
+
+       public final static native void delete_btSliderConstraint (long jarg1);
+
+       public final static native void btSliderConstraintData_m_typeConstraintData_set (long jarg1, btSliderConstraintData jarg1_,
+               long jarg2, btTypedConstraintData jarg2_);
+
+       public final static native long btSliderConstraintData_m_typeConstraintData_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_rbAFrame_set (long jarg1, btSliderConstraintData jarg1_, long jarg2,
+               btTransformFloatData jarg2_);
+
+       public final static native long btSliderConstraintData_m_rbAFrame_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_rbBFrame_set (long jarg1, btSliderConstraintData jarg1_, long jarg2,
+               btTransformFloatData jarg2_);
+
+       public final static native long btSliderConstraintData_m_rbBFrame_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_linearUpperLimit_set (long jarg1, btSliderConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btSliderConstraintData_m_linearUpperLimit_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_linearLowerLimit_set (long jarg1, btSliderConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btSliderConstraintData_m_linearLowerLimit_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_angularUpperLimit_set (long jarg1, btSliderConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btSliderConstraintData_m_angularUpperLimit_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_angularLowerLimit_set (long jarg1, btSliderConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btSliderConstraintData_m_angularLowerLimit_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_useLinearReferenceFrameA_set (long jarg1,
+               btSliderConstraintData jarg1_, int jarg2);
+
+       public final static native int btSliderConstraintData_m_useLinearReferenceFrameA_get (long jarg1, btSliderConstraintData jarg1_);
+
+       public final static native void btSliderConstraintData_m_useOffsetForConstraintFrame_set (long jarg1,
+               btSliderConstraintData jarg1_, int jarg2);
+
+       public final static native int btSliderConstraintData_m_useOffsetForConstraintFrame_get (long jarg1,
+               btSliderConstraintData jarg1_);
+
+       public final static native long new_btSliderConstraintData ();
+
+       public final static native void delete_btSliderConstraintData (long jarg1);
+
+       public final static native long new_btConstraintSetting ();
+
+       public final static native void btConstraintSetting_m_tau_set (long jarg1, btConstraintSetting jarg1_, float jarg2);
+
+       public final static native float btConstraintSetting_m_tau_get (long jarg1, btConstraintSetting jarg1_);
+
+       public final static native void btConstraintSetting_m_damping_set (long jarg1, btConstraintSetting jarg1_, float jarg2);
+
+       public final static native float btConstraintSetting_m_damping_get (long jarg1, btConstraintSetting jarg1_);
+
+       public final static native void btConstraintSetting_m_impulseClamp_set (long jarg1, btConstraintSetting jarg1_, float jarg2);
+
+       public final static native float btConstraintSetting_m_impulseClamp_get (long jarg1, btConstraintSetting jarg1_);
+
+       public final static native void delete_btConstraintSetting (long jarg1);
+
+       public final static native void btPoint2PointConstraint_m_useSolveConstraintObsolete_set (long jarg1,
+               btPoint2PointConstraint jarg1_, boolean jarg2);
+
+       public final static native boolean btPoint2PointConstraint_m_useSolveConstraintObsolete_get (long jarg1,
+               btPoint2PointConstraint jarg1_);
+
+       public final static native void btPoint2PointConstraint_m_setting_set (long jarg1, btPoint2PointConstraint jarg1_, long jarg2,
+               btConstraintSetting jarg2_);
+
+       public final static native long btPoint2PointConstraint_m_setting_get (long jarg1, btPoint2PointConstraint jarg1_);
+
+       public final static native long new_btPoint2PointConstraint__SWIG_0 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btRigidBody jarg2_, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native long new_btPoint2PointConstraint__SWIG_1 (long jarg1, btRigidBody jarg1_, Vector3 jarg2);
+
+       public final static native void btPoint2PointConstraint_getInfo1NonVirtual (long jarg1, btPoint2PointConstraint jarg1_,
+               long jarg2);
+
+       public final static native void btPoint2PointConstraint_getInfo2NonVirtual (long jarg1, btPoint2PointConstraint jarg1_,
+               long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_);
+
+       public final static native void btPoint2PointConstraint_updateRHS (long jarg1, btPoint2PointConstraint jarg1_, float jarg2);
+
+       public final static native void btPoint2PointConstraint_setPivotA (long jarg1, btPoint2PointConstraint jarg1_, Vector3 jarg2);
+
+       public final static native void btPoint2PointConstraint_setPivotB (long jarg1, btPoint2PointConstraint jarg1_, Vector3 jarg2);
+
+       public final static native Vector3 btPoint2PointConstraint_getPivotInA (long jarg1, btPoint2PointConstraint jarg1_);
+
+       public final static native Vector3 btPoint2PointConstraint_getPivotInB (long jarg1, btPoint2PointConstraint jarg1_);
+
+       public final static native void btPoint2PointConstraint_setParam__SWIG_0 (long jarg1, btPoint2PointConstraint jarg1_,
+               int jarg2, float jarg3, int jarg4);
+
+       public final static native void btPoint2PointConstraint_setParam__SWIG_1 (long jarg1, btPoint2PointConstraint jarg1_,
+               int jarg2, float jarg3);
+
+       public final static native float btPoint2PointConstraint_getParam__SWIG_0 (long jarg1, btPoint2PointConstraint jarg1_,
+               int jarg2, int jarg3);
+
+       public final static native float btPoint2PointConstraint_getParam__SWIG_1 (long jarg1, btPoint2PointConstraint jarg1_,
+               int jarg2);
+
+       public final static native void delete_btPoint2PointConstraint (long jarg1);
+
+       public final static native void btPoint2PointConstraintFloatData_m_typeConstraintData_set (long jarg1,
+               btPoint2PointConstraintFloatData jarg1_, long jarg2, btTypedConstraintData jarg2_);
+
+       public final static native long btPoint2PointConstraintFloatData_m_typeConstraintData_get (long jarg1,
+               btPoint2PointConstraintFloatData jarg1_);
+
+       public final static native void btPoint2PointConstraintFloatData_m_pivotInA_set (long jarg1,
+               btPoint2PointConstraintFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btPoint2PointConstraintFloatData_m_pivotInA_get (long jarg1,
+               btPoint2PointConstraintFloatData jarg1_);
+
+       public final static native void btPoint2PointConstraintFloatData_m_pivotInB_set (long jarg1,
+               btPoint2PointConstraintFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btPoint2PointConstraintFloatData_m_pivotInB_get (long jarg1,
+               btPoint2PointConstraintFloatData jarg1_);
+
+       public final static native long new_btPoint2PointConstraintFloatData ();
+
+       public final static native void delete_btPoint2PointConstraintFloatData (long jarg1);
+
+       public final static native void btPoint2PointConstraintDoubleData_m_typeConstraintData_set (long jarg1,
+               btPoint2PointConstraintDoubleData jarg1_, long jarg2, btTypedConstraintData jarg2_);
+
+       public final static native long btPoint2PointConstraintDoubleData_m_typeConstraintData_get (long jarg1,
+               btPoint2PointConstraintDoubleData jarg1_);
+
+       public final static native void btPoint2PointConstraintDoubleData_m_pivotInA_set (long jarg1,
+               btPoint2PointConstraintDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btPoint2PointConstraintDoubleData_m_pivotInA_get (long jarg1,
+               btPoint2PointConstraintDoubleData jarg1_);
+
+       public final static native void btPoint2PointConstraintDoubleData_m_pivotInB_set (long jarg1,
+               btPoint2PointConstraintDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
+
+       public final static native long btPoint2PointConstraintDoubleData_m_pivotInB_get (long jarg1,
+               btPoint2PointConstraintDoubleData jarg1_);
+
+       public final static native long new_btPoint2PointConstraintDoubleData ();
+
+       public final static native void delete_btPoint2PointConstraintDoubleData (long jarg1);
+
+       public final static native long new_btJacobianEntry__SWIG_0 ();
+
+       public final static native long new_btJacobianEntry__SWIG_1 (Matrix3 jarg1, Matrix3 jarg2, Vector3 jarg3, Vector3 jarg4,
+               Vector3 jarg5, Vector3 jarg6, float jarg7, Vector3 jarg8, float jarg9);
+
+       public final static native long new_btJacobianEntry__SWIG_2 (Vector3 jarg1, Matrix3 jarg2, Matrix3 jarg3, Vector3 jarg4,
+               Vector3 jarg5);
+
+       public final static native long new_btJacobianEntry__SWIG_3 (Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
+
+       public final static native long new_btJacobianEntry__SWIG_4 (Matrix3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4,
+               Vector3 jarg5, float jarg6);
+
+       public final static native float btJacobianEntry_getDiagonal (long jarg1, btJacobianEntry jarg1_);
+
+       public final static native float btJacobianEntry_getNonDiagonal__SWIG_0 (long jarg1, btJacobianEntry jarg1_, long jarg2,
+               btJacobianEntry jarg2_, float jarg3);
+
+       public final static native float btJacobianEntry_getNonDiagonal__SWIG_1 (long jarg1, btJacobianEntry jarg1_, long jarg2,
+               btJacobianEntry jarg2_, float jarg3, float jarg4);
+
+       public final static native float btJacobianEntry_getRelativeVelocity (long jarg1, btJacobianEntry jarg1_, Vector3 jarg2,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
+
+       public final static native void btJacobianEntry_m_linearJointAxis_set (long jarg1, btJacobianEntry jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btJacobianEntry_m_linearJointAxis_get (long jarg1, btJacobianEntry jarg1_);
+
+       public final static native void btJacobianEntry_m_aJ_set (long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btJacobianEntry_m_aJ_get (long jarg1, btJacobianEntry jarg1_);
+
+       public final static native void btJacobianEntry_m_bJ_set (long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btJacobianEntry_m_bJ_get (long jarg1, btJacobianEntry jarg1_);
+
+       public final static native void btJacobianEntry_m_0MinvJt_set (long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btJacobianEntry_m_0MinvJt_get (long jarg1, btJacobianEntry jarg1_);
+
+       public final static native void btJacobianEntry_m_1MinvJt_set (long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btJacobianEntry_m_1MinvJt_get (long jarg1, btJacobianEntry jarg1_);
+
+       public final static native void btJacobianEntry_m_Adiag_set (long jarg1, btJacobianEntry jarg1_, float jarg2);
+
+       public final static native float btJacobianEntry_m_Adiag_get (long jarg1, btJacobianEntry jarg1_);
+
+       public final static native void delete_btJacobianEntry (long jarg1);
+
+       public final static native long new_btSolve2LinearConstraint (float jarg1, float jarg2);
+
+       public final static native void btSolve2LinearConstraint_resolveUnilateralPairConstraint (long jarg1,
+               btSolve2LinearConstraint jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btRigidBody jarg3_, Matrix3 jarg4,
+               Matrix3 jarg5, Vector3 jarg6, float jarg7, Vector3 jarg8, Vector3 jarg9, Vector3 jarg10, Vector3 jarg11, float jarg12,
+               Vector3 jarg13, Vector3 jarg14, Vector3 jarg15, float jarg16, Vector3 jarg17, Vector3 jarg18, Vector3 jarg19, float jarg20,
+               Vector3 jarg21, long jarg22, long jarg23);
+
+       public final static native void btSolve2LinearConstraint_resolveBilateralPairConstraint (long jarg1,
+               btSolve2LinearConstraint jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btRigidBody jarg3_, Matrix3 jarg4,
+               Matrix3 jarg5, Vector3 jarg6, float jarg7, Vector3 jarg8, Vector3 jarg9, Vector3 jarg10, Vector3 jarg11, float jarg12,
+               Vector3 jarg13, Vector3 jarg14, Vector3 jarg15, float jarg16, Vector3 jarg17, Vector3 jarg18, Vector3 jarg19, float jarg20,
+               Vector3 jarg21, long jarg22, long jarg23);
+
+       public final static native void delete_btSolve2LinearConstraint (long jarg1);
+
+       public final static native void btRotationalLimitMotor_m_loLimit_set (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_loLimit_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_hiLimit_set (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_hiLimit_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_targetVelocity_set (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_targetVelocity_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_maxMotorForce_set (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_maxMotorForce_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_maxLimitForce_set (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_maxLimitForce_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_damping_set (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_damping_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_limitSoftness_set (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_limitSoftness_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_normalCFM_set (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_normalCFM_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_stopERP_set (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_stopERP_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_stopCFM_set (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_stopCFM_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_bounce_set (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_bounce_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_enableMotor_set (long jarg1, btRotationalLimitMotor jarg1_,
+               boolean jarg2);
+
+       public final static native boolean btRotationalLimitMotor_m_enableMotor_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_currentLimitError_set (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_currentLimitError_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_currentPosition_set (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_currentPosition_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_currentLimit_set (long jarg1, btRotationalLimitMotor jarg1_, int jarg2);
+
+       public final static native int btRotationalLimitMotor_m_currentLimit_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native void btRotationalLimitMotor_m_accumulatedImpulse_set (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btRotationalLimitMotor_m_accumulatedImpulse_get (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native long new_btRotationalLimitMotor__SWIG_0 ();
+
+       public final static native long new_btRotationalLimitMotor__SWIG_1 (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native boolean btRotationalLimitMotor_isLimited (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native boolean btRotationalLimitMotor_needApplyTorques (long jarg1, btRotationalLimitMotor jarg1_);
+
+       public final static native int btRotationalLimitMotor_testLimitValue (long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
+
+       public final static native float btRotationalLimitMotor_solveAngularLimits (long jarg1, btRotationalLimitMotor jarg1_,
+               float jarg2, Vector3 jarg3, float jarg4, long jarg5, btRigidBody jarg5_, long jarg6, btRigidBody jarg6_);
+
+       public final static native void delete_btRotationalLimitMotor (long jarg1);
+
+       public final static native void btTranslationalLimitMotor_m_lowerLimit_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_lowerLimit_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_upperLimit_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_upperLimit_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_accumulatedImpulse_set (long jarg1,
+               btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_accumulatedImpulse_get (long jarg1,
+               btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_limitSoftness_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btTranslationalLimitMotor_m_limitSoftness_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_damping_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btTranslationalLimitMotor_m_damping_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_restitution_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               float jarg2);
+
+       public final static native float btTranslationalLimitMotor_m_restitution_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_normalCFM_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_normalCFM_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_stopERP_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_stopERP_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_stopCFM_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_stopCFM_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_enableMotor_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               boolean[] jarg2);
+
+       public final static native boolean[] btTranslationalLimitMotor_m_enableMotor_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_targetVelocity_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_targetVelocity_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_maxMotorForce_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_maxMotorForce_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_currentLimitError_set (long jarg1,
+               btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_currentLimitError_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_currentLinearDiff_set (long jarg1,
+               btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
+
+       public final static native long btTranslationalLimitMotor_m_currentLinearDiff_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native void btTranslationalLimitMotor_m_currentLimit_set (long jarg1, btTranslationalLimitMotor jarg1_,
+               int[] jarg2);
+
+       public final static native int[] btTranslationalLimitMotor_m_currentLimit_get (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native long new_btTranslationalLimitMotor__SWIG_0 ();
+
+       public final static native long new_btTranslationalLimitMotor__SWIG_1 (long jarg1, btTranslationalLimitMotor jarg1_);
+
+       public final static native boolean btTranslationalLimitMotor_isLimited (long jarg1, btTranslationalLimitMotor jarg1_, int jarg2);
+
+       public final static native boolean btTranslationalLimitMotor_needApplyForce (long jarg1, btTranslationalLimitMotor jarg1_,
+               int jarg2);
+
+       public final static native int btTranslationalLimitMotor_testLimitValue (long jarg1, btTranslationalLimitMotor jarg1_,
+               int jarg2, float jarg3);
+
+       public final static native float btTranslationalLimitMotor_solveLinearAxis (long jarg1, btTranslationalLimitMotor jarg1_,
+               float jarg2, float jarg3, long jarg4, btRigidBody jarg4_, Vector3 jarg5, long jarg6, btRigidBody jarg6_, Vector3 jarg7,
+               int jarg8, Vector3 jarg9, Vector3 jarg10);
+
+       public final static native void delete_btTranslationalLimitMotor (long jarg1);
+
+       public final static native void btGeneric6DofConstraint_m_useSolveConstraintObsolete_set (long jarg1,
+               btGeneric6DofConstraint jarg1_, boolean jarg2);
+
+       public final static native boolean btGeneric6DofConstraint_m_useSolveConstraintObsolete_get (long jarg1,
+               btGeneric6DofConstraint jarg1_);
+
+       public final static native long new_btGeneric6DofConstraint__SWIG_0 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
+
+       public final static native long new_btGeneric6DofConstraint__SWIG_1 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btTransform jarg2_, boolean jarg3);
+
+       public final static native void btGeneric6DofConstraint_calculateTransforms__SWIG_0 (long jarg1,
+               btGeneric6DofConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native void btGeneric6DofConstraint_calculateTransforms__SWIG_1 (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native long btGeneric6DofConstraint_getCalculatedTransformA (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native long btGeneric6DofConstraint_getCalculatedTransformB (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native long btGeneric6DofConstraint_getFrameOffsetA__SWIG_0 (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native long btGeneric6DofConstraint_getFrameOffsetB__SWIG_0 (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native void btGeneric6DofConstraint_getInfo1NonVirtual (long jarg1, btGeneric6DofConstraint jarg1_,
+               long jarg2);
+
+       public final static native void btGeneric6DofConstraint_getInfo2NonVirtual (long jarg1, btGeneric6DofConstraint jarg1_,
+               long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5,
+               Vector3 jarg6, Vector3 jarg7, Vector3 jarg8);
+
+       public final static native void btGeneric6DofConstraint_updateRHS (long jarg1, btGeneric6DofConstraint jarg1_, float jarg2);
+
+       public final static native Vector3 btGeneric6DofConstraint_getAxis (long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
+
+       public final static native float btGeneric6DofConstraint_getAngle (long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
+
+       public final static native float btGeneric6DofConstraint_getRelativePivotPosition (long jarg1, btGeneric6DofConstraint jarg1_,
+               int jarg2);
+
+       public final static native void btGeneric6DofConstraint_setFrames (long jarg1, btGeneric6DofConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native boolean btGeneric6DofConstraint_testAngularLimitMotor (long jarg1, btGeneric6DofConstraint jarg1_,
+               int jarg2);
+
+       public final static native void btGeneric6DofConstraint_setLinearLowerLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btGeneric6DofConstraint_getLinearLowerLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btGeneric6DofConstraint_setLinearUpperLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btGeneric6DofConstraint_getLinearUpperLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btGeneric6DofConstraint_setAngularLowerLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btGeneric6DofConstraint_getAngularLowerLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btGeneric6DofConstraint_setAngularUpperLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native void btGeneric6DofConstraint_getAngularUpperLimit (long jarg1, btGeneric6DofConstraint jarg1_,
+               Vector3 jarg2);
+
+       public final static native long btGeneric6DofConstraint_getRotationalLimitMotor (long jarg1, btGeneric6DofConstraint jarg1_,
+               int jarg2);
+
+       public final static native long btGeneric6DofConstraint_getTranslationalLimitMotor (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native void btGeneric6DofConstraint_setLimit (long jarg1, btGeneric6DofConstraint jarg1_, int jarg2,
+               float jarg3, float jarg4);
+
+       public final static native boolean btGeneric6DofConstraint_isLimited (long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
+
+       public final static native void btGeneric6DofConstraint_calcAnchorPos (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native int btGeneric6DofConstraint_get_limit_motor_info2__SWIG_0 (long jarg1,
+               btGeneric6DofConstraint jarg1_, long jarg2, btRotationalLimitMotor jarg2_, long jarg3, btTransform jarg3_, long jarg4,
+               btTransform jarg4_, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, long jarg9, btConstraintInfo2 jarg9_,
+               int jarg10, Vector3 jarg11, int jarg12, int jarg13);
+
+       public final static native int btGeneric6DofConstraint_get_limit_motor_info2__SWIG_1 (long jarg1,
+               btGeneric6DofConstraint jarg1_, long jarg2, btRotationalLimitMotor jarg2_, long jarg3, btTransform jarg3_, long jarg4,
+               btTransform jarg4_, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, long jarg9, btConstraintInfo2 jarg9_,
+               int jarg10, Vector3 jarg11, int jarg12);
+
+       public final static native boolean btGeneric6DofConstraint_getUseFrameOffset (long jarg1, btGeneric6DofConstraint jarg1_);
+
+       public final static native void btGeneric6DofConstraint_setUseFrameOffset (long jarg1, btGeneric6DofConstraint jarg1_,
+               boolean jarg2);
+
+       public final static native void btGeneric6DofConstraint_setParam__SWIG_0 (long jarg1, btGeneric6DofConstraint jarg1_,
+               int jarg2, float jarg3, int jarg4);
+
+       public final static native void btGeneric6DofConstraint_setParam__SWIG_1 (long jarg1, btGeneric6DofConstraint jarg1_,
+               int jarg2, float jarg3);
+
+       public final static native float btGeneric6DofConstraint_getParam__SWIG_0 (long jarg1, btGeneric6DofConstraint jarg1_,
+               int jarg2, int jarg3);
+
+       public final static native float btGeneric6DofConstraint_getParam__SWIG_1 (long jarg1, btGeneric6DofConstraint jarg1_,
+               int jarg2);
+
+       public final static native void btGeneric6DofConstraint_setAxis (long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2,
+               Vector3 jarg3);
+
+       public final static native void delete_btGeneric6DofConstraint (long jarg1);
+
+       public final static native void btGeneric6DofConstraintData_m_typeConstraintData_set (long jarg1,
+               btGeneric6DofConstraintData jarg1_, long jarg2, btTypedConstraintData jarg2_);
+
+       public final static native long btGeneric6DofConstraintData_m_typeConstraintData_get (long jarg1,
+               btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_rbAFrame_set (long jarg1, btGeneric6DofConstraintData jarg1_,
+               long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btGeneric6DofConstraintData_m_rbAFrame_get (long jarg1, btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_rbBFrame_set (long jarg1, btGeneric6DofConstraintData jarg1_,
+               long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btGeneric6DofConstraintData_m_rbBFrame_get (long jarg1, btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_linearUpperLimit_set (long jarg1,
+               btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btGeneric6DofConstraintData_m_linearUpperLimit_get (long jarg1,
+               btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_linearLowerLimit_set (long jarg1,
+               btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btGeneric6DofConstraintData_m_linearLowerLimit_get (long jarg1,
+               btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_angularUpperLimit_set (long jarg1,
+               btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btGeneric6DofConstraintData_m_angularUpperLimit_get (long jarg1,
+               btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_angularLowerLimit_set (long jarg1,
+               btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
+
+       public final static native long btGeneric6DofConstraintData_m_angularLowerLimit_get (long jarg1,
+               btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_useLinearReferenceFrameA_set (long jarg1,
+               btGeneric6DofConstraintData jarg1_, int jarg2);
+
+       public final static native int btGeneric6DofConstraintData_m_useLinearReferenceFrameA_get (long jarg1,
+               btGeneric6DofConstraintData jarg1_);
+
+       public final static native void btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_set (long jarg1,
+               btGeneric6DofConstraintData jarg1_, int jarg2);
+
+       public final static native int btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_get (long jarg1,
+               btGeneric6DofConstraintData jarg1_);
+
+       public final static native long new_btGeneric6DofConstraintData ();
+
+       public final static native void delete_btGeneric6DofConstraintData (long jarg1);
+
+       public final static native long new_btUniversalConstraint (long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
+
+       public final static native Vector3 btUniversalConstraint_getAnchor (long jarg1, btUniversalConstraint jarg1_);
+
+       public final static native Vector3 btUniversalConstraint_getAnchor2 (long jarg1, btUniversalConstraint jarg1_);
+
+       public final static native Vector3 btUniversalConstraint_getAxis1 (long jarg1, btUniversalConstraint jarg1_);
+
+       public final static native Vector3 btUniversalConstraint_getAxis2 (long jarg1, btUniversalConstraint jarg1_);
+
+       public final static native float btUniversalConstraint_getAngle1 (long jarg1, btUniversalConstraint jarg1_);
+
+       public final static native float btUniversalConstraint_getAngle2 (long jarg1, btUniversalConstraint jarg1_);
+
+       public final static native void btUniversalConstraint_setUpperLimit (long jarg1, btUniversalConstraint jarg1_, float jarg2,
+               float jarg3);
+
+       public final static native void btUniversalConstraint_setLowerLimit (long jarg1, btUniversalConstraint jarg1_, float jarg2,
+               float jarg3);
+
+       public final static native void btUniversalConstraint_setAxis (long jarg1, btUniversalConstraint jarg1_, Vector3 jarg2,
+               Vector3 jarg3);
+
+       public final static native void delete_btUniversalConstraint (long jarg1);
+
+       public final static native void btContactConstraint_setContactManifold (long jarg1, btContactConstraint jarg1_, long jarg2,
+               btPersistentManifold jarg2_);
+
+       public final static native long btContactConstraint_getContactManifold__SWIG_0 (long jarg1, btContactConstraint jarg1_);
+
+       public final static native void delete_btContactConstraint (long jarg1);
+
+       public final static native float resolveSingleCollision (long jarg1, btRigidBody jarg1_, long jarg2, btCollisionObject jarg2_,
+               Vector3 jarg3, Vector3 jarg4, long jarg5, btContactSolverInfo jarg5_, float jarg6);
+
+       public final static native void resolveSingleBilateral (long jarg1, btRigidBody jarg1_, Vector3 jarg2, long jarg3,
+               btRigidBody jarg3_, Vector3 jarg4, float jarg5, Vector3 jarg6, long jarg7, float jarg8);
+
+       public final static native long new_btConeTwistConstraint__SWIG_0 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_);
+
+       public final static native long new_btConeTwistConstraint__SWIG_1 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btTransform jarg2_);
+
+       public final static native void btConeTwistConstraint_getInfo1NonVirtual (long jarg1, btConeTwistConstraint jarg1_, long jarg2);
+
+       public final static native void btConeTwistConstraint_getInfo2NonVirtual (long jarg1, btConeTwistConstraint jarg1_,
+               long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Matrix3 jarg5,
+               Matrix3 jarg6);
+
+       public final static native void btConeTwistConstraint_updateRHS (long jarg1, btConeTwistConstraint jarg1_, float jarg2);
+
+       public final static native long btConeTwistConstraint_getRigidBodyA (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native long btConeTwistConstraint_getRigidBodyB (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native void btConeTwistConstraint_setAngularOnly (long jarg1, btConeTwistConstraint jarg1_, boolean jarg2);
+
+       public final static native void btConeTwistConstraint_setLimit__SWIG_0 (long jarg1, btConeTwistConstraint jarg1_, int jarg2,
+               float jarg3);
+
+       public final static native void btConeTwistConstraint_setLimit__SWIG_1 (long jarg1, btConeTwistConstraint jarg1_, float jarg2,
+               float jarg3, float jarg4, float jarg5, float jarg6, float jarg7);
+
+       public final static native void btConeTwistConstraint_setLimit__SWIG_2 (long jarg1, btConeTwistConstraint jarg1_, float jarg2,
+               float jarg3, float jarg4, float jarg5, float jarg6);
+
+       public final static native void btConeTwistConstraint_setLimit__SWIG_3 (long jarg1, btConeTwistConstraint jarg1_, float jarg2,
+               float jarg3, float jarg4, float jarg5);
+
+       public final static native void btConeTwistConstraint_setLimit__SWIG_4 (long jarg1, btConeTwistConstraint jarg1_, float jarg2,
+               float jarg3, float jarg4);
+
+       public final static native long btConeTwistConstraint_getAFrame (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native long btConeTwistConstraint_getBFrame (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native int btConeTwistConstraint_getSolveTwistLimit (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native int btConeTwistConstraint_getSolveSwingLimit (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native float btConeTwistConstraint_getTwistLimitSign (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native void btConeTwistConstraint_calcAngleInfo (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native void btConeTwistConstraint_calcAngleInfo2 (long jarg1, btConeTwistConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_, Matrix3 jarg4, Matrix3 jarg5);
+
+       public final static native float btConeTwistConstraint_getSwingSpan1 (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native float btConeTwistConstraint_getSwingSpan2 (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native float btConeTwistConstraint_getTwistSpan (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native float btConeTwistConstraint_getTwistAngle (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native boolean btConeTwistConstraint_isPastSwingLimit (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native void btConeTwistConstraint_setDamping (long jarg1, btConeTwistConstraint jarg1_, float jarg2);
+
+       public final static native void btConeTwistConstraint_enableMotor (long jarg1, btConeTwistConstraint jarg1_, boolean jarg2);
+
+       public final static native void btConeTwistConstraint_setMaxMotorImpulse (long jarg1, btConeTwistConstraint jarg1_, float jarg2);
+
+       public final static native void btConeTwistConstraint_setMaxMotorImpulseNormalized (long jarg1, btConeTwistConstraint jarg1_,
+               float jarg2);
+
+       public final static native float btConeTwistConstraint_getFixThresh (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native void btConeTwistConstraint_setFixThresh (long jarg1, btConeTwistConstraint jarg1_, float jarg2);
+
+       public final static native void btConeTwistConstraint_setMotorTarget (long jarg1, btConeTwistConstraint jarg1_,
+               Quaternion jarg2);
+
+       public final static native void btConeTwistConstraint_setMotorTargetInConstraintSpace (long jarg1,
+               btConeTwistConstraint jarg1_, Quaternion jarg2);
+
+       public final static native Vector3 btConeTwistConstraint_GetPointForAngle (long jarg1, btConeTwistConstraint jarg1_,
+               float jarg2, float jarg3);
+
+       public final static native void btConeTwistConstraint_setParam__SWIG_0 (long jarg1, btConeTwistConstraint jarg1_, int jarg2,
+               float jarg3, int jarg4);
+
+       public final static native void btConeTwistConstraint_setParam__SWIG_1 (long jarg1, btConeTwistConstraint jarg1_, int jarg2,
+               float jarg3);
+
+       public final static native void btConeTwistConstraint_setFrames (long jarg1, btConeTwistConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native long btConeTwistConstraint_getFrameOffsetA (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native long btConeTwistConstraint_getFrameOffsetB (long jarg1, btConeTwistConstraint jarg1_);
+
+       public final static native float btConeTwistConstraint_getParam__SWIG_0 (long jarg1, btConeTwistConstraint jarg1_, int jarg2,
+               int jarg3);
+
+       public final static native float btConeTwistConstraint_getParam__SWIG_1 (long jarg1, btConeTwistConstraint jarg1_, int jarg2);
+
+       public final static native void delete_btConeTwistConstraint (long jarg1);
+
+       public final static native void btConeTwistConstraintData_m_typeConstraintData_set (long jarg1,
+               btConeTwistConstraintData jarg1_, long jarg2, btTypedConstraintData jarg2_);
+
+       public final static native long btConeTwistConstraintData_m_typeConstraintData_get (long jarg1,
+               btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_rbAFrame_set (long jarg1, btConeTwistConstraintData jarg1_,
+               long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btConeTwistConstraintData_m_rbAFrame_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_rbBFrame_set (long jarg1, btConeTwistConstraintData jarg1_,
+               long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btConeTwistConstraintData_m_rbBFrame_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_swingSpan1_set (long jarg1, btConeTwistConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btConeTwistConstraintData_m_swingSpan1_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_swingSpan2_set (long jarg1, btConeTwistConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btConeTwistConstraintData_m_swingSpan2_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_twistSpan_set (long jarg1, btConeTwistConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btConeTwistConstraintData_m_twistSpan_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_limitSoftness_set (long jarg1, btConeTwistConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btConeTwistConstraintData_m_limitSoftness_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_biasFactor_set (long jarg1, btConeTwistConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btConeTwistConstraintData_m_biasFactor_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_relaxationFactor_set (long jarg1,
+               btConeTwistConstraintData jarg1_, float jarg2);
+
+       public final static native float btConeTwistConstraintData_m_relaxationFactor_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_damping_set (long jarg1, btConeTwistConstraintData jarg1_,
+               float jarg2);
+
+       public final static native float btConeTwistConstraintData_m_damping_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native void btConeTwistConstraintData_m_pad_set (long jarg1, btConeTwistConstraintData jarg1_, String jarg2);
+
+       public final static native String btConeTwistConstraintData_m_pad_get (long jarg1, btConeTwistConstraintData jarg1_);
+
+       public final static native long new_btConeTwistConstraintData ();
+
+       public final static native void delete_btConeTwistConstraintData (long jarg1);
+
+       public final static native long new_btGeneric6DofSpringConstraint__SWIG_0 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
+
+       public final static native long new_btGeneric6DofSpringConstraint__SWIG_1 (long jarg1, btRigidBody jarg1_, long jarg2,
+               btTransform jarg2_, boolean jarg3);
+
+       public final static native void btGeneric6DofSpringConstraint_enableSpring (long jarg1, btGeneric6DofSpringConstraint jarg1_,
+               int jarg2, boolean jarg3);
+
+       public final static native void btGeneric6DofSpringConstraint_setStiffness (long jarg1, btGeneric6DofSpringConstraint jarg1_,
+               int jarg2, float jarg3);
+
+       public final static native void btGeneric6DofSpringConstraint_setDamping (long jarg1, btGeneric6DofSpringConstraint jarg1_,
+               int jarg2, float jarg3);
+
+       public final static native void btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_0 (long jarg1,
+               btGeneric6DofSpringConstraint jarg1_);
+
+       public final static native void btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_1 (long jarg1,
+               btGeneric6DofSpringConstraint jarg1_, int jarg2);
+
+       public final static native void btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_2 (long jarg1,
+               btGeneric6DofSpringConstraint jarg1_, int jarg2, float jarg3);
+
+       public final static native void btGeneric6DofSpringConstraint_setAxis (long jarg1, btGeneric6DofSpringConstraint jarg1_,
+               Vector3 jarg2, Vector3 jarg3);
+
+       public final static native void delete_btGeneric6DofSpringConstraint (long jarg1);
+
+       public final static native void btGeneric6DofSpringConstraintData_m_6dofData_set (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_, long jarg2, btGeneric6DofConstraintData jarg2_);
+
+       public final static native long btGeneric6DofSpringConstraintData_m_6dofData_get (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_);
+
+       public final static native void btGeneric6DofSpringConstraintData_m_springEnabled_set (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_, int[] jarg2);
+
+       public final static native int[] btGeneric6DofSpringConstraintData_m_springEnabled_get (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_);
+
+       public final static native void btGeneric6DofSpringConstraintData_m_equilibriumPoint_set (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_, float[] jarg2);
+
+       public final static native float[] btGeneric6DofSpringConstraintData_m_equilibriumPoint_get (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_);
+
+       public final static native void btGeneric6DofSpringConstraintData_m_springStiffness_set (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_, float[] jarg2);
+
+       public final static native float[] btGeneric6DofSpringConstraintData_m_springStiffness_get (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_);
+
+       public final static native void btGeneric6DofSpringConstraintData_m_springDamping_set (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_, float[] jarg2);
+
+       public final static native float[] btGeneric6DofSpringConstraintData_m_springDamping_get (long jarg1,
+               btGeneric6DofSpringConstraintData jarg1_);
+
+       public final static native long new_btGeneric6DofSpringConstraintData ();
+
+       public final static native void delete_btGeneric6DofSpringConstraintData (long jarg1);
+
+       public final static native long new_btHingeConstraint__SWIG_0 (long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, boolean jarg7);
+
+       public final static native long new_btHingeConstraint__SWIG_1 (long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native long new_btHingeConstraint__SWIG_2 (long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3,
+               boolean jarg4);
+
+       public final static native long new_btHingeConstraint__SWIG_3 (long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
+
+       public final static native long new_btHingeConstraint__SWIG_4 (long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_,
+               long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
+
+       public final static native long new_btHingeConstraint__SWIG_5 (long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_,
+               long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_);
+
+       public final static native long new_btHingeConstraint__SWIG_6 (long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_,
+               boolean jarg3);
+
+       public final static native long new_btHingeConstraint__SWIG_7 (long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_);
+
+       public final static native void btHingeConstraint_getInfo1NonVirtual (long jarg1, btHingeConstraint jarg1_, long jarg2);
+
+       public final static native void btHingeConstraint_getInfo2NonVirtual (long jarg1, btHingeConstraint jarg1_, long jarg2,
+               btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btHingeConstraint_getInfo2Internal (long jarg1, btHingeConstraint jarg1_, long jarg2,
+               btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6);
+
+       public final static native void btHingeConstraint_getInfo2InternalUsingFrameOffset (long jarg1, btHingeConstraint jarg1_,
+               long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5,
+               Vector3 jarg6);
+
+       public final static native void btHingeConstraint_updateRHS (long jarg1, btHingeConstraint jarg1_, float jarg2);
+
+       public final static native long btHingeConstraint_getRigidBodyA__SWIG_0 (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native long btHingeConstraint_getRigidBodyB__SWIG_0 (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native long btHingeConstraint_getFrameOffsetA (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native long btHingeConstraint_getFrameOffsetB (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native void btHingeConstraint_setFrames (long jarg1, btHingeConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native void btHingeConstraint_setAngularOnly (long jarg1, btHingeConstraint jarg1_, boolean jarg2);
+
+       public final static native void btHingeConstraint_enableAngularMotor (long jarg1, btHingeConstraint jarg1_, boolean jarg2,
+               float jarg3, float jarg4);
+
+       public final static native void btHingeConstraint_enableMotor (long jarg1, btHingeConstraint jarg1_, boolean jarg2);
+
+       public final static native void btHingeConstraint_setMaxMotorImpulse (long jarg1, btHingeConstraint jarg1_, float jarg2);
+
+       public final static native void btHingeConstraint_setMotorTarget__SWIG_0 (long jarg1, btHingeConstraint jarg1_,
+               Quaternion jarg2, float jarg3);
+
+       public final static native void btHingeConstraint_setMotorTarget__SWIG_1 (long jarg1, btHingeConstraint jarg1_, float jarg2,
+               float jarg3);
+
+       public final static native void btHingeConstraint_setLimit__SWIG_0 (long jarg1, btHingeConstraint jarg1_, float jarg2,
+               float jarg3, float jarg4, float jarg5, float jarg6);
+
+       public final static native void btHingeConstraint_setLimit__SWIG_1 (long jarg1, btHingeConstraint jarg1_, float jarg2,
+               float jarg3, float jarg4, float jarg5);
+
+       public final static native void btHingeConstraint_setLimit__SWIG_2 (long jarg1, btHingeConstraint jarg1_, float jarg2,
+               float jarg3, float jarg4);
+
+       public final static native void btHingeConstraint_setLimit__SWIG_3 (long jarg1, btHingeConstraint jarg1_, float jarg2,
+               float jarg3);
+
+       public final static native void btHingeConstraint_setAxis (long jarg1, btHingeConstraint jarg1_, Vector3 jarg2);
+
+       public final static native float btHingeConstraint_getLowerLimit (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native float btHingeConstraint_getUpperLimit (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native float btHingeConstraint_getHingeAngle__SWIG_0 (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native float btHingeConstraint_getHingeAngle__SWIG_1 (long jarg1, btHingeConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native void btHingeConstraint_testLimit (long jarg1, btHingeConstraint jarg1_, long jarg2,
+               btTransform jarg2_, long jarg3, btTransform jarg3_);
+
+       public final static native long btHingeConstraint_getAFrame__SWIG_0 (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native long btHingeConstraint_getBFrame__SWIG_0 (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native int btHingeConstraint_getSolveLimit (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native float btHingeConstraint_getLimitSign (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native boolean btHingeConstraint_getAngularOnly (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native boolean btHingeConstraint_getEnableAngularMotor (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native float btHingeConstraint_getMotorTargetVelosity (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native float btHingeConstraint_getMaxMotorImpulse (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native boolean btHingeConstraint_getUseFrameOffset (long jarg1, btHingeConstraint jarg1_);
+
+       public final static native void btHingeConstraint_setUseFrameOffset (long jarg1, btHingeConstraint jarg1_, boolean jarg2);
+
+       public final static native void btHingeConstraint_setParam__SWIG_0 (long jarg1, btHingeConstraint jarg1_, int jarg2,
+               float jarg3, int jarg4);
+
+       public final static native void btHingeConstraint_setParam__SWIG_1 (long jarg1, btHingeConstraint jarg1_, int jarg2,
+               float jarg3);
+
+       public final static native float btHingeConstraint_getParam__SWIG_0 (long jarg1, btHingeConstraint jarg1_, int jarg2, int jarg3);
+
+       public final static native float btHingeConstraint_getParam__SWIG_1 (long jarg1, btHingeConstraint jarg1_, int jarg2);
+
+       public final static native void delete_btHingeConstraint (long jarg1);
+
+       public final static native void btHingeConstraintDoubleData_m_typeConstraintData_set (long jarg1,
+               btHingeConstraintDoubleData jarg1_, long jarg2, btTypedConstraintData jarg2_);
+
+       public final static native long btHingeConstraintDoubleData_m_typeConstraintData_get (long jarg1,
+               btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_rbAFrame_set (long jarg1, btHingeConstraintDoubleData jarg1_,
+               long jarg2, btTransformDoubleData jarg2_);
+
+       public final static native long btHingeConstraintDoubleData_m_rbAFrame_get (long jarg1, btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_rbBFrame_set (long jarg1, btHingeConstraintDoubleData jarg1_,
+               long jarg2, btTransformDoubleData jarg2_);
+
+       public final static native long btHingeConstraintDoubleData_m_rbBFrame_get (long jarg1, btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_useReferenceFrameA_set (long jarg1,
+               btHingeConstraintDoubleData jarg1_, int jarg2);
+
+       public final static native int btHingeConstraintDoubleData_m_useReferenceFrameA_get (long jarg1,
+               btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_angularOnly_set (long jarg1, btHingeConstraintDoubleData jarg1_,
+               int jarg2);
+
+       public final static native int btHingeConstraintDoubleData_m_angularOnly_get (long jarg1, btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_enableAngularMotor_set (long jarg1,
+               btHingeConstraintDoubleData jarg1_, int jarg2);
+
+       public final static native int btHingeConstraintDoubleData_m_enableAngularMotor_get (long jarg1,
+               btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_motorTargetVelocity_set (long jarg1,
+               btHingeConstraintDoubleData jarg1_, float jarg2);
+
+       public final static native float btHingeConstraintDoubleData_m_motorTargetVelocity_get (long jarg1,
+               btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_maxMotorImpulse_set (long jarg1,
+               btHingeConstraintDoubleData jarg1_, float jarg2);
+
+       public final static native float btHingeConstraintDoubleData_m_maxMotorImpulse_get (long jarg1,
+               btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_lowerLimit_set (long jarg1, btHingeConstraintDoubleData jarg1_,
+               float jarg2);
+
+       public final static native float btHingeConstraintDoubleData_m_lowerLimit_get (long jarg1, btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_upperLimit_set (long jarg1, btHingeConstraintDoubleData jarg1_,
+               float jarg2);
+
+       public final static native float btHingeConstraintDoubleData_m_upperLimit_get (long jarg1, btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_limitSoftness_set (long jarg1,
+               btHingeConstraintDoubleData jarg1_, float jarg2);
+
+       public final static native float btHingeConstraintDoubleData_m_limitSoftness_get (long jarg1,
+               btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_biasFactor_set (long jarg1, btHingeConstraintDoubleData jarg1_,
+               float jarg2);
+
+       public final static native float btHingeConstraintDoubleData_m_biasFactor_get (long jarg1, btHingeConstraintDoubleData jarg1_);
+
+       public final static native void btHingeConstraintDoubleData_m_relaxationFactor_set (long jarg1,
+               btHingeConstraintDoubleData jarg1_, float jarg2);
+
+       public final static native float btHingeConstraintDoubleData_m_relaxationFactor_get (long jarg1,
+               btHingeConstraintDoubleData jarg1_);
+
+       public final static native long new_btHingeConstraintDoubleData ();
+
+       public final static native void delete_btHingeConstraintDoubleData (long jarg1);
+
+       public final static native void btHingeConstraintFloatData_m_typeConstraintData_set (long jarg1,
+               btHingeConstraintFloatData jarg1_, long jarg2, btTypedConstraintData jarg2_);
+
+       public final static native long btHingeConstraintFloatData_m_typeConstraintData_get (long jarg1,
+               btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_rbAFrame_set (long jarg1, btHingeConstraintFloatData jarg1_,
+               long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btHingeConstraintFloatData_m_rbAFrame_get (long jarg1, btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_rbBFrame_set (long jarg1, btHingeConstraintFloatData jarg1_,
+               long jarg2, btTransformFloatData jarg2_);
+
+       public final static native long btHingeConstraintFloatData_m_rbBFrame_get (long jarg1, btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_useReferenceFrameA_set (long jarg1,
+               btHingeConstraintFloatData jarg1_, int jarg2);
+
+       public final static native int btHingeConstraintFloatData_m_useReferenceFrameA_get (long jarg1,
+               btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_angularOnly_set (long jarg1, btHingeConstraintFloatData jarg1_,
+               int jarg2);
+
+       public final static native int btHingeConstraintFloatData_m_angularOnly_get (long jarg1, btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_enableAngularMotor_set (long jarg1,
+               btHingeConstraintFloatData jarg1_, int jarg2);
+
+       public final static native int btHingeConstraintFloatData_m_enableAngularMotor_get (long jarg1,
+               btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_motorTargetVelocity_set (long jarg1,
+               btHingeConstraintFloatData jarg1_, float jarg2);
+
+       public final static native float btHingeConstraintFloatData_m_motorTargetVelocity_get (long jarg1,
+               btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_maxMotorImpulse_set (long jarg1,
+               btHingeConstraintFloatData jarg1_, float jarg2);
+
+       public final static native float btHingeConstraintFloatData_m_maxMotorImpulse_get (long jarg1,
+               btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_lowerLimit_set (long jarg1, btHingeConstraintFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btHingeConstraintFloatData_m_lowerLimit_get (long jarg1, btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_upperLimit_set (long jarg1, btHingeConstraintFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btHingeConstraintFloatData_m_upperLimit_get (long jarg1, btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_limitSoftness_set (long jarg1, btHingeConstraintFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btHingeConstraintFloatData_m_limitSoftness_get (long jarg1, btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_biasFactor_set (long jarg1, btHingeConstraintFloatData jarg1_,
+               float jarg2);
+
+       public final static native float btHingeConstraintFloatData_m_biasFactor_get (long jarg1, btHingeConstraintFloatData jarg1_);
+
+       public final static native void btHingeConstraintFloatData_m_relaxationFactor_set (long jarg1,
+               btHingeConstraintFloatData jarg1_, float jarg2);
+
+       public final static native float btHingeConstraintFloatData_m_relaxationFactor_get (long jarg1,
+               btHingeConstraintFloatData jarg1_);
+
+       public final static native long new_btHingeConstraintFloatData ();
+
+       public final static native void delete_btHingeConstraintFloatData (long jarg1);
+
+       public final static native void btSolverConstraint_m_relpos1CrossNormal_set (long jarg1, btSolverConstraint jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btSolverConstraint_m_relpos1CrossNormal_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_contactNormal_set (long jarg1, btSolverConstraint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btSolverConstraint_m_contactNormal_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_relpos2CrossNormal_set (long jarg1, btSolverConstraint jarg1_,
+               long jarg2, btVector3 jarg2_);
+
+       public final static native long btSolverConstraint_m_relpos2CrossNormal_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_angularComponentA_set (long jarg1, btSolverConstraint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btSolverConstraint_m_angularComponentA_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_angularComponentB_set (long jarg1, btSolverConstraint jarg1_, long jarg2,
+               btVector3 jarg2_);
+
+       public final static native long btSolverConstraint_m_angularComponentB_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_appliedPushImpulse_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_appliedPushImpulse_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_appliedImpulse_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_appliedImpulse_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_friction_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_friction_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_jacDiagABInv_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_jacDiagABInv_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_overrideNumSolverIterations_set (long jarg1, btSolverConstraint jarg1_,
+               int jarg2);
+
+       public final static native int btSolverConstraint_m_overrideNumSolverIterations_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_rhs_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_rhs_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_cfm_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_cfm_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_lowerLimit_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_lowerLimit_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_upperLimit_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_upperLimit_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native void btSolverConstraint_m_rhsPenetration_set (long jarg1, btSolverConstraint jarg1_, float jarg2);
+
+       public final static native float btSolverConstraint_m_rhsPenetration_get (long jarg1, btSolverConstraint jarg1_);
+
+       public final static native long new_btSolverConstraint ();
+
+       public final static native void delete_btSolverConstraint (long jarg1);
+
+       public final static native long new_btHinge2Constraint (long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_,
+               Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
+
+       public final static native Vector3 btHinge2Constraint_getAnchor (long jarg1, btHinge2Constraint jarg1_);
+
+       public final static native Vector3 btHinge2Constraint_getAnchor2 (long jarg1, btHinge2Constraint jarg1_);
+
+       public final static native Vector3 btHinge2Constraint_getAxis1 (long jarg1, btHinge2Constraint jarg1_);
+
+       public final static native Vector3 btHinge2Constraint_getAxis2 (long jarg1, btHinge2Constraint jarg1_);
+
+       public final static native float btHinge2Constraint_getAngle1 (long jarg1, btHinge2Constraint jarg1_);
+
+       public final static native float btHinge2Constraint_getAngle2 (long jarg1, btHinge2Constraint jarg1_);
+
+       public final static native void btHinge2Constraint_setUpperLimit (long jarg1, btHinge2Constraint jarg1_, float jarg2);
+
+       public final static native void btHinge2Constraint_setLowerLimit (long jarg1, btHinge2Constraint jarg1_, float jarg2);
+
+       public final static native void delete_btHinge2Constraint (long jarg1);
+
+       public final static native long new_btCollisionObjectArray__SWIG_0 ();
+
+       public final static native void delete_btCollisionObjectArray (long jarg1);
+
+       public final static native long new_btCollisionObjectArray__SWIG_1 (long jarg1, btCollisionObjectArray jarg1_);
+
+       public final static native int btCollisionObjectArray_size (long jarg1, btCollisionObjectArray jarg1_);
+
+       public final static native long btCollisionObjectArray_at__SWIG_0 (long jarg1, btCollisionObjectArray jarg1_, int jarg2);
+
+       public final static native void btCollisionObjectArray_clear (long jarg1, btCollisionObjectArray jarg1_);
+
+       public final static native void btCollisionObjectArray_pop_back (long jarg1, btCollisionObjectArray jarg1_);
+
+       public final static native void btCollisionObjectArray_resize__SWIG_0 (long jarg1, btCollisionObjectArray jarg1_, int jarg2,
+               long jarg3, btCollisionObject jarg3_);
+
+       public final static native void btCollisionObjectArray_resize__SWIG_1 (long jarg1, btCollisionObjectArray jarg1_, int jarg2);
+
+       public final static native long btCollisionObjectArray_expandNonInitializing (long jarg1, btCollisionObjectArray jarg1_);
+
+       public final static native long btCollisionObjectArray_expand__SWIG_0 (long jarg1, btCollisionObjectArray jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native long btCollisionObjectArray_expand__SWIG_1 (long jarg1, btCollisionObjectArray jarg1_);
+
+       public final static native void btCollisionObjectArray_push_back (long jarg1, btCollisionObjectArray jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native int btCollisionObjectArray_capacity (long jarg1, btCollisionObjectArray jarg1_);
+
+       public final static native void btCollisionObjectArray_reserve (long jarg1, btCollisionObjectArray jarg1_, int jarg2);
+
+       public final static native void btCollisionObjectArray_swap (long jarg1, btCollisionObjectArray jarg1_, int jarg2, int jarg3);
+
+       public final static native int btCollisionObjectArray_findBinarySearch (long jarg1, btCollisionObjectArray jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native int btCollisionObjectArray_findLinearSearch (long jarg1, btCollisionObjectArray jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native void btCollisionObjectArray_remove (long jarg1, btCollisionObjectArray jarg1_, long jarg2,
+               btCollisionObject jarg2_);
+
+       public final static native void btCollisionObjectArray_initializeFromBuffer (long jarg1, btCollisionObjectArray jarg1_,
+               long jarg2, int jarg3, int jarg4);
+
+       public final static native void btCollisionObjectArray_copyFromArray (long jarg1, btCollisionObjectArray jarg1_, long jarg2,
+               btCollisionObjectArray jarg2_);
+
+       public final static native long btVector4_SWIGUpcast (long jarg1);
+
+       public final static native long btDefaultMotionState_SWIGUpcast (long jarg1);
+
+       public final static native long GrahamVector2_SWIGUpcast (long jarg1);
+
+       public final static native long btBroadphaseRayCallback_SWIGUpcast (long jarg1);
+
+       public final static native long btDbvtProxy_SWIGUpcast (long jarg1);
+
+       public final static native long btDbvtBroadphase_SWIGUpcast (long jarg1);
+
+       public final static native long btSimpleBroadphaseProxy_SWIGUpcast (long jarg1);
+
+       public final static native long btSimpleBroadphase_SWIGUpcast (long jarg1);
+
+       public final static native long btMultiSapBroadphase_SWIGUpcast (long jarg1);
+
+       public final static native long btOverlappingPairCache_SWIGUpcast (long jarg1);
+
+       public final static native long btHashedOverlappingPairCache_SWIGUpcast (long jarg1);
+
+       public final static native long btSortedOverlappingPairCache_SWIGUpcast (long jarg1);
+
+       public final static native long btNullPairCache_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexShape_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexInternalShape_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexInternalAabbCachingShape_SWIGUpcast (long jarg1);
+
+       public final static native long btPolyhedralConvexShape_SWIGUpcast (long jarg1);
+
+       public final static native long btPolyhedralConvexAabbCachingShape_SWIGUpcast (long jarg1);
+
+       public final static native long btConcaveShape_SWIGUpcast (long jarg1);
+
+       public final static native long btStaticPlaneShape_SWIGUpcast (long jarg1);
+
+       public final static native long btHeightfieldTerrainShape_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleMeshShape_SWIGUpcast (long jarg1);
+
+       public final static native long btBvhTriangleMeshShape_SWIGUpcast (long jarg1);
+
+       public final static native long btBoxShape_SWIGUpcast (long jarg1);
+
+       public final static native long btCapsuleShape_SWIGUpcast (long jarg1);
+
+       public final static native long btCapsuleShapeX_SWIGUpcast (long jarg1);
+
+       public final static native long btCapsuleShapeZ_SWIGUpcast (long jarg1);
+
+       public final static native long btBox2dShape_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleShape_SWIGUpcast (long jarg1);
+
+       public final static native long btSphereShape_SWIGUpcast (long jarg1);
+
+       public final static native long btMultiSphereShape_SWIGUpcast (long jarg1);
+
+       public final static native long btMinkowskiSumShape_SWIGUpcast (long jarg1);
+
+       public final static native long btOptimizedBvh_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleBuffer_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleIndexVertexArray_SWIGUpcast (long jarg1);
+
+       public final static native long btScaledBvhTriangleMeshShape_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexHullShape_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleIndexVertexMaterialArray_SWIGUpcast (long jarg1);
+
+       public final static native long btCylinderShape_SWIGUpcast (long jarg1);
+
+       public final static native long btCylinderShapeX_SWIGUpcast (long jarg1);
+
+       public final static native long btCylinderShapeZ_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleMesh_SWIGUpcast (long jarg1);
+
+       public final static native long btConeShape_SWIGUpcast (long jarg1);
+
+       public final static native long btConeShapeX_SWIGUpcast (long jarg1);
+
+       public final static native long btConeShapeZ_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexTriangleMeshShape_SWIGUpcast (long jarg1);
+
+       public final static native long btEmptyShape_SWIGUpcast (long jarg1);
+
+       public final static native long btMultimaterialTriangleMeshShape_SWIGUpcast (long jarg1);
+
+       public final static native long btBU_Simplex1to4_SWIGUpcast (long jarg1);
+
+       public final static native long btUniformScalingShape_SWIGUpcast (long jarg1);
+
+       public final static native long btCompoundShape_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexPointCloudShape_SWIGUpcast (long jarg1);
+
+       public final static native long btConvex2dShape_SWIGUpcast (long jarg1);
+
+       public final static native long btRigidBody_SWIGUpcast (long jarg1);
+
+       public final static native long btEmptyAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btActivatingCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexTriangleCallback_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexConcaveCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexPlaneCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btDefaultCollisionConfiguration_SWIGUpcast (long jarg1);
+
+       public final static native long btSphereSphereCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btBoxBoxCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btBox2dBox2dCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btSphereTriangleCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btGhostObject_SWIGUpcast (long jarg1);
+
+       public final static native long btPairCachingGhostObject_SWIGUpcast (long jarg1);
+
+       public final static native long btGhostPairCallback_SWIGUpcast (long jarg1);
+
+       public final static native long btConvex2dConvex2dAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btSphereBoxCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btCollisionDispatcher_SWIGUpcast (long jarg1);
+
+       public final static native long btConvexConvexAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btCompoundCollisionAlgorithm_SWIGUpcast (long jarg1);
+
+       public final static native long btSubsimplexConvexCast_SWIGUpcast (long jarg1);
+
+       public final static native long btPersistentManifold_SWIGUpcast (long jarg1);
+
+       public final static native long btMinkowskiPenetrationDepthSolver_SWIGUpcast (long jarg1);
+
+       public final static native long btGjkConvexCast_SWIGUpcast (long jarg1);
+
+       public final static native long btContinuousConvexCollision_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleRaycastCallback_SWIGUpcast (long jarg1);
+
+       public final static native long btTriangleConvexcastCallback_SWIGUpcast (long jarg1);
+
+       public final static native long btGjkEpaPenetrationDepthSolver_SWIGUpcast (long jarg1);
+
+       public final static native long btTypedConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btDynamicsWorld_SWIGUpcast (long jarg1);
+
+       public final static native long btSimpleDynamicsWorld_SWIGUpcast (long jarg1);
+
+       public final static native long btDiscreteDynamicsWorld_SWIGUpcast (long jarg1);
+
+       public final static native long btCharacterControllerInterface_SWIGUpcast (long jarg1);
+
+       public final static native long btKinematicCharacterController_SWIGUpcast (long jarg1);
+
+       public final static native long btContactSolverInfo_SWIGUpcast (long jarg1);
+
+       public final static native long btSequentialImpulseConstraintSolver_SWIGUpcast (long jarg1);
+
+       public final static native long btSliderConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btPoint2PointConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btGeneric6DofConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btUniversalConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btContactConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btConeTwistConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btGeneric6DofSpringConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btHingeConstraint_SWIGUpcast (long jarg1);
+
+       public final static native long btHinge2Constraint_SWIGUpcast (long jarg1);
+
+       public static void SwigDirector_btIDebugDraw_drawLine__SWIG_0 (btIDebugDraw self, Vector3 from, Vector3 to, Vector3 color) {
+               self.drawLine(from, to, color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawLine__SWIG_1 (btIDebugDraw self, Vector3 from, Vector3 to, Vector3 fromColor,
+               Vector3 toColor) {
+               self.drawLine(from, to, fromColor, toColor);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawSphere__SWIG_0 (btIDebugDraw self, float radius, long transform, Vector3 color) {
+               self.drawSphere(radius, new btTransform(transform, false), color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawSphere__SWIG_1 (btIDebugDraw self, Vector3 p, float radius, Vector3 color) {
+               self.drawSphere(p, radius, color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawTriangle__SWIG_0 (btIDebugDraw self, Vector3 v0, Vector3 v1, Vector3 v2,
+               Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color, float alpha) {
+               self.drawTriangle(v0, v1, v2, arg3, arg4, arg5, color, alpha);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawTriangle__SWIG_1 (btIDebugDraw self, Vector3 v0, Vector3 v1, Vector3 v2,
+               Vector3 color, float arg4) {
+               self.drawTriangle(v0, v1, v2, color, arg4);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawContactPoint (btIDebugDraw self, Vector3 PointOnB, Vector3 normalOnB,
+               float distance, int lifeTime, Vector3 color) {
+               self.drawContactPoint(PointOnB, normalOnB, distance, lifeTime, color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_reportErrorWarning (btIDebugDraw self, String warningString) {
+               self.reportErrorWarning(warningString);
+       }
+
+       public static void SwigDirector_btIDebugDraw_draw3dText (btIDebugDraw self, Vector3 location, String textString) {
+               self.draw3dText(location, textString);
+       }
+
+       public static void SwigDirector_btIDebugDraw_setDebugMode (btIDebugDraw self, int debugMode) {
+               self.setDebugMode(debugMode);
+       }
+
+       public static int SwigDirector_btIDebugDraw_getDebugMode (btIDebugDraw self) {
+               return self.getDebugMode();
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawAabb (btIDebugDraw self, Vector3 from, Vector3 to, Vector3 color) {
+               self.drawAabb(from, to, color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawTransform (btIDebugDraw self, long transform, float orthoLen) {
+               self.drawTransform(new btTransform(transform, false), orthoLen);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawArc__SWIG_0 (btIDebugDraw self, Vector3 center, Vector3 normal, Vector3 axis,
+               float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect, float stepDegrees) {
+               self.drawArc(center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect, stepDegrees);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawArc__SWIG_1 (btIDebugDraw self, Vector3 center, Vector3 normal, Vector3 axis,
+               float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect) {
+               self.drawArc(center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawSpherePatch__SWIG_0 (btIDebugDraw self, Vector3 center, Vector3 up,
+               Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color, float stepDegrees) {
+               self.drawSpherePatch(center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawSpherePatch__SWIG_1 (btIDebugDraw self, Vector3 center, Vector3 up,
+               Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color) {
+               self.drawSpherePatch(center, up, axis, radius, minTh, maxTh, minPs, maxPs, color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawBox__SWIG_0 (btIDebugDraw self, Vector3 bbMin, Vector3 bbMax, Vector3 color) {
+               self.drawBox(bbMin, bbMax, color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawBox__SWIG_1 (btIDebugDraw self, Vector3 bbMin, Vector3 bbMax, long trans,
+               Vector3 color) {
+               self.drawBox(bbMin, bbMax, new btTransform(trans, false), color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawCapsule (btIDebugDraw self, float radius, float halfHeight, int upAxis,
+               long transform, Vector3 color) {
+               self.drawCapsule(radius, halfHeight, upAxis, new btTransform(transform, false), color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawCylinder (btIDebugDraw self, float radius, float halfHeight, int upAxis,
+               long transform, Vector3 color) {
+               self.drawCylinder(radius, halfHeight, upAxis, new btTransform(transform, false), color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawCone (btIDebugDraw self, float radius, float height, int upAxis,
+               long transform, Vector3 color) {
+               self.drawCone(radius, height, upAxis, new btTransform(transform, false), color);
+       }
+
+       public static void SwigDirector_btIDebugDraw_drawPlane (btIDebugDraw self, Vector3 planeNormal, float planeConst,
+               long transform, Vector3 color) {
+               self.drawPlane(planeNormal, planeConst, new btTransform(transform, false), color);
+       }
+
+       private final static native void swig_module_init ();
+
+       static {
+               swig_module_init();
        }
-  };
-
-  public final static native int btGetVersion();
-  public final static native float btSqrt(float jarg1);
-  public final static native float btFabs(float jarg1);
-  public final static native float btCos(float jarg1);
-  public final static native float btSin(float jarg1);
-  public final static native float btTan(float jarg1);
-  public final static native float btAcos(float jarg1);
-  public final static native float btAsin(float jarg1);
-  public final static native float btAtan(float jarg1);
-  public final static native float btAtan2(float jarg1, float jarg2);
-  public final static native float btExp(float jarg1);
-  public final static native float btLog(float jarg1);
-  public final static native float btPow(float jarg1, float jarg2);
-  public final static native float btFmod(float jarg1, float jarg2);
-  public final static native float btAtan2Fast(float jarg1, float jarg2);
-  public final static native boolean btFuzzyZero(float jarg1);
-  public final static native boolean btEqual(float jarg1, float jarg2);
-  public final static native boolean btGreaterEqual(float jarg1, float jarg2);
-  public final static native int btIsNegative(float jarg1);
-  public final static native float btRadians(float jarg1);
-  public final static native float btDegrees(float jarg1);
-  public final static native float btFsel(float jarg1, float jarg2, float jarg3);
-  public final static native boolean btMachineIsLittleEndian();
-  public final static native long btSelect__SWIG_0(long jarg1, long jarg2, long jarg3);
-  public final static native int btSelect__SWIG_1(long jarg1, int jarg2, int jarg3);
-  public final static native float btSelect__SWIG_2(long jarg1, float jarg2, float jarg3);
-  public final static native long btSwapEndian__SWIG_0(long jarg1);
-  public final static native int btSwapEndian__SWIG_1(int jarg1);
-  public final static native int btSwapEndian__SWIG_3(short jarg1);
-  public final static native long btSwapEndianFloat(float jarg1);
-  public final static native float btUnswapEndianFloat(long jarg1);
-  public final static native void btSwapEndianDouble(double jarg1, long jarg2);
-  public final static native double btUnswapEndianDouble(long jarg1);
-  public final static native float btNormalizeAngle(float jarg1);
-  public final static native long new_btTypedObject(int jarg1);
-  public final static native void btTypedObject_m_objectType_set(long jarg1, btTypedObject jarg1_, int jarg2);
-  public final static native int btTypedObject_m_objectType_get(long jarg1, btTypedObject jarg1_);
-  public final static native int btTypedObject_getObjectType(long jarg1, btTypedObject jarg1_);
-  public final static native void delete_btTypedObject(long jarg1);
-  public final static native void btVector3_m_floats_set(long jarg1, btVector3 jarg1_, float[] jarg2);
-  public final static native float[] btVector3_m_floats_get(long jarg1, btVector3 jarg1_);
-  public final static native long new_btVector3__SWIG_0();
-  public final static native long new_btVector3__SWIG_1(float jarg1, float jarg2, float jarg3);
-  public final static native float btVector3_dot(long jarg1, btVector3 jarg1_, Vector3 jarg2);
-  public final static native float btVector3_length2(long jarg1, btVector3 jarg1_);
-  public final static native float btVector3_length(long jarg1, btVector3 jarg1_);
-  public final static native float btVector3_distance2(long jarg1, btVector3 jarg1_, Vector3 jarg2);
-  public final static native float btVector3_distance(long jarg1, btVector3 jarg1_, Vector3 jarg2);
-  public final static native Vector3 btVector3_safeNormalize(long jarg1, btVector3 jarg1_);
-  public final static native Vector3 btVector3_normalize(long jarg1, btVector3 jarg1_);
-  public final static native Vector3 btVector3_normalized(long jarg1, btVector3 jarg1_);
-  public final static native Vector3 btVector3_rotate(long jarg1, btVector3 jarg1_, Vector3 jarg2, float jarg3);
-  public final static native float btVector3_angle(long jarg1, btVector3 jarg1_, Vector3 jarg2);
-  public final static native Vector3 btVector3_absolute(long jarg1, btVector3 jarg1_);
-  public final static native Vector3 btVector3_cross(long jarg1, btVector3 jarg1_, Vector3 jarg2);
-  public final static native float btVector3_triple(long jarg1, btVector3 jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native int btVector3_minAxis(long jarg1, btVector3 jarg1_);
-  public final static native int btVector3_maxAxis(long jarg1, btVector3 jarg1_);
-  public final static native int btVector3_furthestAxis(long jarg1, btVector3 jarg1_);
-  public final static native int btVector3_closestAxis(long jarg1, btVector3 jarg1_);
-  public final static native void btVector3_setInterpolate3(long jarg1, btVector3 jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native Vector3 btVector3_lerp(long jarg1, btVector3 jarg1_, Vector3 jarg2, float jarg3);
-  public final static native float btVector3_getX(long jarg1, btVector3 jarg1_);
-  public final static native float btVector3_getY(long jarg1, btVector3 jarg1_);
-  public final static native float btVector3_getZ(long jarg1, btVector3 jarg1_);
-  public final static native void btVector3_setX(long jarg1, btVector3 jarg1_, float jarg2);
-  public final static native void btVector3_setY(long jarg1, btVector3 jarg1_, float jarg2);
-  public final static native void btVector3_setZ(long jarg1, btVector3 jarg1_, float jarg2);
-  public final static native void btVector3_setW(long jarg1, btVector3 jarg1_, float jarg2);
-  public final static native float btVector3_x(long jarg1, btVector3 jarg1_);
-  public final static native float btVector3_y(long jarg1, btVector3 jarg1_);
-  public final static native float btVector3_z(long jarg1, btVector3 jarg1_);
-  public final static native float btVector3_w(long jarg1, btVector3 jarg1_);
-  public final static native void btVector3_setMax(long jarg1, btVector3 jarg1_, Vector3 jarg2);
-  public final static native void btVector3_setMin(long jarg1, btVector3 jarg1_, Vector3 jarg2);
-  public final static native void btVector3_setValue(long jarg1, btVector3 jarg1_, float jarg2, float jarg3, float jarg4);
-  public final static native void btVector3_getSkewSymmetricMatrix(long jarg1, btVector3 jarg1_, long jarg2, btVector3 jarg2_, long jarg3, btVector3 jarg3_, long jarg4, btVector3 jarg4_);
-  public final static native void btVector3_setZero(long jarg1, btVector3 jarg1_);
-  public final static native boolean btVector3_isZero(long jarg1, btVector3 jarg1_);
-  public final static native boolean btVector3_fuzzyZero(long jarg1, btVector3 jarg1_);
-  public final static native void btVector3_serialize(long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native void btVector3_deSerialize(long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native void btVector3_serializeFloat(long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native void btVector3_deSerializeFloat(long jarg1, btVector3 jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native void btVector3_serializeDouble(long jarg1, btVector3 jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native void btVector3_deSerializeDouble(long jarg1, btVector3 jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native void delete_btVector3(long jarg1);
-  public final static native float btDot(Vector3 jarg1, Vector3 jarg2);
-  public final static native float btDistance2(Vector3 jarg1, Vector3 jarg2);
-  public final static native float btDistance(Vector3 jarg1, Vector3 jarg2);
-  public final static native float btAngle(Vector3 jarg1, Vector3 jarg2);
-  public final static native Vector3 btCross(Vector3 jarg1, Vector3 jarg2);
-  public final static native float btTriple(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
-  public final static native Vector3 lerp(Vector3 jarg1, Vector3 jarg2, float jarg3);
-  public final static native long new_btVector4__SWIG_0();
-  public final static native long new_btVector4__SWIG_1(float jarg1, float jarg2, float jarg3, float jarg4);
-  public final static native long btVector4_absolute4(long jarg1, btVector4 jarg1_);
-  public final static native float btVector4_getW(long jarg1, btVector4 jarg1_);
-  public final static native int btVector4_maxAxis4(long jarg1, btVector4 jarg1_);
-  public final static native int btVector4_minAxis4(long jarg1, btVector4 jarg1_);
-  public final static native int btVector4_closestAxis4(long jarg1, btVector4 jarg1_);
-  public final static native void btVector4_setValue(long jarg1, btVector4 jarg1_, float jarg2, float jarg3, float jarg4, float jarg5);
-  public final static native void delete_btVector4(long jarg1);
-  public final static native void btSwapScalarEndian(float jarg1, long jarg2);
-  public final static native void btSwapVector3Endian(Vector3 jarg1, Vector3 jarg2);
-  public final static native void btUnSwapVector3Endian(Vector3 jarg1);
-  public final static native void btVector3FloatData_m_floats_set(long jarg1, btVector3FloatData jarg1_, float[] jarg2);
-  public final static native float[] btVector3FloatData_m_floats_get(long jarg1, btVector3FloatData jarg1_);
-  public final static native long new_btVector3FloatData();
-  public final static native void delete_btVector3FloatData(long jarg1);
-  public final static native void btVector3DoubleData_m_floats_set(long jarg1, btVector3DoubleData jarg1_, double[] jarg2);
-  public final static native double[] btVector3DoubleData_m_floats_get(long jarg1, btVector3DoubleData jarg1_);
-  public final static native long new_btVector3DoubleData();
-  public final static native void delete_btVector3DoubleData(long jarg1);
-  public final static native long new_btQuaternion__SWIG_0();
-  public final static native long new_btQuaternion__SWIG_1(float jarg1, float jarg2, float jarg3, float jarg4);
-  public final static native long new_btQuaternion__SWIG_2(Vector3 jarg1, float jarg2);
-  public final static native long new_btQuaternion__SWIG_3(float jarg1, float jarg2, float jarg3);
-  public final static native void btQuaternion_setRotation(long jarg1, btQuaternion jarg1_, Vector3 jarg2, float jarg3);
-  public final static native void btQuaternion_setEuler(long jarg1, btQuaternion jarg1_, float jarg2, float jarg3, float jarg4);
-  public final static native void btQuaternion_setEulerZYX(long jarg1, btQuaternion jarg1_, float jarg2, float jarg3, float jarg4);
-  public final static native float btQuaternion_dot(long jarg1, btQuaternion jarg1_, Quaternion jarg2);
-  public final static native float btQuaternion_length2(long jarg1, btQuaternion jarg1_);
-  public final static native float btQuaternion_length(long jarg1, btQuaternion jarg1_);
-  public final static native Quaternion btQuaternion_normalize(long jarg1, btQuaternion jarg1_);
-  public final static native Quaternion btQuaternion_normalized(long jarg1, btQuaternion jarg1_);
-  public final static native float btQuaternion_angle(long jarg1, btQuaternion jarg1_, Quaternion jarg2);
-  public final static native float btQuaternion_getAngle(long jarg1, btQuaternion jarg1_);
-  public final static native Vector3 btQuaternion_getAxis(long jarg1, btQuaternion jarg1_);
-  public final static native Quaternion btQuaternion_inverse(long jarg1, btQuaternion jarg1_);
-  public final static native Quaternion btQuaternion_farthest(long jarg1, btQuaternion jarg1_, Quaternion jarg2);
-  public final static native Quaternion btQuaternion_nearest(long jarg1, btQuaternion jarg1_, Quaternion jarg2);
-  public final static native Quaternion btQuaternion_slerp(long jarg1, btQuaternion jarg1_, Quaternion jarg2, float jarg3);
-  public final static native Quaternion btQuaternion_getIdentity();
-  public final static native float btQuaternion_getW(long jarg1, btQuaternion jarg1_);
-  public final static native void delete_btQuaternion(long jarg1);
-  public final static native float dot(Quaternion jarg1, Quaternion jarg2);
-  public final static native float length(Quaternion jarg1);
-  public final static native float angle(Quaternion jarg1, Quaternion jarg2);
-  public final static native Quaternion inverse(Quaternion jarg1);
-  public final static native Quaternion slerp(Quaternion jarg1, Quaternion jarg2, float jarg3);
-  public final static native Vector3 quatRotate(Quaternion jarg1, Vector3 jarg2);
-  public final static native Quaternion shortestArcQuat(Vector3 jarg1, Vector3 jarg2);
-  public final static native Quaternion shortestArcQuatNormalize2(Vector3 jarg1, Vector3 jarg2);
-  public final static native void AabbExpand(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native boolean TestPointAgainstAabb2(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
-  public final static native boolean TestAabbAgainstAabb2(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native boolean TestTriangleAgainstAabb2(long jarg1, btVector3 jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native int btOutcode(Vector3 jarg1, Vector3 jarg2);
-  public final static native boolean btRayAabb2(Vector3 jarg1, Vector3 jarg2, long[] jarg3, long jarg4, btVector3 jarg4_, long jarg5, float jarg6, float jarg7);
-  public final static native boolean btRayAabb(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, long jarg5, Vector3 jarg6);
-  public final static native void btTransformAabb__SWIG_0(Vector3 jarg1, float jarg2, long jarg3, btTransform jarg3_, Vector3 jarg4, Vector3 jarg5);
-  public final static native void btTransformAabb__SWIG_1(Vector3 jarg1, Vector3 jarg2, float jarg3, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native long testQuantizedAabbAgainstQuantizedAabb(long jarg1, long jarg2, long jarg3, long jarg4);
-  public final static native void delete_btIDebugDraw(long jarg1);
-  public final static native void btIDebugDraw_drawLine__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawLine__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native void btIDebugDraw_drawLineSwigExplicitbtIDebugDraw__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native void btIDebugDraw_drawSphere__SWIG_0(long jarg1, btIDebugDraw jarg1_, float jarg2, long jarg3, btTransform jarg3_, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_0(long jarg1, btIDebugDraw jarg1_, float jarg2, long jarg3, btTransform jarg3_, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawSphere__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, float jarg3, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawSphereSwigExplicitbtIDebugDraw__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, float jarg3, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawTriangle__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, float jarg9);
-  public final static native void btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, float jarg9);
-  public final static native void btIDebugDraw_drawTriangle__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, float jarg6);
-  public final static native void btIDebugDraw_drawTriangleSwigExplicitbtIDebugDraw__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, float jarg6);
-  public final static native void btIDebugDraw_drawContactPoint(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4, int jarg5, Vector3 jarg6);
-  public final static native void btIDebugDraw_reportErrorWarning(long jarg1, btIDebugDraw jarg1_, String jarg2);
-  public final static native void btIDebugDraw_draw3dText(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, String jarg3);
-  public final static native void btIDebugDraw_setDebugMode(long jarg1, btIDebugDraw jarg1_, int jarg2);
-  public final static native int btIDebugDraw_getDebugMode(long jarg1, btIDebugDraw jarg1_);
-  public final static native void btIDebugDraw_drawAabb(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawAabbSwigExplicitbtIDebugDraw(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawTransform(long jarg1, btIDebugDraw jarg1_, long jarg2, btTransform jarg2_, float jarg3);
-  public final static native void btIDebugDraw_drawTransformSwigExplicitbtIDebugDraw(long jarg1, btIDebugDraw jarg1_, long jarg2, btTransform jarg2_, float jarg3);
-  public final static native void btIDebugDraw_drawArc__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9, boolean jarg10, float jarg11);
-  public final static native void btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9, boolean jarg10, float jarg11);
-  public final static native void btIDebugDraw_drawArc__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9, boolean jarg10);
-  public final static native void btIDebugDraw_drawArcSwigExplicitbtIDebugDraw__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, Vector3 jarg9, boolean jarg10);
-  public final static native void btIDebugDraw_drawSpherePatch__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9, Vector3 jarg10, float jarg11);
-  public final static native void btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9, Vector3 jarg10, float jarg11);
-  public final static native void btIDebugDraw_drawSpherePatch__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9, Vector3 jarg10);
-  public final static native void btIDebugDraw_drawSpherePatchSwigExplicitbtIDebugDraw__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, float jarg5, float jarg6, float jarg7, float jarg8, float jarg9, Vector3 jarg10);
-  public final static native void btIDebugDraw_drawBox__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_0(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btIDebugDraw_drawBox__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btTransform jarg4_, Vector3 jarg5);
-  public final static native void btIDebugDraw_drawBoxSwigExplicitbtIDebugDraw__SWIG_1(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btTransform jarg4_, Vector3 jarg5);
-  public final static native void btIDebugDraw_drawCapsule(long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
-  public final static native void btIDebugDraw_drawCapsuleSwigExplicitbtIDebugDraw(long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
-  public final static native void btIDebugDraw_drawCylinder(long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
-  public final static native void btIDebugDraw_drawCylinderSwigExplicitbtIDebugDraw(long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
-  public final static native void btIDebugDraw_drawCone(long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
-  public final static native void btIDebugDraw_drawConeSwigExplicitbtIDebugDraw(long jarg1, btIDebugDraw jarg1_, float jarg2, float jarg3, int jarg4, long jarg5, btTransform jarg5_, Vector3 jarg6);
-  public final static native void btIDebugDraw_drawPlane(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, float jarg3, long jarg4, btTransform jarg4_, Vector3 jarg5);
-  public final static native void btIDebugDraw_drawPlaneSwigExplicitbtIDebugDraw(long jarg1, btIDebugDraw jarg1_, Vector3 jarg2, float jarg3, long jarg4, btTransform jarg4_, Vector3 jarg5);
-  public final static native long new_btIDebugDraw();
-  public final static native void btIDebugDraw_director_connect(btIDebugDraw obj, long cptr, boolean mem_own, boolean weak_global);
-  public final static native void btIDebugDraw_change_ownership(btIDebugDraw obj, long cptr, boolean take_or_release);
-  public final static native void btGeometryUtil_getPlaneEquationsFromVertices(long jarg1, long jarg2);
-  public final static native void btGeometryUtil_getVerticesFromPlaneEquations(long jarg1, long jarg2);
-  public final static native boolean btGeometryUtil_isInside(long jarg1, Vector3 jarg2, float jarg3);
-  public final static native boolean btGeometryUtil_isPointInsidePlanes(long jarg1, Vector3 jarg2, float jarg3);
-  public final static native boolean btGeometryUtil_areVerticesBehindPlane(Vector3 jarg1, long jarg2, float jarg3);
-  public final static native long new_btGeometryUtil();
-  public final static native void delete_btGeometryUtil(long jarg1);
-  public final static native void GEN_srand(long jarg1);
-  public final static native long GEN_rand();
-  public final static native long new_btTransform__SWIG_0();
-  public final static native long new_btTransform__SWIG_1(Quaternion jarg1, Vector3 jarg2);
-  public final static native long new_btTransform__SWIG_2(Quaternion jarg1);
-  public final static native long new_btTransform__SWIG_3(Matrix3 jarg1, Vector3 jarg2);
-  public final static native long new_btTransform__SWIG_4(Matrix3 jarg1);
-  public final static native long new_btTransform__SWIG_5(long jarg1, btTransform jarg1_);
-  public final static native void btTransform_mult(long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native Matrix3 btTransform_getBasis__SWIG_0(long jarg1, btTransform jarg1_);
-  public final static native Vector3 btTransform_getOrigin__SWIG_0(long jarg1, btTransform jarg1_);
-  public final static native Quaternion btTransform_getRotation(long jarg1, btTransform jarg1_);
-  public final static native void btTransform_setFromOpenGLMatrix(long jarg1, btTransform jarg1_, float[] jarg2);
-  public final static native void btTransform_getOpenGLMatrix(long jarg1, btTransform jarg1_, float[] jarg2);
-  public final static native void btTransform_setOrigin(long jarg1, btTransform jarg1_, Vector3 jarg2);
-  public final static native Vector3 btTransform_invXform(long jarg1, btTransform jarg1_, Vector3 jarg2);
-  public final static native void btTransform_setBasis(long jarg1, btTransform jarg1_, Matrix3 jarg2);
-  public final static native void btTransform_setRotation(long jarg1, btTransform jarg1_, Quaternion jarg2);
-  public final static native void btTransform_setIdentity(long jarg1, btTransform jarg1_);
-  public final static native long btTransform_inverse(long jarg1, btTransform jarg1_);
-  public final static native long btTransform_inverseTimes(long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btTransform_getIdentity();
-  public final static native void btTransform_serialize(long jarg1, btTransform jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native void btTransform_serializeFloat(long jarg1, btTransform jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native void btTransform_deSerialize(long jarg1, btTransform jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native void btTransform_deSerializeDouble(long jarg1, btTransform jarg1_, long jarg2, btTransformDoubleData jarg2_);
-  public final static native void btTransform_deSerializeFloat(long jarg1, btTransform jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native void delete_btTransform(long jarg1);
-  public final static native void btTransformFloatData_m_basis_set(long jarg1, btTransformFloatData jarg1_, long jarg2);
-  public final static native long btTransformFloatData_m_basis_get(long jarg1, btTransformFloatData jarg1_);
-  public final static native void btTransformFloatData_m_origin_set(long jarg1, btTransformFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btTransformFloatData_m_origin_get(long jarg1, btTransformFloatData jarg1_);
-  public final static native long new_btTransformFloatData();
-  public final static native void delete_btTransformFloatData(long jarg1);
-  public final static native void btTransformDoubleData_m_basis_set(long jarg1, btTransformDoubleData jarg1_, long jarg2);
-  public final static native long btTransformDoubleData_m_basis_get(long jarg1, btTransformDoubleData jarg1_);
-  public final static native void btTransformDoubleData_m_origin_set(long jarg1, btTransformDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btTransformDoubleData_m_origin_get(long jarg1, btTransformDoubleData jarg1_);
-  public final static native long new_btTransformDoubleData();
-  public final static native void delete_btTransformDoubleData(long jarg1);
-  public final static native Vector3 btAabbSupport(Vector3 jarg1, Vector3 jarg2);
-  public final static native void btTransformUtil_integrateTransform(long jarg1, btTransform jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4, long jarg5, btTransform jarg5_);
-  public final static native void btTransformUtil_calculateVelocityQuaternion(Vector3 jarg1, Vector3 jarg2, Quaternion jarg3, Quaternion jarg4, float jarg5, Vector3 jarg6, Vector3 jarg7);
-  public final static native void btTransformUtil_calculateDiffAxisAngleQuaternion(Quaternion jarg1, Quaternion jarg2, Vector3 jarg3, long jarg4);
-  public final static native void btTransformUtil_calculateVelocity(long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_, float jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native void btTransformUtil_calculateDiffAxisAngle(long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, long jarg4);
-  public final static native long new_btTransformUtil();
-  public final static native void delete_btTransformUtil(long jarg1);
-  public final static native long new_btConvexSeparatingDistanceUtil(float jarg1, float jarg2);
-  public final static native float btConvexSeparatingDistanceUtil_getConservativeSeparatingDistance(long jarg1, btConvexSeparatingDistanceUtil jarg1_);
-  public final static native void btConvexSeparatingDistanceUtil_updateSeparatingDistance(long jarg1, btConvexSeparatingDistanceUtil jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native void btConvexSeparatingDistanceUtil_initSeparatingDistance(long jarg1, btConvexSeparatingDistanceUtil jarg1_, Vector3 jarg2, float jarg3, long jarg4, btTransform jarg4_, long jarg5, btTransform jarg5_);
-  public final static native void delete_btConvexSeparatingDistanceUtil(long jarg1);
-  public final static native void delete_btMotionState(long jarg1);
-  public final static native void btMotionState_getWorldTransform(long jarg1, btMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btMotionState_setWorldTransform(long jarg1, btMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btDefaultMotionState_m_graphicsWorldTrans_set(long jarg1, btDefaultMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btDefaultMotionState_m_graphicsWorldTrans_get(long jarg1, btDefaultMotionState jarg1_);
-  public final static native void btDefaultMotionState_m_centerOfMassOffset_set(long jarg1, btDefaultMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btDefaultMotionState_m_centerOfMassOffset_get(long jarg1, btDefaultMotionState jarg1_);
-  public final static native void btDefaultMotionState_m_startWorldTrans_set(long jarg1, btDefaultMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btDefaultMotionState_m_startWorldTrans_get(long jarg1, btDefaultMotionState jarg1_);
-  public final static native void btDefaultMotionState_m_userPointer_set(long jarg1, btDefaultMotionState jarg1_, long jarg2);
-  public final static native long btDefaultMotionState_m_userPointer_get(long jarg1, btDefaultMotionState jarg1_);
-  public final static native long new_btDefaultMotionState__SWIG_0(long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long new_btDefaultMotionState__SWIG_1(long jarg1, btTransform jarg1_);
-  public final static native long new_btDefaultMotionState__SWIG_2();
-  public final static native void btDefaultMotionState_getGraphicsWorldTrans(long jarg1, btDefaultMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btDefaultMotionState_getCenterOfMassOffset(long jarg1, btDefaultMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btDefaultMotionState_getStartWorldTrans(long jarg1, btDefaultMotionState jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void delete_btDefaultMotionState(long jarg1);
-  public final static native long new_HullResult();
-  public final static native void HullResult_mPolygons_set(long jarg1, HullResult jarg1_, boolean jarg2);
-  public final static native boolean HullResult_mPolygons_get(long jarg1, HullResult jarg1_);
-  public final static native void HullResult_mNumOutputVertices_set(long jarg1, HullResult jarg1_, long jarg2);
-  public final static native long HullResult_mNumOutputVertices_get(long jarg1, HullResult jarg1_);
-  public final static native void HullResult_m_OutputVertices_set(long jarg1, HullResult jarg1_, long jarg2);
-  public final static native long HullResult_m_OutputVertices_get(long jarg1, HullResult jarg1_);
-  public final static native void HullResult_mNumFaces_set(long jarg1, HullResult jarg1_, long jarg2);
-  public final static native long HullResult_mNumFaces_get(long jarg1, HullResult jarg1_);
-  public final static native void HullResult_mNumIndices_set(long jarg1, HullResult jarg1_, long jarg2);
-  public final static native long HullResult_mNumIndices_get(long jarg1, HullResult jarg1_);
-  public final static native void HullResult_m_Indices_set(long jarg1, HullResult jarg1_, long jarg2);
-  public final static native long HullResult_m_Indices_get(long jarg1, HullResult jarg1_);
-  public final static native void delete_HullResult(long jarg1);
-  public final static native long new_HullDesc__SWIG_0();
-  public final static native long new_HullDesc__SWIG_1(int jarg1, long jarg2, long jarg3, btVector3 jarg3_, long jarg4);
-  public final static native long new_HullDesc__SWIG_2(int jarg1, long jarg2, long jarg3, btVector3 jarg3_);
-  public final static native boolean HullDesc_HasHullFlag(long jarg1, HullDesc jarg1_, int jarg2);
-  public final static native void HullDesc_SetHullFlag(long jarg1, HullDesc jarg1_, int jarg2);
-  public final static native void HullDesc_ClearHullFlag(long jarg1, HullDesc jarg1_, int jarg2);
-  public final static native void HullDesc_mFlags_set(long jarg1, HullDesc jarg1_, long jarg2);
-  public final static native long HullDesc_mFlags_get(long jarg1, HullDesc jarg1_);
-  public final static native void HullDesc_mVcount_set(long jarg1, HullDesc jarg1_, long jarg2);
-  public final static native long HullDesc_mVcount_get(long jarg1, HullDesc jarg1_);
-  public final static native void HullDesc_mVertices_set(long jarg1, HullDesc jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long HullDesc_mVertices_get(long jarg1, HullDesc jarg1_);
-  public final static native void HullDesc_mVertexStride_set(long jarg1, HullDesc jarg1_, long jarg2);
-  public final static native long HullDesc_mVertexStride_get(long jarg1, HullDesc jarg1_);
-  public final static native void HullDesc_mNormalEpsilon_set(long jarg1, HullDesc jarg1_, float jarg2);
-  public final static native float HullDesc_mNormalEpsilon_get(long jarg1, HullDesc jarg1_);
-  public final static native void HullDesc_mMaxVertices_set(long jarg1, HullDesc jarg1_, long jarg2);
-  public final static native long HullDesc_mMaxVertices_get(long jarg1, HullDesc jarg1_);
-  public final static native void HullDesc_mMaxFaces_set(long jarg1, HullDesc jarg1_, long jarg2);
-  public final static native long HullDesc_mMaxFaces_get(long jarg1, HullDesc jarg1_);
-  public final static native void delete_HullDesc(long jarg1);
-  public final static native void btPlane_normal_set(long jarg1, btPlane jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btPlane_normal_get(long jarg1, btPlane jarg1_);
-  public final static native void btPlane_dist_set(long jarg1, btPlane jarg1_, float jarg2);
-  public final static native float btPlane_dist_get(long jarg1, btPlane jarg1_);
-  public final static native long new_btPlane__SWIG_0(Vector3 jarg1, float jarg2);
-  public final static native long new_btPlane__SWIG_1();
-  public final static native void delete_btPlane(long jarg1);
-  public final static native long new_ConvexH__SWIG_0();
-  public final static native void delete_ConvexH(long jarg1);
-  public final static native void ConvexH_vertices_set(long jarg1, ConvexH jarg1_, long jarg2);
-  public final static native long ConvexH_vertices_get(long jarg1, ConvexH jarg1_);
-  public final static native void ConvexH_edges_set(long jarg1, ConvexH jarg1_, long jarg2);
-  public final static native long ConvexH_edges_get(long jarg1, ConvexH jarg1_);
-  public final static native void ConvexH_facets_set(long jarg1, ConvexH jarg1_, long jarg2);
-  public final static native long ConvexH_facets_get(long jarg1, ConvexH jarg1_);
-  public final static native long new_ConvexH__SWIG_1(int jarg1, int jarg2, int jarg3);
-  public final static native void int4_x_set(long jarg1, int4 jarg1_, int jarg2);
-  public final static native int int4_x_get(long jarg1, int4 jarg1_);
-  public final static native void int4_y_set(long jarg1, int4 jarg1_, int jarg2);
-  public final static native int int4_y_get(long jarg1, int4 jarg1_);
-  public final static native void int4_z_set(long jarg1, int4 jarg1_, int jarg2);
-  public final static native int int4_z_get(long jarg1, int4 jarg1_);
-  public final static native void int4_w_set(long jarg1, int4 jarg1_, int jarg2);
-  public final static native int int4_w_get(long jarg1, int4 jarg1_);
-  public final static native long new_int4__SWIG_0();
-  public final static native long new_int4__SWIG_1(int jarg1, int jarg2, int jarg3, int jarg4);
-  public final static native void delete_int4(long jarg1);
-  public final static native long new_PHullResult();
-  public final static native void PHullResult_mVcount_set(long jarg1, PHullResult jarg1_, long jarg2);
-  public final static native long PHullResult_mVcount_get(long jarg1, PHullResult jarg1_);
-  public final static native void PHullResult_mIndexCount_set(long jarg1, PHullResult jarg1_, long jarg2);
-  public final static native long PHullResult_mIndexCount_get(long jarg1, PHullResult jarg1_);
-  public final static native void PHullResult_mFaceCount_set(long jarg1, PHullResult jarg1_, long jarg2);
-  public final static native long PHullResult_mFaceCount_get(long jarg1, PHullResult jarg1_);
-  public final static native void PHullResult_mVertices_set(long jarg1, PHullResult jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long PHullResult_mVertices_get(long jarg1, PHullResult jarg1_);
-  public final static native void PHullResult_m_Indices_set(long jarg1, PHullResult jarg1_, long jarg2);
-  public final static native long PHullResult_m_Indices_get(long jarg1, PHullResult jarg1_);
-  public final static native void delete_PHullResult(long jarg1);
-  public final static native void HullLibrary_m_vertexIndexMapping_set(long jarg1, HullLibrary jarg1_, long jarg2);
-  public final static native long HullLibrary_m_vertexIndexMapping_get(long jarg1, HullLibrary jarg1_);
-  public final static native int HullLibrary_CreateConvexHull(long jarg1, HullLibrary jarg1_, long jarg2, HullDesc jarg2_, long jarg3, HullResult jarg3_);
-  public final static native int HullLibrary_ReleaseResult(long jarg1, HullLibrary jarg1_, long jarg2, HullResult jarg2_);
-  public final static native long new_HullLibrary();
-  public final static native void delete_HullLibrary(long jarg1);
-  public final static native long new_GrahamVector2(Vector3 jarg1, int jarg2);
-  public final static native void GrahamVector2_m_angle_set(long jarg1, GrahamVector2 jarg1_, float jarg2);
-  public final static native float GrahamVector2_m_angle_get(long jarg1, GrahamVector2 jarg1_);
-  public final static native void GrahamVector2_m_orgIndex_set(long jarg1, GrahamVector2 jarg1_, int jarg2);
-  public final static native int GrahamVector2_m_orgIndex_get(long jarg1, GrahamVector2 jarg1_);
-  public final static native void delete_GrahamVector2(long jarg1);
-  public final static native void btAngleCompareFunc_m_anchor_set(long jarg1, btAngleCompareFunc jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btAngleCompareFunc_m_anchor_get(long jarg1, btAngleCompareFunc jarg1_);
-  public final static native long new_btAngleCompareFunc(Vector3 jarg1);
-  public final static native void delete_btAngleCompareFunc(long jarg1);
-  public final static native void GrahamScanConvexHull2D(long jarg1, long jarg2);
-  public final static native long new_btPoolAllocator(int jarg1, int jarg2);
-  public final static native void delete_btPoolAllocator(long jarg1);
-  public final static native int btPoolAllocator_getFreeCount(long jarg1, btPoolAllocator jarg1_);
-  public final static native int btPoolAllocator_getUsedCount(long jarg1, btPoolAllocator jarg1_);
-  public final static native int btPoolAllocator_getMaxCount(long jarg1, btPoolAllocator jarg1_);
-  public final static native long btPoolAllocator_allocate(long jarg1, btPoolAllocator jarg1_, int jarg2);
-  public final static native boolean btPoolAllocator_validPtr(long jarg1, btPoolAllocator jarg1_, long jarg2);
-  public final static native void btPoolAllocator_freeMemory(long jarg1, btPoolAllocator jarg1_, long jarg2);
-  public final static native int btPoolAllocator_getElementSize(long jarg1, btPoolAllocator jarg1_);
-  public final static native long btPoolAllocator_getPoolAddress__SWIG_0(long jarg1, btPoolAllocator jarg1_);
-  public final static native void btConvexHullComputer_vertices_set(long jarg1, btConvexHullComputer jarg1_, long jarg2);
-  public final static native long btConvexHullComputer_vertices_get(long jarg1, btConvexHullComputer jarg1_);
-  public final static native void btConvexHullComputer_edges_set(long jarg1, btConvexHullComputer jarg1_, long jarg2);
-  public final static native long btConvexHullComputer_edges_get(long jarg1, btConvexHullComputer jarg1_);
-  public final static native void btConvexHullComputer_faces_set(long jarg1, btConvexHullComputer jarg1_, long jarg2);
-  public final static native long btConvexHullComputer_faces_get(long jarg1, btConvexHullComputer jarg1_);
-  public final static native float btConvexHullComputer_compute__SWIG_0(long jarg1, btConvexHullComputer jarg1_, long jarg2, int jarg3, int jarg4, float jarg5, float jarg6);
-  public final static native float btConvexHullComputer_compute__SWIG_1(long jarg1, btConvexHullComputer jarg1_, long jarg2, int jarg3, int jarg4, float jarg5, float jarg6);
-  public final static native long new_btConvexHullComputer();
-  public final static native void delete_btConvexHullComputer(long jarg1);
-  public final static native long new_btGEN_Link__SWIG_0();
-  public final static native long new_btGEN_Link__SWIG_1(long jarg1, btGEN_Link jarg1_, long jarg2, btGEN_Link jarg2_);
-  public final static native long btGEN_Link_getNext(long jarg1, btGEN_Link jarg1_);
-  public final static native long btGEN_Link_getPrev(long jarg1, btGEN_Link jarg1_);
-  public final static native boolean btGEN_Link_isHead(long jarg1, btGEN_Link jarg1_);
-  public final static native boolean btGEN_Link_isTail(long jarg1, btGEN_Link jarg1_);
-  public final static native void btGEN_Link_insertBefore(long jarg1, btGEN_Link jarg1_, long jarg2, btGEN_Link jarg2_);
-  public final static native void btGEN_Link_insertAfter(long jarg1, btGEN_Link jarg1_, long jarg2, btGEN_Link jarg2_);
-  public final static native void btGEN_Link_remove(long jarg1, btGEN_Link jarg1_);
-  public final static native void delete_btGEN_Link(long jarg1);
-  public final static native long new_btGEN_List();
-  public final static native long btGEN_List_getHead(long jarg1, btGEN_List jarg1_);
-  public final static native long btGEN_List_getTail(long jarg1, btGEN_List jarg1_);
-  public final static native void btGEN_List_addHead(long jarg1, btGEN_List jarg1_, long jarg2, btGEN_Link jarg2_);
-  public final static native void btGEN_List_addTail(long jarg1, btGEN_List jarg1_, long jarg2, btGEN_Link jarg2_);
-  public final static native void delete_btGEN_List(long jarg1);
-  public final static native long btAlignedAllocInternal(long jarg1, int jarg2);
-  public final static native void btAlignedFreeInternal(long jarg1);
-  public final static native void btAlignedAllocSetCustom(long jarg1, long jarg2);
-  public final static native void btAlignedAllocSetCustomAligned(long jarg1, long jarg2);
-  public final static native void btHashString_m_string_set(long jarg1, btHashString jarg1_, String jarg2);
-  public final static native String btHashString_m_string_get(long jarg1, btHashString jarg1_);
-  public final static native void btHashString_m_hash_set(long jarg1, btHashString jarg1_, long jarg2);
-  public final static native long btHashString_m_hash_get(long jarg1, btHashString jarg1_);
-  public final static native long btHashString_getHash(long jarg1, btHashString jarg1_);
-  public final static native long new_btHashString(String jarg1);
-  public final static native int btHashString_portableStringCompare(long jarg1, btHashString jarg1_, String jarg2, String jarg3);
-  public final static native boolean btHashString_equals(long jarg1, btHashString jarg1_, long jarg2, btHashString jarg2_);
-  public final static native void delete_btHashString(long jarg1);
-  public final static native int BT_HASH_NULL_get();
-  public final static native long new_btHashInt(int jarg1);
-  public final static native int btHashInt_getUid1(long jarg1, btHashInt jarg1_);
-  public final static native void btHashInt_setUid1(long jarg1, btHashInt jarg1_, int jarg2);
-  public final static native boolean btHashInt_equals(long jarg1, btHashInt jarg1_, long jarg2, btHashInt jarg2_);
-  public final static native long btHashInt_getHash(long jarg1, btHashInt jarg1_);
-  public final static native void delete_btHashInt(long jarg1);
-  public final static native long new_btHashPtr(long jarg1);
-  public final static native long btHashPtr_getPointer(long jarg1, btHashPtr jarg1_);
-  public final static native boolean btHashPtr_equals(long jarg1, btHashPtr jarg1_, long jarg2, btHashPtr jarg2_);
-  public final static native long btHashPtr_getHash(long jarg1, btHashPtr jarg1_);
-  public final static native void delete_btHashPtr(long jarg1);
-  public final static native void btBlock_previous_set(long jarg1, btBlock jarg1_, long jarg2, btBlock jarg2_);
-  public final static native long btBlock_previous_get(long jarg1, btBlock jarg1_);
-  public final static native void btBlock_address_set(long jarg1, btBlock jarg1_, long jarg2);
-  public final static native long btBlock_address_get(long jarg1, btBlock jarg1_);
-  public final static native long new_btBlock();
-  public final static native void delete_btBlock(long jarg1);
-  public final static native long new_btStackAlloc(long jarg1);
-  public final static native void delete_btStackAlloc(long jarg1);
-  public final static native void btStackAlloc_create(long jarg1, btStackAlloc jarg1_, long jarg2);
-  public final static native void btStackAlloc_destroy(long jarg1, btStackAlloc jarg1_);
-  public final static native int btStackAlloc_getAvailableMemory(long jarg1, btStackAlloc jarg1_);
-  public final static native long btStackAlloc_allocate(long jarg1, btStackAlloc jarg1_, long jarg2);
-  public final static native long btStackAlloc_beginBlock(long jarg1, btStackAlloc jarg1_);
-  public final static native void btStackAlloc_endBlock(long jarg1, btStackAlloc jarg1_, long jarg2, btBlock jarg2_);
-  public final static native void delete_Result(long jarg1);
-  public final static native void Result_setShapeIdentifiersA(long jarg1, Result jarg1_, int jarg2, int jarg3);
-  public final static native void Result_setShapeIdentifiersB(long jarg1, Result jarg1_, int jarg2, int jarg3);
-  public final static native void Result_addContactPoint(long jarg1, Result jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native long new_ClosestPointInput();
-  public final static native void ClosestPointInput_m_transformA_set(long jarg1, ClosestPointInput jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long ClosestPointInput_m_transformA_get(long jarg1, ClosestPointInput jarg1_);
-  public final static native void ClosestPointInput_m_transformB_set(long jarg1, ClosestPointInput jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long ClosestPointInput_m_transformB_get(long jarg1, ClosestPointInput jarg1_);
-  public final static native void ClosestPointInput_m_maximumDistanceSquared_set(long jarg1, ClosestPointInput jarg1_, float jarg2);
-  public final static native float ClosestPointInput_m_maximumDistanceSquared_get(long jarg1, ClosestPointInput jarg1_);
-  public final static native void ClosestPointInput_m_stackAlloc_set(long jarg1, ClosestPointInput jarg1_, long jarg2, btStackAlloc jarg2_);
-  public final static native long ClosestPointInput_m_stackAlloc_get(long jarg1, ClosestPointInput jarg1_);
-  public final static native void delete_ClosestPointInput(long jarg1);
-  public final static native void btBroadphaseProxy_m_clientObject_set(long jarg1, btBroadphaseProxy jarg1_, long jarg2);
-  public final static native long btBroadphaseProxy_m_clientObject_get(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native void btBroadphaseProxy_m_collisionFilterGroup_set(long jarg1, btBroadphaseProxy jarg1_, short jarg2);
-  public final static native short btBroadphaseProxy_m_collisionFilterGroup_get(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native void btBroadphaseProxy_m_collisionFilterMask_set(long jarg1, btBroadphaseProxy jarg1_, short jarg2);
-  public final static native short btBroadphaseProxy_m_collisionFilterMask_get(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native void btBroadphaseProxy_m_multiSapParentProxy_set(long jarg1, btBroadphaseProxy jarg1_, long jarg2);
-  public final static native long btBroadphaseProxy_m_multiSapParentProxy_get(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native void btBroadphaseProxy_m_uniqueId_set(long jarg1, btBroadphaseProxy jarg1_, int jarg2);
-  public final static native int btBroadphaseProxy_m_uniqueId_get(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native void btBroadphaseProxy_m_aabbMin_set(long jarg1, btBroadphaseProxy jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btBroadphaseProxy_m_aabbMin_get(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native void btBroadphaseProxy_m_aabbMax_set(long jarg1, btBroadphaseProxy jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btBroadphaseProxy_m_aabbMax_get(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native int btBroadphaseProxy_getUid(long jarg1, btBroadphaseProxy jarg1_);
-  public final static native long new_btBroadphaseProxy__SWIG_0();
-  public final static native long new_btBroadphaseProxy__SWIG_1(Vector3 jarg1, Vector3 jarg2, long jarg3, short jarg4, short jarg5, long jarg6);
-  public final static native long new_btBroadphaseProxy__SWIG_2(Vector3 jarg1, Vector3 jarg2, long jarg3, short jarg4, short jarg5);
-  public final static native boolean btBroadphaseProxy_isPolyhedral(int jarg1);
-  public final static native boolean btBroadphaseProxy_isConvex(int jarg1);
-  public final static native boolean btBroadphaseProxy_isNonMoving(int jarg1);
-  public final static native boolean btBroadphaseProxy_isConcave(int jarg1);
-  public final static native boolean btBroadphaseProxy_isCompound(int jarg1);
-  public final static native boolean btBroadphaseProxy_isSoftBody(int jarg1);
-  public final static native boolean btBroadphaseProxy_isInfinite(int jarg1);
-  public final static native boolean btBroadphaseProxy_isConvex2d(int jarg1);
-  public final static native void delete_btBroadphaseProxy(long jarg1);
-  public final static native long new_btBroadphasePair__SWIG_0();
-  public final static native long new_btBroadphasePair__SWIG_1(long jarg1, btBroadphasePair jarg1_);
-  public final static native long new_btBroadphasePair__SWIG_2(long jarg1, btBroadphaseProxy jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native void btBroadphasePair_m_pProxy0_set(long jarg1, btBroadphasePair jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native long btBroadphasePair_m_pProxy0_get(long jarg1, btBroadphasePair jarg1_);
-  public final static native void btBroadphasePair_m_pProxy1_set(long jarg1, btBroadphasePair jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native long btBroadphasePair_m_pProxy1_get(long jarg1, btBroadphasePair jarg1_);
-  public final static native void btBroadphasePair_m_algorithm_set(long jarg1, btBroadphasePair jarg1_, long jarg2, btCollisionAlgorithm jarg2_);
-  public final static native long btBroadphasePair_m_algorithm_get(long jarg1, btBroadphasePair jarg1_);
-  public final static native void delete_btBroadphasePair(long jarg1);
-  public final static native long new_btBroadphasePairSortPredicate();
-  public final static native void delete_btBroadphasePairSortPredicate(long jarg1);
-  public final static native void delete_btBroadphaseAabbCallback(long jarg1);
-  public final static native boolean btBroadphaseAabbCallback_process(long jarg1, btBroadphaseAabbCallback jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native void btBroadphaseRayCallback_m_rayDirectionInverse_set(long jarg1, btBroadphaseRayCallback jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btBroadphaseRayCallback_m_rayDirectionInverse_get(long jarg1, btBroadphaseRayCallback jarg1_);
-  public final static native void btBroadphaseRayCallback_m_signs_set(long jarg1, btBroadphaseRayCallback jarg1_, long[] jarg2);
-  public final static native long[] btBroadphaseRayCallback_m_signs_get(long jarg1, btBroadphaseRayCallback jarg1_);
-  public final static native void btBroadphaseRayCallback_m_lambda_max_set(long jarg1, btBroadphaseRayCallback jarg1_, float jarg2);
-  public final static native float btBroadphaseRayCallback_m_lambda_max_get(long jarg1, btBroadphaseRayCallback jarg1_);
-  public final static native void delete_btBroadphaseRayCallback(long jarg1);
-  public final static native void delete_btBroadphaseInterface(long jarg1);
-  public final static native long btBroadphaseInterface_createProxy(long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2, Vector3 jarg3, int jarg4, long jarg5, short jarg6, short jarg7, long jarg8, btDispatcher jarg8_, long jarg9);
-  public final static native void btBroadphaseInterface_destroyProxy(long jarg1, btBroadphaseInterface jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native void btBroadphaseInterface_setAabb(long jarg1, btBroadphaseInterface jarg1_, long jarg2, btBroadphaseProxy jarg2_, Vector3 jarg3, Vector3 jarg4, long jarg5, btDispatcher jarg5_);
-  public final static native void btBroadphaseInterface_getAabb(long jarg1, btBroadphaseInterface jarg1_, long jarg2, btBroadphaseProxy jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btBroadphaseInterface_rayTest__SWIG_0(long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btBroadphaseInterface_rayTest__SWIG_1(long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
-  public final static native void btBroadphaseInterface_rayTest__SWIG_2(long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
-  public final static native void btBroadphaseInterface_aabbTest(long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseAabbCallback jarg4_);
-  public final static native void btBroadphaseInterface_calculateOverlappingPairs(long jarg1, btBroadphaseInterface jarg1_, long jarg2, btDispatcher jarg2_);
-  public final static native long btBroadphaseInterface_getOverlappingPairCache__SWIG_0(long jarg1, btBroadphaseInterface jarg1_);
-  public final static native void btBroadphaseInterface_getBroadphaseAabb(long jarg1, btBroadphaseInterface jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btBroadphaseInterface_resetPool(long jarg1, btBroadphaseInterface jarg1_, long jarg2, btDispatcher jarg2_);
-  public final static native void btBroadphaseInterface_printStats(long jarg1, btBroadphaseInterface jarg1_);
-  public final static native Vector3 btDbvtAabbMm_Center(long jarg1, btDbvtAabbMm jarg1_);
-  public final static native Vector3 btDbvtAabbMm_Lengths(long jarg1, btDbvtAabbMm jarg1_);
-  public final static native Vector3 btDbvtAabbMm_Extents(long jarg1, btDbvtAabbMm jarg1_);
-  public final static native Vector3 btDbvtAabbMm_Mins(long jarg1, btDbvtAabbMm jarg1_);
-  public final static native Vector3 btDbvtAabbMm_Maxs(long jarg1, btDbvtAabbMm jarg1_);
-  public final static native long btDbvtAabbMm_FromCE(Vector3 jarg1, Vector3 jarg2);
-  public final static native long btDbvtAabbMm_FromCR(Vector3 jarg1, float jarg2);
-  public final static native long btDbvtAabbMm_FromMM(Vector3 jarg1, Vector3 jarg2);
-  public final static native long btDbvtAabbMm_FromPoints__SWIG_0(long jarg1, btVector3 jarg1_, int jarg2);
-  public final static native long btDbvtAabbMm_FromPoints__SWIG_1(long jarg1, int jarg2);
-  public final static native void btDbvtAabbMm_Expand(long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2);
-  public final static native void btDbvtAabbMm_SignedExpand(long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2);
-  public final static native boolean btDbvtAabbMm_Contain(long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
-  public final static native int btDbvtAabbMm_Classify(long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2, float jarg3, int jarg4);
-  public final static native float btDbvtAabbMm_ProjectMinimum(long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2, long jarg3);
-  public final static native boolean Intersect__SWIG_0(long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
-  public final static native boolean Intersect__SWIG_1(long jarg1, btDbvtAabbMm jarg1_, Vector3 jarg2);
-  public final static native float Proximity(long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
-  public final static native int Select(long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_, long jarg3, btDbvtAabbMm jarg3_);
-  public final static native void Merge(long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_, long jarg3, btDbvtAabbMm jarg3_);
-  public final static native boolean NotEqual(long jarg1, btDbvtAabbMm jarg1_, long jarg2, btDbvtAabbMm jarg2_);
-  public final static native long new_btDbvtAabbMm();
-  public final static native void delete_btDbvtAabbMm(long jarg1);
-  public final static native void btDbvtNode_volume_set(long jarg1, btDbvtNode jarg1_, long jarg2, btDbvtAabbMm jarg2_);
-  public final static native long btDbvtNode_volume_get(long jarg1, btDbvtNode jarg1_);
-  public final static native void btDbvtNode_parent_set(long jarg1, btDbvtNode jarg1_, long jarg2, btDbvtNode jarg2_);
-  public final static native long btDbvtNode_parent_get(long jarg1, btDbvtNode jarg1_);
-  public final static native boolean btDbvtNode_isleaf(long jarg1, btDbvtNode jarg1_);
-  public final static native boolean btDbvtNode_isinternal(long jarg1, btDbvtNode jarg1_);
-  public final static native long new_btDbvtNode();
-  public final static native void delete_btDbvtNode(long jarg1);
-  public final static native void btDbvt_m_root_set(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
-  public final static native long btDbvt_m_root_get(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_m_free_set(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
-  public final static native long btDbvt_m_free_get(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_m_lkhd_set(long jarg1, btDbvt jarg1_, int jarg2);
-  public final static native int btDbvt_m_lkhd_get(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_m_leaves_set(long jarg1, btDbvt jarg1_, int jarg2);
-  public final static native int btDbvt_m_leaves_get(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_m_opath_set(long jarg1, btDbvt jarg1_, long jarg2);
-  public final static native long btDbvt_m_opath_get(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_m_stkStack_set(long jarg1, btDbvt jarg1_, long jarg2);
-  public final static native long btDbvt_m_stkStack_get(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_m_rayTestStack_set(long jarg1, btDbvt jarg1_, long jarg2);
-  public final static native long btDbvt_m_rayTestStack_get(long jarg1, btDbvt jarg1_);
-  public final static native long new_btDbvt();
-  public final static native void delete_btDbvt(long jarg1);
-  public final static native void btDbvt_clear(long jarg1, btDbvt jarg1_);
-  public final static native boolean btDbvt_empty(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_optimizeBottomUp(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_optimizeTopDown__SWIG_0(long jarg1, btDbvt jarg1_, int jarg2);
-  public final static native void btDbvt_optimizeTopDown__SWIG_1(long jarg1, btDbvt jarg1_);
-  public final static native void btDbvt_optimizeIncremental(long jarg1, btDbvt jarg1_, int jarg2);
-  public final static native long btDbvt_insert(long jarg1, btDbvt jarg1_, long jarg2, btDbvtAabbMm jarg2_, long jarg3);
-  public final static native void btDbvt_update__SWIG_0(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, int jarg3);
-  public final static native void btDbvt_update__SWIG_1(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
-  public final static native void btDbvt_update__SWIG_2(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3, btDbvtAabbMm jarg3_);
-  public final static native boolean btDbvt_update__SWIG_3(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3, btDbvtAabbMm jarg3_, Vector3 jarg4, float jarg5);
-  public final static native boolean btDbvt_update__SWIG_4(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3, btDbvtAabbMm jarg3_, Vector3 jarg4);
-  public final static native boolean btDbvt_update__SWIG_5(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3, btDbvtAabbMm jarg3_, float jarg4);
-  public final static native void btDbvt_remove(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_);
-  public final static native void btDbvt_write(long jarg1, btDbvt jarg1_, long jarg2);
-  public final static native void btDbvt_clone__SWIG_0(long jarg1, btDbvt jarg1_, long jarg2, btDbvt jarg2_, long jarg3);
-  public final static native void btDbvt_clone__SWIG_1(long jarg1, btDbvt jarg1_, long jarg2, btDbvt jarg2_);
-  public final static native int btDbvt_maxdepth(long jarg1, btDbvtNode jarg1_);
-  public final static native int btDbvt_countLeaves(long jarg1, btDbvtNode jarg1_);
-  public final static native void btDbvt_extractLeaves(long jarg1, btDbvtNode jarg1_, long jarg2);
-  public final static native void btDbvt_benchmark();
-  public final static native void btDbvt_enumNodes(long jarg1, btDbvtNode jarg1_, long jarg2);
-  public final static native void btDbvt_enumLeaves(long jarg1, btDbvtNode jarg1_, long jarg2);
-  public final static native void btDbvt_collideTT(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3, btDbvtNode jarg3_, long jarg4);
-  public final static native void btDbvt_collideTTpersistentStack(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3, btDbvtNode jarg3_, long jarg4);
-  public final static native void btDbvt_collideTV(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, long jarg3, btDbvtAabbMm jarg3_, long jarg4);
-  public final static native void btDbvt_rayTest(long jarg1, btDbvtNode jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4);
-  public final static native void btDbvt_rayTestInternal(long jarg1, btDbvt jarg1_, long jarg2, btDbvtNode jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, long[] jarg6, float jarg7, Vector3 jarg8, Vector3 jarg9, long jarg10);
-  public final static native void btDbvt_collideKDOP(long jarg1, btDbvtNode jarg1_, long jarg2, btVector3 jarg2_, float[] jarg3, int jarg4, long jarg5);
-  public final static native void btDbvt_collideOCL__SWIG_0(long jarg1, btDbvtNode jarg1_, long jarg2, btVector3 jarg2_, float[] jarg3, Vector3 jarg4, int jarg5, long jarg6, boolean jarg7);
-  public final static native void btDbvt_collideOCL__SWIG_1(long jarg1, btDbvtNode jarg1_, long jarg2, btVector3 jarg2_, float[] jarg3, Vector3 jarg4, int jarg5, long jarg6);
-  public final static native void btDbvt_collideTU(long jarg1, btDbvtNode jarg1_, long jarg2);
-  public final static native int btDbvt_nearest(long jarg1, long jarg2, float jarg3, int jarg4, int jarg5);
-  public final static native int btDbvt_allocate(long jarg1, long jarg2, long jarg3);
-  public final static native void btQuantizedBvhNode_m_quantizedAabbMin_set(long jarg1, btQuantizedBvhNode jarg1_, int[] jarg2);
-  public final static native int[] btQuantizedBvhNode_m_quantizedAabbMin_get(long jarg1, btQuantizedBvhNode jarg1_);
-  public final static native void btQuantizedBvhNode_m_quantizedAabbMax_set(long jarg1, btQuantizedBvhNode jarg1_, int[] jarg2);
-  public final static native int[] btQuantizedBvhNode_m_quantizedAabbMax_get(long jarg1, btQuantizedBvhNode jarg1_);
-  public final static native void btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_set(long jarg1, btQuantizedBvhNode jarg1_, int jarg2);
-  public final static native int btQuantizedBvhNode_m_escapeIndexOrTriangleIndex_get(long jarg1, btQuantizedBvhNode jarg1_);
-  public final static native boolean btQuantizedBvhNode_isLeafNode(long jarg1, btQuantizedBvhNode jarg1_);
-  public final static native int btQuantizedBvhNode_getEscapeIndex(long jarg1, btQuantizedBvhNode jarg1_);
-  public final static native int btQuantizedBvhNode_getTriangleIndex(long jarg1, btQuantizedBvhNode jarg1_);
-  public final static native int btQuantizedBvhNode_getPartId(long jarg1, btQuantizedBvhNode jarg1_);
-  public final static native long new_btQuantizedBvhNode();
-  public final static native void delete_btQuantizedBvhNode(long jarg1);
-  public final static native void btOptimizedBvhNode_m_aabbMinOrg_set(long jarg1, btOptimizedBvhNode jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btOptimizedBvhNode_m_aabbMinOrg_get(long jarg1, btOptimizedBvhNode jarg1_);
-  public final static native void btOptimizedBvhNode_m_aabbMaxOrg_set(long jarg1, btOptimizedBvhNode jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btOptimizedBvhNode_m_aabbMaxOrg_get(long jarg1, btOptimizedBvhNode jarg1_);
-  public final static native void btOptimizedBvhNode_m_escapeIndex_set(long jarg1, btOptimizedBvhNode jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNode_m_escapeIndex_get(long jarg1, btOptimizedBvhNode jarg1_);
-  public final static native void btOptimizedBvhNode_m_subPart_set(long jarg1, btOptimizedBvhNode jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNode_m_subPart_get(long jarg1, btOptimizedBvhNode jarg1_);
-  public final static native void btOptimizedBvhNode_m_triangleIndex_set(long jarg1, btOptimizedBvhNode jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNode_m_triangleIndex_get(long jarg1, btOptimizedBvhNode jarg1_);
-  public final static native void btOptimizedBvhNode_m_padding_set(long jarg1, btOptimizedBvhNode jarg1_, String jarg2);
-  public final static native String btOptimizedBvhNode_m_padding_get(long jarg1, btOptimizedBvhNode jarg1_);
-  public final static native long new_btOptimizedBvhNode();
-  public final static native void delete_btOptimizedBvhNode(long jarg1);
-  public final static native void btBvhSubtreeInfo_m_quantizedAabbMin_set(long jarg1, btBvhSubtreeInfo jarg1_, int[] jarg2);
-  public final static native int[] btBvhSubtreeInfo_m_quantizedAabbMin_get(long jarg1, btBvhSubtreeInfo jarg1_);
-  public final static native void btBvhSubtreeInfo_m_quantizedAabbMax_set(long jarg1, btBvhSubtreeInfo jarg1_, int[] jarg2);
-  public final static native int[] btBvhSubtreeInfo_m_quantizedAabbMax_get(long jarg1, btBvhSubtreeInfo jarg1_);
-  public final static native void btBvhSubtreeInfo_m_rootNodeIndex_set(long jarg1, btBvhSubtreeInfo jarg1_, int jarg2);
-  public final static native int btBvhSubtreeInfo_m_rootNodeIndex_get(long jarg1, btBvhSubtreeInfo jarg1_);
-  public final static native void btBvhSubtreeInfo_m_subtreeSize_set(long jarg1, btBvhSubtreeInfo jarg1_, int jarg2);
-  public final static native int btBvhSubtreeInfo_m_subtreeSize_get(long jarg1, btBvhSubtreeInfo jarg1_);
-  public final static native void btBvhSubtreeInfo_m_padding_set(long jarg1, btBvhSubtreeInfo jarg1_, int[] jarg2);
-  public final static native int[] btBvhSubtreeInfo_m_padding_get(long jarg1, btBvhSubtreeInfo jarg1_);
-  public final static native long new_btBvhSubtreeInfo();
-  public final static native void btBvhSubtreeInfo_setAabbFromQuantizeNode(long jarg1, btBvhSubtreeInfo jarg1_, long jarg2, btQuantizedBvhNode jarg2_);
-  public final static native void delete_btBvhSubtreeInfo(long jarg1);
-  public final static native void delete_btNodeOverlapCallback(long jarg1);
-  public final static native void btNodeOverlapCallback_processNode(long jarg1, btNodeOverlapCallback jarg1_, int jarg2, int jarg3);
-  public final static native long new_btQuantizedBvh();
-  public final static native void delete_btQuantizedBvh(long jarg1);
-  public final static native void btQuantizedBvh_setQuantizationValues__SWIG_0(long jarg1, btQuantizedBvh jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void btQuantizedBvh_setQuantizationValues__SWIG_1(long jarg1, btQuantizedBvh jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native long btQuantizedBvh_getLeafNodeArray(long jarg1, btQuantizedBvh jarg1_);
-  public final static native void btQuantizedBvh_buildInternal(long jarg1, btQuantizedBvh jarg1_);
-  public final static native void btQuantizedBvh_reportAabbOverlappingNodex(long jarg1, btQuantizedBvh jarg1_, long jarg2, btNodeOverlapCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btQuantizedBvh_reportRayOverlappingNodex(long jarg1, btQuantizedBvh jarg1_, long jarg2, btNodeOverlapCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btQuantizedBvh_reportBoxCastOverlappingNodex(long jarg1, btQuantizedBvh jarg1_, long jarg2, btNodeOverlapCallback jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btQuantizedBvh_quantize(long jarg1, btQuantizedBvh jarg1_, long jarg2, Vector3 jarg3, int jarg4);
-  public final static native void btQuantizedBvh_quantizeWithClamp(long jarg1, btQuantizedBvh jarg1_, long jarg2, Vector3 jarg3, int jarg4);
-  public final static native Vector3 btQuantizedBvh_unQuantize(long jarg1, btQuantizedBvh jarg1_, long jarg2);
-  public final static native void btQuantizedBvh_setTraversalMode(long jarg1, btQuantizedBvh jarg1_, int jarg2);
-  public final static native long btQuantizedBvh_getQuantizedNodeArray(long jarg1, btQuantizedBvh jarg1_);
-  public final static native long btQuantizedBvh_getSubtreeInfoArray(long jarg1, btQuantizedBvh jarg1_);
-  public final static native long btQuantizedBvh_calculateSerializeBufferSize(long jarg1, btQuantizedBvh jarg1_);
-  public final static native boolean btQuantizedBvh_serialize__SWIG_0(long jarg1, btQuantizedBvh jarg1_, long jarg2, long jarg3, boolean jarg4);
-  public final static native long btQuantizedBvh_deSerializeInPlace(long jarg1, long jarg2, boolean jarg3);
-  public final static native long btQuantizedBvh_getAlignmentSerializationPadding();
-  public final static native int btQuantizedBvh_calculateSerializeBufferSizeNew(long jarg1, btQuantizedBvh jarg1_);
-  public final static native String btQuantizedBvh_serialize__SWIG_1(long jarg1, btQuantizedBvh jarg1_, long jarg2, long jarg3);
-  public final static native void btQuantizedBvh_deSerializeFloat(long jarg1, btQuantizedBvh jarg1_, long jarg2, btQuantizedBvhFloatData jarg2_);
-  public final static native void btQuantizedBvh_deSerializeDouble(long jarg1, btQuantizedBvh jarg1_, long jarg2, btQuantizedBvhDoubleData jarg2_);
-  public final static native boolean btQuantizedBvh_isQuantized(long jarg1, btQuantizedBvh jarg1_);
-  public final static native void btBvhSubtreeInfoData_m_rootNodeIndex_set(long jarg1, btBvhSubtreeInfoData jarg1_, int jarg2);
-  public final static native int btBvhSubtreeInfoData_m_rootNodeIndex_get(long jarg1, btBvhSubtreeInfoData jarg1_);
-  public final static native void btBvhSubtreeInfoData_m_subtreeSize_set(long jarg1, btBvhSubtreeInfoData jarg1_, int jarg2);
-  public final static native int btBvhSubtreeInfoData_m_subtreeSize_get(long jarg1, btBvhSubtreeInfoData jarg1_);
-  public final static native void btBvhSubtreeInfoData_m_quantizedAabbMin_set(long jarg1, btBvhSubtreeInfoData jarg1_, int[] jarg2);
-  public final static native int[] btBvhSubtreeInfoData_m_quantizedAabbMin_get(long jarg1, btBvhSubtreeInfoData jarg1_);
-  public final static native void btBvhSubtreeInfoData_m_quantizedAabbMax_set(long jarg1, btBvhSubtreeInfoData jarg1_, int[] jarg2);
-  public final static native int[] btBvhSubtreeInfoData_m_quantizedAabbMax_get(long jarg1, btBvhSubtreeInfoData jarg1_);
-  public final static native long new_btBvhSubtreeInfoData();
-  public final static native void delete_btBvhSubtreeInfoData(long jarg1);
-  public final static native void btOptimizedBvhNodeFloatData_m_aabbMinOrg_set(long jarg1, btOptimizedBvhNodeFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btOptimizedBvhNodeFloatData_m_aabbMinOrg_get(long jarg1, btOptimizedBvhNodeFloatData jarg1_);
-  public final static native void btOptimizedBvhNodeFloatData_m_aabbMaxOrg_set(long jarg1, btOptimizedBvhNodeFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btOptimizedBvhNodeFloatData_m_aabbMaxOrg_get(long jarg1, btOptimizedBvhNodeFloatData jarg1_);
-  public final static native void btOptimizedBvhNodeFloatData_m_escapeIndex_set(long jarg1, btOptimizedBvhNodeFloatData jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNodeFloatData_m_escapeIndex_get(long jarg1, btOptimizedBvhNodeFloatData jarg1_);
-  public final static native void btOptimizedBvhNodeFloatData_m_subPart_set(long jarg1, btOptimizedBvhNodeFloatData jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNodeFloatData_m_subPart_get(long jarg1, btOptimizedBvhNodeFloatData jarg1_);
-  public final static native void btOptimizedBvhNodeFloatData_m_triangleIndex_set(long jarg1, btOptimizedBvhNodeFloatData jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNodeFloatData_m_triangleIndex_get(long jarg1, btOptimizedBvhNodeFloatData jarg1_);
-  public final static native void btOptimizedBvhNodeFloatData_m_pad_set(long jarg1, btOptimizedBvhNodeFloatData jarg1_, String jarg2);
-  public final static native String btOptimizedBvhNodeFloatData_m_pad_get(long jarg1, btOptimizedBvhNodeFloatData jarg1_);
-  public final static native long new_btOptimizedBvhNodeFloatData();
-  public final static native void delete_btOptimizedBvhNodeFloatData(long jarg1);
-  public final static native void btOptimizedBvhNodeDoubleData_m_aabbMinOrg_set(long jarg1, btOptimizedBvhNodeDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btOptimizedBvhNodeDoubleData_m_aabbMinOrg_get(long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
-  public final static native void btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_set(long jarg1, btOptimizedBvhNodeDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btOptimizedBvhNodeDoubleData_m_aabbMaxOrg_get(long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
-  public final static native void btOptimizedBvhNodeDoubleData_m_escapeIndex_set(long jarg1, btOptimizedBvhNodeDoubleData jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNodeDoubleData_m_escapeIndex_get(long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
-  public final static native void btOptimizedBvhNodeDoubleData_m_subPart_set(long jarg1, btOptimizedBvhNodeDoubleData jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNodeDoubleData_m_subPart_get(long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
-  public final static native void btOptimizedBvhNodeDoubleData_m_triangleIndex_set(long jarg1, btOptimizedBvhNodeDoubleData jarg1_, int jarg2);
-  public final static native int btOptimizedBvhNodeDoubleData_m_triangleIndex_get(long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
-  public final static native void btOptimizedBvhNodeDoubleData_m_pad_set(long jarg1, btOptimizedBvhNodeDoubleData jarg1_, String jarg2);
-  public final static native String btOptimizedBvhNodeDoubleData_m_pad_get(long jarg1, btOptimizedBvhNodeDoubleData jarg1_);
-  public final static native long new_btOptimizedBvhNodeDoubleData();
-  public final static native void delete_btOptimizedBvhNodeDoubleData(long jarg1);
-  public final static native void btQuantizedBvhNodeData_m_quantizedAabbMin_set(long jarg1, btQuantizedBvhNodeData jarg1_, int[] jarg2);
-  public final static native int[] btQuantizedBvhNodeData_m_quantizedAabbMin_get(long jarg1, btQuantizedBvhNodeData jarg1_);
-  public final static native void btQuantizedBvhNodeData_m_quantizedAabbMax_set(long jarg1, btQuantizedBvhNodeData jarg1_, int[] jarg2);
-  public final static native int[] btQuantizedBvhNodeData_m_quantizedAabbMax_get(long jarg1, btQuantizedBvhNodeData jarg1_);
-  public final static native void btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_set(long jarg1, btQuantizedBvhNodeData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhNodeData_m_escapeIndexOrTriangleIndex_get(long jarg1, btQuantizedBvhNodeData jarg1_);
-  public final static native long new_btQuantizedBvhNodeData();
-  public final static native void delete_btQuantizedBvhNodeData(long jarg1);
-  public final static native void btQuantizedBvhFloatData_m_bvhAabbMin_set(long jarg1, btQuantizedBvhFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btQuantizedBvhFloatData_m_bvhAabbMin_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_bvhAabbMax_set(long jarg1, btQuantizedBvhFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btQuantizedBvhFloatData_m_bvhAabbMax_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_bvhQuantization_set(long jarg1, btQuantizedBvhFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btQuantizedBvhFloatData_m_bvhQuantization_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_curNodeIndex_set(long jarg1, btQuantizedBvhFloatData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhFloatData_m_curNodeIndex_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_useQuantization_set(long jarg1, btQuantizedBvhFloatData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhFloatData_m_useQuantization_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_numContiguousLeafNodes_set(long jarg1, btQuantizedBvhFloatData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhFloatData_m_numContiguousLeafNodes_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_set(long jarg1, btQuantizedBvhFloatData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhFloatData_m_numQuantizedContiguousNodes_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_contiguousNodesPtr_set(long jarg1, btQuantizedBvhFloatData jarg1_, long jarg2, btOptimizedBvhNodeFloatData jarg2_);
-  public final static native long btQuantizedBvhFloatData_m_contiguousNodesPtr_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_set(long jarg1, btQuantizedBvhFloatData jarg1_, long jarg2, btQuantizedBvhNodeData jarg2_);
-  public final static native long btQuantizedBvhFloatData_m_quantizedContiguousNodesPtr_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_subTreeInfoPtr_set(long jarg1, btQuantizedBvhFloatData jarg1_, long jarg2, btBvhSubtreeInfoData jarg2_);
-  public final static native long btQuantizedBvhFloatData_m_subTreeInfoPtr_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_traversalMode_set(long jarg1, btQuantizedBvhFloatData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhFloatData_m_traversalMode_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native void btQuantizedBvhFloatData_m_numSubtreeHeaders_set(long jarg1, btQuantizedBvhFloatData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhFloatData_m_numSubtreeHeaders_get(long jarg1, btQuantizedBvhFloatData jarg1_);
-  public final static native long new_btQuantizedBvhFloatData();
-  public final static native void delete_btQuantizedBvhFloatData(long jarg1);
-  public final static native void btQuantizedBvhDoubleData_m_bvhAabbMin_set(long jarg1, btQuantizedBvhDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btQuantizedBvhDoubleData_m_bvhAabbMin_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_bvhAabbMax_set(long jarg1, btQuantizedBvhDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btQuantizedBvhDoubleData_m_bvhAabbMax_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_bvhQuantization_set(long jarg1, btQuantizedBvhDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btQuantizedBvhDoubleData_m_bvhQuantization_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_curNodeIndex_set(long jarg1, btQuantizedBvhDoubleData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhDoubleData_m_curNodeIndex_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_useQuantization_set(long jarg1, btQuantizedBvhDoubleData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhDoubleData_m_useQuantization_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_numContiguousLeafNodes_set(long jarg1, btQuantizedBvhDoubleData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhDoubleData_m_numContiguousLeafNodes_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_set(long jarg1, btQuantizedBvhDoubleData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhDoubleData_m_numQuantizedContiguousNodes_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_contiguousNodesPtr_set(long jarg1, btQuantizedBvhDoubleData jarg1_, long jarg2, btOptimizedBvhNodeDoubleData jarg2_);
-  public final static native long btQuantizedBvhDoubleData_m_contiguousNodesPtr_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_set(long jarg1, btQuantizedBvhDoubleData jarg1_, long jarg2, btQuantizedBvhNodeData jarg2_);
-  public final static native long btQuantizedBvhDoubleData_m_quantizedContiguousNodesPtr_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_traversalMode_set(long jarg1, btQuantizedBvhDoubleData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhDoubleData_m_traversalMode_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_numSubtreeHeaders_set(long jarg1, btQuantizedBvhDoubleData jarg1_, int jarg2);
-  public final static native int btQuantizedBvhDoubleData_m_numSubtreeHeaders_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native void btQuantizedBvhDoubleData_m_subTreeInfoPtr_set(long jarg1, btQuantizedBvhDoubleData jarg1_, long jarg2, btBvhSubtreeInfoData jarg2_);
-  public final static native long btQuantizedBvhDoubleData_m_subTreeInfoPtr_get(long jarg1, btQuantizedBvhDoubleData jarg1_);
-  public final static native long new_btQuantizedBvhDoubleData();
-  public final static native void delete_btQuantizedBvhDoubleData(long jarg1);
-  public final static native void btDbvtProxy_leaf_set(long jarg1, btDbvtProxy jarg1_, long jarg2, btDbvtNode jarg2_);
-  public final static native long btDbvtProxy_leaf_get(long jarg1, btDbvtProxy jarg1_);
-  public final static native void btDbvtProxy_links_set(long jarg1, btDbvtProxy jarg1_, long jarg2);
-  public final static native long btDbvtProxy_links_get(long jarg1, btDbvtProxy jarg1_);
-  public final static native void btDbvtProxy_stage_set(long jarg1, btDbvtProxy jarg1_, int jarg2);
-  public final static native int btDbvtProxy_stage_get(long jarg1, btDbvtProxy jarg1_);
-  public final static native long new_btDbvtProxy(Vector3 jarg1, Vector3 jarg2, long jarg3, short jarg4, short jarg5);
-  public final static native void delete_btDbvtProxy(long jarg1);
-  public final static native void btDbvtBroadphase_m_sets_set(long jarg1, btDbvtBroadphase jarg1_, long jarg2, btDbvt jarg2_);
-  public final static native long btDbvtBroadphase_m_sets_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_stageRoots_set(long jarg1, btDbvtBroadphase jarg1_, long jarg2);
-  public final static native long btDbvtBroadphase_m_stageRoots_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_paircache_set(long jarg1, btDbvtBroadphase jarg1_, long jarg2, btOverlappingPairCache jarg2_);
-  public final static native long btDbvtBroadphase_m_paircache_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_prediction_set(long jarg1, btDbvtBroadphase jarg1_, float jarg2);
-  public final static native float btDbvtBroadphase_m_prediction_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_stageCurrent_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_stageCurrent_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_fupdates_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_fupdates_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_dupdates_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_dupdates_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_cupdates_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_cupdates_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_newpairs_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_newpairs_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_fixedleft_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_fixedleft_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_updates_call_set(long jarg1, btDbvtBroadphase jarg1_, long jarg2);
-  public final static native long btDbvtBroadphase_m_updates_call_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_updates_done_set(long jarg1, btDbvtBroadphase jarg1_, long jarg2);
-  public final static native long btDbvtBroadphase_m_updates_done_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_updates_ratio_set(long jarg1, btDbvtBroadphase jarg1_, float jarg2);
-  public final static native float btDbvtBroadphase_m_updates_ratio_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_pid_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_pid_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_cid_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_cid_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_gid_set(long jarg1, btDbvtBroadphase jarg1_, int jarg2);
-  public final static native int btDbvtBroadphase_m_gid_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_releasepaircache_set(long jarg1, btDbvtBroadphase jarg1_, boolean jarg2);
-  public final static native boolean btDbvtBroadphase_m_releasepaircache_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_deferedcollide_set(long jarg1, btDbvtBroadphase jarg1_, boolean jarg2);
-  public final static native boolean btDbvtBroadphase_m_deferedcollide_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_m_needcleanup_set(long jarg1, btDbvtBroadphase jarg1_, boolean jarg2);
-  public final static native boolean btDbvtBroadphase_m_needcleanup_get(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native long new_btDbvtBroadphase__SWIG_0(long jarg1, btOverlappingPairCache jarg1_);
-  public final static native long new_btDbvtBroadphase__SWIG_1();
-  public final static native void delete_btDbvtBroadphase(long jarg1);
-  public final static native void btDbvtBroadphase_collide(long jarg1, btDbvtBroadphase jarg1_, long jarg2, btDispatcher jarg2_);
-  public final static native void btDbvtBroadphase_optimize(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_rayTest__SWIG_0(long jarg1, btDbvtBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btDbvtBroadphase_rayTest__SWIG_1(long jarg1, btDbvtBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
-  public final static native void btDbvtBroadphase_rayTest__SWIG_2(long jarg1, btDbvtBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
-  public final static native long btDbvtBroadphase_getOverlappingPairCache__SWIG_0(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_performDeferredRemoval(long jarg1, btDbvtBroadphase jarg1_, long jarg2, btDispatcher jarg2_);
-  public final static native void btDbvtBroadphase_setVelocityPrediction(long jarg1, btDbvtBroadphase jarg1_, float jarg2);
-  public final static native float btDbvtBroadphase_getVelocityPrediction(long jarg1, btDbvtBroadphase jarg1_);
-  public final static native void btDbvtBroadphase_setAabbForceUpdate(long jarg1, btDbvtBroadphase jarg1_, long jarg2, btBroadphaseProxy jarg2_, Vector3 jarg3, Vector3 jarg4, long jarg5, btDispatcher jarg5_);
-  public final static native void btDbvtBroadphase_benchmark(long jarg1, btBroadphaseInterface jarg1_);
-  public final static native void btSimpleBroadphaseProxy_m_nextFree_set(long jarg1, btSimpleBroadphaseProxy jarg1_, int jarg2);
-  public final static native int btSimpleBroadphaseProxy_m_nextFree_get(long jarg1, btSimpleBroadphaseProxy jarg1_);
-  public final static native long new_btSimpleBroadphaseProxy__SWIG_0();
-  public final static native long new_btSimpleBroadphaseProxy__SWIG_1(Vector3 jarg1, Vector3 jarg2, int jarg3, long jarg4, short jarg5, short jarg6, long jarg7);
-  public final static native void btSimpleBroadphaseProxy_SetNextFree(long jarg1, btSimpleBroadphaseProxy jarg1_, int jarg2);
-  public final static native int btSimpleBroadphaseProxy_GetNextFree(long jarg1, btSimpleBroadphaseProxy jarg1_);
-  public final static native void delete_btSimpleBroadphaseProxy(long jarg1);
-  public final static native long new_btSimpleBroadphase__SWIG_0(int jarg1, long jarg2, btOverlappingPairCache jarg2_);
-  public final static native long new_btSimpleBroadphase__SWIG_1(int jarg1);
-  public final static native long new_btSimpleBroadphase__SWIG_2();
-  public final static native void delete_btSimpleBroadphase(long jarg1);
-  public final static native boolean btSimpleBroadphase_aabbOverlap(long jarg1, btSimpleBroadphaseProxy jarg1_, long jarg2, btSimpleBroadphaseProxy jarg2_);
-  public final static native void btSimpleBroadphase_rayTest__SWIG_0(long jarg1, btSimpleBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btSimpleBroadphase_rayTest__SWIG_1(long jarg1, btSimpleBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
-  public final static native void btSimpleBroadphase_rayTest__SWIG_2(long jarg1, btSimpleBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
-  public final static native long btSimpleBroadphase_getOverlappingPairCache__SWIG_0(long jarg1, btSimpleBroadphase jarg1_);
-  public final static native boolean btSimpleBroadphase_testAabbOverlap(long jarg1, btSimpleBroadphase jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native long btMultiSapBroadphase_getBroadphaseArray__SWIG_0(long jarg1, btMultiSapBroadphase jarg1_);
-  public final static native void delete_btMultiSapBroadphase(long jarg1);
-  public final static native void btMultiSapBroadphase_rayTest__SWIG_0(long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btMultiSapBroadphase_rayTest__SWIG_1(long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_, Vector3 jarg5);
-  public final static native void btMultiSapBroadphase_rayTest__SWIG_2(long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4, btBroadphaseRayCallback jarg4_);
-  public final static native void btMultiSapBroadphase_addToChildBroadphase(long jarg1, btMultiSapBroadphase jarg1_, long jarg2, long jarg3, btBroadphaseProxy jarg3_, long jarg4, btBroadphaseInterface jarg4_);
-  public final static native boolean btMultiSapBroadphase_testAabbOverlap(long jarg1, btMultiSapBroadphase jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native long btMultiSapBroadphase_getOverlappingPairCache__SWIG_0(long jarg1, btMultiSapBroadphase jarg1_);
-  public final static native void btMultiSapBroadphase_buildTree(long jarg1, btMultiSapBroadphase jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btMultiSapBroadphase_quicksort(long jarg1, btMultiSapBroadphase jarg1_, long jarg2, int jarg3, int jarg4);
-  public final static native long new_btCollisionAlgorithmConstructionInfo__SWIG_0();
-  public final static native long new_btCollisionAlgorithmConstructionInfo__SWIG_1(long jarg1, btDispatcher jarg1_, int jarg2);
-  public final static native void btCollisionAlgorithmConstructionInfo_m_dispatcher1_set(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_, long jarg2, btDispatcher jarg2_);
-  public final static native long btCollisionAlgorithmConstructionInfo_m_dispatcher1_get(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
-  public final static native void btCollisionAlgorithmConstructionInfo_m_manifold_set(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_, long jarg2, btPersistentManifold jarg2_);
-  public final static native long btCollisionAlgorithmConstructionInfo_m_manifold_get(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
-  public final static native void delete_btCollisionAlgorithmConstructionInfo(long jarg1);
-  public final static native void delete_btCollisionAlgorithm(long jarg1);
-  public final static native void btCollisionAlgorithm_processCollision(long jarg1, btCollisionAlgorithm jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btDispatcherInfo jarg4_, long jarg5, btManifoldResult jarg5_);
-  public final static native float btCollisionAlgorithm_calculateTimeOfImpact(long jarg1, btCollisionAlgorithm jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btDispatcherInfo jarg4_, long jarg5, btManifoldResult jarg5_);
-  public final static native void btCollisionAlgorithm_getAllContactManifolds(long jarg1, btCollisionAlgorithm jarg1_, long jarg2);
-  public final static native void delete_btOverlappingPairCallback(long jarg1);
-  public final static native long btOverlappingPairCallback_addOverlappingPair(long jarg1, btOverlappingPairCallback jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native long btOverlappingPairCallback_removeOverlappingPair(long jarg1, btOverlappingPairCallback jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_, long jarg4, btDispatcher jarg4_);
-  public final static native void btOverlappingPairCallback_removeOverlappingPairsContainingProxy(long jarg1, btOverlappingPairCallback jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native void gOverlappingPairs_set(int jarg1);
-  public final static native int gOverlappingPairs_get();
-  public final static native long new_btAxisSweep3__SWIG_0(Vector3 jarg1, Vector3 jarg2, int jarg3, long jarg4, btOverlappingPairCache jarg4_, boolean jarg5);
-  public final static native long new_btAxisSweep3__SWIG_1(Vector3 jarg1, Vector3 jarg2, int jarg3, long jarg4, btOverlappingPairCache jarg4_);
-  public final static native long new_btAxisSweep3__SWIG_2(Vector3 jarg1, Vector3 jarg2, int jarg3);
-  public final static native long new_btAxisSweep3__SWIG_3(Vector3 jarg1, Vector3 jarg2);
-  public final static native void delete_btAxisSweep3(long jarg1);
-  public final static native long new_bt32BitAxisSweep3__SWIG_0(Vector3 jarg1, Vector3 jarg2, long jarg3, long jarg4, btOverlappingPairCache jarg4_, boolean jarg5);
-  public final static native long new_bt32BitAxisSweep3__SWIG_1(Vector3 jarg1, Vector3 jarg2, long jarg3, long jarg4, btOverlappingPairCache jarg4_);
-  public final static native long new_bt32BitAxisSweep3__SWIG_2(Vector3 jarg1, Vector3 jarg2, long jarg3);
-  public final static native long new_bt32BitAxisSweep3__SWIG_3(Vector3 jarg1, Vector3 jarg2);
-  public final static native void delete_bt32BitAxisSweep3(long jarg1);
-  public final static native long new_btDispatcherInfo();
-  public final static native void btDispatcherInfo_m_timeStep_set(long jarg1, btDispatcherInfo jarg1_, float jarg2);
-  public final static native float btDispatcherInfo_m_timeStep_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_stepCount_set(long jarg1, btDispatcherInfo jarg1_, int jarg2);
-  public final static native int btDispatcherInfo_m_stepCount_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_dispatchFunc_set(long jarg1, btDispatcherInfo jarg1_, int jarg2);
-  public final static native int btDispatcherInfo_m_dispatchFunc_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_timeOfImpact_set(long jarg1, btDispatcherInfo jarg1_, float jarg2);
-  public final static native float btDispatcherInfo_m_timeOfImpact_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_useContinuous_set(long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
-  public final static native boolean btDispatcherInfo_m_useContinuous_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_debugDraw_set(long jarg1, btDispatcherInfo jarg1_, long jarg2, btIDebugDraw jarg2_);
-  public final static native long btDispatcherInfo_m_debugDraw_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_enableSatConvex_set(long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
-  public final static native boolean btDispatcherInfo_m_enableSatConvex_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_enableSPU_set(long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
-  public final static native boolean btDispatcherInfo_m_enableSPU_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_useEpa_set(long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
-  public final static native boolean btDispatcherInfo_m_useEpa_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_allowedCcdPenetration_set(long jarg1, btDispatcherInfo jarg1_, float jarg2);
-  public final static native float btDispatcherInfo_m_allowedCcdPenetration_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_useConvexConservativeDistanceUtil_set(long jarg1, btDispatcherInfo jarg1_, boolean jarg2);
-  public final static native boolean btDispatcherInfo_m_useConvexConservativeDistanceUtil_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_convexConservativeDistanceThreshold_set(long jarg1, btDispatcherInfo jarg1_, float jarg2);
-  public final static native float btDispatcherInfo_m_convexConservativeDistanceThreshold_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void btDispatcherInfo_m_stackAllocator_set(long jarg1, btDispatcherInfo jarg1_, long jarg2, btStackAlloc jarg2_);
-  public final static native long btDispatcherInfo_m_stackAllocator_get(long jarg1, btDispatcherInfo jarg1_);
-  public final static native void delete_btDispatcherInfo(long jarg1);
-  public final static native void delete_btDispatcher(long jarg1);
-  public final static native long btDispatcher_findAlgorithm__SWIG_0(long jarg1, btDispatcher jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btPersistentManifold jarg4_);
-  public final static native long btDispatcher_findAlgorithm__SWIG_1(long jarg1, btDispatcher jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
-  public final static native long btDispatcher_getNewManifold(long jarg1, btDispatcher jarg1_, long jarg2, long jarg3);
-  public final static native void btDispatcher_releaseManifold(long jarg1, btDispatcher jarg1_, long jarg2, btPersistentManifold jarg2_);
-  public final static native void btDispatcher_clearManifold(long jarg1, btDispatcher jarg1_, long jarg2, btPersistentManifold jarg2_);
-  public final static native boolean btDispatcher_needsCollision(long jarg1, btDispatcher jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
-  public final static native boolean btDispatcher_needsResponse(long jarg1, btDispatcher jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
-  public final static native void btDispatcher_dispatchAllCollisionPairs(long jarg1, btDispatcher jarg1_, long jarg2, btOverlappingPairCache jarg2_, long jarg3, btDispatcherInfo jarg3_, long jarg4, btDispatcher jarg4_);
-  public final static native int btDispatcher_getNumManifolds(long jarg1, btDispatcher jarg1_);
-  public final static native long btDispatcher_getManifoldByIndexInternal(long jarg1, btDispatcher jarg1_, int jarg2);
-  public final static native long btDispatcher_getInternalManifoldPointer(long jarg1, btDispatcher jarg1_);
-  public final static native long btDispatcher_getInternalManifoldPool__SWIG_0(long jarg1, btDispatcher jarg1_);
-  public final static native long btDispatcher_allocateCollisionAlgorithm(long jarg1, btDispatcher jarg1_, int jarg2);
-  public final static native void btDispatcher_freeCollisionAlgorithm(long jarg1, btDispatcher jarg1_, long jarg2);
-  public final static native void delete_btOverlapCallback(long jarg1);
-  public final static native boolean btOverlapCallback_processOverlap(long jarg1, btOverlapCallback jarg1_, long jarg2, btBroadphasePair jarg2_);
-  public final static native void delete_btOverlapFilterCallback(long jarg1);
-  public final static native boolean btOverlapFilterCallback_needBroadphaseCollision(long jarg1, btOverlapFilterCallback jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native void gRemovePairs_set(int jarg1);
-  public final static native int gRemovePairs_get();
-  public final static native void gAddedPairs_set(int jarg1);
-  public final static native int gAddedPairs_get();
-  public final static native void gFindPairs_set(int jarg1);
-  public final static native int gFindPairs_get();
-  public final static native int BT_NULL_PAIR_get();
-  public final static native void delete_btOverlappingPairCache(long jarg1);
-  public final static native long btOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(long jarg1, btOverlappingPairCache jarg1_);
-  public final static native long btOverlappingPairCache_getOverlappingPairArray(long jarg1, btOverlappingPairCache jarg1_);
-  public final static native void btOverlappingPairCache_cleanOverlappingPair(long jarg1, btOverlappingPairCache jarg1_, long jarg2, btBroadphasePair jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native int btOverlappingPairCache_getNumOverlappingPairs(long jarg1, btOverlappingPairCache jarg1_);
-  public final static native void btOverlappingPairCache_cleanProxyFromPairs(long jarg1, btOverlappingPairCache jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native void btOverlappingPairCache_setOverlapFilterCallback(long jarg1, btOverlappingPairCache jarg1_, long jarg2, btOverlapFilterCallback jarg2_);
-  public final static native void btOverlappingPairCache_processAllOverlappingPairs(long jarg1, btOverlappingPairCache jarg1_, long jarg2, btOverlapCallback jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native long btOverlappingPairCache_findPair(long jarg1, btOverlappingPairCache jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native boolean btOverlappingPairCache_hasDeferredRemoval(long jarg1, btOverlappingPairCache jarg1_);
-  public final static native void btOverlappingPairCache_setInternalGhostPairCallback(long jarg1, btOverlappingPairCache jarg1_, long jarg2, btOverlappingPairCallback jarg2_);
-  public final static native void btOverlappingPairCache_sortOverlappingPairs(long jarg1, btOverlappingPairCache jarg1_, long jarg2, btDispatcher jarg2_);
-  public final static native long new_btHashedOverlappingPairCache();
-  public final static native void delete_btHashedOverlappingPairCache(long jarg1);
-  public final static native boolean btHashedOverlappingPairCache_needsBroadphaseCollision(long jarg1, btHashedOverlappingPairCache jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native long btHashedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(long jarg1, btHashedOverlappingPairCache jarg1_);
-  public final static native long btHashedOverlappingPairCache_getOverlappingPairArray__SWIG_0(long jarg1, btHashedOverlappingPairCache jarg1_);
-  public final static native int btHashedOverlappingPairCache_GetCount(long jarg1, btHashedOverlappingPairCache jarg1_);
-  public final static native long btHashedOverlappingPairCache_getOverlapFilterCallback(long jarg1, btHashedOverlappingPairCache jarg1_);
-  public final static native long new_btSortedOverlappingPairCache();
-  public final static native void delete_btSortedOverlappingPairCache(long jarg1);
-  public final static native boolean btSortedOverlappingPairCache_needsBroadphaseCollision(long jarg1, btSortedOverlappingPairCache jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native long btSortedOverlappingPairCache_getOverlappingPairArray__SWIG_0(long jarg1, btSortedOverlappingPairCache jarg1_);
-  public final static native long btSortedOverlappingPairCache_getOverlappingPairArrayPtr__SWIG_0(long jarg1, btSortedOverlappingPairCache jarg1_);
-  public final static native long btSortedOverlappingPairCache_getOverlapFilterCallback(long jarg1, btSortedOverlappingPairCache jarg1_);
-  public final static native long btNullPairCache_getOverlappingPairArrayPtr__SWIG_0(long jarg1, btNullPairCache jarg1_);
-  public final static native long new_btNullPairCache();
-  public final static native void delete_btNullPairCache(long jarg1);
-  public final static native void delete_btCollisionShape(long jarg1);
-  public final static native void btCollisionShape_getAabb(long jarg1, btCollisionShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btCollisionShape_getBoundingSphere(long jarg1, btCollisionShape jarg1_, Vector3 jarg2, long jarg3);
-  public final static native float btCollisionShape_getAngularMotionDisc(long jarg1, btCollisionShape jarg1_);
-  public final static native float btCollisionShape_getContactBreakingThreshold(long jarg1, btCollisionShape jarg1_, float jarg2);
-  public final static native void btCollisionShape_calculateTemporalAabb(long jarg1, btCollisionShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, Vector3 jarg4, float jarg5, Vector3 jarg6, Vector3 jarg7);
-  public final static native boolean btCollisionShape_isPolyhedral(long jarg1, btCollisionShape jarg1_);
-  public final static native boolean btCollisionShape_isConvex2d(long jarg1, btCollisionShape jarg1_);
-  public final static native boolean btCollisionShape_isConvex(long jarg1, btCollisionShape jarg1_);
-  public final static native boolean btCollisionShape_isNonMoving(long jarg1, btCollisionShape jarg1_);
-  public final static native boolean btCollisionShape_isConcave(long jarg1, btCollisionShape jarg1_);
-  public final static native boolean btCollisionShape_isCompound(long jarg1, btCollisionShape jarg1_);
-  public final static native boolean btCollisionShape_isSoftBody(long jarg1, btCollisionShape jarg1_);
-  public final static native boolean btCollisionShape_isInfinite(long jarg1, btCollisionShape jarg1_);
-  public final static native void btCollisionShape_setLocalScaling(long jarg1, btCollisionShape jarg1_, Vector3 jarg2);
-  public final static native Vector3 btCollisionShape_getLocalScaling(long jarg1, btCollisionShape jarg1_);
-  public final static native void btCollisionShape_calculateLocalInertia(long jarg1, btCollisionShape jarg1_, float jarg2, Vector3 jarg3);
-  public final static native String btCollisionShape_getName(long jarg1, btCollisionShape jarg1_);
-  public final static native int btCollisionShape_getShapeType(long jarg1, btCollisionShape jarg1_);
-  public final static native void btCollisionShape_setMargin(long jarg1, btCollisionShape jarg1_, float jarg2);
-  public final static native float btCollisionShape_getMargin(long jarg1, btCollisionShape jarg1_);
-  public final static native void btCollisionShape_setUserPointer(long jarg1, btCollisionShape jarg1_, long jarg2);
-  public final static native long btCollisionShape_getUserPointer(long jarg1, btCollisionShape jarg1_);
-  public final static native int btCollisionShape_calculateSerializeBufferSize(long jarg1, btCollisionShape jarg1_);
-  public final static native String btCollisionShape_serialize(long jarg1, btCollisionShape jarg1_, long jarg2, long jarg3);
-  public final static native void btCollisionShape_serializeSingleShape(long jarg1, btCollisionShape jarg1_, long jarg2);
-  public final static native void btCollisionShapeData_m_name_set(long jarg1, btCollisionShapeData jarg1_, String jarg2);
-  public final static native String btCollisionShapeData_m_name_get(long jarg1, btCollisionShapeData jarg1_);
-  public final static native void btCollisionShapeData_m_shapeType_set(long jarg1, btCollisionShapeData jarg1_, int jarg2);
-  public final static native int btCollisionShapeData_m_shapeType_get(long jarg1, btCollisionShapeData jarg1_);
-  public final static native void btCollisionShapeData_m_padding_set(long jarg1, btCollisionShapeData jarg1_, String jarg2);
-  public final static native String btCollisionShapeData_m_padding_get(long jarg1, btCollisionShapeData jarg1_);
-  public final static native long new_btCollisionShapeData();
-  public final static native void delete_btCollisionShapeData(long jarg1);
-  public final static native void delete_btConvexShape(long jarg1);
-  public final static native Vector3 btConvexShape_localGetSupportingVertex(long jarg1, btConvexShape jarg1_, Vector3 jarg2);
-  public final static native Vector3 btConvexShape_localGetSupportingVertexWithoutMargin(long jarg1, btConvexShape jarg1_, Vector3 jarg2);
-  public final static native Vector3 btConvexShape_localGetSupportVertexWithoutMarginNonVirtual(long jarg1, btConvexShape jarg1_, Vector3 jarg2);
-  public final static native Vector3 btConvexShape_localGetSupportVertexNonVirtual(long jarg1, btConvexShape jarg1_, Vector3 jarg2);
-  public final static native float btConvexShape_getMarginNonVirtual(long jarg1, btConvexShape jarg1_);
-  public final static native void btConvexShape_getAabbNonVirtual(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btConvexShape_project(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, long jarg4, long jarg5);
-  public final static native void btConvexShape_batchedUnitVectorGetSupportingVertexWithoutMargin(long jarg1, btConvexShape jarg1_, long jarg2, btVector3 jarg2_, long jarg3, btVector3 jarg3_, int jarg4);
-  public final static native void btConvexShape_getAabbSlow(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native int btConvexShape_getNumPreferredPenetrationDirections(long jarg1, btConvexShape jarg1_);
-  public final static native void btConvexShape_getPreferredPenetrationDirection(long jarg1, btConvexShape jarg1_, int jarg2, Vector3 jarg3);
-  public final static native void delete_btConvexInternalShape(long jarg1);
-  public final static native Vector3 btConvexInternalShape_getImplicitShapeDimensions(long jarg1, btConvexInternalShape jarg1_);
-  public final static native void btConvexInternalShape_setImplicitShapeDimensions(long jarg1, btConvexInternalShape jarg1_, Vector3 jarg2);
-  public final static native void btConvexInternalShape_setSafeMargin__SWIG_0(long jarg1, btConvexInternalShape jarg1_, float jarg2, float jarg3);
-  public final static native void btConvexInternalShape_setSafeMargin__SWIG_1(long jarg1, btConvexInternalShape jarg1_, float jarg2);
-  public final static native void btConvexInternalShape_setSafeMargin__SWIG_2(long jarg1, btConvexInternalShape jarg1_, Vector3 jarg2, float jarg3);
-  public final static native void btConvexInternalShape_setSafeMargin__SWIG_3(long jarg1, btConvexInternalShape jarg1_, Vector3 jarg2);
-  public final static native Vector3 btConvexInternalShape_getLocalScalingNV(long jarg1, btConvexInternalShape jarg1_);
-  public final static native float btConvexInternalShape_getMarginNV(long jarg1, btConvexInternalShape jarg1_);
-  public final static native void btConvexInternalShapeData_m_collisionShapeData_set(long jarg1, btConvexInternalShapeData jarg1_, long jarg2, btCollisionShapeData jarg2_);
-  public final static native long btConvexInternalShapeData_m_collisionShapeData_get(long jarg1, btConvexInternalShapeData jarg1_);
-  public final static native void btConvexInternalShapeData_m_localScaling_set(long jarg1, btConvexInternalShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btConvexInternalShapeData_m_localScaling_get(long jarg1, btConvexInternalShapeData jarg1_);
-  public final static native void btConvexInternalShapeData_m_implicitShapeDimensions_set(long jarg1, btConvexInternalShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btConvexInternalShapeData_m_implicitShapeDimensions_get(long jarg1, btConvexInternalShapeData jarg1_);
-  public final static native void btConvexInternalShapeData_m_collisionMargin_set(long jarg1, btConvexInternalShapeData jarg1_, float jarg2);
-  public final static native float btConvexInternalShapeData_m_collisionMargin_get(long jarg1, btConvexInternalShapeData jarg1_);
-  public final static native void btConvexInternalShapeData_m_padding_set(long jarg1, btConvexInternalShapeData jarg1_, int jarg2);
-  public final static native int btConvexInternalShapeData_m_padding_get(long jarg1, btConvexInternalShapeData jarg1_);
-  public final static native long new_btConvexInternalShapeData();
-  public final static native void delete_btConvexInternalShapeData(long jarg1);
-  public final static native void btConvexInternalAabbCachingShape_recalcLocalAabb(long jarg1, btConvexInternalAabbCachingShape jarg1_);
-  public final static native void delete_btConvexInternalAabbCachingShape(long jarg1);
-  public final static native void delete_btPolyhedralConvexShape(long jarg1);
-  public final static native boolean btPolyhedralConvexShape_initializePolyhedralFeatures(long jarg1, btPolyhedralConvexShape jarg1_);
-  public final static native long btPolyhedralConvexShape_getConvexPolyhedron(long jarg1, btPolyhedralConvexShape jarg1_);
-  public final static native int btPolyhedralConvexShape_getNumVertices(long jarg1, btPolyhedralConvexShape jarg1_);
-  public final static native int btPolyhedralConvexShape_getNumEdges(long jarg1, btPolyhedralConvexShape jarg1_);
-  public final static native void btPolyhedralConvexShape_getEdge(long jarg1, btPolyhedralConvexShape jarg1_, int jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btPolyhedralConvexShape_getVertex(long jarg1, btPolyhedralConvexShape jarg1_, int jarg2, Vector3 jarg3);
-  public final static native int btPolyhedralConvexShape_getNumPlanes(long jarg1, btPolyhedralConvexShape jarg1_);
-  public final static native void btPolyhedralConvexShape_getPlane(long jarg1, btPolyhedralConvexShape jarg1_, Vector3 jarg2, Vector3 jarg3, int jarg4);
-  public final static native boolean btPolyhedralConvexShape_isInside(long jarg1, btPolyhedralConvexShape jarg1_, Vector3 jarg2, float jarg3);
-  public final static native void btPolyhedralConvexAabbCachingShape_getNonvirtualAabb(long jarg1, btPolyhedralConvexAabbCachingShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, Vector3 jarg4, float jarg5);
-  public final static native void btPolyhedralConvexAabbCachingShape_recalcLocalAabb(long jarg1, btPolyhedralConvexAabbCachingShape jarg1_);
-  public final static native void delete_btPolyhedralConvexAabbCachingShape(long jarg1);
-  public final static native void delete_btConcaveShape(long jarg1);
-  public final static native void btConcaveShape_processAllTriangles(long jarg1, btConcaveShape jarg1_, long jarg2, btTriangleCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void delete_btTriangleCallback(long jarg1);
-  public final static native void btTriangleCallback_processTriangle(long jarg1, btTriangleCallback jarg1_, long jarg2, btVector3 jarg2_, int jarg3, int jarg4);
-  public final static native void delete_btInternalTriangleIndexCallback(long jarg1);
-  public final static native void btInternalTriangleIndexCallback_internalProcessTriangleIndex(long jarg1, btInternalTriangleIndexCallback jarg1_, long jarg2, btVector3 jarg2_, int jarg3, int jarg4);
-  public final static native long new_btTriangleInfo();
-  public final static native void btTriangleInfo_m_flags_set(long jarg1, btTriangleInfo jarg1_, int jarg2);
-  public final static native int btTriangleInfo_m_flags_get(long jarg1, btTriangleInfo jarg1_);
-  public final static native void btTriangleInfo_m_edgeV0V1Angle_set(long jarg1, btTriangleInfo jarg1_, float jarg2);
-  public final static native float btTriangleInfo_m_edgeV0V1Angle_get(long jarg1, btTriangleInfo jarg1_);
-  public final static native void btTriangleInfo_m_edgeV1V2Angle_set(long jarg1, btTriangleInfo jarg1_, float jarg2);
-  public final static native float btTriangleInfo_m_edgeV1V2Angle_get(long jarg1, btTriangleInfo jarg1_);
-  public final static native void btTriangleInfo_m_edgeV2V0Angle_set(long jarg1, btTriangleInfo jarg1_, float jarg2);
-  public final static native float btTriangleInfo_m_edgeV2V0Angle_get(long jarg1, btTriangleInfo jarg1_);
-  public final static native void delete_btTriangleInfo(long jarg1);
-  public final static native void btTriangleInfoMap_m_convexEpsilon_set(long jarg1, btTriangleInfoMap jarg1_, float jarg2);
-  public final static native float btTriangleInfoMap_m_convexEpsilon_get(long jarg1, btTriangleInfoMap jarg1_);
-  public final static native void btTriangleInfoMap_m_planarEpsilon_set(long jarg1, btTriangleInfoMap jarg1_, float jarg2);
-  public final static native float btTriangleInfoMap_m_planarEpsilon_get(long jarg1, btTriangleInfoMap jarg1_);
-  public final static native void btTriangleInfoMap_m_equalVertexThreshold_set(long jarg1, btTriangleInfoMap jarg1_, float jarg2);
-  public final static native float btTriangleInfoMap_m_equalVertexThreshold_get(long jarg1, btTriangleInfoMap jarg1_);
-  public final static native void btTriangleInfoMap_m_edgeDistanceThreshold_set(long jarg1, btTriangleInfoMap jarg1_, float jarg2);
-  public final static native float btTriangleInfoMap_m_edgeDistanceThreshold_get(long jarg1, btTriangleInfoMap jarg1_);
-  public final static native void btTriangleInfoMap_m_maxEdgeAngleThreshold_set(long jarg1, btTriangleInfoMap jarg1_, float jarg2);
-  public final static native float btTriangleInfoMap_m_maxEdgeAngleThreshold_get(long jarg1, btTriangleInfoMap jarg1_);
-  public final static native void btTriangleInfoMap_m_zeroAreaThreshold_set(long jarg1, btTriangleInfoMap jarg1_, float jarg2);
-  public final static native float btTriangleInfoMap_m_zeroAreaThreshold_get(long jarg1, btTriangleInfoMap jarg1_);
-  public final static native long new_btTriangleInfoMap();
-  public final static native void delete_btTriangleInfoMap(long jarg1);
-  public final static native int btTriangleInfoMap_calculateSerializeBufferSize(long jarg1, btTriangleInfoMap jarg1_);
-  public final static native String btTriangleInfoMap_serialize(long jarg1, btTriangleInfoMap jarg1_, long jarg2, long jarg3);
-  public final static native void btTriangleInfoMap_deSerialize(long jarg1, btTriangleInfoMap jarg1_, long jarg2, btTriangleInfoMapData jarg2_);
-  public final static native void btTriangleInfoData_m_flags_set(long jarg1, btTriangleInfoData jarg1_, int jarg2);
-  public final static native int btTriangleInfoData_m_flags_get(long jarg1, btTriangleInfoData jarg1_);
-  public final static native void btTriangleInfoData_m_edgeV0V1Angle_set(long jarg1, btTriangleInfoData jarg1_, float jarg2);
-  public final static native float btTriangleInfoData_m_edgeV0V1Angle_get(long jarg1, btTriangleInfoData jarg1_);
-  public final static native void btTriangleInfoData_m_edgeV1V2Angle_set(long jarg1, btTriangleInfoData jarg1_, float jarg2);
-  public final static native float btTriangleInfoData_m_edgeV1V2Angle_get(long jarg1, btTriangleInfoData jarg1_);
-  public final static native void btTriangleInfoData_m_edgeV2V0Angle_set(long jarg1, btTriangleInfoData jarg1_, float jarg2);
-  public final static native float btTriangleInfoData_m_edgeV2V0Angle_get(long jarg1, btTriangleInfoData jarg1_);
-  public final static native long new_btTriangleInfoData();
-  public final static native void delete_btTriangleInfoData(long jarg1);
-  public final static native void btTriangleInfoMapData_m_hashTablePtr_set(long jarg1, btTriangleInfoMapData jarg1_, long jarg2);
-  public final static native long btTriangleInfoMapData_m_hashTablePtr_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_nextPtr_set(long jarg1, btTriangleInfoMapData jarg1_, long jarg2);
-  public final static native long btTriangleInfoMapData_m_nextPtr_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_valueArrayPtr_set(long jarg1, btTriangleInfoMapData jarg1_, long jarg2, btTriangleInfoData jarg2_);
-  public final static native long btTriangleInfoMapData_m_valueArrayPtr_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_keyArrayPtr_set(long jarg1, btTriangleInfoMapData jarg1_, long jarg2);
-  public final static native long btTriangleInfoMapData_m_keyArrayPtr_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_convexEpsilon_set(long jarg1, btTriangleInfoMapData jarg1_, float jarg2);
-  public final static native float btTriangleInfoMapData_m_convexEpsilon_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_planarEpsilon_set(long jarg1, btTriangleInfoMapData jarg1_, float jarg2);
-  public final static native float btTriangleInfoMapData_m_planarEpsilon_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_equalVertexThreshold_set(long jarg1, btTriangleInfoMapData jarg1_, float jarg2);
-  public final static native float btTriangleInfoMapData_m_equalVertexThreshold_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_edgeDistanceThreshold_set(long jarg1, btTriangleInfoMapData jarg1_, float jarg2);
-  public final static native float btTriangleInfoMapData_m_edgeDistanceThreshold_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_zeroAreaThreshold_set(long jarg1, btTriangleInfoMapData jarg1_, float jarg2);
-  public final static native float btTriangleInfoMapData_m_zeroAreaThreshold_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_nextSize_set(long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
-  public final static native int btTriangleInfoMapData_m_nextSize_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_hashTableSize_set(long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
-  public final static native int btTriangleInfoMapData_m_hashTableSize_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_numValues_set(long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
-  public final static native int btTriangleInfoMapData_m_numValues_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_numKeys_set(long jarg1, btTriangleInfoMapData jarg1_, int jarg2);
-  public final static native int btTriangleInfoMapData_m_numKeys_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native void btTriangleInfoMapData_m_padding_set(long jarg1, btTriangleInfoMapData jarg1_, String jarg2);
-  public final static native String btTriangleInfoMapData_m_padding_get(long jarg1, btTriangleInfoMapData jarg1_);
-  public final static native long new_btTriangleInfoMapData();
-  public final static native void delete_btTriangleInfoMapData(long jarg1);
-  public final static native long new_btStaticPlaneShape(Vector3 jarg1, float jarg2);
-  public final static native void delete_btStaticPlaneShape(long jarg1);
-  public final static native Vector3 btStaticPlaneShape_getPlaneNormal(long jarg1, btStaticPlaneShape jarg1_);
-  public final static native float btStaticPlaneShape_getPlaneConstant(long jarg1, btStaticPlaneShape jarg1_);
-  public final static native void btStaticPlaneShapeData_m_collisionShapeData_set(long jarg1, btStaticPlaneShapeData jarg1_, long jarg2, btCollisionShapeData jarg2_);
-  public final static native long btStaticPlaneShapeData_m_collisionShapeData_get(long jarg1, btStaticPlaneShapeData jarg1_);
-  public final static native void btStaticPlaneShapeData_m_localScaling_set(long jarg1, btStaticPlaneShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btStaticPlaneShapeData_m_localScaling_get(long jarg1, btStaticPlaneShapeData jarg1_);
-  public final static native void btStaticPlaneShapeData_m_planeNormal_set(long jarg1, btStaticPlaneShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btStaticPlaneShapeData_m_planeNormal_get(long jarg1, btStaticPlaneShapeData jarg1_);
-  public final static native void btStaticPlaneShapeData_m_planeConstant_set(long jarg1, btStaticPlaneShapeData jarg1_, float jarg2);
-  public final static native float btStaticPlaneShapeData_m_planeConstant_get(long jarg1, btStaticPlaneShapeData jarg1_);
-  public final static native void btStaticPlaneShapeData_m_pad_set(long jarg1, btStaticPlaneShapeData jarg1_, String jarg2);
-  public final static native String btStaticPlaneShapeData_m_pad_get(long jarg1, btStaticPlaneShapeData jarg1_);
-  public final static native long new_btStaticPlaneShapeData();
-  public final static native void delete_btStaticPlaneShapeData(long jarg1);
-  public final static native long new_btHeightfieldTerrainShape__SWIG_0(int jarg1, int jarg2, long jarg3, float jarg4, float jarg5, float jarg6, int jarg7, int jarg8, boolean jarg9);
-  public final static native long new_btHeightfieldTerrainShape__SWIG_1(int jarg1, int jarg2, long jarg3, float jarg4, int jarg5, boolean jarg6, boolean jarg7);
-  public final static native void delete_btHeightfieldTerrainShape(long jarg1);
-  public final static native void btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_0(long jarg1, btHeightfieldTerrainShape jarg1_, boolean jarg2);
-  public final static native void btHeightfieldTerrainShape_setUseDiamondSubdivision__SWIG_1(long jarg1, btHeightfieldTerrainShape jarg1_);
-  public final static native void delete_btTriangleMeshShape(long jarg1);
-  public final static native Vector3 btTriangleMeshShape_localGetSupportingVertex(long jarg1, btTriangleMeshShape jarg1_, Vector3 jarg2);
-  public final static native Vector3 btTriangleMeshShape_localGetSupportingVertexWithoutMargin(long jarg1, btTriangleMeshShape jarg1_, Vector3 jarg2);
-  public final static native void btTriangleMeshShape_recalcLocalAabb(long jarg1, btTriangleMeshShape jarg1_);
-  public final static native long btTriangleMeshShape_getMeshInterface__SWIG_0(long jarg1, btTriangleMeshShape jarg1_);
-  public final static native Vector3 btTriangleMeshShape_getLocalAabbMin(long jarg1, btTriangleMeshShape jarg1_);
-  public final static native Vector3 btTriangleMeshShape_getLocalAabbMax(long jarg1, btTriangleMeshShape jarg1_);
-  public final static native long new_btBvhTriangleMeshShape__SWIG_0(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2, boolean jarg3);
-  public final static native long new_btBvhTriangleMeshShape__SWIG_1(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2);
-  public final static native long new_btBvhTriangleMeshShape__SWIG_2(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2, Vector3 jarg3, Vector3 jarg4, boolean jarg5);
-  public final static native long new_btBvhTriangleMeshShape__SWIG_3(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void delete_btBvhTriangleMeshShape(long jarg1);
-  public final static native boolean btBvhTriangleMeshShape_getOwnsBvh(long jarg1, btBvhTriangleMeshShape jarg1_);
-  public final static native void btBvhTriangleMeshShape_performRaycast(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2, btTriangleCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btBvhTriangleMeshShape_performConvexcast(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2, btTriangleCallback jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btBvhTriangleMeshShape_refitTree(long jarg1, btBvhTriangleMeshShape jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btBvhTriangleMeshShape_partialRefitTree(long jarg1, btBvhTriangleMeshShape jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native long btBvhTriangleMeshShape_getOptimizedBvh(long jarg1, btBvhTriangleMeshShape jarg1_);
-  public final static native void btBvhTriangleMeshShape_setOptimizedBvh__SWIG_0(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2, btOptimizedBvh jarg2_, Vector3 jarg3);
-  public final static native void btBvhTriangleMeshShape_setOptimizedBvh__SWIG_1(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2, btOptimizedBvh jarg2_);
-  public final static native void btBvhTriangleMeshShape_buildOptimizedBvh(long jarg1, btBvhTriangleMeshShape jarg1_);
-  public final static native boolean btBvhTriangleMeshShape_usesQuantizedAabbCompression(long jarg1, btBvhTriangleMeshShape jarg1_);
-  public final static native void btBvhTriangleMeshShape_setTriangleInfoMap(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2, btTriangleInfoMap jarg2_);
-  public final static native long btBvhTriangleMeshShape_getTriangleInfoMap__SWIG_0(long jarg1, btBvhTriangleMeshShape jarg1_);
-  public final static native void btBvhTriangleMeshShape_serializeSingleBvh(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2);
-  public final static native void btBvhTriangleMeshShape_serializeSingleTriangleInfoMap(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2);
-  public final static native void btTriangleMeshShapeData_m_collisionShapeData_set(long jarg1, btTriangleMeshShapeData jarg1_, long jarg2, btCollisionShapeData jarg2_);
-  public final static native long btTriangleMeshShapeData_m_collisionShapeData_get(long jarg1, btTriangleMeshShapeData jarg1_);
-  public final static native void btTriangleMeshShapeData_m_meshInterface_set(long jarg1, btTriangleMeshShapeData jarg1_, long jarg2, btStridingMeshInterfaceData jarg2_);
-  public final static native long btTriangleMeshShapeData_m_meshInterface_get(long jarg1, btTriangleMeshShapeData jarg1_);
-  public final static native void btTriangleMeshShapeData_m_quantizedFloatBvh_set(long jarg1, btTriangleMeshShapeData jarg1_, long jarg2, btQuantizedBvhFloatData jarg2_);
-  public final static native long btTriangleMeshShapeData_m_quantizedFloatBvh_get(long jarg1, btTriangleMeshShapeData jarg1_);
-  public final static native void btTriangleMeshShapeData_m_quantizedDoubleBvh_set(long jarg1, btTriangleMeshShapeData jarg1_, long jarg2, btQuantizedBvhDoubleData jarg2_);
-  public final static native long btTriangleMeshShapeData_m_quantizedDoubleBvh_get(long jarg1, btTriangleMeshShapeData jarg1_);
-  public final static native void btTriangleMeshShapeData_m_triangleInfoMap_set(long jarg1, btTriangleMeshShapeData jarg1_, long jarg2, btTriangleInfoMapData jarg2_);
-  public final static native long btTriangleMeshShapeData_m_triangleInfoMap_get(long jarg1, btTriangleMeshShapeData jarg1_);
-  public final static native void btTriangleMeshShapeData_m_collisionMargin_set(long jarg1, btTriangleMeshShapeData jarg1_, float jarg2);
-  public final static native float btTriangleMeshShapeData_m_collisionMargin_get(long jarg1, btTriangleMeshShapeData jarg1_);
-  public final static native void btTriangleMeshShapeData_m_pad3_set(long jarg1, btTriangleMeshShapeData jarg1_, String jarg2);
-  public final static native String btTriangleMeshShapeData_m_pad3_get(long jarg1, btTriangleMeshShapeData jarg1_);
-  public final static native long new_btTriangleMeshShapeData();
-  public final static native void delete_btTriangleMeshShapeData(long jarg1);
-  public final static native Vector3 btBoxShape_getHalfExtentsWithMargin(long jarg1, btBoxShape jarg1_);
-  public final static native Vector3 btBoxShape_getHalfExtentsWithoutMargin(long jarg1, btBoxShape jarg1_);
-  public final static native long new_btBoxShape(Vector3 jarg1);
-  public final static native void btBoxShape_getPlaneEquation(long jarg1, btBoxShape jarg1_, long jarg2, btVector4 jarg2_, int jarg3);
-  public final static native void delete_btBoxShape(long jarg1);
-  public final static native long new_btCapsuleShape__SWIG_1(float jarg1, float jarg2);
-  public final static native int btCapsuleShape_getUpAxis(long jarg1, btCapsuleShape jarg1_);
-  public final static native float btCapsuleShape_getRadius(long jarg1, btCapsuleShape jarg1_);
-  public final static native float btCapsuleShape_getHalfHeight(long jarg1, btCapsuleShape jarg1_);
-  public final static native void delete_btCapsuleShape(long jarg1);
-  public final static native long new_btCapsuleShapeX(float jarg1, float jarg2);
-  public final static native void delete_btCapsuleShapeX(long jarg1);
-  public final static native long new_btCapsuleShapeZ(float jarg1, float jarg2);
-  public final static native void delete_btCapsuleShapeZ(long jarg1);
-  public final static native void btCapsuleShapeData_m_convexInternalShapeData_set(long jarg1, btCapsuleShapeData jarg1_, long jarg2, btConvexInternalShapeData jarg2_);
-  public final static native long btCapsuleShapeData_m_convexInternalShapeData_get(long jarg1, btCapsuleShapeData jarg1_);
-  public final static native void btCapsuleShapeData_m_upAxis_set(long jarg1, btCapsuleShapeData jarg1_, int jarg2);
-  public final static native int btCapsuleShapeData_m_upAxis_get(long jarg1, btCapsuleShapeData jarg1_);
-  public final static native void btCapsuleShapeData_m_padding_set(long jarg1, btCapsuleShapeData jarg1_, String jarg2);
-  public final static native String btCapsuleShapeData_m_padding_get(long jarg1, btCapsuleShapeData jarg1_);
-  public final static native long new_btCapsuleShapeData();
-  public final static native void delete_btCapsuleShapeData(long jarg1);
-  public final static native Vector3 btBox2dShape_getHalfExtentsWithMargin(long jarg1, btBox2dShape jarg1_);
-  public final static native Vector3 btBox2dShape_getHalfExtentsWithoutMargin(long jarg1, btBox2dShape jarg1_);
-  public final static native long new_btBox2dShape(Vector3 jarg1);
-  public final static native int btBox2dShape_getVertexCount(long jarg1, btBox2dShape jarg1_);
-  public final static native long btBox2dShape_getVertices(long jarg1, btBox2dShape jarg1_);
-  public final static native long btBox2dShape_getNormals(long jarg1, btBox2dShape jarg1_);
-  public final static native Vector3 btBox2dShape_getCentroid(long jarg1, btBox2dShape jarg1_);
-  public final static native void btBox2dShape_getPlaneEquation(long jarg1, btBox2dShape jarg1_, long jarg2, btVector4 jarg2_, int jarg3);
-  public final static native void delete_btBox2dShape(long jarg1);
-  public final static native void btTriangleShape_m_vertices1_set(long jarg1, btTriangleShape jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTriangleShape_m_vertices1_get(long jarg1, btTriangleShape jarg1_);
-  public final static native Vector3 btTriangleShape_getVertexPtr__SWIG_0(long jarg1, btTriangleShape jarg1_, int jarg2);
-  public final static native long new_btTriangleShape__SWIG_0();
-  public final static native long new_btTriangleShape__SWIG_1(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btTriangleShape_calcNormal(long jarg1, btTriangleShape jarg1_, Vector3 jarg2);
-  public final static native void btTriangleShape_getPlaneEquation(long jarg1, btTriangleShape jarg1_, int jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void delete_btTriangleShape(long jarg1);
-  public final static native long new_btShapeHull(long jarg1, btConvexShape jarg1_);
-  public final static native void delete_btShapeHull(long jarg1);
-  public final static native boolean btShapeHull_buildHull(long jarg1, btShapeHull jarg1_, float jarg2);
-  public final static native int btShapeHull_numTriangles(long jarg1, btShapeHull jarg1_);
-  public final static native int btShapeHull_numVertices(long jarg1, btShapeHull jarg1_);
-  public final static native int btShapeHull_numIndices(long jarg1, btShapeHull jarg1_);
-  public final static native long btShapeHull_getVertexPointer(long jarg1, btShapeHull jarg1_);
-  public final static native long btShapeHull_getIndexPointer(long jarg1, btShapeHull jarg1_);
-  public final static native long new_btSphereShape(float jarg1);
-  public final static native float btSphereShape_getRadius(long jarg1, btSphereShape jarg1_);
-  public final static native void btSphereShape_setUnscaledRadius(long jarg1, btSphereShape jarg1_, float jarg2);
-  public final static native void delete_btSphereShape(long jarg1);
-  public final static native long new_btMultiSphereShape(long jarg1, btVector3 jarg1_, float[] jarg2, int jarg3);
-  public final static native int btMultiSphereShape_getSphereCount(long jarg1, btMultiSphereShape jarg1_);
-  public final static native Vector3 btMultiSphereShape_getSpherePosition(long jarg1, btMultiSphereShape jarg1_, int jarg2);
-  public final static native float btMultiSphereShape_getSphereRadius(long jarg1, btMultiSphereShape jarg1_, int jarg2);
-  public final static native void delete_btMultiSphereShape(long jarg1);
-  public final static native void btPositionAndRadius_m_pos_set(long jarg1, btPositionAndRadius jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btPositionAndRadius_m_pos_get(long jarg1, btPositionAndRadius jarg1_);
-  public final static native void btPositionAndRadius_m_radius_set(long jarg1, btPositionAndRadius jarg1_, float jarg2);
-  public final static native float btPositionAndRadius_m_radius_get(long jarg1, btPositionAndRadius jarg1_);
-  public final static native long new_btPositionAndRadius();
-  public final static native void delete_btPositionAndRadius(long jarg1);
-  public final static native void btMultiSphereShapeData_m_convexInternalShapeData_set(long jarg1, btMultiSphereShapeData jarg1_, long jarg2, btConvexInternalShapeData jarg2_);
-  public final static native long btMultiSphereShapeData_m_convexInternalShapeData_get(long jarg1, btMultiSphereShapeData jarg1_);
-  public final static native void btMultiSphereShapeData_m_localPositionArrayPtr_set(long jarg1, btMultiSphereShapeData jarg1_, long jarg2, btPositionAndRadius jarg2_);
-  public final static native long btMultiSphereShapeData_m_localPositionArrayPtr_get(long jarg1, btMultiSphereShapeData jarg1_);
-  public final static native void btMultiSphereShapeData_m_localPositionArraySize_set(long jarg1, btMultiSphereShapeData jarg1_, int jarg2);
-  public final static native int btMultiSphereShapeData_m_localPositionArraySize_get(long jarg1, btMultiSphereShapeData jarg1_);
-  public final static native void btMultiSphereShapeData_m_padding_set(long jarg1, btMultiSphereShapeData jarg1_, String jarg2);
-  public final static native String btMultiSphereShapeData_m_padding_get(long jarg1, btMultiSphereShapeData jarg1_);
-  public final static native long new_btMultiSphereShapeData();
-  public final static native void delete_btMultiSphereShapeData(long jarg1);
-  public final static native void delete_btStridingMeshInterface(long jarg1);
-  public final static native void btStridingMeshInterface_InternalProcessAllTriangles(long jarg1, btStridingMeshInterface jarg1_, long jarg2, btInternalTriangleIndexCallback jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btStridingMeshInterface_calculateAabbBruteForce(long jarg1, btStridingMeshInterface jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btStridingMeshInterface_getLockedVertexIndexBase__SWIG_0(long jarg1, btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9, int jarg10);
-  public final static native void btStridingMeshInterface_getLockedVertexIndexBase__SWIG_1(long jarg1, btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9);
-  public final static native void btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_0(long jarg1, btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9, int jarg10);
-  public final static native void btStridingMeshInterface_getLockedReadOnlyVertexIndexBase__SWIG_1(long jarg1, btStridingMeshInterface jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9);
-  public final static native void btStridingMeshInterface_unLockVertexBase(long jarg1, btStridingMeshInterface jarg1_, int jarg2);
-  public final static native void btStridingMeshInterface_unLockReadOnlyVertexBase(long jarg1, btStridingMeshInterface jarg1_, int jarg2);
-  public final static native int btStridingMeshInterface_getNumSubParts(long jarg1, btStridingMeshInterface jarg1_);
-  public final static native void btStridingMeshInterface_preallocateVertices(long jarg1, btStridingMeshInterface jarg1_, int jarg2);
-  public final static native void btStridingMeshInterface_preallocateIndices(long jarg1, btStridingMeshInterface jarg1_, int jarg2);
-  public final static native boolean btStridingMeshInterface_hasPremadeAabb(long jarg1, btStridingMeshInterface jarg1_);
-  public final static native void btStridingMeshInterface_setPremadeAabb(long jarg1, btStridingMeshInterface jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btStridingMeshInterface_getPremadeAabb(long jarg1, btStridingMeshInterface jarg1_, long jarg2, btVector3 jarg2_, long jarg3, btVector3 jarg3_);
-  public final static native Vector3 btStridingMeshInterface_getScaling(long jarg1, btStridingMeshInterface jarg1_);
-  public final static native void btStridingMeshInterface_setScaling(long jarg1, btStridingMeshInterface jarg1_, Vector3 jarg2);
-  public final static native int btStridingMeshInterface_calculateSerializeBufferSize(long jarg1, btStridingMeshInterface jarg1_);
-  public final static native String btStridingMeshInterface_serialize(long jarg1, btStridingMeshInterface jarg1_, long jarg2, long jarg3);
-  public final static native void btIntIndexData_m_value_set(long jarg1, btIntIndexData jarg1_, int jarg2);
-  public final static native int btIntIndexData_m_value_get(long jarg1, btIntIndexData jarg1_);
-  public final static native long new_btIntIndexData();
-  public final static native void delete_btIntIndexData(long jarg1);
-  public final static native void btShortIntIndexData_m_value_set(long jarg1, btShortIntIndexData jarg1_, short jarg2);
-  public final static native short btShortIntIndexData_m_value_get(long jarg1, btShortIntIndexData jarg1_);
-  public final static native void btShortIntIndexData_m_pad_set(long jarg1, btShortIntIndexData jarg1_, String jarg2);
-  public final static native String btShortIntIndexData_m_pad_get(long jarg1, btShortIntIndexData jarg1_);
-  public final static native long new_btShortIntIndexData();
-  public final static native void delete_btShortIntIndexData(long jarg1);
-  public final static native void btShortIntIndexTripletData_m_values_set(long jarg1, btShortIntIndexTripletData jarg1_, short[] jarg2);
-  public final static native short[] btShortIntIndexTripletData_m_values_get(long jarg1, btShortIntIndexTripletData jarg1_);
-  public final static native void btShortIntIndexTripletData_m_pad_set(long jarg1, btShortIntIndexTripletData jarg1_, String jarg2);
-  public final static native String btShortIntIndexTripletData_m_pad_get(long jarg1, btShortIntIndexTripletData jarg1_);
-  public final static native long new_btShortIntIndexTripletData();
-  public final static native void delete_btShortIntIndexTripletData(long jarg1);
-  public final static native void btCharIndexTripletData_m_values_set(long jarg1, btCharIndexTripletData jarg1_, short[] jarg2);
-  public final static native short[] btCharIndexTripletData_m_values_get(long jarg1, btCharIndexTripletData jarg1_);
-  public final static native void btCharIndexTripletData_m_pad_set(long jarg1, btCharIndexTripletData jarg1_, char jarg2);
-  public final static native char btCharIndexTripletData_m_pad_get(long jarg1, btCharIndexTripletData jarg1_);
-  public final static native long new_btCharIndexTripletData();
-  public final static native void delete_btCharIndexTripletData(long jarg1);
-  public final static native void btMeshPartData_m_vertices3f_set(long jarg1, btMeshPartData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btMeshPartData_m_vertices3f_get(long jarg1, btMeshPartData jarg1_);
-  public final static native void btMeshPartData_m_vertices3d_set(long jarg1, btMeshPartData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btMeshPartData_m_vertices3d_get(long jarg1, btMeshPartData jarg1_);
-  public final static native void btMeshPartData_m_indices32_set(long jarg1, btMeshPartData jarg1_, long jarg2, btIntIndexData jarg2_);
-  public final static native long btMeshPartData_m_indices32_get(long jarg1, btMeshPartData jarg1_);
-  public final static native void btMeshPartData_m_3indices16_set(long jarg1, btMeshPartData jarg1_, long jarg2, btShortIntIndexTripletData jarg2_);
-  public final static native long btMeshPartData_m_3indices16_get(long jarg1, btMeshPartData jarg1_);
-  public final static native void btMeshPartData_m_3indices8_set(long jarg1, btMeshPartData jarg1_, long jarg2, btCharIndexTripletData jarg2_);
-  public final static native long btMeshPartData_m_3indices8_get(long jarg1, btMeshPartData jarg1_);
-  public final static native void btMeshPartData_m_indices16_set(long jarg1, btMeshPartData jarg1_, long jarg2, btShortIntIndexData jarg2_);
-  public final static native long btMeshPartData_m_indices16_get(long jarg1, btMeshPartData jarg1_);
-  public final static native void btMeshPartData_m_numTriangles_set(long jarg1, btMeshPartData jarg1_, int jarg2);
-  public final static native int btMeshPartData_m_numTriangles_get(long jarg1, btMeshPartData jarg1_);
-  public final static native void btMeshPartData_m_numVertices_set(long jarg1, btMeshPartData jarg1_, int jarg2);
-  public final static native int btMeshPartData_m_numVertices_get(long jarg1, btMeshPartData jarg1_);
-  public final static native long new_btMeshPartData();
-  public final static native void delete_btMeshPartData(long jarg1);
-  public final static native void btStridingMeshInterfaceData_m_meshPartsPtr_set(long jarg1, btStridingMeshInterfaceData jarg1_, long jarg2, btMeshPartData jarg2_);
-  public final static native long btStridingMeshInterfaceData_m_meshPartsPtr_get(long jarg1, btStridingMeshInterfaceData jarg1_);
-  public final static native void btStridingMeshInterfaceData_m_scaling_set(long jarg1, btStridingMeshInterfaceData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btStridingMeshInterfaceData_m_scaling_get(long jarg1, btStridingMeshInterfaceData jarg1_);
-  public final static native void btStridingMeshInterfaceData_m_numMeshParts_set(long jarg1, btStridingMeshInterfaceData jarg1_, int jarg2);
-  public final static native int btStridingMeshInterfaceData_m_numMeshParts_get(long jarg1, btStridingMeshInterfaceData jarg1_);
-  public final static native void btStridingMeshInterfaceData_m_padding_set(long jarg1, btStridingMeshInterfaceData jarg1_, String jarg2);
-  public final static native String btStridingMeshInterfaceData_m_padding_get(long jarg1, btStridingMeshInterfaceData jarg1_);
-  public final static native long new_btStridingMeshInterfaceData();
-  public final static native void delete_btStridingMeshInterfaceData(long jarg1);
-  public final static native long new_btMinkowskiSumShape(long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_);
-  public final static native void btMinkowskiSumShape_setTransformA(long jarg1, btMinkowskiSumShape jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btMinkowskiSumShape_setTransformB(long jarg1, btMinkowskiSumShape jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btMinkowskiSumShape_getTransformA(long jarg1, btMinkowskiSumShape jarg1_);
-  public final static native long btMinkowskiSumShape_GetTransformB(long jarg1, btMinkowskiSumShape jarg1_);
-  public final static native long btMinkowskiSumShape_getShapeA(long jarg1, btMinkowskiSumShape jarg1_);
-  public final static native long btMinkowskiSumShape_getShapeB(long jarg1, btMinkowskiSumShape jarg1_);
-  public final static native void delete_btMinkowskiSumShape(long jarg1);
-  public final static native void btFace_m_indices_set(long jarg1, btFace jarg1_, long jarg2);
-  public final static native long btFace_m_indices_get(long jarg1, btFace jarg1_);
-  public final static native void btFace_m_plane_set(long jarg1, btFace jarg1_, float[] jarg2);
-  public final static native float[] btFace_m_plane_get(long jarg1, btFace jarg1_);
-  public final static native long new_btFace();
-  public final static native void delete_btFace(long jarg1);
-  public final static native long new_btConvexPolyhedron();
-  public final static native void delete_btConvexPolyhedron(long jarg1);
-  public final static native void btConvexPolyhedron_m_vertices_set(long jarg1, btConvexPolyhedron jarg1_, long jarg2);
-  public final static native long btConvexPolyhedron_m_vertices_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_m_faces_set(long jarg1, btConvexPolyhedron jarg1_, long jarg2);
-  public final static native long btConvexPolyhedron_m_faces_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_m_uniqueEdges_set(long jarg1, btConvexPolyhedron jarg1_, long jarg2);
-  public final static native long btConvexPolyhedron_m_uniqueEdges_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_m_localCenter_set(long jarg1, btConvexPolyhedron jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btConvexPolyhedron_m_localCenter_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_m_extents_set(long jarg1, btConvexPolyhedron jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btConvexPolyhedron_m_extents_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_m_radius_set(long jarg1, btConvexPolyhedron jarg1_, float jarg2);
-  public final static native float btConvexPolyhedron_m_radius_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_mC_set(long jarg1, btConvexPolyhedron jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btConvexPolyhedron_mC_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_mE_set(long jarg1, btConvexPolyhedron jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btConvexPolyhedron_mE_get(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_initialize(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native boolean btConvexPolyhedron_testContainment(long jarg1, btConvexPolyhedron jarg1_);
-  public final static native void btConvexPolyhedron_project(long jarg1, btConvexPolyhedron jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, long jarg4, long jarg5);
-  public final static native long new_btOptimizedBvh();
-  public final static native void delete_btOptimizedBvh(long jarg1);
-  public final static native void btOptimizedBvh_build(long jarg1, btOptimizedBvh jarg1_, long jarg2, btStridingMeshInterface jarg2_, boolean jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native void btOptimizedBvh_refit(long jarg1, btOptimizedBvh jarg1_, long jarg2, btStridingMeshInterface jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btOptimizedBvh_refitPartial(long jarg1, btOptimizedBvh jarg1_, long jarg2, btStridingMeshInterface jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btOptimizedBvh_updateBvhNodes(long jarg1, btOptimizedBvh jarg1_, long jarg2, btStridingMeshInterface jarg2_, int jarg3, int jarg4, int jarg5);
-  public final static native boolean btOptimizedBvh_serializeInPlace(long jarg1, btOptimizedBvh jarg1_, long jarg2, long jarg3, boolean jarg4);
-  public final static native long btOptimizedBvh_deSerializeInPlace(long jarg1, long jarg2, boolean jarg3);
-  public final static native void btTriangle_m_vertex0_set(long jarg1, btTriangle jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTriangle_m_vertex0_get(long jarg1, btTriangle jarg1_);
-  public final static native void btTriangle_m_vertex1_set(long jarg1, btTriangle jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTriangle_m_vertex1_get(long jarg1, btTriangle jarg1_);
-  public final static native void btTriangle_m_vertex2_set(long jarg1, btTriangle jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTriangle_m_vertex2_get(long jarg1, btTriangle jarg1_);
-  public final static native void btTriangle_m_partId_set(long jarg1, btTriangle jarg1_, int jarg2);
-  public final static native int btTriangle_m_partId_get(long jarg1, btTriangle jarg1_);
-  public final static native void btTriangle_m_triangleIndex_set(long jarg1, btTriangle jarg1_, int jarg2);
-  public final static native int btTriangle_m_triangleIndex_get(long jarg1, btTriangle jarg1_);
-  public final static native long new_btTriangle();
-  public final static native void delete_btTriangle(long jarg1);
-  public final static native int btTriangleBuffer_getNumTriangles(long jarg1, btTriangleBuffer jarg1_);
-  public final static native long btTriangleBuffer_getTriangle(long jarg1, btTriangleBuffer jarg1_, int jarg2);
-  public final static native void btTriangleBuffer_clearBuffer(long jarg1, btTriangleBuffer jarg1_);
-  public final static native long new_btTriangleBuffer();
-  public final static native void delete_btTriangleBuffer(long jarg1);
-  public final static native void btIndexedMesh_m_numTriangles_set(long jarg1, btIndexedMesh jarg1_, int jarg2);
-  public final static native int btIndexedMesh_m_numTriangles_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native void btIndexedMesh_m_triangleIndexBase_set(long jarg1, btIndexedMesh jarg1_, long jarg2);
-  public final static native long btIndexedMesh_m_triangleIndexBase_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native void btIndexedMesh_m_triangleIndexStride_set(long jarg1, btIndexedMesh jarg1_, int jarg2);
-  public final static native int btIndexedMesh_m_triangleIndexStride_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native void btIndexedMesh_m_numVertices_set(long jarg1, btIndexedMesh jarg1_, int jarg2);
-  public final static native int btIndexedMesh_m_numVertices_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native void btIndexedMesh_m_vertexBase_set(long jarg1, btIndexedMesh jarg1_, long jarg2);
-  public final static native long btIndexedMesh_m_vertexBase_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native void btIndexedMesh_m_vertexStride_set(long jarg1, btIndexedMesh jarg1_, int jarg2);
-  public final static native int btIndexedMesh_m_vertexStride_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native void btIndexedMesh_m_indexType_set(long jarg1, btIndexedMesh jarg1_, int jarg2);
-  public final static native int btIndexedMesh_m_indexType_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native void btIndexedMesh_m_vertexType_set(long jarg1, btIndexedMesh jarg1_, int jarg2);
-  public final static native int btIndexedMesh_m_vertexType_get(long jarg1, btIndexedMesh jarg1_);
-  public final static native long new_btIndexedMesh();
-  public final static native void delete_btIndexedMesh(long jarg1);
-  public final static native long new_btTriangleIndexVertexArray__SWIG_0();
-  public final static native void delete_btTriangleIndexVertexArray(long jarg1);
-  public final static native long new_btTriangleIndexVertexArray__SWIG_1(int jarg1, long jarg2, int jarg3, int jarg4, float[] jarg5, int jarg6);
-  public final static native void btTriangleIndexVertexArray_addIndexedMesh__SWIG_0(long jarg1, btTriangleIndexVertexArray jarg1_, long jarg2, btIndexedMesh jarg2_, int jarg3);
-  public final static native void btTriangleIndexVertexArray_addIndexedMesh__SWIG_1(long jarg1, btTriangleIndexVertexArray jarg1_, long jarg2, btIndexedMesh jarg2_);
-  public final static native void btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_0(long jarg1, btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9, int jarg10);
-  public final static native void btTriangleIndexVertexArray_getLockedVertexIndexBase__SWIG_1(long jarg1, btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9);
-  public final static native void btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_0(long jarg1, btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9, int jarg10);
-  public final static native void btTriangleIndexVertexArray_getLockedReadOnlyVertexIndexBase__SWIG_1(long jarg1, btTriangleIndexVertexArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9);
-  public final static native long btTriangleIndexVertexArray_getIndexedMeshArray__SWIG_0(long jarg1, btTriangleIndexVertexArray jarg1_);
-  public final static native void btMaterial_m_friction_set(long jarg1, btMaterial jarg1_, float jarg2);
-  public final static native float btMaterial_m_friction_get(long jarg1, btMaterial jarg1_);
-  public final static native void btMaterial_m_restitution_set(long jarg1, btMaterial jarg1_, float jarg2);
-  public final static native float btMaterial_m_restitution_get(long jarg1, btMaterial jarg1_);
-  public final static native void btMaterial_pad_set(long jarg1, btMaterial jarg1_, int[] jarg2);
-  public final static native int[] btMaterial_pad_get(long jarg1, btMaterial jarg1_);
-  public final static native long new_btMaterial__SWIG_0();
-  public final static native long new_btMaterial__SWIG_1(float jarg1, float jarg2);
-  public final static native void delete_btMaterial(long jarg1);
-  public final static native long new_btScaledBvhTriangleMeshShape(long jarg1, btBvhTriangleMeshShape jarg1_, Vector3 jarg2);
-  public final static native void delete_btScaledBvhTriangleMeshShape(long jarg1);
-  public final static native long btScaledBvhTriangleMeshShape_getChildShape__SWIG_0(long jarg1, btScaledBvhTriangleMeshShape jarg1_);
-  public final static native void btScaledTriangleMeshShapeData_m_trimeshShapeData_set(long jarg1, btScaledTriangleMeshShapeData jarg1_, long jarg2, btTriangleMeshShapeData jarg2_);
-  public final static native long btScaledTriangleMeshShapeData_m_trimeshShapeData_get(long jarg1, btScaledTriangleMeshShapeData jarg1_);
-  public final static native void btScaledTriangleMeshShapeData_m_localScaling_set(long jarg1, btScaledTriangleMeshShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btScaledTriangleMeshShapeData_m_localScaling_get(long jarg1, btScaledTriangleMeshShapeData jarg1_);
-  public final static native long new_btScaledTriangleMeshShapeData();
-  public final static native void delete_btScaledTriangleMeshShapeData(long jarg1);
-  public final static native long new_btConvexHullShape__SWIG_0(float[] jarg1, int jarg2, int jarg3);
-  public final static native long new_btConvexHullShape__SWIG_1(float[] jarg1, int jarg2);
-  public final static native long new_btConvexHullShape__SWIG_2(float[] jarg1);
-  public final static native long new_btConvexHullShape__SWIG_3();
-  public final static native void btConvexHullShape_addPoint(long jarg1, btConvexHullShape jarg1_, Vector3 jarg2);
-  public final static native long btConvexHullShape_getUnscaledPoints__SWIG_0(long jarg1, btConvexHullShape jarg1_);
-  public final static native long btConvexHullShape_getPoints(long jarg1, btConvexHullShape jarg1_);
-  public final static native Vector3 btConvexHullShape_getScaledPoint(long jarg1, btConvexHullShape jarg1_, int jarg2);
-  public final static native int btConvexHullShape_getNumPoints(long jarg1, btConvexHullShape jarg1_);
-  public final static native void delete_btConvexHullShape(long jarg1);
-  public final static native void btConvexHullShapeData_m_convexInternalShapeData_set(long jarg1, btConvexHullShapeData jarg1_, long jarg2, btConvexInternalShapeData jarg2_);
-  public final static native long btConvexHullShapeData_m_convexInternalShapeData_get(long jarg1, btConvexHullShapeData jarg1_);
-  public final static native void btConvexHullShapeData_m_unscaledPointsFloatPtr_set(long jarg1, btConvexHullShapeData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btConvexHullShapeData_m_unscaledPointsFloatPtr_get(long jarg1, btConvexHullShapeData jarg1_);
-  public final static native void btConvexHullShapeData_m_unscaledPointsDoublePtr_set(long jarg1, btConvexHullShapeData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btConvexHullShapeData_m_unscaledPointsDoublePtr_get(long jarg1, btConvexHullShapeData jarg1_);
-  public final static native void btConvexHullShapeData_m_numUnscaledPoints_set(long jarg1, btConvexHullShapeData jarg1_, int jarg2);
-  public final static native int btConvexHullShapeData_m_numUnscaledPoints_get(long jarg1, btConvexHullShapeData jarg1_);
-  public final static native void btConvexHullShapeData_m_padding3_set(long jarg1, btConvexHullShapeData jarg1_, String jarg2);
-  public final static native String btConvexHullShapeData_m_padding3_get(long jarg1, btConvexHullShapeData jarg1_);
-  public final static native long new_btConvexHullShapeData();
-  public final static native void delete_btConvexHullShapeData(long jarg1);
-  public final static native void btMaterialProperties_m_numMaterials_set(long jarg1, btMaterialProperties jarg1_, int jarg2);
-  public final static native int btMaterialProperties_m_numMaterials_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native void btMaterialProperties_m_materialBase_set(long jarg1, btMaterialProperties jarg1_, long jarg2);
-  public final static native long btMaterialProperties_m_materialBase_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native void btMaterialProperties_m_materialStride_set(long jarg1, btMaterialProperties jarg1_, int jarg2);
-  public final static native int btMaterialProperties_m_materialStride_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native void btMaterialProperties_m_materialType_set(long jarg1, btMaterialProperties jarg1_, int jarg2);
-  public final static native int btMaterialProperties_m_materialType_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native void btMaterialProperties_m_numTriangles_set(long jarg1, btMaterialProperties jarg1_, int jarg2);
-  public final static native int btMaterialProperties_m_numTriangles_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native void btMaterialProperties_m_triangleMaterialsBase_set(long jarg1, btMaterialProperties jarg1_, long jarg2);
-  public final static native long btMaterialProperties_m_triangleMaterialsBase_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native void btMaterialProperties_m_triangleMaterialStride_set(long jarg1, btMaterialProperties jarg1_, int jarg2);
-  public final static native int btMaterialProperties_m_triangleMaterialStride_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native void btMaterialProperties_m_triangleType_set(long jarg1, btMaterialProperties jarg1_, int jarg2);
-  public final static native int btMaterialProperties_m_triangleType_get(long jarg1, btMaterialProperties jarg1_);
-  public final static native long new_btMaterialProperties();
-  public final static native void delete_btMaterialProperties(long jarg1);
-  public final static native long new_btTriangleIndexVertexMaterialArray__SWIG_0();
-  public final static native long new_btTriangleIndexVertexMaterialArray__SWIG_1(int jarg1, long jarg2, int jarg3, int jarg4, float[] jarg5, int jarg6, int jarg7, long jarg8, int jarg9, long jarg10, int jarg11);
-  public final static native void delete_btTriangleIndexVertexMaterialArray(long jarg1);
-  public final static native void btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_0(long jarg1, btTriangleIndexVertexMaterialArray jarg1_, long jarg2, btMaterialProperties jarg2_, int jarg3);
-  public final static native void btTriangleIndexVertexMaterialArray_addMaterialProperties__SWIG_1(long jarg1, btTriangleIndexVertexMaterialArray jarg1_, long jarg2, btMaterialProperties jarg2_);
-  public final static native void btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_0(long jarg1, btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9, int jarg10);
-  public final static native void btTriangleIndexVertexMaterialArray_getLockedMaterialBase__SWIG_1(long jarg1, btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9);
-  public final static native void btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_0(long jarg1, btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9, int jarg10);
-  public final static native void btTriangleIndexVertexMaterialArray_getLockedReadOnlyMaterialBase__SWIG_1(long jarg1, btTriangleIndexVertexMaterialArray jarg1_, long jarg2, long jarg3, long jarg4, long jarg5, long jarg6, long jarg7, long jarg8, long jarg9);
-  public final static native Vector3 btCylinderShape_getHalfExtentsWithMargin(long jarg1, btCylinderShape jarg1_);
-  public final static native Vector3 btCylinderShape_getHalfExtentsWithoutMargin(long jarg1, btCylinderShape jarg1_);
-  public final static native long new_btCylinderShape(Vector3 jarg1);
-  public final static native int btCylinderShape_getUpAxis(long jarg1, btCylinderShape jarg1_);
-  public final static native float btCylinderShape_getRadius(long jarg1, btCylinderShape jarg1_);
-  public final static native void delete_btCylinderShape(long jarg1);
-  public final static native long new_btCylinderShapeX(Vector3 jarg1);
-  public final static native void delete_btCylinderShapeX(long jarg1);
-  public final static native long new_btCylinderShapeZ(Vector3 jarg1);
-  public final static native void delete_btCylinderShapeZ(long jarg1);
-  public final static native void btCylinderShapeData_m_convexInternalShapeData_set(long jarg1, btCylinderShapeData jarg1_, long jarg2, btConvexInternalShapeData jarg2_);
-  public final static native long btCylinderShapeData_m_convexInternalShapeData_get(long jarg1, btCylinderShapeData jarg1_);
-  public final static native void btCylinderShapeData_m_upAxis_set(long jarg1, btCylinderShapeData jarg1_, int jarg2);
-  public final static native int btCylinderShapeData_m_upAxis_get(long jarg1, btCylinderShapeData jarg1_);
-  public final static native void btCylinderShapeData_m_padding_set(long jarg1, btCylinderShapeData jarg1_, String jarg2);
-  public final static native String btCylinderShapeData_m_padding_get(long jarg1, btCylinderShapeData jarg1_);
-  public final static native long new_btCylinderShapeData();
-  public final static native void delete_btCylinderShapeData(long jarg1);
-  public final static native void btTriangleMesh_m_weldingThreshold_set(long jarg1, btTriangleMesh jarg1_, float jarg2);
-  public final static native float btTriangleMesh_m_weldingThreshold_get(long jarg1, btTriangleMesh jarg1_);
-  public final static native long new_btTriangleMesh__SWIG_0(boolean jarg1, boolean jarg2);
-  public final static native long new_btTriangleMesh__SWIG_1(boolean jarg1);
-  public final static native long new_btTriangleMesh__SWIG_2();
-  public final static native boolean btTriangleMesh_getUse32bitIndices(long jarg1, btTriangleMesh jarg1_);
-  public final static native boolean btTriangleMesh_getUse4componentVertices(long jarg1, btTriangleMesh jarg1_);
-  public final static native void btTriangleMesh_addTriangle__SWIG_0(long jarg1, btTriangleMesh jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, boolean jarg5);
-  public final static native void btTriangleMesh_addTriangle__SWIG_1(long jarg1, btTriangleMesh jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native int btTriangleMesh_getNumTriangles(long jarg1, btTriangleMesh jarg1_);
-  public final static native int btTriangleMesh_findOrAddVertex(long jarg1, btTriangleMesh jarg1_, Vector3 jarg2, boolean jarg3);
-  public final static native void btTriangleMesh_addIndex(long jarg1, btTriangleMesh jarg1_, int jarg2);
-  public final static native void delete_btTriangleMesh(long jarg1);
-  public final static native long new_btConeShape(float jarg1, float jarg2);
-  public final static native float btConeShape_getRadius(long jarg1, btConeShape jarg1_);
-  public final static native float btConeShape_getHeight(long jarg1, btConeShape jarg1_);
-  public final static native void btConeShape_setConeUpIndex(long jarg1, btConeShape jarg1_, int jarg2);
-  public final static native int btConeShape_getConeUpIndex(long jarg1, btConeShape jarg1_);
-  public final static native void delete_btConeShape(long jarg1);
-  public final static native long new_btConeShapeX(float jarg1, float jarg2);
-  public final static native void delete_btConeShapeX(long jarg1);
-  public final static native long new_btConeShapeZ(float jarg1, float jarg2);
-  public final static native void delete_btConeShapeZ(long jarg1);
-  public final static native long new_btConvexTriangleMeshShape__SWIG_0(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2);
-  public final static native long new_btConvexTriangleMeshShape__SWIG_1(long jarg1, btStridingMeshInterface jarg1_);
-  public final static native long btConvexTriangleMeshShape_getMeshInterface__SWIG_0(long jarg1, btConvexTriangleMeshShape jarg1_);
-  public final static native void btConvexTriangleMeshShape_calculatePrincipalAxisTransform(long jarg1, btConvexTriangleMeshShape jarg1_, long jarg2, btTransform jarg2_, Vector3 jarg3, long jarg4);
-  public final static native void delete_btConvexTriangleMeshShape(long jarg1);
-  public final static native long new_btEmptyShape();
-  public final static native void delete_btEmptyShape(long jarg1);
-  public final static native long new_btMultimaterialTriangleMeshShape__SWIG_0(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2, boolean jarg3);
-  public final static native long new_btMultimaterialTriangleMeshShape__SWIG_1(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2);
-  public final static native long new_btMultimaterialTriangleMeshShape__SWIG_2(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2, Vector3 jarg3, Vector3 jarg4, boolean jarg5);
-  public final static native long new_btMultimaterialTriangleMeshShape__SWIG_3(long jarg1, btStridingMeshInterface jarg1_, boolean jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void delete_btMultimaterialTriangleMeshShape(long jarg1);
-  public final static native long btMultimaterialTriangleMeshShape_getMaterialProperties(long jarg1, btMultimaterialTriangleMeshShape jarg1_, int jarg2, int jarg3);
-  public final static native long new_btBU_Simplex1to4__SWIG_0();
-  public final static native long new_btBU_Simplex1to4__SWIG_1(Vector3 jarg1);
-  public final static native long new_btBU_Simplex1to4__SWIG_2(Vector3 jarg1, Vector3 jarg2);
-  public final static native long new_btBU_Simplex1to4__SWIG_3(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3);
-  public final static native long new_btBU_Simplex1to4__SWIG_4(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btBU_Simplex1to4_reset(long jarg1, btBU_Simplex1to4 jarg1_);
-  public final static native void btBU_Simplex1to4_addVertex(long jarg1, btBU_Simplex1to4 jarg1_, Vector3 jarg2);
-  public final static native int btBU_Simplex1to4_getIndex(long jarg1, btBU_Simplex1to4 jarg1_, int jarg2);
-  public final static native void delete_btBU_Simplex1to4(long jarg1);
-  public final static native long new_btUniformScalingShape(long jarg1, btConvexShape jarg1_, float jarg2);
-  public final static native void delete_btUniformScalingShape(long jarg1);
-  public final static native float btUniformScalingShape_getUniformScalingFactor(long jarg1, btUniformScalingShape jarg1_);
-  public final static native long btUniformScalingShape_getChildShape__SWIG_0(long jarg1, btUniformScalingShape jarg1_);
-  public final static native void btCompoundShapeChild_m_transform_set(long jarg1, btCompoundShapeChild jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btCompoundShapeChild_m_transform_get(long jarg1, btCompoundShapeChild jarg1_);
-  public final static native void btCompoundShapeChild_m_childShape_set(long jarg1, btCompoundShapeChild jarg1_, long jarg2, btCollisionShape jarg2_);
-  public final static native long btCompoundShapeChild_m_childShape_get(long jarg1, btCompoundShapeChild jarg1_);
-  public final static native void btCompoundShapeChild_m_childShapeType_set(long jarg1, btCompoundShapeChild jarg1_, int jarg2);
-  public final static native int btCompoundShapeChild_m_childShapeType_get(long jarg1, btCompoundShapeChild jarg1_);
-  public final static native void btCompoundShapeChild_m_childMargin_set(long jarg1, btCompoundShapeChild jarg1_, float jarg2);
-  public final static native float btCompoundShapeChild_m_childMargin_get(long jarg1, btCompoundShapeChild jarg1_);
-  public final static native void btCompoundShapeChild_m_node_set(long jarg1, btCompoundShapeChild jarg1_, long jarg2, btDbvtNode jarg2_);
-  public final static native long btCompoundShapeChild_m_node_get(long jarg1, btCompoundShapeChild jarg1_);
-  public final static native long new_btCompoundShapeChild();
-  public final static native void delete_btCompoundShapeChild(long jarg1);
-  public final static native long new_btCompoundShape__SWIG_0(boolean jarg1);
-  public final static native long new_btCompoundShape__SWIG_1();
-  public final static native void delete_btCompoundShape(long jarg1);
-  public final static native void btCompoundShape_addChildShape(long jarg1, btCompoundShape jarg1_, long jarg2, btTransform jarg2_, long jarg3, btCollisionShape jarg3_);
-  public final static native void btCompoundShape_removeChildShape(long jarg1, btCompoundShape jarg1_, long jarg2, btCollisionShape jarg2_);
-  public final static native void btCompoundShape_removeChildShapeByIndex(long jarg1, btCompoundShape jarg1_, int jarg2);
-  public final static native int btCompoundShape_getNumChildShapes(long jarg1, btCompoundShape jarg1_);
-  public final static native long btCompoundShape_getChildShape__SWIG_0(long jarg1, btCompoundShape jarg1_, int jarg2);
-  public final static native long btCompoundShape_getChildTransform__SWIG_0(long jarg1, btCompoundShape jarg1_, int jarg2);
-  public final static native void btCompoundShape_updateChildTransform__SWIG_0(long jarg1, btCompoundShape jarg1_, int jarg2, long jarg3, btTransform jarg3_, boolean jarg4);
-  public final static native void btCompoundShape_updateChildTransform__SWIG_1(long jarg1, btCompoundShape jarg1_, int jarg2, long jarg3, btTransform jarg3_);
-  public final static native long btCompoundShape_getChildList(long jarg1, btCompoundShape jarg1_);
-  public final static native void btCompoundShape_recalculateLocalAabb(long jarg1, btCompoundShape jarg1_);
-  public final static native long btCompoundShape_getDynamicAabbTree__SWIG_0(long jarg1, btCompoundShape jarg1_);
-  public final static native void btCompoundShape_createAabbTreeFromChildren(long jarg1, btCompoundShape jarg1_);
-  public final static native void btCompoundShape_calculatePrincipalAxisTransform(long jarg1, btCompoundShape jarg1_, float[] jarg2, long jarg3, btTransform jarg3_, Vector3 jarg4);
-  public final static native int btCompoundShape_getUpdateRevision(long jarg1, btCompoundShape jarg1_);
-  public final static native void btCompoundShapeChildData_m_transform_set(long jarg1, btCompoundShapeChildData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btCompoundShapeChildData_m_transform_get(long jarg1, btCompoundShapeChildData jarg1_);
-  public final static native void btCompoundShapeChildData_m_childShape_set(long jarg1, btCompoundShapeChildData jarg1_, long jarg2, btCollisionShapeData jarg2_);
-  public final static native long btCompoundShapeChildData_m_childShape_get(long jarg1, btCompoundShapeChildData jarg1_);
-  public final static native void btCompoundShapeChildData_m_childShapeType_set(long jarg1, btCompoundShapeChildData jarg1_, int jarg2);
-  public final static native int btCompoundShapeChildData_m_childShapeType_get(long jarg1, btCompoundShapeChildData jarg1_);
-  public final static native void btCompoundShapeChildData_m_childMargin_set(long jarg1, btCompoundShapeChildData jarg1_, float jarg2);
-  public final static native float btCompoundShapeChildData_m_childMargin_get(long jarg1, btCompoundShapeChildData jarg1_);
-  public final static native long new_btCompoundShapeChildData();
-  public final static native void delete_btCompoundShapeChildData(long jarg1);
-  public final static native void btCompoundShapeData_m_collisionShapeData_set(long jarg1, btCompoundShapeData jarg1_, long jarg2, btCollisionShapeData jarg2_);
-  public final static native long btCompoundShapeData_m_collisionShapeData_get(long jarg1, btCompoundShapeData jarg1_);
-  public final static native void btCompoundShapeData_m_childShapePtr_set(long jarg1, btCompoundShapeData jarg1_, long jarg2, btCompoundShapeChildData jarg2_);
-  public final static native long btCompoundShapeData_m_childShapePtr_get(long jarg1, btCompoundShapeData jarg1_);
-  public final static native void btCompoundShapeData_m_numChildShapes_set(long jarg1, btCompoundShapeData jarg1_, int jarg2);
-  public final static native int btCompoundShapeData_m_numChildShapes_get(long jarg1, btCompoundShapeData jarg1_);
-  public final static native void btCompoundShapeData_m_collisionMargin_set(long jarg1, btCompoundShapeData jarg1_, float jarg2);
-  public final static native float btCompoundShapeData_m_collisionMargin_get(long jarg1, btCompoundShapeData jarg1_);
-  public final static native long new_btCompoundShapeData();
-  public final static native void delete_btCompoundShapeData(long jarg1);
-  public final static native long new_btConvexPointCloudShape__SWIG_0();
-  public final static native long new_btConvexPointCloudShape__SWIG_1(long jarg1, btVector3 jarg1_, int jarg2, Vector3 jarg3, boolean jarg4);
-  public final static native long new_btConvexPointCloudShape__SWIG_2(long jarg1, btVector3 jarg1_, int jarg2, Vector3 jarg3);
-  public final static native void btConvexPointCloudShape_setPoints__SWIG_0(long jarg1, btConvexPointCloudShape jarg1_, long jarg2, btVector3 jarg2_, int jarg3, boolean jarg4, Vector3 jarg5);
-  public final static native void btConvexPointCloudShape_setPoints__SWIG_1(long jarg1, btConvexPointCloudShape jarg1_, long jarg2, btVector3 jarg2_, int jarg3, boolean jarg4);
-  public final static native void btConvexPointCloudShape_setPoints__SWIG_2(long jarg1, btConvexPointCloudShape jarg1_, long jarg2, btVector3 jarg2_, int jarg3);
-  public final static native long btConvexPointCloudShape_getUnscaledPoints__SWIG_0(long jarg1, btConvexPointCloudShape jarg1_);
-  public final static native int btConvexPointCloudShape_getNumPoints(long jarg1, btConvexPointCloudShape jarg1_);
-  public final static native Vector3 btConvexPointCloudShape_getScaledPoint(long jarg1, btConvexPointCloudShape jarg1_, int jarg2);
-  public final static native void delete_btConvexPointCloudShape(long jarg1);
-  public final static native long new_btConvex2dShape(long jarg1, btConvexShape jarg1_);
-  public final static native void delete_btConvex2dShape(long jarg1);
-  public final static native long btConvex2dShape_getChildShape__SWIG_0(long jarg1, btConvex2dShape jarg1_);
-  public final static native boolean btCollisionObject_mergesSimulationIslands(long jarg1, btCollisionObject jarg1_);
-  public final static native Vector3 btCollisionObject_getAnisotropicFriction__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setAnisotropicFriction(long jarg1, btCollisionObject jarg1_, Vector3 jarg2);
-  public final static native boolean btCollisionObject_hasAnisotropicFriction(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setContactProcessingThreshold(long jarg1, btCollisionObject jarg1_, float jarg2);
-  public final static native float btCollisionObject_getContactProcessingThreshold(long jarg1, btCollisionObject jarg1_);
-  public final static native boolean btCollisionObject_isStaticObject(long jarg1, btCollisionObject jarg1_);
-  public final static native boolean btCollisionObject_isKinematicObject(long jarg1, btCollisionObject jarg1_);
-  public final static native boolean btCollisionObject_isStaticOrKinematicObject(long jarg1, btCollisionObject jarg1_);
-  public final static native boolean btCollisionObject_hasContactResponse(long jarg1, btCollisionObject jarg1_);
-  public final static native long new_btCollisionObject();
-  public final static native void delete_btCollisionObject(long jarg1);
-  public final static native void btCollisionObject_setCollisionShape(long jarg1, btCollisionObject jarg1_, long jarg2, btCollisionShape jarg2_);
-  public final static native long btCollisionObject_getCollisionShape__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native long btCollisionObject_getRootCollisionShape__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_internalSetTemporaryCollisionShape(long jarg1, btCollisionObject jarg1_, long jarg2, btCollisionShape jarg2_);
-  public final static native long btCollisionObject_internalGetExtensionPointer(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_internalSetExtensionPointer(long jarg1, btCollisionObject jarg1_, long jarg2);
-  public final static native int btCollisionObject_getActivationState(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setActivationState(long jarg1, btCollisionObject jarg1_, int jarg2);
-  public final static native void btCollisionObject_setDeactivationTime(long jarg1, btCollisionObject jarg1_, float jarg2);
-  public final static native float btCollisionObject_getDeactivationTime(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_forceActivationState(long jarg1, btCollisionObject jarg1_, int jarg2);
-  public final static native void btCollisionObject_activate__SWIG_0(long jarg1, btCollisionObject jarg1_, boolean jarg2);
-  public final static native void btCollisionObject_activate__SWIG_1(long jarg1, btCollisionObject jarg1_);
-  public final static native boolean btCollisionObject_isActive(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setRestitution(long jarg1, btCollisionObject jarg1_, float jarg2);
-  public final static native float btCollisionObject_getRestitution(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setFriction(long jarg1, btCollisionObject jarg1_, float jarg2);
-  public final static native float btCollisionObject_getFriction(long jarg1, btCollisionObject jarg1_);
-  public final static native int btCollisionObject_getInternalType(long jarg1, btCollisionObject jarg1_);
-  public final static native long btCollisionObject_getWorldTransform__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setWorldTransform(long jarg1, btCollisionObject jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btCollisionObject_getBroadphaseHandle__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setBroadphaseHandle(long jarg1, btCollisionObject jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native long btCollisionObject_getInterpolationWorldTransform__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setInterpolationWorldTransform(long jarg1, btCollisionObject jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btCollisionObject_setInterpolationLinearVelocity(long jarg1, btCollisionObject jarg1_, Vector3 jarg2);
-  public final static native void btCollisionObject_setInterpolationAngularVelocity(long jarg1, btCollisionObject jarg1_, Vector3 jarg2);
-  public final static native Vector3 btCollisionObject_getInterpolationLinearVelocity__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native Vector3 btCollisionObject_getInterpolationAngularVelocity__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native int btCollisionObject_getIslandTag(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setIslandTag(long jarg1, btCollisionObject jarg1_, int jarg2);
-  public final static native int btCollisionObject_getCompanionId(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setCompanionId(long jarg1, btCollisionObject jarg1_, int jarg2);
-  public final static native float btCollisionObject_getHitFraction(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setHitFraction(long jarg1, btCollisionObject jarg1_, float jarg2);
-  public final static native int btCollisionObject_getCollisionFlags(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setCollisionFlags(long jarg1, btCollisionObject jarg1_, int jarg2);
-  public final static native float btCollisionObject_getCcdSweptSphereRadius(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setCcdSweptSphereRadius(long jarg1, btCollisionObject jarg1_, float jarg2);
-  public final static native float btCollisionObject_getCcdMotionThreshold(long jarg1, btCollisionObject jarg1_);
-  public final static native float btCollisionObject_getCcdSquareMotionThreshold(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setCcdMotionThreshold(long jarg1, btCollisionObject jarg1_, float jarg2);
-  public final static native long btCollisionObject_getUserPointer(long jarg1, btCollisionObject jarg1_);
-  public final static native void btCollisionObject_setUserPointer(long jarg1, btCollisionObject jarg1_, long jarg2);
-  public final static native boolean btCollisionObject_checkCollideWith(long jarg1, btCollisionObject jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native int btCollisionObject_calculateSerializeBufferSize(long jarg1, btCollisionObject jarg1_);
-  public final static native String btCollisionObject_serialize(long jarg1, btCollisionObject jarg1_, long jarg2, long jarg3);
-  public final static native void btCollisionObject_serializeSingleObject(long jarg1, btCollisionObject jarg1_, long jarg2);
-  public final static native void btCollisionObject_getAnisotropicFriction__SWIG_1(long jarg1, btCollisionObject jarg1_, Vector3 jarg2);
-  public final static native void btCollisionObject_getWorldTransform__SWIG_2(long jarg1, btCollisionObject jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btCollisionObject_getInterpolationWorldTransform__SWIG_2(long jarg1, btCollisionObject jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btCollisionObject_getInterpolationLinearVelocity__SWIG_1(long jarg1, btCollisionObject jarg1_, Vector3 jarg2);
-  public final static native void btCollisionObject_getInterpolationAngularVelocity__SWIG_1(long jarg1, btCollisionObject jarg1_, Vector3 jarg2);
-  public final static native void btCollisionObjectDoubleData_m_broadphaseHandle_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2);
-  public final static native long btCollisionObjectDoubleData_m_broadphaseHandle_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_collisionShape_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2);
-  public final static native long btCollisionObjectDoubleData_m_collisionShape_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_rootCollisionShape_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2, btCollisionShapeData jarg2_);
-  public final static native long btCollisionObjectDoubleData_m_rootCollisionShape_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_name_set(long jarg1, btCollisionObjectDoubleData jarg1_, String jarg2);
-  public final static native String btCollisionObjectDoubleData_m_name_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_worldTransform_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2, btTransformDoubleData jarg2_);
-  public final static native long btCollisionObjectDoubleData_m_worldTransform_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_interpolationWorldTransform_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2, btTransformDoubleData jarg2_);
-  public final static native long btCollisionObjectDoubleData_m_interpolationWorldTransform_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_interpolationLinearVelocity_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btCollisionObjectDoubleData_m_interpolationLinearVelocity_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_interpolationAngularVelocity_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btCollisionObjectDoubleData_m_interpolationAngularVelocity_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_anisotropicFriction_set(long jarg1, btCollisionObjectDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btCollisionObjectDoubleData_m_anisotropicFriction_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_contactProcessingThreshold_set(long jarg1, btCollisionObjectDoubleData jarg1_, double jarg2);
-  public final static native double btCollisionObjectDoubleData_m_contactProcessingThreshold_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_deactivationTime_set(long jarg1, btCollisionObjectDoubleData jarg1_, double jarg2);
-  public final static native double btCollisionObjectDoubleData_m_deactivationTime_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_friction_set(long jarg1, btCollisionObjectDoubleData jarg1_, double jarg2);
-  public final static native double btCollisionObjectDoubleData_m_friction_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_restitution_set(long jarg1, btCollisionObjectDoubleData jarg1_, double jarg2);
-  public final static native double btCollisionObjectDoubleData_m_restitution_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_hitFraction_set(long jarg1, btCollisionObjectDoubleData jarg1_, double jarg2);
-  public final static native double btCollisionObjectDoubleData_m_hitFraction_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_ccdSweptSphereRadius_set(long jarg1, btCollisionObjectDoubleData jarg1_, double jarg2);
-  public final static native double btCollisionObjectDoubleData_m_ccdSweptSphereRadius_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_ccdMotionThreshold_set(long jarg1, btCollisionObjectDoubleData jarg1_, double jarg2);
-  public final static native double btCollisionObjectDoubleData_m_ccdMotionThreshold_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_hasAnisotropicFriction_set(long jarg1, btCollisionObjectDoubleData jarg1_, int jarg2);
-  public final static native int btCollisionObjectDoubleData_m_hasAnisotropicFriction_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_collisionFlags_set(long jarg1, btCollisionObjectDoubleData jarg1_, int jarg2);
-  public final static native int btCollisionObjectDoubleData_m_collisionFlags_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_islandTag1_set(long jarg1, btCollisionObjectDoubleData jarg1_, int jarg2);
-  public final static native int btCollisionObjectDoubleData_m_islandTag1_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_companionId_set(long jarg1, btCollisionObjectDoubleData jarg1_, int jarg2);
-  public final static native int btCollisionObjectDoubleData_m_companionId_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_activationState1_set(long jarg1, btCollisionObjectDoubleData jarg1_, int jarg2);
-  public final static native int btCollisionObjectDoubleData_m_activationState1_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_internalType_set(long jarg1, btCollisionObjectDoubleData jarg1_, int jarg2);
-  public final static native int btCollisionObjectDoubleData_m_internalType_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_checkCollideWith_set(long jarg1, btCollisionObjectDoubleData jarg1_, int jarg2);
-  public final static native int btCollisionObjectDoubleData_m_checkCollideWith_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native void btCollisionObjectDoubleData_m_padding_set(long jarg1, btCollisionObjectDoubleData jarg1_, String jarg2);
-  public final static native String btCollisionObjectDoubleData_m_padding_get(long jarg1, btCollisionObjectDoubleData jarg1_);
-  public final static native long new_btCollisionObjectDoubleData();
-  public final static native void delete_btCollisionObjectDoubleData(long jarg1);
-  public final static native void btCollisionObjectFloatData_m_broadphaseHandle_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2);
-  public final static native long btCollisionObjectFloatData_m_broadphaseHandle_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_collisionShape_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2);
-  public final static native long btCollisionObjectFloatData_m_collisionShape_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_rootCollisionShape_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2, btCollisionShapeData jarg2_);
-  public final static native long btCollisionObjectFloatData_m_rootCollisionShape_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_name_set(long jarg1, btCollisionObjectFloatData jarg1_, String jarg2);
-  public final static native String btCollisionObjectFloatData_m_name_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_worldTransform_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btCollisionObjectFloatData_m_worldTransform_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_interpolationWorldTransform_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btCollisionObjectFloatData_m_interpolationWorldTransform_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_interpolationLinearVelocity_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btCollisionObjectFloatData_m_interpolationLinearVelocity_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_interpolationAngularVelocity_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btCollisionObjectFloatData_m_interpolationAngularVelocity_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_anisotropicFriction_set(long jarg1, btCollisionObjectFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btCollisionObjectFloatData_m_anisotropicFriction_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_contactProcessingThreshold_set(long jarg1, btCollisionObjectFloatData jarg1_, float jarg2);
-  public final static native float btCollisionObjectFloatData_m_contactProcessingThreshold_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_deactivationTime_set(long jarg1, btCollisionObjectFloatData jarg1_, float jarg2);
-  public final static native float btCollisionObjectFloatData_m_deactivationTime_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_friction_set(long jarg1, btCollisionObjectFloatData jarg1_, float jarg2);
-  public final static native float btCollisionObjectFloatData_m_friction_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_restitution_set(long jarg1, btCollisionObjectFloatData jarg1_, float jarg2);
-  public final static native float btCollisionObjectFloatData_m_restitution_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_hitFraction_set(long jarg1, btCollisionObjectFloatData jarg1_, float jarg2);
-  public final static native float btCollisionObjectFloatData_m_hitFraction_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_ccdSweptSphereRadius_set(long jarg1, btCollisionObjectFloatData jarg1_, float jarg2);
-  public final static native float btCollisionObjectFloatData_m_ccdSweptSphereRadius_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_ccdMotionThreshold_set(long jarg1, btCollisionObjectFloatData jarg1_, float jarg2);
-  public final static native float btCollisionObjectFloatData_m_ccdMotionThreshold_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_hasAnisotropicFriction_set(long jarg1, btCollisionObjectFloatData jarg1_, int jarg2);
-  public final static native int btCollisionObjectFloatData_m_hasAnisotropicFriction_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_collisionFlags_set(long jarg1, btCollisionObjectFloatData jarg1_, int jarg2);
-  public final static native int btCollisionObjectFloatData_m_collisionFlags_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_islandTag1_set(long jarg1, btCollisionObjectFloatData jarg1_, int jarg2);
-  public final static native int btCollisionObjectFloatData_m_islandTag1_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_companionId_set(long jarg1, btCollisionObjectFloatData jarg1_, int jarg2);
-  public final static native int btCollisionObjectFloatData_m_companionId_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_activationState1_set(long jarg1, btCollisionObjectFloatData jarg1_, int jarg2);
-  public final static native int btCollisionObjectFloatData_m_activationState1_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_internalType_set(long jarg1, btCollisionObjectFloatData jarg1_, int jarg2);
-  public final static native int btCollisionObjectFloatData_m_internalType_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native void btCollisionObjectFloatData_m_checkCollideWith_set(long jarg1, btCollisionObjectFloatData jarg1_, int jarg2);
-  public final static native int btCollisionObjectFloatData_m_checkCollideWith_get(long jarg1, btCollisionObjectFloatData jarg1_);
-  public final static native long new_btCollisionObjectFloatData();
-  public final static native void delete_btCollisionObjectFloatData(long jarg1);
-  public final static native void btRigidBodyConstructionInfo_m_mass_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_mass_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_motionState_set(long jarg1, btRigidBodyConstructionInfo jarg1_, long jarg2, btMotionState jarg2_);
-  public final static native long btRigidBodyConstructionInfo_m_motionState_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_startWorldTransform_set(long jarg1, btRigidBodyConstructionInfo jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btRigidBodyConstructionInfo_m_startWorldTransform_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_collisionShape_set(long jarg1, btRigidBodyConstructionInfo jarg1_, long jarg2, btCollisionShape jarg2_);
-  public final static native long btRigidBodyConstructionInfo_m_collisionShape_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_localInertia_set(long jarg1, btRigidBodyConstructionInfo jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btRigidBodyConstructionInfo_m_localInertia_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_linearDamping_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_linearDamping_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_angularDamping_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_angularDamping_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_friction_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_friction_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_restitution_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_restitution_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_linearSleepingThreshold_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_linearSleepingThreshold_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_angularSleepingThreshold_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_angularSleepingThreshold_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_additionalDamping_set(long jarg1, btRigidBodyConstructionInfo jarg1_, boolean jarg2);
-  public final static native boolean btRigidBodyConstructionInfo_m_additionalDamping_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_additionalDampingFactor_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_additionalDampingFactor_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_additionalLinearDampingThresholdSqr_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_additionalAngularDampingThresholdSqr_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native void btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_set(long jarg1, btRigidBodyConstructionInfo jarg1_, float jarg2);
-  public final static native float btRigidBodyConstructionInfo_m_additionalAngularDampingFactor_get(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native long new_btRigidBodyConstructionInfo__SWIG_0(float jarg1, long jarg2, btMotionState jarg2_, long jarg3, btCollisionShape jarg3_, Vector3 jarg4);
-  public final static native long new_btRigidBodyConstructionInfo__SWIG_1(float jarg1, long jarg2, btMotionState jarg2_, long jarg3, btCollisionShape jarg3_);
-  public final static native void delete_btRigidBodyConstructionInfo(long jarg1);
-  public final static native void gDeactivationTime_set(float jarg1);
-  public final static native float gDeactivationTime_get();
-  public final static native void gDisableDeactivation_set(boolean jarg1);
-  public final static native boolean gDisableDeactivation_get();
-  public final static native long new_btRigidBody__SWIG_0(long jarg1, btRigidBodyConstructionInfo jarg1_);
-  public final static native long new_btRigidBody__SWIG_1(float jarg1, long jarg2, btMotionState jarg2_, long jarg3, btCollisionShape jarg3_, Vector3 jarg4);
-  public final static native long new_btRigidBody__SWIG_2(float jarg1, long jarg2, btMotionState jarg2_, long jarg3, btCollisionShape jarg3_);
-  public final static native void delete_btRigidBody(long jarg1);
-  public final static native void btRigidBody_proceedToTransform(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btRigidBody_upcast__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native void btRigidBody_predictIntegratedTransform(long jarg1, btRigidBody jarg1_, float jarg2, long jarg3, btTransform jarg3_);
-  public final static native void btRigidBody_saveKinematicState(long jarg1, btRigidBody jarg1_, float jarg2);
-  public final static native void btRigidBody_applyGravity(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setGravity(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native Vector3 btRigidBody_getGravity(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setDamping(long jarg1, btRigidBody jarg1_, float jarg2, float jarg3);
-  public final static native float btRigidBody_getLinearDamping(long jarg1, btRigidBody jarg1_);
-  public final static native float btRigidBody_getAngularDamping(long jarg1, btRigidBody jarg1_);
-  public final static native float btRigidBody_getLinearSleepingThreshold(long jarg1, btRigidBody jarg1_);
-  public final static native float btRigidBody_getAngularSleepingThreshold(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_applyDamping(long jarg1, btRigidBody jarg1_, float jarg2);
-  public final static native long btRigidBody_getCollisionShape__SWIG_0(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setMassProps(long jarg1, btRigidBody jarg1_, float jarg2, Vector3 jarg3);
-  public final static native Vector3 btRigidBody_getLinearFactor(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setLinearFactor(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native float btRigidBody_getInvMass(long jarg1, btRigidBody jarg1_);
-  public final static native Matrix3 btRigidBody_getInvInertiaTensorWorld(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_integrateVelocities(long jarg1, btRigidBody jarg1_, float jarg2);
-  public final static native void btRigidBody_setCenterOfMassTransform(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btRigidBody_applyCentralForce(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native Vector3 btRigidBody_getTotalForce(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getTotalTorque(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getInvInertiaDiagLocal(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setInvInertiaDiagLocal(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_setSleepingThresholds(long jarg1, btRigidBody jarg1_, float jarg2, float jarg3);
-  public final static native void btRigidBody_applyTorque(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_applyForce(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btRigidBody_applyCentralImpulse(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_applyTorqueImpulse(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_applyImpulse(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btRigidBody_clearForces(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_updateInertiaTensor(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getCenterOfMassPosition(long jarg1, btRigidBody jarg1_);
-  public final static native Quaternion btRigidBody_getOrientation(long jarg1, btRigidBody jarg1_);
-  public final static native long btRigidBody_getCenterOfMassTransform(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getLinearVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getAngularVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setLinearVelocity(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_setAngularVelocity(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native Vector3 btRigidBody_getVelocityInLocalPoint(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_translate(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_getAabb(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native float btRigidBody_computeImpulseDenominator(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native float btRigidBody_computeAngularImpulseDenominator(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_updateDeactivation(long jarg1, btRigidBody jarg1_, float jarg2);
-  public final static native boolean btRigidBody_wantsSleeping(long jarg1, btRigidBody jarg1_);
-  public final static native long btRigidBody_getBroadphaseProxy__SWIG_0(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setNewBroadphaseProxy(long jarg1, btRigidBody jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native long btRigidBody_getMotionState__SWIG_0(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setMotionState(long jarg1, btRigidBody jarg1_, long jarg2, btMotionState jarg2_);
-  public final static native void btRigidBody_m_contactSolverType_set(long jarg1, btRigidBody jarg1_, int jarg2);
-  public final static native int btRigidBody_m_contactSolverType_get(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_m_frictionSolverType_set(long jarg1, btRigidBody jarg1_, int jarg2);
-  public final static native int btRigidBody_m_frictionSolverType_get(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setAngularFactor__SWIG_0(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_setAngularFactor__SWIG_1(long jarg1, btRigidBody jarg1_, float jarg2);
-  public final static native Vector3 btRigidBody_getAngularFactor(long jarg1, btRigidBody jarg1_);
-  public final static native boolean btRigidBody_isInWorld(long jarg1, btRigidBody jarg1_);
-  public final static native boolean btRigidBody_checkCollideWithOverride(long jarg1, btRigidBody jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native void btRigidBody_addConstraintRef(long jarg1, btRigidBody jarg1_, long jarg2, btTypedConstraint jarg2_);
-  public final static native void btRigidBody_removeConstraintRef(long jarg1, btRigidBody jarg1_, long jarg2, btTypedConstraint jarg2_);
-  public final static native long btRigidBody_getConstraintRef(long jarg1, btRigidBody jarg1_, int jarg2);
-  public final static native int btRigidBody_getNumConstraintRefs(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_setFlags(long jarg1, btRigidBody jarg1_, int jarg2);
-  public final static native int btRigidBody_getFlags(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getDeltaLinearVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getDeltaAngularVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getPushVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_getTurnVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_internalGetDeltaLinearVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_internalGetDeltaAngularVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_internalGetAngularFactor(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_internalGetInvMass(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_internalGetPushVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native Vector3 btRigidBody_internalGetTurnVelocity(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_internalGetVelocityInLocalPointObsolete(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btRigidBody_internalGetAngularVelocity(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btRigidBody_internalApplyImpulse(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void btRigidBody_internalApplyPushImpulse(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void btRigidBody_internalWritebackVelocity__SWIG_0(long jarg1, btRigidBody jarg1_);
-  public final static native void btRigidBody_internalWritebackVelocity__SWIG_1(long jarg1, btRigidBody jarg1_, float jarg2);
-  public final static native void btRigidBodyFloatData_m_collisionObjectData_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btCollisionObjectFloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_collisionObjectData_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_invInertiaTensorWorld_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2);
-  public final static native long btRigidBodyFloatData_m_invInertiaTensorWorld_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_linearVelocity_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_linearVelocity_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_angularVelocity_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_angularVelocity_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_angularFactor_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_angularFactor_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_linearFactor_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_linearFactor_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_gravity_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_gravity_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_gravity_acceleration_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_gravity_acceleration_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_invInertiaLocal_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_invInertiaLocal_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_totalForce_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_totalForce_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_totalTorque_set(long jarg1, btRigidBodyFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btRigidBodyFloatData_m_totalTorque_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_inverseMass_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_inverseMass_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_linearDamping_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_linearDamping_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_angularDamping_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_angularDamping_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_additionalDampingFactor_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_additionalDampingFactor_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_additionalLinearDampingThresholdSqr_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_additionalAngularDampingThresholdSqr_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_additionalAngularDampingFactor_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_additionalAngularDampingFactor_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_linearSleepingThreshold_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_linearSleepingThreshold_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_angularSleepingThreshold_set(long jarg1, btRigidBodyFloatData jarg1_, float jarg2);
-  public final static native float btRigidBodyFloatData_m_angularSleepingThreshold_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native void btRigidBodyFloatData_m_additionalDamping_set(long jarg1, btRigidBodyFloatData jarg1_, int jarg2);
-  public final static native int btRigidBodyFloatData_m_additionalDamping_get(long jarg1, btRigidBodyFloatData jarg1_);
-  public final static native long new_btRigidBodyFloatData();
-  public final static native void delete_btRigidBodyFloatData(long jarg1);
-  public final static native void btRigidBodyDoubleData_m_collisionObjectData_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btCollisionObjectDoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_collisionObjectData_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_invInertiaTensorWorld_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2);
-  public final static native long btRigidBodyDoubleData_m_invInertiaTensorWorld_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_linearVelocity_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_linearVelocity_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_angularVelocity_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_angularVelocity_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_angularFactor_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_angularFactor_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_linearFactor_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_linearFactor_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_gravity_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_gravity_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_gravity_acceleration_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_gravity_acceleration_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_invInertiaLocal_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_invInertiaLocal_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_totalForce_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_totalForce_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_totalTorque_set(long jarg1, btRigidBodyDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btRigidBodyDoubleData_m_totalTorque_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_inverseMass_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_inverseMass_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_linearDamping_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_linearDamping_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_angularDamping_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_angularDamping_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_additionalDampingFactor_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_additionalDampingFactor_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_additionalLinearDampingThresholdSqr_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_additionalAngularDampingThresholdSqr_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_additionalAngularDampingFactor_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_additionalAngularDampingFactor_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_linearSleepingThreshold_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_linearSleepingThreshold_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_angularSleepingThreshold_set(long jarg1, btRigidBodyDoubleData jarg1_, double jarg2);
-  public final static native double btRigidBodyDoubleData_m_angularSleepingThreshold_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_additionalDamping_set(long jarg1, btRigidBodyDoubleData jarg1_, int jarg2);
-  public final static native int btRigidBodyDoubleData_m_additionalDamping_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native void btRigidBodyDoubleData_m_padding_set(long jarg1, btRigidBodyDoubleData jarg1_, String jarg2);
-  public final static native String btRigidBodyDoubleData_m_padding_get(long jarg1, btRigidBodyDoubleData jarg1_);
-  public final static native long new_btRigidBodyDoubleData();
-  public final static native void delete_btRigidBodyDoubleData(long jarg1);
-  public final static native long new_btEmptyAlgorithm(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
-  public final static native void delete_btEmptyAlgorithm(long jarg1);
-  public final static native void delete_btActivatingCollisionAlgorithm(long jarg1);
-  public final static native void btConvexTriangleCallback_m_triangleCount_set(long jarg1, btConvexTriangleCallback jarg1_, int jarg2);
-  public final static native int btConvexTriangleCallback_m_triangleCount_get(long jarg1, btConvexTriangleCallback jarg1_);
-  public final static native void btConvexTriangleCallback_m_manifoldPtr_set(long jarg1, btConvexTriangleCallback jarg1_, long jarg2, btPersistentManifold jarg2_);
-  public final static native long btConvexTriangleCallback_m_manifoldPtr_get(long jarg1, btConvexTriangleCallback jarg1_);
-  public final static native long new_btConvexTriangleCallback(long jarg1, btDispatcher jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, boolean jarg4);
-  public final static native void btConvexTriangleCallback_setTimeStepAndCounters(long jarg1, btConvexTriangleCallback jarg1_, float jarg2, long jarg3, btDispatcherInfo jarg3_, long jarg4, btManifoldResult jarg4_);
-  public final static native void delete_btConvexTriangleCallback(long jarg1);
-  public final static native void btConvexTriangleCallback_clearCache(long jarg1, btConvexTriangleCallback jarg1_);
-  public final static native Vector3 btConvexTriangleCallback_getAabbMin(long jarg1, btConvexTriangleCallback jarg1_);
-  public final static native Vector3 btConvexTriangleCallback_getAabbMax(long jarg1, btConvexTriangleCallback jarg1_);
-  public final static native long new_btConvexConcaveCollisionAlgorithm(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, boolean jarg4);
-  public final static native void delete_btConvexConcaveCollisionAlgorithm(long jarg1);
-  public final static native void btConvexConcaveCollisionAlgorithm_clearCache(long jarg1, btConvexConcaveCollisionAlgorithm jarg1_);
-  public final static native long new_btConvexPlaneCollisionAlgorithm(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_, boolean jarg5, int jarg6, int jarg7);
-  public final static native void delete_btConvexPlaneCollisionAlgorithm(long jarg1);
-  public final static native void btConvexPlaneCollisionAlgorithm_collideSingleContact(long jarg1, btConvexPlaneCollisionAlgorithm jarg1_, Quaternion jarg2, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_, long jarg5, btDispatcherInfo jarg5_, long jarg6, btManifoldResult jarg6_);
-  public final static native void delete_btCollisionConfiguration(long jarg1);
-  public final static native long btCollisionConfiguration_getPersistentManifoldPool(long jarg1, btCollisionConfiguration jarg1_);
-  public final static native long btCollisionConfiguration_getCollisionAlgorithmPool(long jarg1, btCollisionConfiguration jarg1_);
-  public final static native long btCollisionConfiguration_getStackAllocator(long jarg1, btCollisionConfiguration jarg1_);
-  public final static native long btCollisionConfiguration_getCollisionAlgorithmCreateFunc(long jarg1, btCollisionConfiguration jarg1_, int jarg2, int jarg3);
-  public final static native void btDefaultCollisionConstructionInfo_m_stackAlloc_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, long jarg2, btStackAlloc jarg2_);
-  public final static native long btDefaultCollisionConstructionInfo_m_stackAlloc_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native void btDefaultCollisionConstructionInfo_m_persistentManifoldPool_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, long jarg2, btPoolAllocator jarg2_);
-  public final static native long btDefaultCollisionConstructionInfo_m_persistentManifoldPool_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native void btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, long jarg2, btPoolAllocator jarg2_);
-  public final static native long btDefaultCollisionConstructionInfo_m_collisionAlgorithmPool_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native void btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, int jarg2);
-  public final static native int btDefaultCollisionConstructionInfo_m_defaultMaxPersistentManifoldPoolSize_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native void btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, int jarg2);
-  public final static native int btDefaultCollisionConstructionInfo_m_defaultMaxCollisionAlgorithmPoolSize_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native void btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, int jarg2);
-  public final static native int btDefaultCollisionConstructionInfo_m_customCollisionAlgorithmMaxElementSize_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native void btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, int jarg2);
-  public final static native int btDefaultCollisionConstructionInfo_m_defaultStackAllocatorSize_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native void btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_set(long jarg1, btDefaultCollisionConstructionInfo jarg1_, int jarg2);
-  public final static native int btDefaultCollisionConstructionInfo_m_useEpaPenetrationAlgorithm_get(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native long new_btDefaultCollisionConstructionInfo();
-  public final static native void delete_btDefaultCollisionConstructionInfo(long jarg1);
-  public final static native long new_btDefaultCollisionConfiguration__SWIG_0(long jarg1, btDefaultCollisionConstructionInfo jarg1_);
-  public final static native long new_btDefaultCollisionConfiguration__SWIG_1();
-  public final static native void delete_btDefaultCollisionConfiguration(long jarg1);
-  public final static native long btDefaultCollisionConfiguration_getSimplexSolver(long jarg1, btDefaultCollisionConfiguration jarg1_);
-  public final static native void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_0(long jarg1, btDefaultCollisionConfiguration jarg1_, int jarg2, int jarg3);
-  public final static native void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_1(long jarg1, btDefaultCollisionConfiguration jarg1_, int jarg2);
-  public final static native void btDefaultCollisionConfiguration_setConvexConvexMultipointIterations__SWIG_2(long jarg1, btDefaultCollisionConfiguration jarg1_);
-  public final static native void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_0(long jarg1, btDefaultCollisionConfiguration jarg1_, int jarg2, int jarg3);
-  public final static native void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_1(long jarg1, btDefaultCollisionConfiguration jarg1_, int jarg2);
-  public final static native void btDefaultCollisionConfiguration_setPlaneConvexMultipointIterations__SWIG_2(long jarg1, btDefaultCollisionConfiguration jarg1_);
-  public final static native void gContactAddedCallback_set(long jarg1);
-  public final static native long gContactAddedCallback_get();
-  public final static native long new_btManifoldResult__SWIG_0();
-  public final static native long new_btManifoldResult__SWIG_1(long jarg1, btCollisionObject jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native void delete_btManifoldResult(long jarg1);
-  public final static native void btManifoldResult_setPersistentManifold(long jarg1, btManifoldResult jarg1_, long jarg2, btPersistentManifold jarg2_);
-  public final static native long btManifoldResult_getPersistentManifold__SWIG_0(long jarg1, btManifoldResult jarg1_);
-  public final static native void btManifoldResult_setShapeIdentifiersA(long jarg1, btManifoldResult jarg1_, int jarg2, int jarg3);
-  public final static native void btManifoldResult_setShapeIdentifiersB(long jarg1, btManifoldResult jarg1_, int jarg2, int jarg3);
-  public final static native void btManifoldResult_addContactPoint(long jarg1, btManifoldResult jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void btManifoldResult_refreshContactPoints(long jarg1, btManifoldResult jarg1_);
-  public final static native long btManifoldResult_getBody0Internal(long jarg1, btManifoldResult jarg1_);
-  public final static native long btManifoldResult_getBody1Internal(long jarg1, btManifoldResult jarg1_);
-  public final static native long new_btSphereSphereCollisionAlgorithm__SWIG_0(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_);
-  public final static native long new_btSphereSphereCollisionAlgorithm__SWIG_1(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
-  public final static native void delete_btSphereSphereCollisionAlgorithm(long jarg1);
-  public final static native long new_btBoxBoxCollisionAlgorithm__SWIG_0(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
-  public final static native long new_btBoxBoxCollisionAlgorithm__SWIG_1(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_);
-  public final static native void delete_btBoxBoxCollisionAlgorithm(long jarg1);
-  public final static native void btCollisionAlgorithmCreateFunc_m_swapped_set(long jarg1, btCollisionAlgorithmCreateFunc jarg1_, boolean jarg2);
-  public final static native boolean btCollisionAlgorithmCreateFunc_m_swapped_get(long jarg1, btCollisionAlgorithmCreateFunc jarg1_);
-  public final static native long new_btCollisionAlgorithmCreateFunc();
-  public final static native void delete_btCollisionAlgorithmCreateFunc(long jarg1);
-  public final static native long btCollisionAlgorithmCreateFunc_CreateCollisionAlgorithm(long jarg1, btCollisionAlgorithmCreateFunc jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_);
-  public final static native long new_btBox2dBox2dCollisionAlgorithm__SWIG_0(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
-  public final static native long new_btBox2dBox2dCollisionAlgorithm__SWIG_1(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_);
-  public final static native void delete_btBox2dBox2dCollisionAlgorithm(long jarg1);
-  public final static native void btElement_m_id_set(long jarg1, btElement jarg1_, int jarg2);
-  public final static native int btElement_m_id_get(long jarg1, btElement jarg1_);
-  public final static native void btElement_m_sz_set(long jarg1, btElement jarg1_, int jarg2);
-  public final static native int btElement_m_sz_get(long jarg1, btElement jarg1_);
-  public final static native long new_btElement();
-  public final static native void delete_btElement(long jarg1);
-  public final static native long new_btUnionFind();
-  public final static native void delete_btUnionFind(long jarg1);
-  public final static native void btUnionFind_sortIslands(long jarg1, btUnionFind jarg1_);
-  public final static native void btUnionFind_reset(long jarg1, btUnionFind jarg1_, int jarg2);
-  public final static native int btUnionFind_getNumElements(long jarg1, btUnionFind jarg1_);
-  public final static native boolean btUnionFind_isRoot(long jarg1, btUnionFind jarg1_, int jarg2);
-  public final static native long btUnionFind_getElement__SWIG_0(long jarg1, btUnionFind jarg1_, int jarg2);
-  public final static native void btUnionFind_allocate(long jarg1, btUnionFind jarg1_, int jarg2);
-  public final static native void btUnionFind_Free(long jarg1, btUnionFind jarg1_);
-  public final static native int btUnionFind_find__SWIG_0(long jarg1, btUnionFind jarg1_, int jarg2, int jarg3);
-  public final static native void btUnionFind_unite(long jarg1, btUnionFind jarg1_, int jarg2, int jarg3);
-  public final static native int btUnionFind_find__SWIG_1(long jarg1, btUnionFind jarg1_, int jarg2);
-  public final static native long new_btSphereTriangleCollisionAlgorithm__SWIG_0(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_, boolean jarg5);
-  public final static native long new_btSphereTriangleCollisionAlgorithm__SWIG_1(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_);
-  public final static native void delete_btSphereTriangleCollisionAlgorithm(long jarg1);
-  public final static native long new_btSimulationIslandManager();
-  public final static native void delete_btSimulationIslandManager(long jarg1);
-  public final static native void btSimulationIslandManager_initUnionFind(long jarg1, btSimulationIslandManager jarg1_, int jarg2);
-  public final static native long btSimulationIslandManager_getUnionFind(long jarg1, btSimulationIslandManager jarg1_);
-  public final static native void btSimulationIslandManager_updateActivationState(long jarg1, btSimulationIslandManager jarg1_, long jarg2, btCollisionWorld jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native void btSimulationIslandManager_storeIslandActivationState(long jarg1, btSimulationIslandManager jarg1_, long jarg2, btCollisionWorld jarg2_);
-  public final static native void btSimulationIslandManager_findUnions(long jarg1, btSimulationIslandManager jarg1_, long jarg2, btDispatcher jarg2_, long jarg3, btCollisionWorld jarg3_);
-  public final static native void btSimulationIslandManager_buildAndProcessIslands(long jarg1, btSimulationIslandManager jarg1_, long jarg2, btDispatcher jarg2_, long jarg3, btCollisionWorld jarg3_, long jarg4);
-  public final static native void btSimulationIslandManager_buildIslands(long jarg1, btSimulationIslandManager jarg1_, long jarg2, btDispatcher jarg2_, long jarg3, btCollisionWorld jarg3_);
-  public final static native boolean btSimulationIslandManager_getSplitIslands(long jarg1, btSimulationIslandManager jarg1_);
-  public final static native void btSimulationIslandManager_setSplitIslands(long jarg1, btSimulationIslandManager jarg1_, boolean jarg2);
-  public final static native long new_btGhostObject();
-  public final static native void delete_btGhostObject(long jarg1);
-  public final static native void btGhostObject_convexSweepTest__SWIG_0(long jarg1, btGhostObject jarg1_, long jarg2, btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5, float jarg6);
-  public final static native void btGhostObject_convexSweepTest__SWIG_1(long jarg1, btGhostObject jarg1_, long jarg2, btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5);
-  public final static native void btGhostObject_rayTest(long jarg1, btGhostObject jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4);
-  public final static native void btGhostObject_addOverlappingObjectInternal__SWIG_0(long jarg1, btGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native void btGhostObject_addOverlappingObjectInternal__SWIG_1(long jarg1, btGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native void btGhostObject_removeOverlappingObjectInternal__SWIG_0(long jarg1, btGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_, long jarg4, btBroadphaseProxy jarg4_);
-  public final static native void btGhostObject_removeOverlappingObjectInternal__SWIG_1(long jarg1, btGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native int btGhostObject_getNumOverlappingObjects(long jarg1, btGhostObject jarg1_);
-  public final static native long btGhostObject_getOverlappingObject__SWIG_0(long jarg1, btGhostObject jarg1_, int jarg2);
-  public final static native long btGhostObject_getOverlappingPairs__SWIG_0(long jarg1, btGhostObject jarg1_);
-  public final static native long btGhostObject_upcast__SWIG_0(long jarg1, btCollisionObject jarg1_);
-  public final static native long new_btPairCachingGhostObject();
-  public final static native void delete_btPairCachingGhostObject(long jarg1);
-  public final static native void btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_0(long jarg1, btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btBroadphaseProxy jarg3_);
-  public final static native void btPairCachingGhostObject_addOverlappingObjectInternal__SWIG_1(long jarg1, btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_);
-  public final static native void btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_0(long jarg1, btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_, long jarg4, btBroadphaseProxy jarg4_);
-  public final static native void btPairCachingGhostObject_removeOverlappingObjectInternal__SWIG_1(long jarg1, btPairCachingGhostObject jarg1_, long jarg2, btBroadphaseProxy jarg2_, long jarg3, btDispatcher jarg3_);
-  public final static native long btPairCachingGhostObject_getOverlappingPairCache(long jarg1, btPairCachingGhostObject jarg1_);
-  public final static native long new_btGhostPairCallback();
-  public final static native void delete_btGhostPairCallback(long jarg1);
-  public final static native long new_btCollisionWorld(long jarg1, btDispatcher jarg1_, long jarg2, btBroadphaseInterface jarg2_, long jarg3, btCollisionConfiguration jarg3_);
-  public final static native void delete_btCollisionWorld(long jarg1);
-  public final static native void btCollisionWorld_setBroadphase(long jarg1, btCollisionWorld jarg1_, long jarg2, btBroadphaseInterface jarg2_);
-  public final static native long btCollisionWorld_getBroadphase__SWIG_0(long jarg1, btCollisionWorld jarg1_);
-  public final static native long btCollisionWorld_getPairCache(long jarg1, btCollisionWorld jarg1_);
-  public final static native long btCollisionWorld_getDispatcher__SWIG_0(long jarg1, btCollisionWorld jarg1_);
-  public final static native void btCollisionWorld_updateSingleAabb(long jarg1, btCollisionWorld jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native void btCollisionWorld_updateAabbs(long jarg1, btCollisionWorld jarg1_);
-  public final static native void btCollisionWorld_setDebugDrawer(long jarg1, btCollisionWorld jarg1_, long jarg2, btIDebugDraw jarg2_);
-  public final static native long btCollisionWorld_getDebugDrawer(long jarg1, btCollisionWorld jarg1_);
-  public final static native void btCollisionWorld_debugDrawWorld(long jarg1, btCollisionWorld jarg1_);
-  public final static native void btCollisionWorld_debugDrawObject(long jarg1, btCollisionWorld jarg1_, long jarg2, btTransform jarg2_, long jarg3, btCollisionShape jarg3_, Vector3 jarg4);
-  public final static native int btCollisionWorld_getNumCollisionObjects(long jarg1, btCollisionWorld jarg1_);
-  public final static native void btCollisionWorld_rayTest(long jarg1, btCollisionWorld jarg1_, Vector3 jarg2, Vector3 jarg3, long jarg4);
-  public final static native void btCollisionWorld_convexSweepTest__SWIG_0(long jarg1, btCollisionWorld jarg1_, long jarg2, btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5, float jarg6);
-  public final static native void btCollisionWorld_convexSweepTest__SWIG_1(long jarg1, btCollisionWorld jarg1_, long jarg2, btConvexShape jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5);
-  public final static native void btCollisionWorld_contactTest(long jarg1, btCollisionWorld jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3);
-  public final static native void btCollisionWorld_contactPairTest(long jarg1, btCollisionWorld jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4);
-  public final static native void btCollisionWorld_rayTestSingle(long jarg1, btTransform jarg1_, long jarg2, btTransform jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionShape jarg4_, long jarg5, btTransform jarg5_, long jarg6);
-  public final static native void btCollisionWorld_objectQuerySingle(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_, long jarg4, btCollisionObject jarg4_, long jarg5, btCollisionShape jarg5_, long jarg6, btTransform jarg6_, long jarg7, float jarg8);
-  public final static native void btCollisionWorld_addCollisionObject__SWIG_0(long jarg1, btCollisionWorld jarg1_, long jarg2, btCollisionObject jarg2_, short jarg3, short jarg4);
-  public final static native void btCollisionWorld_addCollisionObject__SWIG_1(long jarg1, btCollisionWorld jarg1_, long jarg2, btCollisionObject jarg2_, short jarg3);
-  public final static native void btCollisionWorld_addCollisionObject__SWIG_2(long jarg1, btCollisionWorld jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native long btCollisionWorld_getCollisionObjectArray__SWIG_0(long jarg1, btCollisionWorld jarg1_);
-  public final static native void btCollisionWorld_removeCollisionObject(long jarg1, btCollisionWorld jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native void btCollisionWorld_performDiscreteCollisionDetection(long jarg1, btCollisionWorld jarg1_);
-  public final static native long btCollisionWorld_getDispatchInfo__SWIG_0(long jarg1, btCollisionWorld jarg1_);
-  public final static native boolean btCollisionWorld_getForceUpdateAllAabbs(long jarg1, btCollisionWorld jarg1_);
-  public final static native void btCollisionWorld_setForceUpdateAllAabbs(long jarg1, btCollisionWorld jarg1_, boolean jarg2);
-  public final static native void btCollisionWorld_serialize(long jarg1, btCollisionWorld jarg1_, long jarg2);
-  public final static native long new_btConvex2dConvex2dAlgorithm(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_, long jarg5, long jarg6, btConvexPenetrationDepthSolver jarg6_, int jarg7, int jarg8);
-  public final static native void delete_btConvex2dConvex2dAlgorithm(long jarg1);
-  public final static native void btConvex2dConvex2dAlgorithm_setLowLevelOfDetail(long jarg1, btConvex2dConvex2dAlgorithm jarg1_, boolean jarg2);
-  public final static native long btConvex2dConvex2dAlgorithm_getManifold(long jarg1, btConvex2dConvex2dAlgorithm jarg1_);
-  public final static native void btBoxBoxDetector_m_box1_set(long jarg1, btBoxBoxDetector jarg1_, long jarg2, btBoxShape jarg2_);
-  public final static native long btBoxBoxDetector_m_box1_get(long jarg1, btBoxBoxDetector jarg1_);
-  public final static native void btBoxBoxDetector_m_box2_set(long jarg1, btBoxBoxDetector jarg1_, long jarg2, btBoxShape jarg2_);
-  public final static native long btBoxBoxDetector_m_box2_get(long jarg1, btBoxBoxDetector jarg1_);
-  public final static native long new_btBoxBoxDetector(long jarg1, btBoxShape jarg1_, long jarg2, btBoxShape jarg2_);
-  public final static native void delete_btBoxBoxDetector(long jarg1);
-  public final static native void btBoxBoxDetector_getClosestPoints__SWIG_0(long jarg1, btBoxBoxDetector jarg1_, long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_, boolean jarg5);
-  public final static native void btBoxBoxDetector_getClosestPoints__SWIG_1(long jarg1, btBoxBoxDetector jarg1_, long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
-  public final static native long new_btSphereBoxCollisionAlgorithm(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_, boolean jarg5);
-  public final static native void delete_btSphereBoxCollisionAlgorithm(long jarg1);
-  public final static native float btSphereBoxCollisionAlgorithm_getSphereDistance(long jarg1, btSphereBoxCollisionAlgorithm jarg1_, long jarg2, btCollisionObject jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, float jarg6);
-  public final static native float btSphereBoxCollisionAlgorithm_getSpherePenetration(long jarg1, btSphereBoxCollisionAlgorithm jarg1_, long jarg2, btCollisionObject jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, float jarg6, Vector3 jarg7, Vector3 jarg8);
-  public final static native int btCollisionDispatcher_getDispatcherFlags(long jarg1, btCollisionDispatcher jarg1_);
-  public final static native void btCollisionDispatcher_setDispatcherFlags(long jarg1, btCollisionDispatcher jarg1_, int jarg2);
-  public final static native void btCollisionDispatcher_registerCollisionCreateFunc(long jarg1, btCollisionDispatcher jarg1_, int jarg2, int jarg3, long jarg4, btCollisionAlgorithmCreateFunc jarg4_);
-  public final static native long btCollisionDispatcher_getManifoldByIndexInternal__SWIG_0(long jarg1, btCollisionDispatcher jarg1_, int jarg2);
-  public final static native long new_btCollisionDispatcher(long jarg1, btCollisionConfiguration jarg1_);
-  public final static native void delete_btCollisionDispatcher(long jarg1);
-  public final static native long btCollisionDispatcher_findAlgorithm__SWIG_0(long jarg1, btCollisionDispatcher jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btPersistentManifold jarg4_);
-  public final static native long btCollisionDispatcher_findAlgorithm__SWIG_1(long jarg1, btCollisionDispatcher jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_);
-  public final static native void btCollisionDispatcher_setNearCallback(long jarg1, btCollisionDispatcher jarg1_, long jarg2);
-  public final static native long btCollisionDispatcher_getNearCallback(long jarg1, btCollisionDispatcher jarg1_);
-  public final static native void btCollisionDispatcher_defaultNearCallback(long jarg1, btBroadphasePair jarg1_, long jarg2, btCollisionDispatcher jarg2_, long jarg3, btDispatcherInfo jarg3_);
-  public final static native long btCollisionDispatcher_getCollisionConfiguration__SWIG_0(long jarg1, btCollisionDispatcher jarg1_);
-  public final static native void btCollisionDispatcher_setCollisionConfiguration(long jarg1, btCollisionDispatcher jarg1_, long jarg2, btCollisionConfiguration jarg2_);
-  public final static native long btCollisionDispatcher_getInternalManifoldPool__SWIG_0(long jarg1, btCollisionDispatcher jarg1_);
-  public final static native long new_btConvexConvexAlgorithm(long jarg1, btPersistentManifold jarg1_, long jarg2, btCollisionAlgorithmConstructionInfo jarg2_, long jarg3, btCollisionObject jarg3_, long jarg4, btCollisionObject jarg4_, long jarg5, long jarg6, btConvexPenetrationDepthSolver jarg6_, int jarg7, int jarg8);
-  public final static native void delete_btConvexConvexAlgorithm(long jarg1);
-  public final static native void btConvexConvexAlgorithm_setLowLevelOfDetail(long jarg1, btConvexConvexAlgorithm jarg1_, boolean jarg2);
-  public final static native long btConvexConvexAlgorithm_getManifold(long jarg1, btConvexConvexAlgorithm jarg1_);
-  public final static native void SphereTriangleDetector_getClosestPoints__SWIG_0(long jarg1, SphereTriangleDetector jarg1_, long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_, boolean jarg5);
-  public final static native void SphereTriangleDetector_getClosestPoints__SWIG_1(long jarg1, SphereTriangleDetector jarg1_, long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
-  public final static native long new_SphereTriangleDetector(long jarg1, btSphereShape jarg1_, long jarg2, btTriangleShape jarg2_, float jarg3);
-  public final static native void delete_SphereTriangleDetector(long jarg1);
-  public final static native boolean SphereTriangleDetector_collide(long jarg1, SphereTriangleDetector jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, long jarg5, long jarg6, float jarg7);
-  public final static native void btGenerateInternalEdgeInfo(long jarg1, btBvhTriangleMeshShape jarg1_, long jarg2, btTriangleInfoMap jarg2_);
-  public final static native void btAdjustInternalEdgeContacts__SWIG_0(long jarg1, btManifoldPoint jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, int jarg4, int jarg5, int jarg6);
-  public final static native void btAdjustInternalEdgeContacts__SWIG_1(long jarg1, btManifoldPoint jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, int jarg4, int jarg5);
-  public final static native long new_btCompoundCollisionAlgorithm(long jarg1, btCollisionAlgorithmConstructionInfo jarg1_, long jarg2, btCollisionObject jarg2_, long jarg3, btCollisionObject jarg3_, boolean jarg4);
-  public final static native void delete_btCompoundCollisionAlgorithm(long jarg1);
-  public final static native void delete_btConvexCast(long jarg1);
-  public final static native boolean btConvexCast_calcTimeOfImpact(long jarg1, btConvexCast jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, long jarg5, btTransform jarg5_, long jarg6);
-  public final static native long new_btSubsimplexConvexCast(long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_, long jarg3);
-  public final static native void delete_btSubsimplexConvexCast(long jarg1);
-  public final static native void btPolyhedralContactClipping_clipHullAgainstHull(Vector3 jarg1, long jarg2, btConvexPolyhedron jarg2_, long jarg3, btConvexPolyhedron jarg3_, long jarg4, btTransform jarg4_, long jarg5, btTransform jarg5_, float jarg6, float jarg7, long jarg8);
-  public final static native void btPolyhedralContactClipping_clipFaceAgainstHull(Vector3 jarg1, long jarg2, btConvexPolyhedron jarg2_, long jarg3, btTransform jarg3_, long jarg4, float jarg5, float jarg6, long jarg7);
-  public final static native boolean btPolyhedralContactClipping_findSeparatingAxis(long jarg1, btConvexPolyhedron jarg1_, long jarg2, btConvexPolyhedron jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5);
-  public final static native void btPolyhedralContactClipping_clipFace(long jarg1, long jarg2, Vector3 jarg3, float jarg4);
-  public final static native long new_btPolyhedralContactClipping();
-  public final static native void delete_btPolyhedralContactClipping(long jarg1);
-  public final static native void gContactBreakingThreshold_set(float jarg1);
-  public final static native float gContactBreakingThreshold_get();
-  public final static native void gContactDestroyedCallback_set(long jarg1);
-  public final static native long gContactDestroyedCallback_get();
-  public final static native void gContactProcessedCallback_set(long jarg1);
-  public final static native long gContactProcessedCallback_get();
-  public final static native void btPersistentManifold_m_companionIdA_set(long jarg1, btPersistentManifold jarg1_, int jarg2);
-  public final static native int btPersistentManifold_m_companionIdA_get(long jarg1, btPersistentManifold jarg1_);
-  public final static native void btPersistentManifold_m_companionIdB_set(long jarg1, btPersistentManifold jarg1_, int jarg2);
-  public final static native int btPersistentManifold_m_companionIdB_get(long jarg1, btPersistentManifold jarg1_);
-  public final static native void btPersistentManifold_m_index1a_set(long jarg1, btPersistentManifold jarg1_, int jarg2);
-  public final static native int btPersistentManifold_m_index1a_get(long jarg1, btPersistentManifold jarg1_);
-  public final static native long new_btPersistentManifold__SWIG_0();
-  public final static native long new_btPersistentManifold__SWIG_1(long jarg1, long jarg2, int jarg3, float jarg4, float jarg5);
-  public final static native long btPersistentManifold_getBody0__SWIG_0(long jarg1, btPersistentManifold jarg1_);
-  public final static native long btPersistentManifold_getBody1__SWIG_0(long jarg1, btPersistentManifold jarg1_);
-  public final static native void btPersistentManifold_setBodies(long jarg1, btPersistentManifold jarg1_, long jarg2, long jarg3);
-  public final static native void btPersistentManifold_clearUserCache(long jarg1, btPersistentManifold jarg1_, long jarg2, btManifoldPoint jarg2_);
-  public final static native int btPersistentManifold_getNumContacts(long jarg1, btPersistentManifold jarg1_);
-  public final static native long btPersistentManifold_getContactPoint__SWIG_0(long jarg1, btPersistentManifold jarg1_, int jarg2);
-  public final static native float btPersistentManifold_getContactBreakingThreshold(long jarg1, btPersistentManifold jarg1_);
-  public final static native float btPersistentManifold_getContactProcessingThreshold(long jarg1, btPersistentManifold jarg1_);
-  public final static native int btPersistentManifold_getCacheEntry(long jarg1, btPersistentManifold jarg1_, long jarg2, btManifoldPoint jarg2_);
-  public final static native int btPersistentManifold_addManifoldPoint(long jarg1, btPersistentManifold jarg1_, long jarg2, btManifoldPoint jarg2_);
-  public final static native void btPersistentManifold_removeContactPoint(long jarg1, btPersistentManifold jarg1_, int jarg2);
-  public final static native void btPersistentManifold_replaceContactPoint(long jarg1, btPersistentManifold jarg1_, long jarg2, btManifoldPoint jarg2_, int jarg3);
-  public final static native boolean btPersistentManifold_validContactDistance(long jarg1, btPersistentManifold jarg1_, long jarg2, btManifoldPoint jarg2_);
-  public final static native void btPersistentManifold_refreshContactPoints(long jarg1, btPersistentManifold jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native void btPersistentManifold_clearManifold(long jarg1, btPersistentManifold jarg1_);
-  public final static native void delete_btPersistentManifold(long jarg1);
-  public final static native void btGjkPairDetector_m_lastUsedMethod_set(long jarg1, btGjkPairDetector jarg1_, int jarg2);
-  public final static native int btGjkPairDetector_m_lastUsedMethod_get(long jarg1, btGjkPairDetector jarg1_);
-  public final static native void btGjkPairDetector_m_curIter_set(long jarg1, btGjkPairDetector jarg1_, int jarg2);
-  public final static native int btGjkPairDetector_m_curIter_get(long jarg1, btGjkPairDetector jarg1_);
-  public final static native void btGjkPairDetector_m_degenerateSimplex_set(long jarg1, btGjkPairDetector jarg1_, int jarg2);
-  public final static native int btGjkPairDetector_m_degenerateSimplex_get(long jarg1, btGjkPairDetector jarg1_);
-  public final static native void btGjkPairDetector_m_catchDegeneracies_set(long jarg1, btGjkPairDetector jarg1_, int jarg2);
-  public final static native int btGjkPairDetector_m_catchDegeneracies_get(long jarg1, btGjkPairDetector jarg1_);
-  public final static native long new_btGjkPairDetector__SWIG_0(long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_, long jarg3, long jarg4, btConvexPenetrationDepthSolver jarg4_);
-  public final static native long new_btGjkPairDetector__SWIG_1(long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_, int jarg3, int jarg4, float jarg5, float jarg6, long jarg7, long jarg8, btConvexPenetrationDepthSolver jarg8_);
-  public final static native void delete_btGjkPairDetector(long jarg1);
-  public final static native void btGjkPairDetector_getClosestPoints__SWIG_0(long jarg1, btGjkPairDetector jarg1_, long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_, boolean jarg5);
-  public final static native void btGjkPairDetector_getClosestPoints__SWIG_1(long jarg1, btGjkPairDetector jarg1_, long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
-  public final static native void btGjkPairDetector_getClosestPointsNonVirtual(long jarg1, btGjkPairDetector jarg1_, long jarg2, ClosestPointInput jarg2_, long jarg3, Result jarg3_, long jarg4, btIDebugDraw jarg4_);
-  public final static native void btGjkPairDetector_setMinkowskiA(long jarg1, btGjkPairDetector jarg1_, long jarg2, btConvexShape jarg2_);
-  public final static native void btGjkPairDetector_setMinkowskiB(long jarg1, btGjkPairDetector jarg1_, long jarg2, btConvexShape jarg2_);
-  public final static native void btGjkPairDetector_setCachedSeperatingAxis(long jarg1, btGjkPairDetector jarg1_, Vector3 jarg2);
-  public final static native Vector3 btGjkPairDetector_getCachedSeparatingAxis(long jarg1, btGjkPairDetector jarg1_);
-  public final static native float btGjkPairDetector_getCachedSeparatingDistance(long jarg1, btGjkPairDetector jarg1_);
-  public final static native void btGjkPairDetector_setPenetrationDepthSolver(long jarg1, btGjkPairDetector jarg1_, long jarg2, btConvexPenetrationDepthSolver jarg2_);
-  public final static native void btGjkPairDetector_setIgnoreMargin(long jarg1, btGjkPairDetector jarg1_, boolean jarg2);
-  public final static native void delete_btConvexPenetrationDepthSolver(long jarg1);
-  public final static native boolean btConvexPenetrationDepthSolver_calcPenDepth(long jarg1, btConvexPenetrationDepthSolver jarg1_, long jarg2, long jarg3, btConvexShape jarg3_, long jarg4, btConvexShape jarg4_, long jarg5, btTransform jarg5_, long jarg6, btTransform jarg6_, Vector3 jarg7, Vector3 jarg8, Vector3 jarg9, long jarg10, btIDebugDraw jarg10_, long jarg11, btStackAlloc jarg11_);
-  public final static native long new_btMinkowskiPenetrationDepthSolver();
-  public final static native void delete_btMinkowskiPenetrationDepthSolver(long jarg1);
-  public final static native long new_btGjkConvexCast(long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_, long jarg3);
-  public final static native void delete_btGjkConvexCast(long jarg1);
-  public final static native void btConstraintRow_m_normal_set(long jarg1, btConstraintRow jarg1_, float[] jarg2);
-  public final static native float[] btConstraintRow_m_normal_get(long jarg1, btConstraintRow jarg1_);
-  public final static native void btConstraintRow_m_rhs_set(long jarg1, btConstraintRow jarg1_, float jarg2);
-  public final static native float btConstraintRow_m_rhs_get(long jarg1, btConstraintRow jarg1_);
-  public final static native void btConstraintRow_m_jacDiagInv_set(long jarg1, btConstraintRow jarg1_, float jarg2);
-  public final static native float btConstraintRow_m_jacDiagInv_get(long jarg1, btConstraintRow jarg1_);
-  public final static native void btConstraintRow_m_lowerLimit_set(long jarg1, btConstraintRow jarg1_, float jarg2);
-  public final static native float btConstraintRow_m_lowerLimit_get(long jarg1, btConstraintRow jarg1_);
-  public final static native void btConstraintRow_m_upperLimit_set(long jarg1, btConstraintRow jarg1_, float jarg2);
-  public final static native float btConstraintRow_m_upperLimit_get(long jarg1, btConstraintRow jarg1_);
-  public final static native void btConstraintRow_m_accumImpulse_set(long jarg1, btConstraintRow jarg1_, float jarg2);
-  public final static native float btConstraintRow_m_accumImpulse_get(long jarg1, btConstraintRow jarg1_);
-  public final static native long new_btConstraintRow();
-  public final static native void delete_btConstraintRow(long jarg1);
-  public final static native long new_btManifoldPoint__SWIG_0();
-  public final static native long new_btManifoldPoint__SWIG_1(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void btManifoldPoint_m_localPointA_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btManifoldPoint_m_localPointA_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_localPointB_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btManifoldPoint_m_localPointB_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_positionWorldOnB_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btManifoldPoint_m_positionWorldOnB_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_positionWorldOnA_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btManifoldPoint_m_positionWorldOnA_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_normalWorldOnB_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btManifoldPoint_m_normalWorldOnB_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_distance1_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_distance1_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_combinedFriction_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_combinedFriction_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_combinedRestitution_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_combinedRestitution_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_partId0_set(long jarg1, btManifoldPoint jarg1_, int jarg2);
-  public final static native int btManifoldPoint_m_partId0_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_partId1_set(long jarg1, btManifoldPoint jarg1_, int jarg2);
-  public final static native int btManifoldPoint_m_partId1_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_index0_set(long jarg1, btManifoldPoint jarg1_, int jarg2);
-  public final static native int btManifoldPoint_m_index0_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_index1_set(long jarg1, btManifoldPoint jarg1_, int jarg2);
-  public final static native int btManifoldPoint_m_index1_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_userPersistentData_set(long jarg1, btManifoldPoint jarg1_, long jarg2);
-  public final static native long btManifoldPoint_m_userPersistentData_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_appliedImpulse_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_appliedImpulse_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_lateralFrictionInitialized_set(long jarg1, btManifoldPoint jarg1_, boolean jarg2);
-  public final static native boolean btManifoldPoint_m_lateralFrictionInitialized_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_appliedImpulseLateral1_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_appliedImpulseLateral1_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_appliedImpulseLateral2_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_appliedImpulseLateral2_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_contactMotion1_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_contactMotion1_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_contactMotion2_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_contactMotion2_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_contactCFM1_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_contactCFM1_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_contactCFM2_set(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_m_contactCFM2_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_lifeTime_set(long jarg1, btManifoldPoint jarg1_, int jarg2);
-  public final static native int btManifoldPoint_m_lifeTime_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_lateralFrictionDir1_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btManifoldPoint_m_lateralFrictionDir1_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_m_lateralFrictionDir2_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btManifoldPoint_m_lateralFrictionDir2_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_mConstraintRow_set(long jarg1, btManifoldPoint jarg1_, long jarg2, btConstraintRow jarg2_);
-  public final static native long btManifoldPoint_mConstraintRow_get(long jarg1, btManifoldPoint jarg1_);
-  public final static native float btManifoldPoint_getDistance(long jarg1, btManifoldPoint jarg1_);
-  public final static native int btManifoldPoint_getLifeTime(long jarg1, btManifoldPoint jarg1_);
-  public final static native Vector3 btManifoldPoint_getPositionWorldOnA(long jarg1, btManifoldPoint jarg1_);
-  public final static native Vector3 btManifoldPoint_getPositionWorldOnB(long jarg1, btManifoldPoint jarg1_);
-  public final static native void btManifoldPoint_setDistance(long jarg1, btManifoldPoint jarg1_, float jarg2);
-  public final static native float btManifoldPoint_getAppliedImpulse(long jarg1, btManifoldPoint jarg1_);
-  public final static native void delete_btManifoldPoint(long jarg1);
-  public final static native long new_btContinuousConvexCollision__SWIG_0(long jarg1, btConvexShape jarg1_, long jarg2, btConvexShape jarg2_, long jarg3, long jarg4, btConvexPenetrationDepthSolver jarg4_);
-  public final static native long new_btContinuousConvexCollision__SWIG_1(long jarg1, btConvexShape jarg1_, long jarg2, btStaticPlaneShape jarg2_);
-  public final static native void delete_btContinuousConvexCollision(long jarg1);
-  public final static native void btTriangleRaycastCallback_m_from_set(long jarg1, btTriangleRaycastCallback jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTriangleRaycastCallback_m_from_get(long jarg1, btTriangleRaycastCallback jarg1_);
-  public final static native void btTriangleRaycastCallback_m_to_set(long jarg1, btTriangleRaycastCallback jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTriangleRaycastCallback_m_to_get(long jarg1, btTriangleRaycastCallback jarg1_);
-  public final static native void btTriangleRaycastCallback_m_flags_set(long jarg1, btTriangleRaycastCallback jarg1_, long jarg2);
-  public final static native long btTriangleRaycastCallback_m_flags_get(long jarg1, btTriangleRaycastCallback jarg1_);
-  public final static native void btTriangleRaycastCallback_m_hitFraction_set(long jarg1, btTriangleRaycastCallback jarg1_, float jarg2);
-  public final static native float btTriangleRaycastCallback_m_hitFraction_get(long jarg1, btTriangleRaycastCallback jarg1_);
-  public final static native float btTriangleRaycastCallback_reportHit(long jarg1, btTriangleRaycastCallback jarg1_, Vector3 jarg2, float jarg3, int jarg4, int jarg5);
-  public final static native void delete_btTriangleRaycastCallback(long jarg1);
-  public final static native void btTriangleConvexcastCallback_m_convexShape_set(long jarg1, btTriangleConvexcastCallback jarg1_, long jarg2, btConvexShape jarg2_);
-  public final static native long btTriangleConvexcastCallback_m_convexShape_get(long jarg1, btTriangleConvexcastCallback jarg1_);
-  public final static native void btTriangleConvexcastCallback_m_convexShapeFrom_set(long jarg1, btTriangleConvexcastCallback jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btTriangleConvexcastCallback_m_convexShapeFrom_get(long jarg1, btTriangleConvexcastCallback jarg1_);
-  public final static native void btTriangleConvexcastCallback_m_convexShapeTo_set(long jarg1, btTriangleConvexcastCallback jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btTriangleConvexcastCallback_m_convexShapeTo_get(long jarg1, btTriangleConvexcastCallback jarg1_);
-  public final static native void btTriangleConvexcastCallback_m_triangleToWorld_set(long jarg1, btTriangleConvexcastCallback jarg1_, long jarg2, btTransform jarg2_);
-  public final static native long btTriangleConvexcastCallback_m_triangleToWorld_get(long jarg1, btTriangleConvexcastCallback jarg1_);
-  public final static native void btTriangleConvexcastCallback_m_hitFraction_set(long jarg1, btTriangleConvexcastCallback jarg1_, float jarg2);
-  public final static native float btTriangleConvexcastCallback_m_hitFraction_get(long jarg1, btTriangleConvexcastCallback jarg1_);
-  public final static native void btTriangleConvexcastCallback_m_triangleCollisionMargin_set(long jarg1, btTriangleConvexcastCallback jarg1_, float jarg2);
-  public final static native float btTriangleConvexcastCallback_m_triangleCollisionMargin_get(long jarg1, btTriangleConvexcastCallback jarg1_);
-  public final static native void btTriangleConvexcastCallback_m_allowedPenetration_set(long jarg1, btTriangleConvexcastCallback jarg1_, float jarg2);
-  public final static native float btTriangleConvexcastCallback_m_allowedPenetration_get(long jarg1, btTriangleConvexcastCallback jarg1_);
-  public final static native float btTriangleConvexcastCallback_reportHit(long jarg1, btTriangleConvexcastCallback jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4, int jarg5, int jarg6);
-  public final static native void delete_btTriangleConvexcastCallback(long jarg1);
-  public final static native int btGjkEpaSolver2_StackSizeRequirement();
-  public final static native boolean btGjkEpaSolver2_Distance(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6);
-  public final static native boolean btGjkEpaSolver2_Penetration__SWIG_0(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6, boolean jarg7);
-  public final static native boolean btGjkEpaSolver2_Penetration__SWIG_1(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6);
-  public final static native float btGjkEpaSolver2_SignedDistance__SWIG_0(Vector3 jarg1, float jarg2, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, long jarg5);
-  public final static native boolean btGjkEpaSolver2_SignedDistance__SWIG_1(long jarg1, btConvexShape jarg1_, long jarg2, btTransform jarg2_, long jarg3, btConvexShape jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, long jarg6);
-  public final static native long new_btGjkEpaSolver2();
-  public final static native void delete_btGjkEpaSolver2(long jarg1);
-  public final static native long new_btGjkEpaPenetrationDepthSolver();
-  public final static native void delete_btGjkEpaPenetrationDepthSolver(long jarg1);
-  public final static native void btPointCollector_m_normalOnBInWorld_set(long jarg1, btPointCollector jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btPointCollector_m_normalOnBInWorld_get(long jarg1, btPointCollector jarg1_);
-  public final static native void btPointCollector_m_pointInWorld_set(long jarg1, btPointCollector jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btPointCollector_m_pointInWorld_get(long jarg1, btPointCollector jarg1_);
-  public final static native void btPointCollector_m_distance_set(long jarg1, btPointCollector jarg1_, float jarg2);
-  public final static native float btPointCollector_m_distance_get(long jarg1, btPointCollector jarg1_);
-  public final static native void btPointCollector_m_hasResult_set(long jarg1, btPointCollector jarg1_, boolean jarg2);
-  public final static native boolean btPointCollector_m_hasResult_get(long jarg1, btPointCollector jarg1_);
-  public final static native long new_btPointCollector();
-  public final static native void btPointCollector_setShapeIdentifiersA(long jarg1, btPointCollector jarg1_, int jarg2, int jarg3);
-  public final static native void btPointCollector_setShapeIdentifiersB(long jarg1, btPointCollector jarg1_, int jarg2, int jarg3);
-  public final static native void btPointCollector_addContactPoint(long jarg1, btPointCollector jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void delete_btPointCollector(long jarg1);
-  public final static native long new_btUsageBitfield();
-  public final static native void btUsageBitfield_reset(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_usedVertexA_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_usedVertexA_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_usedVertexB_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_usedVertexB_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_usedVertexC_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_usedVertexC_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_usedVertexD_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_usedVertexD_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_unused1_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_unused1_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_unused2_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_unused2_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_unused3_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_unused3_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void btUsageBitfield_unused4_set(long jarg1, btUsageBitfield jarg1_, int jarg2);
-  public final static native int btUsageBitfield_unused4_get(long jarg1, btUsageBitfield jarg1_);
-  public final static native void delete_btUsageBitfield(long jarg1);
-  public final static native void btSubSimplexClosestResult_m_closestPointOnSimplex_set(long jarg1, btSubSimplexClosestResult jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSubSimplexClosestResult_m_closestPointOnSimplex_get(long jarg1, btSubSimplexClosestResult jarg1_);
-  public final static native void btSubSimplexClosestResult_m_usedVertices_set(long jarg1, btSubSimplexClosestResult jarg1_, long jarg2, btUsageBitfield jarg2_);
-  public final static native long btSubSimplexClosestResult_m_usedVertices_get(long jarg1, btSubSimplexClosestResult jarg1_);
-  public final static native void btSubSimplexClosestResult_m_barycentricCoords_set(long jarg1, btSubSimplexClosestResult jarg1_, float[] jarg2);
-  public final static native float[] btSubSimplexClosestResult_m_barycentricCoords_get(long jarg1, btSubSimplexClosestResult jarg1_);
-  public final static native void btSubSimplexClosestResult_m_degenerate_set(long jarg1, btSubSimplexClosestResult jarg1_, boolean jarg2);
-  public final static native boolean btSubSimplexClosestResult_m_degenerate_get(long jarg1, btSubSimplexClosestResult jarg1_);
-  public final static native void btSubSimplexClosestResult_reset(long jarg1, btSubSimplexClosestResult jarg1_);
-  public final static native boolean btSubSimplexClosestResult_isValid(long jarg1, btSubSimplexClosestResult jarg1_);
-  public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_0(long jarg1, btSubSimplexClosestResult jarg1_, float jarg2, float jarg3, float jarg4, float jarg5);
-  public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_1(long jarg1, btSubSimplexClosestResult jarg1_, float jarg2, float jarg3, float jarg4);
-  public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_2(long jarg1, btSubSimplexClosestResult jarg1_, float jarg2, float jarg3);
-  public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_3(long jarg1, btSubSimplexClosestResult jarg1_, float jarg2);
-  public final static native void btSubSimplexClosestResult_setBarycentricCoordinates__SWIG_4(long jarg1, btSubSimplexClosestResult jarg1_);
-  public final static native long new_btSubSimplexClosestResult();
-  public final static native void delete_btSubSimplexClosestResult(long jarg1);
-  public final static native void btVoronoiSimplexSolver_m_numVertices_set(long jarg1, btVoronoiSimplexSolver jarg1_, int jarg2);
-  public final static native int btVoronoiSimplexSolver_m_numVertices_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_simplexVectorW_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_simplexVectorW_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_simplexPointsP_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_simplexPointsP_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_simplexPointsQ_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_simplexPointsQ_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_cachedP1_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_cachedP1_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_cachedP2_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_cachedP2_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_cachedV_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_cachedV_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_lastW_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_lastW_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_equalVertexThreshold_set(long jarg1, btVoronoiSimplexSolver jarg1_, float jarg2);
-  public final static native float btVoronoiSimplexSolver_m_equalVertexThreshold_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_cachedValidClosest_set(long jarg1, btVoronoiSimplexSolver jarg1_, boolean jarg2);
-  public final static native boolean btVoronoiSimplexSolver_m_cachedValidClosest_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_cachedBC_set(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btSubSimplexClosestResult jarg2_);
-  public final static native long btVoronoiSimplexSolver_m_cachedBC_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_m_needsUpdate_set(long jarg1, btVoronoiSimplexSolver jarg1_, boolean jarg2);
-  public final static native boolean btVoronoiSimplexSolver_m_needsUpdate_get(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_removeVertex(long jarg1, btVoronoiSimplexSolver jarg1_, int jarg2);
-  public final static native void btVoronoiSimplexSolver_reduceVertices(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btUsageBitfield jarg2_);
-  public final static native boolean btVoronoiSimplexSolver_updateClosestVectorAndPoints(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native boolean btVoronoiSimplexSolver_closestPtPointTetrahedron(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, long jarg7, btSubSimplexClosestResult jarg7_);
-  public final static native int btVoronoiSimplexSolver_pointOutsideOfPlane(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
-  public final static native boolean btVoronoiSimplexSolver_closestPtPointTriangle(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, long jarg6, btSubSimplexClosestResult jarg6_);
-  public final static native long new_btVoronoiSimplexSolver();
-  public final static native void btVoronoiSimplexSolver_reset(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_addVertex(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native void btVoronoiSimplexSolver_setEqualVertexThreshold(long jarg1, btVoronoiSimplexSolver jarg1_, float jarg2);
-  public final static native float btVoronoiSimplexSolver_getEqualVertexThreshold(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native boolean btVoronoiSimplexSolver_closest(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2);
-  public final static native float btVoronoiSimplexSolver_maxVertex(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native boolean btVoronoiSimplexSolver_fullSimplex(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native int btVoronoiSimplexSolver_getSimplex(long jarg1, btVoronoiSimplexSolver jarg1_, long jarg2, btVector3 jarg2_, long jarg3, btVector3 jarg3_, long jarg4, btVector3 jarg4_);
-  public final static native boolean btVoronoiSimplexSolver_inSimplex(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2);
-  public final static native void btVoronoiSimplexSolver_backup_closest(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2);
-  public final static native boolean btVoronoiSimplexSolver_emptySimplex(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void btVoronoiSimplexSolver_compute_points(long jarg1, btVoronoiSimplexSolver jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native int btVoronoiSimplexSolver_numVertices(long jarg1, btVoronoiSimplexSolver jarg1_);
-  public final static native void delete_btVoronoiSimplexSolver(long jarg1);
-  public final static native void btConstraintInfo2_fps_set(long jarg1, btConstraintInfo2 jarg1_, float jarg2);
-  public final static native float btConstraintInfo2_fps_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_erp_set(long jarg1, btConstraintInfo2 jarg1_, float jarg2);
-  public final static native float btConstraintInfo2_erp_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_J1linearAxis_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_m_J1linearAxis_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_J1angularAxis_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_m_J1angularAxis_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_J2linearAxis_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_m_J2linearAxis_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_J2angularAxis_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_m_J2angularAxis_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_rowskip_set(long jarg1, btConstraintInfo2 jarg1_, int jarg2);
-  public final static native int btConstraintInfo2_rowskip_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_constraintError_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_m_constraintError_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_cfm_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_cfm_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_lowerLimit_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_m_lowerLimit_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_upperLimit_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_m_upperLimit_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_findex_set(long jarg1, btConstraintInfo2 jarg1_, long jarg2);
-  public final static native long btConstraintInfo2_findex_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_numIterations_set(long jarg1, btConstraintInfo2 jarg1_, int jarg2);
-  public final static native int btConstraintInfo2_m_numIterations_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native void btConstraintInfo2_m_damping_set(long jarg1, btConstraintInfo2 jarg1_, float jarg2);
-  public final static native float btConstraintInfo2_m_damping_get(long jarg1, btConstraintInfo2 jarg1_);
-  public final static native long new_btConstraintInfo2();
-  public final static native void delete_btConstraintInfo2(long jarg1);
-  public final static native void delete_btTypedConstraint(long jarg1);
-  public final static native long btTypedConstraint_getFixedBody();
-  public final static native int btTypedConstraint_getOverrideNumSolverIterations(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setOverrideNumSolverIterations(long jarg1, btTypedConstraint jarg1_, int jarg2);
-  public final static native void btTypedConstraint_buildJacobian(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setupSolverConstraint(long jarg1, btTypedConstraint jarg1_, long jarg2, int jarg3, int jarg4, float jarg5);
-  public final static native void btTypedConstraint_getInfo1(long jarg1, btTypedConstraint jarg1_, long jarg2);
-  public final static native void btTypedConstraint_getInfo2(long jarg1, btTypedConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_);
-  public final static native void btTypedConstraint_internalSetAppliedImpulse(long jarg1, btTypedConstraint jarg1_, float jarg2);
-  public final static native float btTypedConstraint_internalGetAppliedImpulse(long jarg1, btTypedConstraint jarg1_);
-  public final static native float btTypedConstraint_getBreakingImpulseThreshold(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setBreakingImpulseThreshold(long jarg1, btTypedConstraint jarg1_, float jarg2);
-  public final static native boolean btTypedConstraint_isEnabled(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setEnabled(long jarg1, btTypedConstraint jarg1_, boolean jarg2);
-  public final static native void btTypedConstraint_solveConstraintObsolete(long jarg1, btTypedConstraint jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btRigidBody jarg3_, float jarg4);
-  public final static native long btTypedConstraint_getRigidBodyA__SWIG_0(long jarg1, btTypedConstraint jarg1_);
-  public final static native long btTypedConstraint_getRigidBodyB__SWIG_0(long jarg1, btTypedConstraint jarg1_);
-  public final static native int btTypedConstraint_getUserConstraintType(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setUserConstraintType(long jarg1, btTypedConstraint jarg1_, int jarg2);
-  public final static native void btTypedConstraint_setUserConstraintId(long jarg1, btTypedConstraint jarg1_, int jarg2);
-  public final static native int btTypedConstraint_getUserConstraintId(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setUserConstraintPtr(long jarg1, btTypedConstraint jarg1_, long jarg2);
-  public final static native long btTypedConstraint_getUserConstraintPtr(long jarg1, btTypedConstraint jarg1_);
-  public final static native int btTypedConstraint_getUid(long jarg1, btTypedConstraint jarg1_);
-  public final static native boolean btTypedConstraint_needsFeedback(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_enableFeedback(long jarg1, btTypedConstraint jarg1_, boolean jarg2);
-  public final static native float btTypedConstraint_getAppliedImpulse(long jarg1, btTypedConstraint jarg1_);
-  public final static native int btTypedConstraint_getConstraintType(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setDbgDrawSize(long jarg1, btTypedConstraint jarg1_, float jarg2);
-  public final static native float btTypedConstraint_getDbgDrawSize(long jarg1, btTypedConstraint jarg1_);
-  public final static native void btTypedConstraint_setParam__SWIG_0(long jarg1, btTypedConstraint jarg1_, int jarg2, float jarg3, int jarg4);
-  public final static native void btTypedConstraint_setParam__SWIG_1(long jarg1, btTypedConstraint jarg1_, int jarg2, float jarg3);
-  public final static native float btTypedConstraint_getParam__SWIG_0(long jarg1, btTypedConstraint jarg1_, int jarg2, int jarg3);
-  public final static native float btTypedConstraint_getParam__SWIG_1(long jarg1, btTypedConstraint jarg1_, int jarg2);
-  public final static native int btTypedConstraint_calculateSerializeBufferSize(long jarg1, btTypedConstraint jarg1_);
-  public final static native String btTypedConstraint_serialize(long jarg1, btTypedConstraint jarg1_, long jarg2, long jarg3);
-  public final static native float btAdjustAngleToLimits(float jarg1, float jarg2, float jarg3);
-  public final static native void btTypedConstraintData_m_rbA_set(long jarg1, btTypedConstraintData jarg1_, long jarg2, btRigidBodyFloatData jarg2_);
-  public final static native long btTypedConstraintData_m_rbA_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_rbB_set(long jarg1, btTypedConstraintData jarg1_, long jarg2, btRigidBodyFloatData jarg2_);
-  public final static native long btTypedConstraintData_m_rbB_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_name_set(long jarg1, btTypedConstraintData jarg1_, String jarg2);
-  public final static native String btTypedConstraintData_m_name_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_objectType_set(long jarg1, btTypedConstraintData jarg1_, int jarg2);
-  public final static native int btTypedConstraintData_m_objectType_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_userConstraintType_set(long jarg1, btTypedConstraintData jarg1_, int jarg2);
-  public final static native int btTypedConstraintData_m_userConstraintType_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_userConstraintId_set(long jarg1, btTypedConstraintData jarg1_, int jarg2);
-  public final static native int btTypedConstraintData_m_userConstraintId_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_needsFeedback_set(long jarg1, btTypedConstraintData jarg1_, int jarg2);
-  public final static native int btTypedConstraintData_m_needsFeedback_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_appliedImpulse_set(long jarg1, btTypedConstraintData jarg1_, float jarg2);
-  public final static native float btTypedConstraintData_m_appliedImpulse_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_dbgDrawSize_set(long jarg1, btTypedConstraintData jarg1_, float jarg2);
-  public final static native float btTypedConstraintData_m_dbgDrawSize_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_set(long jarg1, btTypedConstraintData jarg1_, int jarg2);
-  public final static native int btTypedConstraintData_m_disableCollisionsBetweenLinkedBodies_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_overrideNumSolverIterations_set(long jarg1, btTypedConstraintData jarg1_, int jarg2);
-  public final static native int btTypedConstraintData_m_overrideNumSolverIterations_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_breakingImpulseThreshold_set(long jarg1, btTypedConstraintData jarg1_, float jarg2);
-  public final static native float btTypedConstraintData_m_breakingImpulseThreshold_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native void btTypedConstraintData_m_isEnabled_set(long jarg1, btTypedConstraintData jarg1_, int jarg2);
-  public final static native int btTypedConstraintData_m_isEnabled_get(long jarg1, btTypedConstraintData jarg1_);
-  public final static native long new_btTypedConstraintData();
-  public final static native void delete_btTypedConstraintData(long jarg1);
-  public final static native long new_btAngularLimit();
-  public final static native void btAngularLimit_set__SWIG_0(long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3, float jarg4, float jarg5, float jarg6);
-  public final static native void btAngularLimit_set__SWIG_1(long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3, float jarg4, float jarg5);
-  public final static native void btAngularLimit_set__SWIG_2(long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3, float jarg4);
-  public final static native void btAngularLimit_set__SWIG_3(long jarg1, btAngularLimit jarg1_, float jarg2, float jarg3);
-  public final static native void btAngularLimit_test(long jarg1, btAngularLimit jarg1_, float jarg2);
-  public final static native float btAngularLimit_getSoftness(long jarg1, btAngularLimit jarg1_);
-  public final static native float btAngularLimit_getBiasFactor(long jarg1, btAngularLimit jarg1_);
-  public final static native float btAngularLimit_getRelaxationFactor(long jarg1, btAngularLimit jarg1_);
-  public final static native float btAngularLimit_getCorrection(long jarg1, btAngularLimit jarg1_);
-  public final static native float btAngularLimit_getSign(long jarg1, btAngularLimit jarg1_);
-  public final static native float btAngularLimit_getHalfRange(long jarg1, btAngularLimit jarg1_);
-  public final static native boolean btAngularLimit_isLimit(long jarg1, btAngularLimit jarg1_);
-  public final static native void btAngularLimit_fit(long jarg1, btAngularLimit jarg1_, long jarg2);
-  public final static native float btAngularLimit_getError(long jarg1, btAngularLimit jarg1_);
-  public final static native float btAngularLimit_getLow(long jarg1, btAngularLimit jarg1_);
-  public final static native float btAngularLimit_getHigh(long jarg1, btAngularLimit jarg1_);
-  public final static native void delete_btAngularLimit(long jarg1);
-  public final static native void delete_btDynamicsWorld(long jarg1);
-  public final static native int btDynamicsWorld_stepSimulation__SWIG_0(long jarg1, btDynamicsWorld jarg1_, float jarg2, int jarg3, float jarg4);
-  public final static native int btDynamicsWorld_stepSimulation__SWIG_1(long jarg1, btDynamicsWorld jarg1_, float jarg2, int jarg3);
-  public final static native int btDynamicsWorld_stepSimulation__SWIG_2(long jarg1, btDynamicsWorld jarg1_, float jarg2);
-  public final static native void btDynamicsWorld_addConstraint__SWIG_0(long jarg1, btDynamicsWorld jarg1_, long jarg2, btTypedConstraint jarg2_, boolean jarg3);
-  public final static native void btDynamicsWorld_addConstraint__SWIG_1(long jarg1, btDynamicsWorld jarg1_, long jarg2, btTypedConstraint jarg2_);
-  public final static native void btDynamicsWorld_removeConstraint(long jarg1, btDynamicsWorld jarg1_, long jarg2, btTypedConstraint jarg2_);
-  public final static native void btDynamicsWorld_addAction(long jarg1, btDynamicsWorld jarg1_, long jarg2, btActionInterface jarg2_);
-  public final static native void btDynamicsWorld_removeAction(long jarg1, btDynamicsWorld jarg1_, long jarg2, btActionInterface jarg2_);
-  public final static native void btDynamicsWorld_setGravity(long jarg1, btDynamicsWorld jarg1_, Vector3 jarg2);
-  public final static native Vector3 btDynamicsWorld_getGravity(long jarg1, btDynamicsWorld jarg1_);
-  public final static native void btDynamicsWorld_synchronizeMotionStates(long jarg1, btDynamicsWorld jarg1_);
-  public final static native void btDynamicsWorld_addRigidBody__SWIG_0(long jarg1, btDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_);
-  public final static native void btDynamicsWorld_addRigidBody__SWIG_1(long jarg1, btDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_, short jarg3, short jarg4);
-  public final static native void btDynamicsWorld_removeRigidBody(long jarg1, btDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_);
-  public final static native void btDynamicsWorld_setConstraintSolver(long jarg1, btDynamicsWorld jarg1_, long jarg2, btConstraintSolver jarg2_);
-  public final static native long btDynamicsWorld_getConstraintSolver(long jarg1, btDynamicsWorld jarg1_);
-  public final static native int btDynamicsWorld_getNumConstraints(long jarg1, btDynamicsWorld jarg1_);
-  public final static native long btDynamicsWorld_getConstraint__SWIG_0(long jarg1, btDynamicsWorld jarg1_, int jarg2);
-  public final static native int btDynamicsWorld_getWorldType(long jarg1, btDynamicsWorld jarg1_);
-  public final static native void btDynamicsWorld_clearForces(long jarg1, btDynamicsWorld jarg1_);
-  public final static native void btDynamicsWorld_setInternalTickCallback__SWIG_0(long jarg1, btDynamicsWorld jarg1_, long jarg2, long jarg3, boolean jarg4);
-  public final static native void btDynamicsWorld_setInternalTickCallback__SWIG_1(long jarg1, btDynamicsWorld jarg1_, long jarg2, long jarg3);
-  public final static native void btDynamicsWorld_setInternalTickCallback__SWIG_2(long jarg1, btDynamicsWorld jarg1_, long jarg2);
-  public final static native void btDynamicsWorld_setWorldUserInfo(long jarg1, btDynamicsWorld jarg1_, long jarg2);
-  public final static native long btDynamicsWorld_getWorldUserInfo(long jarg1, btDynamicsWorld jarg1_);
-  public final static native long btDynamicsWorld_getSolverInfo(long jarg1, btDynamicsWorld jarg1_);
-  public final static native void btDynamicsWorld_addVehicle(long jarg1, btDynamicsWorld jarg1_, long jarg2, btActionInterface jarg2_);
-  public final static native void btDynamicsWorld_removeVehicle(long jarg1, btDynamicsWorld jarg1_, long jarg2, btActionInterface jarg2_);
-  public final static native void btDynamicsWorld_addCharacter(long jarg1, btDynamicsWorld jarg1_, long jarg2, btActionInterface jarg2_);
-  public final static native void btDynamicsWorld_removeCharacter(long jarg1, btDynamicsWorld jarg1_, long jarg2, btActionInterface jarg2_);
-  public final static native long new_btSimpleDynamicsWorld(long jarg1, btDispatcher jarg1_, long jarg2, btBroadphaseInterface jarg2_, long jarg3, btConstraintSolver jarg3_, long jarg4, btCollisionConfiguration jarg4_);
-  public final static native void delete_btSimpleDynamicsWorld(long jarg1);
-  public final static native int btSimpleDynamicsWorld_stepSimulation__SWIG_0(long jarg1, btSimpleDynamicsWorld jarg1_, float jarg2, int jarg3, float jarg4);
-  public final static native int btSimpleDynamicsWorld_stepSimulation__SWIG_1(long jarg1, btSimpleDynamicsWorld jarg1_, float jarg2, int jarg3);
-  public final static native int btSimpleDynamicsWorld_stepSimulation__SWIG_2(long jarg1, btSimpleDynamicsWorld jarg1_, float jarg2);
-  public final static native void btSimpleDynamicsWorld_addRigidBody__SWIG_0(long jarg1, btSimpleDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_);
-  public final static native void btSimpleDynamicsWorld_addRigidBody__SWIG_1(long jarg1, btSimpleDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_, short jarg3, short jarg4);
-  public final static native void delete_btActionInterface(long jarg1);
-  public final static native void btActionInterface_updateAction(long jarg1, btActionInterface jarg1_, long jarg2, btCollisionWorld jarg2_, float jarg3);
-  public final static native void btActionInterface_debugDraw(long jarg1, btActionInterface jarg1_, long jarg2, btIDebugDraw jarg2_);
-  public final static native long new_btDiscreteDynamicsWorld(long jarg1, btDispatcher jarg1_, long jarg2, btBroadphaseInterface jarg2_, long jarg3, btConstraintSolver jarg3_, long jarg4, btCollisionConfiguration jarg4_);
-  public final static native void delete_btDiscreteDynamicsWorld(long jarg1);
-  public final static native int btDiscreteDynamicsWorld_stepSimulation__SWIG_0(long jarg1, btDiscreteDynamicsWorld jarg1_, float jarg2, int jarg3, float jarg4);
-  public final static native int btDiscreteDynamicsWorld_stepSimulation__SWIG_1(long jarg1, btDiscreteDynamicsWorld jarg1_, float jarg2, int jarg3);
-  public final static native int btDiscreteDynamicsWorld_stepSimulation__SWIG_2(long jarg1, btDiscreteDynamicsWorld jarg1_, float jarg2);
-  public final static native void btDiscreteDynamicsWorld_synchronizeSingleMotionState(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_);
-  public final static native void btDiscreteDynamicsWorld_addConstraint__SWIG_0(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btTypedConstraint jarg2_, boolean jarg3);
-  public final static native void btDiscreteDynamicsWorld_addConstraint__SWIG_1(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btTypedConstraint jarg2_);
-  public final static native long btDiscreteDynamicsWorld_getSimulationIslandManager__SWIG_0(long jarg1, btDiscreteDynamicsWorld jarg1_);
-  public final static native long btDiscreteDynamicsWorld_getCollisionWorld(long jarg1, btDiscreteDynamicsWorld jarg1_);
-  public final static native void btDiscreteDynamicsWorld_addCollisionObject__SWIG_0(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btCollisionObject jarg2_, short jarg3, short jarg4);
-  public final static native void btDiscreteDynamicsWorld_addCollisionObject__SWIG_1(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btCollisionObject jarg2_, short jarg3);
-  public final static native void btDiscreteDynamicsWorld_addCollisionObject__SWIG_2(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native void btDiscreteDynamicsWorld_addRigidBody__SWIG_0(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_);
-  public final static native void btDiscreteDynamicsWorld_addRigidBody__SWIG_1(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btRigidBody jarg2_, short jarg3, short jarg4);
-  public final static native void btDiscreteDynamicsWorld_debugDrawConstraint(long jarg1, btDiscreteDynamicsWorld jarg1_, long jarg2, btTypedConstraint jarg2_);
-  public final static native long btDiscreteDynamicsWorld_getConstraint__SWIG_0(long jarg1, btDiscreteDynamicsWorld jarg1_, int jarg2);
-  public final static native void btDiscreteDynamicsWorld_applyGravity(long jarg1, btDiscreteDynamicsWorld jarg1_);
-  public final static native void btDiscreteDynamicsWorld_setNumTasks(long jarg1, btDiscreteDynamicsWorld jarg1_, int jarg2);
-  public final static native void btDiscreteDynamicsWorld_updateVehicles(long jarg1, btDiscreteDynamicsWorld jarg1_, float jarg2);
-  public final static native void btDiscreteDynamicsWorld_setSynchronizeAllMotionStates(long jarg1, btDiscreteDynamicsWorld jarg1_, boolean jarg2);
-  public final static native boolean btDiscreteDynamicsWorld_getSynchronizeAllMotionStates(long jarg1, btDiscreteDynamicsWorld jarg1_);
-  public final static native void delete_btCharacterControllerInterface(long jarg1);
-  public final static native void btCharacterControllerInterface_setWalkDirection(long jarg1, btCharacterControllerInterface jarg1_, Vector3 jarg2);
-  public final static native void btCharacterControllerInterface_setVelocityForTimeInterval(long jarg1, btCharacterControllerInterface jarg1_, Vector3 jarg2, float jarg3);
-  public final static native void btCharacterControllerInterface_reset(long jarg1, btCharacterControllerInterface jarg1_);
-  public final static native void btCharacterControllerInterface_warp(long jarg1, btCharacterControllerInterface jarg1_, Vector3 jarg2);
-  public final static native void btCharacterControllerInterface_preStep(long jarg1, btCharacterControllerInterface jarg1_, long jarg2, btCollisionWorld jarg2_);
-  public final static native void btCharacterControllerInterface_playerStep(long jarg1, btCharacterControllerInterface jarg1_, long jarg2, btCollisionWorld jarg2_, float jarg3);
-  public final static native boolean btCharacterControllerInterface_canJump(long jarg1, btCharacterControllerInterface jarg1_);
-  public final static native void btCharacterControllerInterface_jump(long jarg1, btCharacterControllerInterface jarg1_);
-  public final static native boolean btCharacterControllerInterface_onGround(long jarg1, btCharacterControllerInterface jarg1_);
-  public final static native long new_btKinematicCharacterController__SWIG_0(long jarg1, btPairCachingGhostObject jarg1_, long jarg2, btConvexShape jarg2_, float jarg3, int jarg4);
-  public final static native long new_btKinematicCharacterController__SWIG_1(long jarg1, btPairCachingGhostObject jarg1_, long jarg2, btConvexShape jarg2_, float jarg3);
-  public final static native void delete_btKinematicCharacterController(long jarg1);
-  public final static native void btKinematicCharacterController_setUpAxis(long jarg1, btKinematicCharacterController jarg1_, int jarg2);
-  public final static native void btKinematicCharacterController_setFallSpeed(long jarg1, btKinematicCharacterController jarg1_, float jarg2);
-  public final static native void btKinematicCharacterController_setJumpSpeed(long jarg1, btKinematicCharacterController jarg1_, float jarg2);
-  public final static native void btKinematicCharacterController_setMaxJumpHeight(long jarg1, btKinematicCharacterController jarg1_, float jarg2);
-  public final static native void btKinematicCharacterController_setGravity(long jarg1, btKinematicCharacterController jarg1_, float jarg2);
-  public final static native float btKinematicCharacterController_getGravity(long jarg1, btKinematicCharacterController jarg1_);
-  public final static native void btKinematicCharacterController_setMaxSlope(long jarg1, btKinematicCharacterController jarg1_, float jarg2);
-  public final static native float btKinematicCharacterController_getMaxSlope(long jarg1, btKinematicCharacterController jarg1_);
-  public final static native long btKinematicCharacterController_getGhostObject(long jarg1, btKinematicCharacterController jarg1_);
-  public final static native void btKinematicCharacterController_setUseGhostSweepTest(long jarg1, btKinematicCharacterController jarg1_, boolean jarg2);
-  public final static native void btContactSolverInfoData_m_tau_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_tau_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_damping_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_damping_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_friction_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_friction_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_timeStep_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_timeStep_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_restitution_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_restitution_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_numIterations_set(long jarg1, btContactSolverInfoData jarg1_, int jarg2);
-  public final static native int btContactSolverInfoData_m_numIterations_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_maxErrorReduction_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_maxErrorReduction_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_sor_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_sor_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_erp_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_erp_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_erp2_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_erp2_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_globalCfm_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_globalCfm_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_splitImpulse_set(long jarg1, btContactSolverInfoData jarg1_, int jarg2);
-  public final static native int btContactSolverInfoData_m_splitImpulse_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_splitImpulsePenetrationThreshold_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_splitImpulsePenetrationThreshold_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_linearSlop_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_linearSlop_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_warmstartingFactor_set(long jarg1, btContactSolverInfoData jarg1_, float jarg2);
-  public final static native float btContactSolverInfoData_m_warmstartingFactor_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_solverMode_set(long jarg1, btContactSolverInfoData jarg1_, int jarg2);
-  public final static native int btContactSolverInfoData_m_solverMode_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_restingContactRestitutionThreshold_set(long jarg1, btContactSolverInfoData jarg1_, int jarg2);
-  public final static native int btContactSolverInfoData_m_restingContactRestitutionThreshold_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native void btContactSolverInfoData_m_minimumSolverBatchSize_set(long jarg1, btContactSolverInfoData jarg1_, int jarg2);
-  public final static native int btContactSolverInfoData_m_minimumSolverBatchSize_get(long jarg1, btContactSolverInfoData jarg1_);
-  public final static native long new_btContactSolverInfoData();
-  public final static native void delete_btContactSolverInfoData(long jarg1);
-  public final static native long new_btContactSolverInfo();
-  public final static native void delete_btContactSolverInfo(long jarg1);
-  public final static native void delete_btConstraintSolver(long jarg1);
-  public final static native void btConstraintSolver_prepareSolve(long jarg1, btConstraintSolver jarg1_, int jarg2, int jarg3);
-  public final static native float btConstraintSolver_solveGroup(long jarg1, btConstraintSolver jarg1_, long jarg2, int jarg3, long jarg4, int jarg5, long jarg6, int jarg7, long jarg8, btContactSolverInfo jarg8_, long jarg9, btIDebugDraw jarg9_, long jarg10, btStackAlloc jarg10_, long jarg11, btDispatcher jarg11_);
-  public final static native void btConstraintSolver_allSolved(long jarg1, btConstraintSolver jarg1_, long jarg2, btContactSolverInfo jarg2_, long jarg3, btIDebugDraw jarg3_, long jarg4, btStackAlloc jarg4_);
-  public final static native void btConstraintSolver_reset(long jarg1, btConstraintSolver jarg1_);
-  public final static native long new_btSequentialImpulseConstraintSolver();
-  public final static native void delete_btSequentialImpulseConstraintSolver(long jarg1);
-  public final static native long btSequentialImpulseConstraintSolver_btRand2(long jarg1, btSequentialImpulseConstraintSolver jarg1_);
-  public final static native int btSequentialImpulseConstraintSolver_btRandInt2(long jarg1, btSequentialImpulseConstraintSolver jarg1_, int jarg2);
-  public final static native void btSequentialImpulseConstraintSolver_setRandSeed(long jarg1, btSequentialImpulseConstraintSolver jarg1_, long jarg2);
-  public final static native long btSequentialImpulseConstraintSolver_getRandSeed(long jarg1, btSequentialImpulseConstraintSolver jarg1_);
-  public final static native void btSolverBodyObsolete_m_deltaLinearVelocity_set(long jarg1, btSolverBodyObsolete jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverBodyObsolete_m_deltaLinearVelocity_get(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_m_deltaAngularVelocity_set(long jarg1, btSolverBodyObsolete jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverBodyObsolete_m_deltaAngularVelocity_get(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_m_angularFactor_set(long jarg1, btSolverBodyObsolete jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverBodyObsolete_m_angularFactor_get(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_m_invMass_set(long jarg1, btSolverBodyObsolete jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverBodyObsolete_m_invMass_get(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_m_originalBody_set(long jarg1, btSolverBodyObsolete jarg1_, long jarg2, btRigidBody jarg2_);
-  public final static native long btSolverBodyObsolete_m_originalBody_get(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_m_pushVelocity_set(long jarg1, btSolverBodyObsolete jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverBodyObsolete_m_pushVelocity_get(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_m_turnVelocity_set(long jarg1, btSolverBodyObsolete jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverBodyObsolete_m_turnVelocity_get(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_getVelocityInLocalPointObsolete(long jarg1, btSolverBodyObsolete jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void btSolverBodyObsolete_getAngularVelocity(long jarg1, btSolverBodyObsolete jarg1_, Vector3 jarg2);
-  public final static native void btSolverBodyObsolete_applyImpulse(long jarg1, btSolverBodyObsolete jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void btSolverBodyObsolete_internalApplyPushImpulse(long jarg1, btSolverBodyObsolete jarg1_, Vector3 jarg2, Vector3 jarg3, float jarg4);
-  public final static native void btSolverBodyObsolete_writebackVelocity__SWIG_0(long jarg1, btSolverBodyObsolete jarg1_);
-  public final static native void btSolverBodyObsolete_writebackVelocity__SWIG_1(long jarg1, btSolverBodyObsolete jarg1_, float jarg2);
-  public final static native long new_btSolverBodyObsolete();
-  public final static native void delete_btSolverBodyObsolete(long jarg1);
-  public final static native long new_btSliderConstraint__SWIG_0(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
-  public final static native long new_btSliderConstraint__SWIG_1(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_, boolean jarg3);
-  public final static native void btSliderConstraint_getInfo1NonVirtual(long jarg1, btSliderConstraint jarg1_, long jarg2);
-  public final static native void btSliderConstraint_getInfo2NonVirtual(long jarg1, btSliderConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6, float jarg7, float jarg8);
-  public final static native long btSliderConstraint_getRigidBodyA(long jarg1, btSliderConstraint jarg1_);
-  public final static native long btSliderConstraint_getRigidBodyB(long jarg1, btSliderConstraint jarg1_);
-  public final static native long btSliderConstraint_getCalculatedTransformA(long jarg1, btSliderConstraint jarg1_);
-  public final static native long btSliderConstraint_getCalculatedTransformB(long jarg1, btSliderConstraint jarg1_);
-  public final static native long btSliderConstraint_getFrameOffsetA__SWIG_0(long jarg1, btSliderConstraint jarg1_);
-  public final static native long btSliderConstraint_getFrameOffsetB__SWIG_0(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getLowerLinLimit(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setLowerLinLimit(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native float btSliderConstraint_getUpperLinLimit(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setUpperLinLimit(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native float btSliderConstraint_getLowerAngLimit(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setLowerAngLimit(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native float btSliderConstraint_getUpperAngLimit(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setUpperAngLimit(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native boolean btSliderConstraint_getUseLinearReferenceFrameA(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getSoftnessDirLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getRestitutionDirLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getDampingDirLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getSoftnessDirAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getRestitutionDirAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getDampingDirAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getSoftnessLimLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getRestitutionLimLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getDampingLimLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getSoftnessLimAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getRestitutionLimAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getDampingLimAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getSoftnessOrthoLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getRestitutionOrthoLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getDampingOrthoLin(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getSoftnessOrthoAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getRestitutionOrthoAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getDampingOrthoAng(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setSoftnessDirLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setRestitutionDirLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setDampingDirLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setSoftnessDirAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setRestitutionDirAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setDampingDirAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setSoftnessLimLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setRestitutionLimLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setDampingLimLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setSoftnessLimAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setRestitutionLimAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setDampingLimAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setSoftnessOrthoLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setRestitutionOrthoLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setDampingOrthoLin(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setSoftnessOrthoAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setRestitutionOrthoAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setDampingOrthoAng(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native void btSliderConstraint_setPoweredLinMotor(long jarg1, btSliderConstraint jarg1_, boolean jarg2);
-  public final static native boolean btSliderConstraint_getPoweredLinMotor(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setTargetLinMotorVelocity(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native float btSliderConstraint_getTargetLinMotorVelocity(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setMaxLinMotorForce(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native float btSliderConstraint_getMaxLinMotorForce(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setPoweredAngMotor(long jarg1, btSliderConstraint jarg1_, boolean jarg2);
-  public final static native boolean btSliderConstraint_getPoweredAngMotor(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setTargetAngMotorVelocity(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native float btSliderConstraint_getTargetAngMotorVelocity(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setMaxAngMotorForce(long jarg1, btSliderConstraint jarg1_, float jarg2);
-  public final static native float btSliderConstraint_getMaxAngMotorForce(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getLinearPos(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getAngularPos(long jarg1, btSliderConstraint jarg1_);
-  public final static native boolean btSliderConstraint_getSolveLinLimit(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getLinDepth(long jarg1, btSliderConstraint jarg1_);
-  public final static native boolean btSliderConstraint_getSolveAngLimit(long jarg1, btSliderConstraint jarg1_);
-  public final static native float btSliderConstraint_getAngDepth(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_calculateTransforms(long jarg1, btSliderConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native void btSliderConstraint_testLinLimits(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_testAngLimits(long jarg1, btSliderConstraint jarg1_);
-  public final static native Vector3 btSliderConstraint_getAncorInA(long jarg1, btSliderConstraint jarg1_);
-  public final static native Vector3 btSliderConstraint_getAncorInB(long jarg1, btSliderConstraint jarg1_);
-  public final static native boolean btSliderConstraint_getUseFrameOffset(long jarg1, btSliderConstraint jarg1_);
-  public final static native void btSliderConstraint_setUseFrameOffset(long jarg1, btSliderConstraint jarg1_, boolean jarg2);
-  public final static native void btSliderConstraint_setFrames(long jarg1, btSliderConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native void btSliderConstraint_setParam__SWIG_0(long jarg1, btSliderConstraint jarg1_, int jarg2, float jarg3, int jarg4);
-  public final static native void btSliderConstraint_setParam__SWIG_1(long jarg1, btSliderConstraint jarg1_, int jarg2, float jarg3);
-  public final static native float btSliderConstraint_getParam__SWIG_0(long jarg1, btSliderConstraint jarg1_, int jarg2, int jarg3);
-  public final static native float btSliderConstraint_getParam__SWIG_1(long jarg1, btSliderConstraint jarg1_, int jarg2);
-  public final static native void delete_btSliderConstraint(long jarg1);
-  public final static native void btSliderConstraintData_m_typeConstraintData_set(long jarg1, btSliderConstraintData jarg1_, long jarg2, btTypedConstraintData jarg2_);
-  public final static native long btSliderConstraintData_m_typeConstraintData_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_rbAFrame_set(long jarg1, btSliderConstraintData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btSliderConstraintData_m_rbAFrame_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_rbBFrame_set(long jarg1, btSliderConstraintData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btSliderConstraintData_m_rbBFrame_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_linearUpperLimit_set(long jarg1, btSliderConstraintData jarg1_, float jarg2);
-  public final static native float btSliderConstraintData_m_linearUpperLimit_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_linearLowerLimit_set(long jarg1, btSliderConstraintData jarg1_, float jarg2);
-  public final static native float btSliderConstraintData_m_linearLowerLimit_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_angularUpperLimit_set(long jarg1, btSliderConstraintData jarg1_, float jarg2);
-  public final static native float btSliderConstraintData_m_angularUpperLimit_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_angularLowerLimit_set(long jarg1, btSliderConstraintData jarg1_, float jarg2);
-  public final static native float btSliderConstraintData_m_angularLowerLimit_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_useLinearReferenceFrameA_set(long jarg1, btSliderConstraintData jarg1_, int jarg2);
-  public final static native int btSliderConstraintData_m_useLinearReferenceFrameA_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native void btSliderConstraintData_m_useOffsetForConstraintFrame_set(long jarg1, btSliderConstraintData jarg1_, int jarg2);
-  public final static native int btSliderConstraintData_m_useOffsetForConstraintFrame_get(long jarg1, btSliderConstraintData jarg1_);
-  public final static native long new_btSliderConstraintData();
-  public final static native void delete_btSliderConstraintData(long jarg1);
-  public final static native long new_btConstraintSetting();
-  public final static native void btConstraintSetting_m_tau_set(long jarg1, btConstraintSetting jarg1_, float jarg2);
-  public final static native float btConstraintSetting_m_tau_get(long jarg1, btConstraintSetting jarg1_);
-  public final static native void btConstraintSetting_m_damping_set(long jarg1, btConstraintSetting jarg1_, float jarg2);
-  public final static native float btConstraintSetting_m_damping_get(long jarg1, btConstraintSetting jarg1_);
-  public final static native void btConstraintSetting_m_impulseClamp_set(long jarg1, btConstraintSetting jarg1_, float jarg2);
-  public final static native float btConstraintSetting_m_impulseClamp_get(long jarg1, btConstraintSetting jarg1_);
-  public final static native void delete_btConstraintSetting(long jarg1);
-  public final static native void btPoint2PointConstraint_m_useSolveConstraintObsolete_set(long jarg1, btPoint2PointConstraint jarg1_, boolean jarg2);
-  public final static native boolean btPoint2PointConstraint_m_useSolveConstraintObsolete_get(long jarg1, btPoint2PointConstraint jarg1_);
-  public final static native void btPoint2PointConstraint_m_setting_set(long jarg1, btPoint2PointConstraint jarg1_, long jarg2, btConstraintSetting jarg2_);
-  public final static native long btPoint2PointConstraint_m_setting_get(long jarg1, btPoint2PointConstraint jarg1_);
-  public final static native long new_btPoint2PointConstraint__SWIG_0(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, Vector3 jarg3, Vector3 jarg4);
-  public final static native long new_btPoint2PointConstraint__SWIG_1(long jarg1, btRigidBody jarg1_, Vector3 jarg2);
-  public final static native void btPoint2PointConstraint_getInfo1NonVirtual(long jarg1, btPoint2PointConstraint jarg1_, long jarg2);
-  public final static native void btPoint2PointConstraint_getInfo2NonVirtual(long jarg1, btPoint2PointConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_);
-  public final static native void btPoint2PointConstraint_updateRHS(long jarg1, btPoint2PointConstraint jarg1_, float jarg2);
-  public final static native void btPoint2PointConstraint_setPivotA(long jarg1, btPoint2PointConstraint jarg1_, Vector3 jarg2);
-  public final static native void btPoint2PointConstraint_setPivotB(long jarg1, btPoint2PointConstraint jarg1_, Vector3 jarg2);
-  public final static native Vector3 btPoint2PointConstraint_getPivotInA(long jarg1, btPoint2PointConstraint jarg1_);
-  public final static native Vector3 btPoint2PointConstraint_getPivotInB(long jarg1, btPoint2PointConstraint jarg1_);
-  public final static native void btPoint2PointConstraint_setParam__SWIG_0(long jarg1, btPoint2PointConstraint jarg1_, int jarg2, float jarg3, int jarg4);
-  public final static native void btPoint2PointConstraint_setParam__SWIG_1(long jarg1, btPoint2PointConstraint jarg1_, int jarg2, float jarg3);
-  public final static native float btPoint2PointConstraint_getParam__SWIG_0(long jarg1, btPoint2PointConstraint jarg1_, int jarg2, int jarg3);
-  public final static native float btPoint2PointConstraint_getParam__SWIG_1(long jarg1, btPoint2PointConstraint jarg1_, int jarg2);
-  public final static native void delete_btPoint2PointConstraint(long jarg1);
-  public final static native void btPoint2PointConstraintFloatData_m_typeConstraintData_set(long jarg1, btPoint2PointConstraintFloatData jarg1_, long jarg2, btTypedConstraintData jarg2_);
-  public final static native long btPoint2PointConstraintFloatData_m_typeConstraintData_get(long jarg1, btPoint2PointConstraintFloatData jarg1_);
-  public final static native void btPoint2PointConstraintFloatData_m_pivotInA_set(long jarg1, btPoint2PointConstraintFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btPoint2PointConstraintFloatData_m_pivotInA_get(long jarg1, btPoint2PointConstraintFloatData jarg1_);
-  public final static native void btPoint2PointConstraintFloatData_m_pivotInB_set(long jarg1, btPoint2PointConstraintFloatData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btPoint2PointConstraintFloatData_m_pivotInB_get(long jarg1, btPoint2PointConstraintFloatData jarg1_);
-  public final static native long new_btPoint2PointConstraintFloatData();
-  public final static native void delete_btPoint2PointConstraintFloatData(long jarg1);
-  public final static native void btPoint2PointConstraintDoubleData_m_typeConstraintData_set(long jarg1, btPoint2PointConstraintDoubleData jarg1_, long jarg2, btTypedConstraintData jarg2_);
-  public final static native long btPoint2PointConstraintDoubleData_m_typeConstraintData_get(long jarg1, btPoint2PointConstraintDoubleData jarg1_);
-  public final static native void btPoint2PointConstraintDoubleData_m_pivotInA_set(long jarg1, btPoint2PointConstraintDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btPoint2PointConstraintDoubleData_m_pivotInA_get(long jarg1, btPoint2PointConstraintDoubleData jarg1_);
-  public final static native void btPoint2PointConstraintDoubleData_m_pivotInB_set(long jarg1, btPoint2PointConstraintDoubleData jarg1_, long jarg2, btVector3DoubleData jarg2_);
-  public final static native long btPoint2PointConstraintDoubleData_m_pivotInB_get(long jarg1, btPoint2PointConstraintDoubleData jarg1_);
-  public final static native long new_btPoint2PointConstraintDoubleData();
-  public final static native void delete_btPoint2PointConstraintDoubleData(long jarg1);
-  public final static native long new_btJacobianEntry__SWIG_0();
-  public final static native long new_btJacobianEntry__SWIG_1(Matrix3 jarg1, Matrix3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, float jarg7, Vector3 jarg8, float jarg9);
-  public final static native long new_btJacobianEntry__SWIG_2(Vector3 jarg1, Matrix3 jarg2, Matrix3 jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native long new_btJacobianEntry__SWIG_3(Vector3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4);
-  public final static native long new_btJacobianEntry__SWIG_4(Matrix3 jarg1, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, float jarg6);
-  public final static native float btJacobianEntry_getDiagonal(long jarg1, btJacobianEntry jarg1_);
-  public final static native float btJacobianEntry_getNonDiagonal__SWIG_0(long jarg1, btJacobianEntry jarg1_, long jarg2, btJacobianEntry jarg2_, float jarg3);
-  public final static native float btJacobianEntry_getNonDiagonal__SWIG_1(long jarg1, btJacobianEntry jarg1_, long jarg2, btJacobianEntry jarg2_, float jarg3, float jarg4);
-  public final static native float btJacobianEntry_getRelativeVelocity(long jarg1, btJacobianEntry jarg1_, Vector3 jarg2, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native void btJacobianEntry_m_linearJointAxis_set(long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btJacobianEntry_m_linearJointAxis_get(long jarg1, btJacobianEntry jarg1_);
-  public final static native void btJacobianEntry_m_aJ_set(long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btJacobianEntry_m_aJ_get(long jarg1, btJacobianEntry jarg1_);
-  public final static native void btJacobianEntry_m_bJ_set(long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btJacobianEntry_m_bJ_get(long jarg1, btJacobianEntry jarg1_);
-  public final static native void btJacobianEntry_m_0MinvJt_set(long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btJacobianEntry_m_0MinvJt_get(long jarg1, btJacobianEntry jarg1_);
-  public final static native void btJacobianEntry_m_1MinvJt_set(long jarg1, btJacobianEntry jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btJacobianEntry_m_1MinvJt_get(long jarg1, btJacobianEntry jarg1_);
-  public final static native void btJacobianEntry_m_Adiag_set(long jarg1, btJacobianEntry jarg1_, float jarg2);
-  public final static native float btJacobianEntry_m_Adiag_get(long jarg1, btJacobianEntry jarg1_);
-  public final static native void delete_btJacobianEntry(long jarg1);
-  public final static native long new_btSolve2LinearConstraint(float jarg1, float jarg2);
-  public final static native void btSolve2LinearConstraint_resolveUnilateralPairConstraint(long jarg1, btSolve2LinearConstraint jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btRigidBody jarg3_, Matrix3 jarg4, Matrix3 jarg5, Vector3 jarg6, float jarg7, Vector3 jarg8, Vector3 jarg9, Vector3 jarg10, Vector3 jarg11, float jarg12, Vector3 jarg13, Vector3 jarg14, Vector3 jarg15, float jarg16, Vector3 jarg17, Vector3 jarg18, Vector3 jarg19, float jarg20, Vector3 jarg21, long jarg22, long jarg23);
-  public final static native void btSolve2LinearConstraint_resolveBilateralPairConstraint(long jarg1, btSolve2LinearConstraint jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btRigidBody jarg3_, Matrix3 jarg4, Matrix3 jarg5, Vector3 jarg6, float jarg7, Vector3 jarg8, Vector3 jarg9, Vector3 jarg10, Vector3 jarg11, float jarg12, Vector3 jarg13, Vector3 jarg14, Vector3 jarg15, float jarg16, Vector3 jarg17, Vector3 jarg18, Vector3 jarg19, float jarg20, Vector3 jarg21, long jarg22, long jarg23);
-  public final static native void delete_btSolve2LinearConstraint(long jarg1);
-  public final static native void btRotationalLimitMotor_m_loLimit_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_loLimit_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_hiLimit_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_hiLimit_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_targetVelocity_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_targetVelocity_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_maxMotorForce_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_maxMotorForce_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_maxLimitForce_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_maxLimitForce_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_damping_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_damping_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_limitSoftness_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_limitSoftness_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_normalCFM_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_normalCFM_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_stopERP_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_stopERP_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_stopCFM_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_stopCFM_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_bounce_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_bounce_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_enableMotor_set(long jarg1, btRotationalLimitMotor jarg1_, boolean jarg2);
-  public final static native boolean btRotationalLimitMotor_m_enableMotor_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_currentLimitError_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_currentLimitError_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_currentPosition_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_currentPosition_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_currentLimit_set(long jarg1, btRotationalLimitMotor jarg1_, int jarg2);
-  public final static native int btRotationalLimitMotor_m_currentLimit_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native void btRotationalLimitMotor_m_accumulatedImpulse_set(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_m_accumulatedImpulse_get(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native long new_btRotationalLimitMotor__SWIG_0();
-  public final static native long new_btRotationalLimitMotor__SWIG_1(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native boolean btRotationalLimitMotor_isLimited(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native boolean btRotationalLimitMotor_needApplyTorques(long jarg1, btRotationalLimitMotor jarg1_);
-  public final static native int btRotationalLimitMotor_testLimitValue(long jarg1, btRotationalLimitMotor jarg1_, float jarg2);
-  public final static native float btRotationalLimitMotor_solveAngularLimits(long jarg1, btRotationalLimitMotor jarg1_, float jarg2, Vector3 jarg3, float jarg4, long jarg5, btRigidBody jarg5_, long jarg6, btRigidBody jarg6_);
-  public final static native void delete_btRotationalLimitMotor(long jarg1);
-  public final static native void btTranslationalLimitMotor_m_lowerLimit_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_lowerLimit_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_upperLimit_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_upperLimit_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_accumulatedImpulse_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_accumulatedImpulse_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_limitSoftness_set(long jarg1, btTranslationalLimitMotor jarg1_, float jarg2);
-  public final static native float btTranslationalLimitMotor_m_limitSoftness_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_damping_set(long jarg1, btTranslationalLimitMotor jarg1_, float jarg2);
-  public final static native float btTranslationalLimitMotor_m_damping_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_restitution_set(long jarg1, btTranslationalLimitMotor jarg1_, float jarg2);
-  public final static native float btTranslationalLimitMotor_m_restitution_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_normalCFM_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_normalCFM_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_stopERP_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_stopERP_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_stopCFM_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_stopCFM_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_enableMotor_set(long jarg1, btTranslationalLimitMotor jarg1_, boolean[] jarg2);
-  public final static native boolean[] btTranslationalLimitMotor_m_enableMotor_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_targetVelocity_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_targetVelocity_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_maxMotorForce_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_maxMotorForce_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_currentLimitError_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_currentLimitError_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_currentLinearDiff_set(long jarg1, btTranslationalLimitMotor jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btTranslationalLimitMotor_m_currentLinearDiff_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native void btTranslationalLimitMotor_m_currentLimit_set(long jarg1, btTranslationalLimitMotor jarg1_, int[] jarg2);
-  public final static native int[] btTranslationalLimitMotor_m_currentLimit_get(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native long new_btTranslationalLimitMotor__SWIG_0();
-  public final static native long new_btTranslationalLimitMotor__SWIG_1(long jarg1, btTranslationalLimitMotor jarg1_);
-  public final static native boolean btTranslationalLimitMotor_isLimited(long jarg1, btTranslationalLimitMotor jarg1_, int jarg2);
-  public final static native boolean btTranslationalLimitMotor_needApplyForce(long jarg1, btTranslationalLimitMotor jarg1_, int jarg2);
-  public final static native int btTranslationalLimitMotor_testLimitValue(long jarg1, btTranslationalLimitMotor jarg1_, int jarg2, float jarg3);
-  public final static native float btTranslationalLimitMotor_solveLinearAxis(long jarg1, btTranslationalLimitMotor jarg1_, float jarg2, float jarg3, long jarg4, btRigidBody jarg4_, Vector3 jarg5, long jarg6, btRigidBody jarg6_, Vector3 jarg7, int jarg8, Vector3 jarg9, Vector3 jarg10);
-  public final static native void delete_btTranslationalLimitMotor(long jarg1);
-  public final static native void btGeneric6DofConstraint_m_useSolveConstraintObsolete_set(long jarg1, btGeneric6DofConstraint jarg1_, boolean jarg2);
-  public final static native boolean btGeneric6DofConstraint_m_useSolveConstraintObsolete_get(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native long new_btGeneric6DofConstraint__SWIG_0(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
-  public final static native long new_btGeneric6DofConstraint__SWIG_1(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_, boolean jarg3);
-  public final static native void btGeneric6DofConstraint_calculateTransforms__SWIG_0(long jarg1, btGeneric6DofConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native void btGeneric6DofConstraint_calculateTransforms__SWIG_1(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native long btGeneric6DofConstraint_getCalculatedTransformA(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native long btGeneric6DofConstraint_getCalculatedTransformB(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native long btGeneric6DofConstraint_getFrameOffsetA__SWIG_0(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native long btGeneric6DofConstraint_getFrameOffsetB__SWIG_0(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native void btGeneric6DofConstraint_getInfo1NonVirtual(long jarg1, btGeneric6DofConstraint jarg1_, long jarg2);
-  public final static native void btGeneric6DofConstraint_getInfo2NonVirtual(long jarg1, btGeneric6DofConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8);
-  public final static native void btGeneric6DofConstraint_updateRHS(long jarg1, btGeneric6DofConstraint jarg1_, float jarg2);
-  public final static native Vector3 btGeneric6DofConstraint_getAxis(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
-  public final static native float btGeneric6DofConstraint_getAngle(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
-  public final static native float btGeneric6DofConstraint_getRelativePivotPosition(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
-  public final static native void btGeneric6DofConstraint_setFrames(long jarg1, btGeneric6DofConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native boolean btGeneric6DofConstraint_testAngularLimitMotor(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
-  public final static native void btGeneric6DofConstraint_setLinearLowerLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native void btGeneric6DofConstraint_getLinearLowerLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native void btGeneric6DofConstraint_setLinearUpperLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native void btGeneric6DofConstraint_getLinearUpperLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native void btGeneric6DofConstraint_setAngularLowerLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native void btGeneric6DofConstraint_getAngularLowerLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native void btGeneric6DofConstraint_setAngularUpperLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native void btGeneric6DofConstraint_getAngularUpperLimit(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2);
-  public final static native long btGeneric6DofConstraint_getRotationalLimitMotor(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
-  public final static native long btGeneric6DofConstraint_getTranslationalLimitMotor(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native void btGeneric6DofConstraint_setLimit(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2, float jarg3, float jarg4);
-  public final static native boolean btGeneric6DofConstraint_isLimited(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
-  public final static native void btGeneric6DofConstraint_calcAnchorPos(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native int btGeneric6DofConstraint_get_limit_motor_info2__SWIG_0(long jarg1, btGeneric6DofConstraint jarg1_, long jarg2, btRotationalLimitMotor jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, long jarg9, btConstraintInfo2 jarg9_, int jarg10, Vector3 jarg11, int jarg12, int jarg13);
-  public final static native int btGeneric6DofConstraint_get_limit_motor_info2__SWIG_1(long jarg1, btGeneric6DofConstraint jarg1_, long jarg2, btRotationalLimitMotor jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6, Vector3 jarg7, Vector3 jarg8, long jarg9, btConstraintInfo2 jarg9_, int jarg10, Vector3 jarg11, int jarg12);
-  public final static native boolean btGeneric6DofConstraint_getUseFrameOffset(long jarg1, btGeneric6DofConstraint jarg1_);
-  public final static native void btGeneric6DofConstraint_setUseFrameOffset(long jarg1, btGeneric6DofConstraint jarg1_, boolean jarg2);
-  public final static native void btGeneric6DofConstraint_setParam__SWIG_0(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2, float jarg3, int jarg4);
-  public final static native void btGeneric6DofConstraint_setParam__SWIG_1(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2, float jarg3);
-  public final static native float btGeneric6DofConstraint_getParam__SWIG_0(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2, int jarg3);
-  public final static native float btGeneric6DofConstraint_getParam__SWIG_1(long jarg1, btGeneric6DofConstraint jarg1_, int jarg2);
-  public final static native void btGeneric6DofConstraint_setAxis(long jarg1, btGeneric6DofConstraint jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void delete_btGeneric6DofConstraint(long jarg1);
-  public final static native void btGeneric6DofConstraintData_m_typeConstraintData_set(long jarg1, btGeneric6DofConstraintData jarg1_, long jarg2, btTypedConstraintData jarg2_);
-  public final static native long btGeneric6DofConstraintData_m_typeConstraintData_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_rbAFrame_set(long jarg1, btGeneric6DofConstraintData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btGeneric6DofConstraintData_m_rbAFrame_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_rbBFrame_set(long jarg1, btGeneric6DofConstraintData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btGeneric6DofConstraintData_m_rbBFrame_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_linearUpperLimit_set(long jarg1, btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btGeneric6DofConstraintData_m_linearUpperLimit_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_linearLowerLimit_set(long jarg1, btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btGeneric6DofConstraintData_m_linearLowerLimit_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_angularUpperLimit_set(long jarg1, btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btGeneric6DofConstraintData_m_angularUpperLimit_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_angularLowerLimit_set(long jarg1, btGeneric6DofConstraintData jarg1_, long jarg2, btVector3FloatData jarg2_);
-  public final static native long btGeneric6DofConstraintData_m_angularLowerLimit_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_useLinearReferenceFrameA_set(long jarg1, btGeneric6DofConstraintData jarg1_, int jarg2);
-  public final static native int btGeneric6DofConstraintData_m_useLinearReferenceFrameA_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native void btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_set(long jarg1, btGeneric6DofConstraintData jarg1_, int jarg2);
-  public final static native int btGeneric6DofConstraintData_m_useOffsetForConstraintFrame_get(long jarg1, btGeneric6DofConstraintData jarg1_);
-  public final static native long new_btGeneric6DofConstraintData();
-  public final static native void delete_btGeneric6DofConstraintData(long jarg1);
-  public final static native long new_btUniversalConstraint(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native Vector3 btUniversalConstraint_getAnchor(long jarg1, btUniversalConstraint jarg1_);
-  public final static native Vector3 btUniversalConstraint_getAnchor2(long jarg1, btUniversalConstraint jarg1_);
-  public final static native Vector3 btUniversalConstraint_getAxis1(long jarg1, btUniversalConstraint jarg1_);
-  public final static native Vector3 btUniversalConstraint_getAxis2(long jarg1, btUniversalConstraint jarg1_);
-  public final static native float btUniversalConstraint_getAngle1(long jarg1, btUniversalConstraint jarg1_);
-  public final static native float btUniversalConstraint_getAngle2(long jarg1, btUniversalConstraint jarg1_);
-  public final static native void btUniversalConstraint_setUpperLimit(long jarg1, btUniversalConstraint jarg1_, float jarg2, float jarg3);
-  public final static native void btUniversalConstraint_setLowerLimit(long jarg1, btUniversalConstraint jarg1_, float jarg2, float jarg3);
-  public final static native void btUniversalConstraint_setAxis(long jarg1, btUniversalConstraint jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void delete_btUniversalConstraint(long jarg1);
-  public final static native void btContactConstraint_setContactManifold(long jarg1, btContactConstraint jarg1_, long jarg2, btPersistentManifold jarg2_);
-  public final static native long btContactConstraint_getContactManifold__SWIG_0(long jarg1, btContactConstraint jarg1_);
-  public final static native void delete_btContactConstraint(long jarg1);
-  public final static native float resolveSingleCollision(long jarg1, btRigidBody jarg1_, long jarg2, btCollisionObject jarg2_, Vector3 jarg3, Vector3 jarg4, long jarg5, btContactSolverInfo jarg5_, float jarg6);
-  public final static native void resolveSingleBilateral(long jarg1, btRigidBody jarg1_, Vector3 jarg2, long jarg3, btRigidBody jarg3_, Vector3 jarg4, float jarg5, Vector3 jarg6, long jarg7, float jarg8);
-  public final static native long new_btConeTwistConstraint__SWIG_0(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_);
-  public final static native long new_btConeTwistConstraint__SWIG_1(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btConeTwistConstraint_getInfo1NonVirtual(long jarg1, btConeTwistConstraint jarg1_, long jarg2);
-  public final static native void btConeTwistConstraint_getInfo2NonVirtual(long jarg1, btConeTwistConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Matrix3 jarg5, Matrix3 jarg6);
-  public final static native void btConeTwistConstraint_updateRHS(long jarg1, btConeTwistConstraint jarg1_, float jarg2);
-  public final static native long btConeTwistConstraint_getRigidBodyA(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native long btConeTwistConstraint_getRigidBodyB(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native void btConeTwistConstraint_setAngularOnly(long jarg1, btConeTwistConstraint jarg1_, boolean jarg2);
-  public final static native void btConeTwistConstraint_setLimit__SWIG_0(long jarg1, btConeTwistConstraint jarg1_, int jarg2, float jarg3);
-  public final static native void btConeTwistConstraint_setLimit__SWIG_1(long jarg1, btConeTwistConstraint jarg1_, float jarg2, float jarg3, float jarg4, float jarg5, float jarg6, float jarg7);
-  public final static native void btConeTwistConstraint_setLimit__SWIG_2(long jarg1, btConeTwistConstraint jarg1_, float jarg2, float jarg3, float jarg4, float jarg5, float jarg6);
-  public final static native void btConeTwistConstraint_setLimit__SWIG_3(long jarg1, btConeTwistConstraint jarg1_, float jarg2, float jarg3, float jarg4, float jarg5);
-  public final static native void btConeTwistConstraint_setLimit__SWIG_4(long jarg1, btConeTwistConstraint jarg1_, float jarg2, float jarg3, float jarg4);
-  public final static native long btConeTwistConstraint_getAFrame(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native long btConeTwistConstraint_getBFrame(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native int btConeTwistConstraint_getSolveTwistLimit(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native int btConeTwistConstraint_getSolveSwingLimit(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native float btConeTwistConstraint_getTwistLimitSign(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native void btConeTwistConstraint_calcAngleInfo(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native void btConeTwistConstraint_calcAngleInfo2(long jarg1, btConeTwistConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_, Matrix3 jarg4, Matrix3 jarg5);
-  public final static native float btConeTwistConstraint_getSwingSpan1(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native float btConeTwistConstraint_getSwingSpan2(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native float btConeTwistConstraint_getTwistSpan(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native float btConeTwistConstraint_getTwistAngle(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native boolean btConeTwistConstraint_isPastSwingLimit(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native void btConeTwistConstraint_setDamping(long jarg1, btConeTwistConstraint jarg1_, float jarg2);
-  public final static native void btConeTwistConstraint_enableMotor(long jarg1, btConeTwistConstraint jarg1_, boolean jarg2);
-  public final static native void btConeTwistConstraint_setMaxMotorImpulse(long jarg1, btConeTwistConstraint jarg1_, float jarg2);
-  public final static native void btConeTwistConstraint_setMaxMotorImpulseNormalized(long jarg1, btConeTwistConstraint jarg1_, float jarg2);
-  public final static native float btConeTwistConstraint_getFixThresh(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native void btConeTwistConstraint_setFixThresh(long jarg1, btConeTwistConstraint jarg1_, float jarg2);
-  public final static native void btConeTwistConstraint_setMotorTarget(long jarg1, btConeTwistConstraint jarg1_, Quaternion jarg2);
-  public final static native void btConeTwistConstraint_setMotorTargetInConstraintSpace(long jarg1, btConeTwistConstraint jarg1_, Quaternion jarg2);
-  public final static native Vector3 btConeTwistConstraint_GetPointForAngle(long jarg1, btConeTwistConstraint jarg1_, float jarg2, float jarg3);
-  public final static native void btConeTwistConstraint_setParam__SWIG_0(long jarg1, btConeTwistConstraint jarg1_, int jarg2, float jarg3, int jarg4);
-  public final static native void btConeTwistConstraint_setParam__SWIG_1(long jarg1, btConeTwistConstraint jarg1_, int jarg2, float jarg3);
-  public final static native void btConeTwistConstraint_setFrames(long jarg1, btConeTwistConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native long btConeTwistConstraint_getFrameOffsetA(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native long btConeTwistConstraint_getFrameOffsetB(long jarg1, btConeTwistConstraint jarg1_);
-  public final static native float btConeTwistConstraint_getParam__SWIG_0(long jarg1, btConeTwistConstraint jarg1_, int jarg2, int jarg3);
-  public final static native float btConeTwistConstraint_getParam__SWIG_1(long jarg1, btConeTwistConstraint jarg1_, int jarg2);
-  public final static native void delete_btConeTwistConstraint(long jarg1);
-  public final static native void btConeTwistConstraintData_m_typeConstraintData_set(long jarg1, btConeTwistConstraintData jarg1_, long jarg2, btTypedConstraintData jarg2_);
-  public final static native long btConeTwistConstraintData_m_typeConstraintData_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_rbAFrame_set(long jarg1, btConeTwistConstraintData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btConeTwistConstraintData_m_rbAFrame_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_rbBFrame_set(long jarg1, btConeTwistConstraintData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btConeTwistConstraintData_m_rbBFrame_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_swingSpan1_set(long jarg1, btConeTwistConstraintData jarg1_, float jarg2);
-  public final static native float btConeTwistConstraintData_m_swingSpan1_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_swingSpan2_set(long jarg1, btConeTwistConstraintData jarg1_, float jarg2);
-  public final static native float btConeTwistConstraintData_m_swingSpan2_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_twistSpan_set(long jarg1, btConeTwistConstraintData jarg1_, float jarg2);
-  public final static native float btConeTwistConstraintData_m_twistSpan_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_limitSoftness_set(long jarg1, btConeTwistConstraintData jarg1_, float jarg2);
-  public final static native float btConeTwistConstraintData_m_limitSoftness_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_biasFactor_set(long jarg1, btConeTwistConstraintData jarg1_, float jarg2);
-  public final static native float btConeTwistConstraintData_m_biasFactor_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_relaxationFactor_set(long jarg1, btConeTwistConstraintData jarg1_, float jarg2);
-  public final static native float btConeTwistConstraintData_m_relaxationFactor_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_damping_set(long jarg1, btConeTwistConstraintData jarg1_, float jarg2);
-  public final static native float btConeTwistConstraintData_m_damping_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native void btConeTwistConstraintData_m_pad_set(long jarg1, btConeTwistConstraintData jarg1_, String jarg2);
-  public final static native String btConeTwistConstraintData_m_pad_get(long jarg1, btConeTwistConstraintData jarg1_);
-  public final static native long new_btConeTwistConstraintData();
-  public final static native void delete_btConeTwistConstraintData(long jarg1);
-  public final static native long new_btGeneric6DofSpringConstraint__SWIG_0(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
-  public final static native long new_btGeneric6DofSpringConstraint__SWIG_1(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_, boolean jarg3);
-  public final static native void btGeneric6DofSpringConstraint_enableSpring(long jarg1, btGeneric6DofSpringConstraint jarg1_, int jarg2, boolean jarg3);
-  public final static native void btGeneric6DofSpringConstraint_setStiffness(long jarg1, btGeneric6DofSpringConstraint jarg1_, int jarg2, float jarg3);
-  public final static native void btGeneric6DofSpringConstraint_setDamping(long jarg1, btGeneric6DofSpringConstraint jarg1_, int jarg2, float jarg3);
-  public final static native void btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_0(long jarg1, btGeneric6DofSpringConstraint jarg1_);
-  public final static native void btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_1(long jarg1, btGeneric6DofSpringConstraint jarg1_, int jarg2);
-  public final static native void btGeneric6DofSpringConstraint_setEquilibriumPoint__SWIG_2(long jarg1, btGeneric6DofSpringConstraint jarg1_, int jarg2, float jarg3);
-  public final static native void btGeneric6DofSpringConstraint_setAxis(long jarg1, btGeneric6DofSpringConstraint jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native void delete_btGeneric6DofSpringConstraint(long jarg1);
-  public final static native void btGeneric6DofSpringConstraintData_m_6dofData_set(long jarg1, btGeneric6DofSpringConstraintData jarg1_, long jarg2, btGeneric6DofConstraintData jarg2_);
-  public final static native long btGeneric6DofSpringConstraintData_m_6dofData_get(long jarg1, btGeneric6DofSpringConstraintData jarg1_);
-  public final static native void btGeneric6DofSpringConstraintData_m_springEnabled_set(long jarg1, btGeneric6DofSpringConstraintData jarg1_, int[] jarg2);
-  public final static native int[] btGeneric6DofSpringConstraintData_m_springEnabled_get(long jarg1, btGeneric6DofSpringConstraintData jarg1_);
-  public final static native void btGeneric6DofSpringConstraintData_m_equilibriumPoint_set(long jarg1, btGeneric6DofSpringConstraintData jarg1_, float[] jarg2);
-  public final static native float[] btGeneric6DofSpringConstraintData_m_equilibriumPoint_get(long jarg1, btGeneric6DofSpringConstraintData jarg1_);
-  public final static native void btGeneric6DofSpringConstraintData_m_springStiffness_set(long jarg1, btGeneric6DofSpringConstraintData jarg1_, float[] jarg2);
-  public final static native float[] btGeneric6DofSpringConstraintData_m_springStiffness_get(long jarg1, btGeneric6DofSpringConstraintData jarg1_);
-  public final static native void btGeneric6DofSpringConstraintData_m_springDamping_set(long jarg1, btGeneric6DofSpringConstraintData jarg1_, float[] jarg2);
-  public final static native float[] btGeneric6DofSpringConstraintData_m_springDamping_get(long jarg1, btGeneric6DofSpringConstraintData jarg1_);
-  public final static native long new_btGeneric6DofSpringConstraintData();
-  public final static native void delete_btGeneric6DofSpringConstraintData(long jarg1);
-  public final static native long new_btHingeConstraint__SWIG_0(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6, boolean jarg7);
-  public final static native long new_btHingeConstraint__SWIG_1(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5, Vector3 jarg6);
-  public final static native long new_btHingeConstraint__SWIG_2(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3, boolean jarg4);
-  public final static native long new_btHingeConstraint__SWIG_3(long jarg1, btRigidBody jarg1_, Vector3 jarg2, Vector3 jarg3);
-  public final static native long new_btHingeConstraint__SWIG_4(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, boolean jarg5);
-  public final static native long new_btHingeConstraint__SWIG_5(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_);
-  public final static native long new_btHingeConstraint__SWIG_6(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_, boolean jarg3);
-  public final static native long new_btHingeConstraint__SWIG_7(long jarg1, btRigidBody jarg1_, long jarg2, btTransform jarg2_);
-  public final static native void btHingeConstraint_getInfo1NonVirtual(long jarg1, btHingeConstraint jarg1_, long jarg2);
-  public final static native void btHingeConstraint_getInfo2NonVirtual(long jarg1, btHingeConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btHingeConstraint_getInfo2Internal(long jarg1, btHingeConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btHingeConstraint_getInfo2InternalUsingFrameOffset(long jarg1, btHingeConstraint jarg1_, long jarg2, btConstraintInfo2 jarg2_, long jarg3, btTransform jarg3_, long jarg4, btTransform jarg4_, Vector3 jarg5, Vector3 jarg6);
-  public final static native void btHingeConstraint_updateRHS(long jarg1, btHingeConstraint jarg1_, float jarg2);
-  public final static native long btHingeConstraint_getRigidBodyA__SWIG_0(long jarg1, btHingeConstraint jarg1_);
-  public final static native long btHingeConstraint_getRigidBodyB__SWIG_0(long jarg1, btHingeConstraint jarg1_);
-  public final static native long btHingeConstraint_getFrameOffsetA(long jarg1, btHingeConstraint jarg1_);
-  public final static native long btHingeConstraint_getFrameOffsetB(long jarg1, btHingeConstraint jarg1_);
-  public final static native void btHingeConstraint_setFrames(long jarg1, btHingeConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native void btHingeConstraint_setAngularOnly(long jarg1, btHingeConstraint jarg1_, boolean jarg2);
-  public final static native void btHingeConstraint_enableAngularMotor(long jarg1, btHingeConstraint jarg1_, boolean jarg2, float jarg3, float jarg4);
-  public final static native void btHingeConstraint_enableMotor(long jarg1, btHingeConstraint jarg1_, boolean jarg2);
-  public final static native void btHingeConstraint_setMaxMotorImpulse(long jarg1, btHingeConstraint jarg1_, float jarg2);
-  public final static native void btHingeConstraint_setMotorTarget__SWIG_0(long jarg1, btHingeConstraint jarg1_, Quaternion jarg2, float jarg3);
-  public final static native void btHingeConstraint_setMotorTarget__SWIG_1(long jarg1, btHingeConstraint jarg1_, float jarg2, float jarg3);
-  public final static native void btHingeConstraint_setLimit__SWIG_0(long jarg1, btHingeConstraint jarg1_, float jarg2, float jarg3, float jarg4, float jarg5, float jarg6);
-  public final static native void btHingeConstraint_setLimit__SWIG_1(long jarg1, btHingeConstraint jarg1_, float jarg2, float jarg3, float jarg4, float jarg5);
-  public final static native void btHingeConstraint_setLimit__SWIG_2(long jarg1, btHingeConstraint jarg1_, float jarg2, float jarg3, float jarg4);
-  public final static native void btHingeConstraint_setLimit__SWIG_3(long jarg1, btHingeConstraint jarg1_, float jarg2, float jarg3);
-  public final static native void btHingeConstraint_setAxis(long jarg1, btHingeConstraint jarg1_, Vector3 jarg2);
-  public final static native float btHingeConstraint_getLowerLimit(long jarg1, btHingeConstraint jarg1_);
-  public final static native float btHingeConstraint_getUpperLimit(long jarg1, btHingeConstraint jarg1_);
-  public final static native float btHingeConstraint_getHingeAngle__SWIG_0(long jarg1, btHingeConstraint jarg1_);
-  public final static native float btHingeConstraint_getHingeAngle__SWIG_1(long jarg1, btHingeConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native void btHingeConstraint_testLimit(long jarg1, btHingeConstraint jarg1_, long jarg2, btTransform jarg2_, long jarg3, btTransform jarg3_);
-  public final static native long btHingeConstraint_getAFrame__SWIG_0(long jarg1, btHingeConstraint jarg1_);
-  public final static native long btHingeConstraint_getBFrame__SWIG_0(long jarg1, btHingeConstraint jarg1_);
-  public final static native int btHingeConstraint_getSolveLimit(long jarg1, btHingeConstraint jarg1_);
-  public final static native float btHingeConstraint_getLimitSign(long jarg1, btHingeConstraint jarg1_);
-  public final static native boolean btHingeConstraint_getAngularOnly(long jarg1, btHingeConstraint jarg1_);
-  public final static native boolean btHingeConstraint_getEnableAngularMotor(long jarg1, btHingeConstraint jarg1_);
-  public final static native float btHingeConstraint_getMotorTargetVelosity(long jarg1, btHingeConstraint jarg1_);
-  public final static native float btHingeConstraint_getMaxMotorImpulse(long jarg1, btHingeConstraint jarg1_);
-  public final static native boolean btHingeConstraint_getUseFrameOffset(long jarg1, btHingeConstraint jarg1_);
-  public final static native void btHingeConstraint_setUseFrameOffset(long jarg1, btHingeConstraint jarg1_, boolean jarg2);
-  public final static native void btHingeConstraint_setParam__SWIG_0(long jarg1, btHingeConstraint jarg1_, int jarg2, float jarg3, int jarg4);
-  public final static native void btHingeConstraint_setParam__SWIG_1(long jarg1, btHingeConstraint jarg1_, int jarg2, float jarg3);
-  public final static native float btHingeConstraint_getParam__SWIG_0(long jarg1, btHingeConstraint jarg1_, int jarg2, int jarg3);
-  public final static native float btHingeConstraint_getParam__SWIG_1(long jarg1, btHingeConstraint jarg1_, int jarg2);
-  public final static native void delete_btHingeConstraint(long jarg1);
-  public final static native void btHingeConstraintDoubleData_m_typeConstraintData_set(long jarg1, btHingeConstraintDoubleData jarg1_, long jarg2, btTypedConstraintData jarg2_);
-  public final static native long btHingeConstraintDoubleData_m_typeConstraintData_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_rbAFrame_set(long jarg1, btHingeConstraintDoubleData jarg1_, long jarg2, btTransformDoubleData jarg2_);
-  public final static native long btHingeConstraintDoubleData_m_rbAFrame_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_rbBFrame_set(long jarg1, btHingeConstraintDoubleData jarg1_, long jarg2, btTransformDoubleData jarg2_);
-  public final static native long btHingeConstraintDoubleData_m_rbBFrame_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_useReferenceFrameA_set(long jarg1, btHingeConstraintDoubleData jarg1_, int jarg2);
-  public final static native int btHingeConstraintDoubleData_m_useReferenceFrameA_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_angularOnly_set(long jarg1, btHingeConstraintDoubleData jarg1_, int jarg2);
-  public final static native int btHingeConstraintDoubleData_m_angularOnly_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_enableAngularMotor_set(long jarg1, btHingeConstraintDoubleData jarg1_, int jarg2);
-  public final static native int btHingeConstraintDoubleData_m_enableAngularMotor_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_motorTargetVelocity_set(long jarg1, btHingeConstraintDoubleData jarg1_, float jarg2);
-  public final static native float btHingeConstraintDoubleData_m_motorTargetVelocity_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_maxMotorImpulse_set(long jarg1, btHingeConstraintDoubleData jarg1_, float jarg2);
-  public final static native float btHingeConstraintDoubleData_m_maxMotorImpulse_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_lowerLimit_set(long jarg1, btHingeConstraintDoubleData jarg1_, float jarg2);
-  public final static native float btHingeConstraintDoubleData_m_lowerLimit_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_upperLimit_set(long jarg1, btHingeConstraintDoubleData jarg1_, float jarg2);
-  public final static native float btHingeConstraintDoubleData_m_upperLimit_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_limitSoftness_set(long jarg1, btHingeConstraintDoubleData jarg1_, float jarg2);
-  public final static native float btHingeConstraintDoubleData_m_limitSoftness_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_biasFactor_set(long jarg1, btHingeConstraintDoubleData jarg1_, float jarg2);
-  public final static native float btHingeConstraintDoubleData_m_biasFactor_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native void btHingeConstraintDoubleData_m_relaxationFactor_set(long jarg1, btHingeConstraintDoubleData jarg1_, float jarg2);
-  public final static native float btHingeConstraintDoubleData_m_relaxationFactor_get(long jarg1, btHingeConstraintDoubleData jarg1_);
-  public final static native long new_btHingeConstraintDoubleData();
-  public final static native void delete_btHingeConstraintDoubleData(long jarg1);
-  public final static native void btHingeConstraintFloatData_m_typeConstraintData_set(long jarg1, btHingeConstraintFloatData jarg1_, long jarg2, btTypedConstraintData jarg2_);
-  public final static native long btHingeConstraintFloatData_m_typeConstraintData_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_rbAFrame_set(long jarg1, btHingeConstraintFloatData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btHingeConstraintFloatData_m_rbAFrame_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_rbBFrame_set(long jarg1, btHingeConstraintFloatData jarg1_, long jarg2, btTransformFloatData jarg2_);
-  public final static native long btHingeConstraintFloatData_m_rbBFrame_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_useReferenceFrameA_set(long jarg1, btHingeConstraintFloatData jarg1_, int jarg2);
-  public final static native int btHingeConstraintFloatData_m_useReferenceFrameA_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_angularOnly_set(long jarg1, btHingeConstraintFloatData jarg1_, int jarg2);
-  public final static native int btHingeConstraintFloatData_m_angularOnly_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_enableAngularMotor_set(long jarg1, btHingeConstraintFloatData jarg1_, int jarg2);
-  public final static native int btHingeConstraintFloatData_m_enableAngularMotor_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_motorTargetVelocity_set(long jarg1, btHingeConstraintFloatData jarg1_, float jarg2);
-  public final static native float btHingeConstraintFloatData_m_motorTargetVelocity_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_maxMotorImpulse_set(long jarg1, btHingeConstraintFloatData jarg1_, float jarg2);
-  public final static native float btHingeConstraintFloatData_m_maxMotorImpulse_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_lowerLimit_set(long jarg1, btHingeConstraintFloatData jarg1_, float jarg2);
-  public final static native float btHingeConstraintFloatData_m_lowerLimit_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_upperLimit_set(long jarg1, btHingeConstraintFloatData jarg1_, float jarg2);
-  public final static native float btHingeConstraintFloatData_m_upperLimit_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_limitSoftness_set(long jarg1, btHingeConstraintFloatData jarg1_, float jarg2);
-  public final static native float btHingeConstraintFloatData_m_limitSoftness_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_biasFactor_set(long jarg1, btHingeConstraintFloatData jarg1_, float jarg2);
-  public final static native float btHingeConstraintFloatData_m_biasFactor_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native void btHingeConstraintFloatData_m_relaxationFactor_set(long jarg1, btHingeConstraintFloatData jarg1_, float jarg2);
-  public final static native float btHingeConstraintFloatData_m_relaxationFactor_get(long jarg1, btHingeConstraintFloatData jarg1_);
-  public final static native long new_btHingeConstraintFloatData();
-  public final static native void delete_btHingeConstraintFloatData(long jarg1);
-  public final static native void btSolverConstraint_m_relpos1CrossNormal_set(long jarg1, btSolverConstraint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverConstraint_m_relpos1CrossNormal_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_contactNormal_set(long jarg1, btSolverConstraint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverConstraint_m_contactNormal_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_relpos2CrossNormal_set(long jarg1, btSolverConstraint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverConstraint_m_relpos2CrossNormal_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_angularComponentA_set(long jarg1, btSolverConstraint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverConstraint_m_angularComponentA_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_angularComponentB_set(long jarg1, btSolverConstraint jarg1_, long jarg2, btVector3 jarg2_);
-  public final static native long btSolverConstraint_m_angularComponentB_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_appliedPushImpulse_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_appliedPushImpulse_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_appliedImpulse_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_appliedImpulse_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_friction_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_friction_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_jacDiagABInv_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_jacDiagABInv_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_overrideNumSolverIterations_set(long jarg1, btSolverConstraint jarg1_, int jarg2);
-  public final static native int btSolverConstraint_m_overrideNumSolverIterations_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_rhs_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_rhs_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_cfm_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_cfm_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_lowerLimit_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_lowerLimit_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_upperLimit_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_upperLimit_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native void btSolverConstraint_m_rhsPenetration_set(long jarg1, btSolverConstraint jarg1_, float jarg2);
-  public final static native float btSolverConstraint_m_rhsPenetration_get(long jarg1, btSolverConstraint jarg1_);
-  public final static native long new_btSolverConstraint();
-  public final static native void delete_btSolverConstraint(long jarg1);
-  public final static native long new_btHinge2Constraint(long jarg1, btRigidBody jarg1_, long jarg2, btRigidBody jarg2_, Vector3 jarg3, Vector3 jarg4, Vector3 jarg5);
-  public final static native Vector3 btHinge2Constraint_getAnchor(long jarg1, btHinge2Constraint jarg1_);
-  public final static native Vector3 btHinge2Constraint_getAnchor2(long jarg1, btHinge2Constraint jarg1_);
-  public final static native Vector3 btHinge2Constraint_getAxis1(long jarg1, btHinge2Constraint jarg1_);
-  public final static native Vector3 btHinge2Constraint_getAxis2(long jarg1, btHinge2Constraint jarg1_);
-  public final static native float btHinge2Constraint_getAngle1(long jarg1, btHinge2Constraint jarg1_);
-  public final static native float btHinge2Constraint_getAngle2(long jarg1, btHinge2Constraint jarg1_);
-  public final static native void btHinge2Constraint_setUpperLimit(long jarg1, btHinge2Constraint jarg1_, float jarg2);
-  public final static native void btHinge2Constraint_setLowerLimit(long jarg1, btHinge2Constraint jarg1_, float jarg2);
-  public final static native void delete_btHinge2Constraint(long jarg1);
-  public final static native long new_btCollisionObjectArray__SWIG_0();
-  public final static native void delete_btCollisionObjectArray(long jarg1);
-  public final static native long new_btCollisionObjectArray__SWIG_1(long jarg1, btCollisionObjectArray jarg1_);
-  public final static native int btCollisionObjectArray_size(long jarg1, btCollisionObjectArray jarg1_);
-  public final static native long btCollisionObjectArray_at__SWIG_0(long jarg1, btCollisionObjectArray jarg1_, int jarg2);
-  public final static native void btCollisionObjectArray_clear(long jarg1, btCollisionObjectArray jarg1_);
-  public final static native void btCollisionObjectArray_pop_back(long jarg1, btCollisionObjectArray jarg1_);
-  public final static native void btCollisionObjectArray_resize__SWIG_0(long jarg1, btCollisionObjectArray jarg1_, int jarg2, long jarg3, btCollisionObject jarg3_);
-  public final static native void btCollisionObjectArray_resize__SWIG_1(long jarg1, btCollisionObjectArray jarg1_, int jarg2);
-  public final static native long btCollisionObjectArray_expandNonInitializing(long jarg1, btCollisionObjectArray jarg1_);
-  public final static native long btCollisionObjectArray_expand__SWIG_0(long jarg1, btCollisionObjectArray jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native long btCollisionObjectArray_expand__SWIG_1(long jarg1, btCollisionObjectArray jarg1_);
-  public final static native void btCollisionObjectArray_push_back(long jarg1, btCollisionObjectArray jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native int btCollisionObjectArray_capacity(long jarg1, btCollisionObjectArray jarg1_);
-  public final static native void btCollisionObjectArray_reserve(long jarg1, btCollisionObjectArray jarg1_, int jarg2);
-  public final static native void btCollisionObjectArray_swap(long jarg1, btCollisionObjectArray jarg1_, int jarg2, int jarg3);
-  public final static native int btCollisionObjectArray_findBinarySearch(long jarg1, btCollisionObjectArray jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native int btCollisionObjectArray_findLinearSearch(long jarg1, btCollisionObjectArray jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native void btCollisionObjectArray_remove(long jarg1, btCollisionObjectArray jarg1_, long jarg2, btCollisionObject jarg2_);
-  public final static native void btCollisionObjectArray_initializeFromBuffer(long jarg1, btCollisionObjectArray jarg1_, long jarg2, int jarg3, int jarg4);
-  public final static native void btCollisionObjectArray_copyFromArray(long jarg1, btCollisionObjectArray jarg1_, long jarg2, btCollisionObjectArray jarg2_);
-  public final static native long btVector4_SWIGUpcast(long jarg1);
-  public final static native long btDefaultMotionState_SWIGUpcast(long jarg1);
-  public final static native long GrahamVector2_SWIGUpcast(long jarg1);
-  public final static native long btBroadphaseRayCallback_SWIGUpcast(long jarg1);
-  public final static native long btDbvtProxy_SWIGUpcast(long jarg1);
-  public final static native long btDbvtBroadphase_SWIGUpcast(long jarg1);
-  public final static native long btSimpleBroadphaseProxy_SWIGUpcast(long jarg1);
-  public final static native long btSimpleBroadphase_SWIGUpcast(long jarg1);
-  public final static native long btMultiSapBroadphase_SWIGUpcast(long jarg1);
-  public final static native long btOverlappingPairCache_SWIGUpcast(long jarg1);
-  public final static native long btHashedOverlappingPairCache_SWIGUpcast(long jarg1);
-  public final static native long btSortedOverlappingPairCache_SWIGUpcast(long jarg1);
-  public final static native long btNullPairCache_SWIGUpcast(long jarg1);
-  public final static native long btConvexShape_SWIGUpcast(long jarg1);
-  public final static native long btConvexInternalShape_SWIGUpcast(long jarg1);
-  public final static native long btConvexInternalAabbCachingShape_SWIGUpcast(long jarg1);
-  public final static native long btPolyhedralConvexShape_SWIGUpcast(long jarg1);
-  public final static native long btPolyhedralConvexAabbCachingShape_SWIGUpcast(long jarg1);
-  public final static native long btConcaveShape_SWIGUpcast(long jarg1);
-  public final static native long btStaticPlaneShape_SWIGUpcast(long jarg1);
-  public final static native long btHeightfieldTerrainShape_SWIGUpcast(long jarg1);
-  public final static native long btTriangleMeshShape_SWIGUpcast(long jarg1);
-  public final static native long btBvhTriangleMeshShape_SWIGUpcast(long jarg1);
-  public final static native long btBoxShape_SWIGUpcast(long jarg1);
-  public final static native long btCapsuleShape_SWIGUpcast(long jarg1);
-  public final static native long btCapsuleShapeX_SWIGUpcast(long jarg1);
-  public final static native long btCapsuleShapeZ_SWIGUpcast(long jarg1);
-  public final static native long btBox2dShape_SWIGUpcast(long jarg1);
-  public final static native long btTriangleShape_SWIGUpcast(long jarg1);
-  public final static native long btSphereShape_SWIGUpcast(long jarg1);
-  public final static native long btMultiSphereShape_SWIGUpcast(long jarg1);
-  public final static native long btMinkowskiSumShape_SWIGUpcast(long jarg1);
-  public final static native long btOptimizedBvh_SWIGUpcast(long jarg1);
-  public final static native long btTriangleBuffer_SWIGUpcast(long jarg1);
-  public final static native long btTriangleIndexVertexArray_SWIGUpcast(long jarg1);
-  public final static native long btScaledBvhTriangleMeshShape_SWIGUpcast(long jarg1);
-  public final static native long btConvexHullShape_SWIGUpcast(long jarg1);
-  public final static native long btTriangleIndexVertexMaterialArray_SWIGUpcast(long jarg1);
-  public final static native long btCylinderShape_SWIGUpcast(long jarg1);
-  public final static native long btCylinderShapeX_SWIGUpcast(long jarg1);
-  public final static native long btCylinderShapeZ_SWIGUpcast(long jarg1);
-  public final static native long btTriangleMesh_SWIGUpcast(long jarg1);
-  public final static native long btConeShape_SWIGUpcast(long jarg1);
-  public final static native long btConeShapeX_SWIGUpcast(long jarg1);
-  public final static native long btConeShapeZ_SWIGUpcast(long jarg1);
-  public final static native long btConvexTriangleMeshShape_SWIGUpcast(long jarg1);
-  public final static native long btEmptyShape_SWIGUpcast(long jarg1);
-  public final static native long btMultimaterialTriangleMeshShape_SWIGUpcast(long jarg1);
-  public final static native long btBU_Simplex1to4_SWIGUpcast(long jarg1);
-  public final static native long btUniformScalingShape_SWIGUpcast(long jarg1);
-  public final static native long btCompoundShape_SWIGUpcast(long jarg1);
-  public final static native long btConvexPointCloudShape_SWIGUpcast(long jarg1);
-  public final static native long btConvex2dShape_SWIGUpcast(long jarg1);
-  public final static native long btRigidBody_SWIGUpcast(long jarg1);
-  public final static native long btEmptyAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btActivatingCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btConvexTriangleCallback_SWIGUpcast(long jarg1);
-  public final static native long btConvexConcaveCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btConvexPlaneCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btDefaultCollisionConfiguration_SWIGUpcast(long jarg1);
-  public final static native long btSphereSphereCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btBoxBoxCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btBox2dBox2dCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btSphereTriangleCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btGhostObject_SWIGUpcast(long jarg1);
-  public final static native long btPairCachingGhostObject_SWIGUpcast(long jarg1);
-  public final static native long btGhostPairCallback_SWIGUpcast(long jarg1);
-  public final static native long btConvex2dConvex2dAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btSphereBoxCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btCollisionDispatcher_SWIGUpcast(long jarg1);
-  public final static native long btConvexConvexAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btCompoundCollisionAlgorithm_SWIGUpcast(long jarg1);
-  public final static native long btSubsimplexConvexCast_SWIGUpcast(long jarg1);
-  public final static native long btPersistentManifold_SWIGUpcast(long jarg1);
-  public final static native long btMinkowskiPenetrationDepthSolver_SWIGUpcast(long jarg1);
-  public final static native long btGjkConvexCast_SWIGUpcast(long jarg1);
-  public final static native long btContinuousConvexCollision_SWIGUpcast(long jarg1);
-  public final static native long btTriangleRaycastCallback_SWIGUpcast(long jarg1);
-  public final static native long btTriangleConvexcastCallback_SWIGUpcast(long jarg1);
-  public final static native long btGjkEpaPenetrationDepthSolver_SWIGUpcast(long jarg1);
-  public final static native long btTypedConstraint_SWIGUpcast(long jarg1);
-  public final static native long btDynamicsWorld_SWIGUpcast(long jarg1);
-  public final static native long btSimpleDynamicsWorld_SWIGUpcast(long jarg1);
-  public final static native long btDiscreteDynamicsWorld_SWIGUpcast(long jarg1);
-  public final static native long btCharacterControllerInterface_SWIGUpcast(long jarg1);
-  public final static native long btKinematicCharacterController_SWIGUpcast(long jarg1);
-  public final static native long btContactSolverInfo_SWIGUpcast(long jarg1);
-  public final static native long btSequentialImpulseConstraintSolver_SWIGUpcast(long jarg1);
-  public final static native long btSliderConstraint_SWIGUpcast(long jarg1);
-  public final static native long btPoint2PointConstraint_SWIGUpcast(long jarg1);
-  public final static native long btGeneric6DofConstraint_SWIGUpcast(long jarg1);
-  public final static native long btUniversalConstraint_SWIGUpcast(long jarg1);
-  public final static native long btContactConstraint_SWIGUpcast(long jarg1);
-  public final static native long btConeTwistConstraint_SWIGUpcast(long jarg1);
-  public final static native long btGeneric6DofSpringConstraint_SWIGUpcast(long jarg1);
-  public final static native long btHingeConstraint_SWIGUpcast(long jarg1);
-  public final static native long btHinge2Constraint_SWIGUpcast(long jarg1);
-
-  public static void SwigDirector_btIDebugDraw_drawLine__SWIG_0(btIDebugDraw self, Vector3 from, Vector3 to, Vector3 color) {
-    self.drawLine(from, to, color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawLine__SWIG_1(btIDebugDraw self, Vector3 from, Vector3 to, Vector3 fromColor, Vector3 toColor) {
-    self.drawLine(from, to, fromColor, toColor);
-  }
-  public static void SwigDirector_btIDebugDraw_drawSphere__SWIG_0(btIDebugDraw self, float radius, long transform, Vector3 color) {
-    self.drawSphere(radius, new btTransform(transform, false), color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawSphere__SWIG_1(btIDebugDraw self, Vector3 p, float radius, Vector3 color) {
-    self.drawSphere(p, radius, color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawTriangle__SWIG_0(btIDebugDraw self, Vector3 v0, Vector3 v1, Vector3 v2, Vector3 arg3, Vector3 arg4, Vector3 arg5, Vector3 color, float alpha) {
-    self.drawTriangle(v0, v1, v2, arg3, arg4, arg5, color, alpha);
-  }
-  public static void SwigDirector_btIDebugDraw_drawTriangle__SWIG_1(btIDebugDraw self, Vector3 v0, Vector3 v1, Vector3 v2, Vector3 color, float arg4) {
-    self.drawTriangle(v0, v1, v2, color, arg4);
-  }
-  public static void SwigDirector_btIDebugDraw_drawContactPoint(btIDebugDraw self, Vector3 PointOnB, Vector3 normalOnB, float distance, int lifeTime, Vector3 color) {
-    self.drawContactPoint(PointOnB, normalOnB, distance, lifeTime, color);
-  }
-  public static void SwigDirector_btIDebugDraw_reportErrorWarning(btIDebugDraw self, String warningString) {
-    self.reportErrorWarning(warningString);
-  }
-  public static void SwigDirector_btIDebugDraw_draw3dText(btIDebugDraw self, Vector3 location, String textString) {
-    self.draw3dText(location, textString);
-  }
-  public static void SwigDirector_btIDebugDraw_setDebugMode(btIDebugDraw self, int debugMode) {
-    self.setDebugMode(debugMode);
-  }
-  public static int SwigDirector_btIDebugDraw_getDebugMode(btIDebugDraw self) {
-    return self.getDebugMode();
-  }
-  public static void SwigDirector_btIDebugDraw_drawAabb(btIDebugDraw self, Vector3 from, Vector3 to, Vector3 color) {
-    self.drawAabb(from, to, color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawTransform(btIDebugDraw self, long transform, float orthoLen) {
-    self.drawTransform(new btTransform(transform, false), orthoLen);
-  }
-  public static void SwigDirector_btIDebugDraw_drawArc__SWIG_0(btIDebugDraw self, Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect, float stepDegrees) {
-    self.drawArc(center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect, stepDegrees);
-  }
-  public static void SwigDirector_btIDebugDraw_drawArc__SWIG_1(btIDebugDraw self, Vector3 center, Vector3 normal, Vector3 axis, float radiusA, float radiusB, float minAngle, float maxAngle, Vector3 color, boolean drawSect) {
-    self.drawArc(center, normal, axis, radiusA, radiusB, minAngle, maxAngle, color, drawSect);
-  }
-  public static void SwigDirector_btIDebugDraw_drawSpherePatch__SWIG_0(btIDebugDraw self, Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color, float stepDegrees) {
-    self.drawSpherePatch(center, up, axis, radius, minTh, maxTh, minPs, maxPs, color, stepDegrees);
-  }
-  public static void SwigDirector_btIDebugDraw_drawSpherePatch__SWIG_1(btIDebugDraw self, Vector3 center, Vector3 up, Vector3 axis, float radius, float minTh, float maxTh, float minPs, float maxPs, Vector3 color) {
-    self.drawSpherePatch(center, up, axis, radius, minTh, maxTh, minPs, maxPs, color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawBox__SWIG_0(btIDebugDraw self, Vector3 bbMin, Vector3 bbMax, Vector3 color) {
-    self.drawBox(bbMin, bbMax, color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawBox__SWIG_1(btIDebugDraw self, Vector3 bbMin, Vector3 bbMax, long trans, Vector3 color) {
-    self.drawBox(bbMin, bbMax, new btTransform(trans, false), color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawCapsule(btIDebugDraw self, float radius, float halfHeight, int upAxis, long transform, Vector3 color) {
-    self.drawCapsule(radius, halfHeight, upAxis, new btTransform(transform, false), color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawCylinder(btIDebugDraw self, float radius, float halfHeight, int upAxis, long transform, Vector3 color) {
-    self.drawCylinder(radius, halfHeight, upAxis, new btTransform(transform, false), color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawCone(btIDebugDraw self, float radius, float height, int upAxis, long transform, Vector3 color) {
-    self.drawCone(radius, height, upAxis, new btTransform(transform, false), color);
-  }
-  public static void SwigDirector_btIDebugDraw_drawPlane(btIDebugDraw self, Vector3 planeNormal, float planeConst, long transform, Vector3 color) {
-    self.drawPlane(planeNormal, planeConst, new btTransform(transform, false), color);
-  }
-
-  private final static native void swig_module_init();
-  static {
-    swig_module_init();
-  }
 }
index e22b725..8b89046 100644 (file)
@@ -8,75 +8,71 @@
 
 package com.badlogic.gdx.physics.bullet;
 
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Matrix3;
-
 public class int4 {
-  private long swigCPtr;
-  protected boolean swigCMemOwn;
-
-  protected int4(long cPtr, boolean cMemoryOwn) {
-    swigCMemOwn = cMemoryOwn;
-    swigCPtr = cPtr;
-  }
-
-  public static long getCPtr(int4 obj) {
-    return (obj == null) ? 0 : obj.swigCPtr;
-  }
-
-  protected void finalize() {
-    delete();
-  }
-
-  public synchronized void delete() {
-    if (swigCPtr != 0) {
-      if (swigCMemOwn) {
-        swigCMemOwn = false;
-        gdxBulletJNI.delete_int4(swigCPtr);
-      }
-      swigCPtr = 0;
-    }
-  }
-
-  public void setX(int value) {
-    gdxBulletJNI.int4_x_set(swigCPtr, this, value);
-  }
-
-  public int getX() {
-    return gdxBulletJNI.int4_x_get(swigCPtr, this);
-  }
-
-  public void setY(int value) {
-    gdxBulletJNI.int4_y_set(swigCPtr, this, value);
-  }
-
-  public int getY() {
-    return gdxBulletJNI.int4_y_get(swigCPtr, this);
-  }
-
-  public void setZ(int value) {
-    gdxBulletJNI.int4_z_set(swigCPtr, this, value);
-  }
-
-  public int getZ() {
-    return gdxBulletJNI.int4_z_get(swigCPtr, this);
-  }
-
-  public void setW(int value) {
-    gdxBulletJNI.int4_w_set(swigCPtr, this, value);
-  }
-
-  public int getW() {
-    return gdxBulletJNI.int4_w_get(swigCPtr, this);
-  }
-
-  public int4() {
-    this(gdxBulletJNI.new_int4__SWIG_0(), true);
-  }
-
-  public int4(int _x, int _y, int _z, int _w) {
-    this(gdxBulletJNI.new_int4__SWIG_1(_x, _y, _z, _w), true);
-  }
+       private long swigCPtr;
+       protected boolean swigCMemOwn;
+
+       protected int4 (long cPtr, boolean cMemoryOwn) {
+               swigCMemOwn = cMemoryOwn;
+               swigCPtr = cPtr;
+       }
+
+       public static long getCPtr (int4 obj) {
+               return (obj == null) ? 0 : obj.swigCPtr;
+       }
+
+       protected void finalize () {
+               delete();
+       }
+
+       public synchronized void delete () {
+               if (swigCPtr != 0) {
+                       if (swigCMemOwn) {
+                               swigCMemOwn = false;
+                               gdxBulletJNI.delete_int4(swigCPtr);
+                       }
+                       swigCPtr = 0;
+               }
+       }
+
+       public void setX (int value) {
+               gdxBulletJNI.int4_x_set(swigCPtr, this, value);
+       }
+
+       public int getX () {
+               return gdxBulletJNI.int4_x_get(swigCPtr, this);
+       }
+
+       public void setY (int value) {
+               gdxBulletJNI.int4_y_set(swigCPtr, this, value);
+       }
+
+       public int getY () {
+               return gdxBulletJNI.int4_y_get(swigCPtr, this);
+       }
+
+       public void setZ (int value) {
+               gdxBulletJNI.int4_z_set(swigCPtr, this, value);
+       }
+
+       public int getZ () {
+               return gdxBulletJNI.int4_z_get(swigCPtr, this);
+       }
+
+       public void setW (int value) {
+               gdxBulletJNI.int4_w_set(swigCPtr, this, value);
+       }
+
+       public int getW () {
+               return gdxBulletJNI.int4_w_get(swigCPtr, this);
+       }
+
+       public int4 () {
+               this(gdxBulletJNI.new_int4__SWIG_0(), true);
+       }
+
+       public int4 (int _x, int _y, int _z, int _w) {
+               this(gdxBulletJNI.new_int4__SWIG_1(_x, _y, _z, _w), true);
+       }
 
 }
index 38321f4..a6aa35a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.bullet;\r
 \r
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
 \r
 public class Bullet {\r
-       /**\r
-        * Loads the native Bullet native library and initializes the gdx-bullet\r
-        * extension.\r
-        */\r
-       public static void init() {\r
-           new SharedLibraryLoader().load("gdx-bullet");\r
+       /** Loads the native Bullet native library and initializes the gdx-bullet extension. */\r
+       public static void init () {\r
+               new SharedLibraryLoader().load("gdx-bullet");\r
        }\r
-}
\ No newline at end of file
+}\r
index 47f12b2..fcc23cc 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.bullet;\r
 \r
 import com.badlogic.gdx.jnigen.AntScriptGenerator;\r
 import com.badlogic.gdx.jnigen.BuildConfig;\r
 import com.badlogic.gdx.jnigen.BuildExecutor;\r
 import com.badlogic.gdx.jnigen.BuildTarget;\r
-import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;\r
+import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 \r
 public class BulletBuild {\r
-       public static void main(String[] args) throws Exception {\r
+       public static void main (String[] args) throws Exception {\r
                // generate C/C++ code\r
                new NativeCodeGenerator().generate("src", "bin", "jni");\r
 \r
                // Flags to accomodate SWIG generated code\r
                String cppFlags = "";\r
-               \r
+\r
                // SWIG doesn't emit strict aliasing compliant code\r
                cppFlags += " -fno-strict-aliasing";\r
-               // SWIG directors aren't clearly documented to require RTTI, but SWIG \r
+               // SWIG directors aren't clearly documented to require RTTI, but SWIG\r
                // normally generates a small number of dynamic_casts for director code.\r
                // gdx-bullet's swig build.xml replaces these with static C casts so we\r
-               // can compile without RTTI and save some disk space.  It seems to work\r
+               // can compile without RTTI and save some disk space. It seems to work\r
                // with these static casts.\r
                cppFlags += " -fno-rtti";\r
-               // Disable profiling (it's on by default).  If you change this, you \r
+               // Disable profiling (it's on by default). If you change this, you\r
                // must regenerate the SWIG wrappers with the changed value.\r
                cppFlags += " -DBT_NO_PROFILE";\r
-               \r
+\r
                // generate build scripts\r
-               String[] excludes = { "src/BulletMultiThreaded/GpuSoftBodySolvers/**" };\r
-               String[] headers = { "src/" };\r
+               String[] excludes = {"src/BulletMultiThreaded/GpuSoftBodySolvers/**"};\r
+               String[] headers = {"src/"};\r
 \r
-               BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows,\r
-                               false);\r
+               BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32home.compilerPrefix = "";\r
                win32home.buildFileName = "build-windows32home.xml";\r
                win32home.excludeFromMasterBuildFile = true;\r
@@ -55,23 +55,20 @@ public class BulletBuild {
                win32home.headerDirs = headers;\r
                win32home.cppFlags += cppFlags;\r
 \r
-               BuildTarget win32 = BuildTarget.newDefaultTarget(TargetOs.Windows,\r
-                               false);\r
+               BuildTarget win32 = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32.cExcludes = win32.cppExcludes = excludes;\r
                win32.headerDirs = headers;\r
                win32.cppFlags += cppFlags;\r
 \r
-               BuildTarget win64 = BuildTarget\r
-                               .newDefaultTarget(TargetOs.Windows, true);\r
+               BuildTarget win64 = BuildTarget.newDefaultTarget(TargetOs.Windows, true);\r
                win64.cExcludes = win64.cppExcludes = excludes;\r
                win64.headerDirs = headers;\r
                win64.cppFlags += cppFlags;\r
                // special pre and post compile tasks to patch the source and revert the\r
                // changes\r
-               win64.preCompileTask = "<copy todir=\"src\" verbose=\"true\" overwrite=\"true\">"\r
-                               + "<fileset dir=\"../patched\"/>" + "</copy>";\r
-               win64.postCompileTask = "<exec executable=\"svn\" dir=\".\">"\r
-                               + "<arg line=\"revert -R src\"/>" + "</exec>";\r
+               win64.preCompileTask = "<copy todir=\"src\" verbose=\"true\" overwrite=\"true\">" + "<fileset dir=\"../patched\"/>"\r
+                       + "</copy>";\r
+               win64.postCompileTask = "<exec executable=\"svn\" dir=\".\">" + "<arg line=\"revert -R src\"/>" + "</exec>";\r
 \r
                BuildTarget lin32 = BuildTarget.newDefaultTarget(TargetOs.Linux, false);\r
                lin32.cExcludes = lin32.cppExcludes = excludes;\r
@@ -88,14 +85,12 @@ public class BulletBuild {
                mac.headerDirs = headers;\r
                mac.cppFlags += cppFlags;\r
 \r
-               BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android,\r
-                               false);\r
+               BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android, false);\r
                android.cExcludes = android.cppExcludes = excludes;\r
                android.headerDirs = headers;\r
                android.cppFlags += cppFlags;\r
 \r
-               new AntScriptGenerator().generate(new BuildConfig("gdx-bullet"),\r
-                               win32home, win32, win64, lin32, lin64, mac, android);\r
+               new AntScriptGenerator().generate(new BuildConfig("gdx-bullet"), win32home, win32, win64, lin32, lin64, mac, android);\r
 \r
                // build natives\r
                // BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
@@ -103,4 +98,4 @@ public class BulletBuild {
                BuildExecutor.executeAnt("jni/build-android32.xml", "");\r
                BuildExecutor.executeAnt("jni/build.xml", "pack-natives");\r
        }\r
-}
\ No newline at end of file
+}\r
index 5ab31ac..af08da4 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.physics.bullet;
-
-import com.badlogic.gdx.math.Matrix3;
-import com.badlogic.gdx.math.Quaternion;
-import com.badlogic.gdx.math.Vector3;
-import com.badlogic.gdx.utils.SharedLibraryLoader;
-
-public class BulletTest {
-       static {
-               new SharedLibraryLoader().load("gdx-bullet");
-       }
-
-       public static void main(String[] args) {
-               testMathTypes();
-               testBounce();
-       }
-
-       public static void testMathTypes() {
-               Matrix3 m = new Matrix3();
-               m.idt();
-               m.val[0] = 1;
-               m.val[1] = 2;
-               m.val[2] = 3;
-               m.val[3] = 4;
-               m.val[4] = 5;
-               m.val[5] = 6;
-               m.val[6] = 7;
-               m.val[7] = 8;
-               m.val[8] = 9;
-
-               Quaternion q = new Quaternion();
-
-               btTransform t = new btTransform();
-               t.setIdentity();
-               System.out.println(t.getOrigin());
-               System.out.println(t.getBasis());
-               System.out.println();
-
-               t.setOrigin(new Vector3(1, 2, 3));
-               t.setBasis(m);
-               System.out.println(t.getOrigin());
-               System.out.println(t.getBasis());
-               System.out.println();
-
-               System.out.println(t.getRotation());
-               t.setRotation(q);
-               System.out.println(t.getRotation());
-
-               t.delete();
-       }
-
-       public static void testBounce() {
-
-               // Create the collision and dynamics worlds
-               btDefaultCollisionConfiguration collisionConfiguration = new btDefaultCollisionConfiguration();
-               btCollisionDispatcher dispatcher = new btCollisionDispatcher(
-                               collisionConfiguration);
-               btDbvtBroadphase broadphase = new btDbvtBroadphase();
-               btSequentialImpulseConstraintSolver solver = new btSequentialImpulseConstraintSolver();
-               btDiscreteDynamicsWorld dynamicsWorld = new btDiscreteDynamicsWorld(
-                               dispatcher, broadphase, solver, collisionConfiguration);
-
-               // Configure gravity at 10 ms/s/s toward -z
-               dynamicsWorld.setGravity(new Vector3(0f, 0f, -10f));
-
-               // Rigid object at +100m
-               btRigidBody dropBody = createDropObject(100);
-               dynamicsWorld.addRigidBody(dropBody);
-
-               // Ground plane at +0m
-               btRigidBody planeBody = createGroundPlane();
-               dynamicsWorld.addRigidBody(planeBody);
-
-               // Simulate 10 seconds
-               int durationSeconds = 10;
-               int hertz = 60;
-               float timeStep = 1f / (float) hertz;
-               for (int i = 0; i < hertz * durationSeconds; i++) {
-                       dynamicsWorld.stepSimulation(timeStep);
-                       if (i % hertz == 0) {
-                               printZ(dropBody);
-                       }
-               }
-
-               // Clean up
-               dynamicsWorld.removeRigidBody(planeBody);
-               planeBody.delete();
-               dynamicsWorld.removeRigidBody(dropBody);
-               dropBody.delete();
-               dynamicsWorld.delete();
-               solver.delete();
-               broadphase.delete();
-               dispatcher.delete();
-               collisionConfiguration.delete();
-       }
-
-       private static btRigidBody createGroundPlane() {
-
-               btTransform startTransform = new btTransform();
-               startTransform.setIdentity();
-
-               // Ground is the x,y plane
-               btRigidBody body = new btRigidBody(0, new btDefaultMotionState(
-                               startTransform),
-                               new btStaticPlaneShape(new Vector3(0, 0, 1), 0), new Vector3(0,
-                                               0, 0));
-
-               // Transform values were copied into the rigid object, delete here
-               startTransform.delete();
-               
-               return body;
-       }
-
-       private static btRigidBody createDropObject(float height) {
-
-               float mass = 100f;
-
-               btTransform startTransform = new btTransform();
-               startTransform.setIdentity();
-               startTransform.setOrigin(new Vector3(0, 0, height));
-
-               Vector3 localInertia = new Vector3();
-
-               btBoxShape shape = new btBoxShape(new Vector3(0.5f, 0.5f, 0.5f));
-               shape.calculateLocalInertia(mass, localInertia);
-
-               btRigidBody body = new btRigidBody(mass, new btDefaultMotionState(
-                               startTransform), shape, localInertia);
-
-               // Transform values were copied into the rigid object, delete here
-               startTransform.delete();
-               
-               return body;
-       }
-
-       private static void printZ(btRigidBody body) {
-               btTransform transform = body.getWorldTransform();
-               System.out.println(transform.getOrigin().z);
-               // We didn't create the transform, don't delete it
-       }
-}
\ No newline at end of file
+ ******************************************************************************/\r
+\r
+package com.badlogic.gdx.physics.bullet;\r
+\r
+import com.badlogic.gdx.math.Matrix3;\r
+import com.badlogic.gdx.math.Quaternion;\r
+import com.badlogic.gdx.math.Vector3;\r
+import com.badlogic.gdx.utils.SharedLibraryLoader;\r
+\r
+public class BulletTest {\r
+       static {\r
+               new SharedLibraryLoader().load("gdx-bullet");\r
+       }\r
+\r
+       public static void main (String[] args) {\r
+               testMathTypes();\r
+               testBounce();\r
+       }\r
+\r
+       public static void testMathTypes () {\r
+               Matrix3 m = new Matrix3();\r
+               m.idt();\r
+               m.val[0] = 1;\r
+               m.val[1] = 2;\r
+               m.val[2] = 3;\r
+               m.val[3] = 4;\r
+               m.val[4] = 5;\r
+               m.val[5] = 6;\r
+               m.val[6] = 7;\r
+               m.val[7] = 8;\r
+               m.val[8] = 9;\r
+\r
+               Quaternion q = new Quaternion();\r
+\r
+               btTransform t = new btTransform();\r
+               t.setIdentity();\r
+               System.out.println(t.getOrigin());\r
+               System.out.println(t.getBasis());\r
+               System.out.println();\r
+\r
+               t.setOrigin(new Vector3(1, 2, 3));\r
+               t.setBasis(m);\r
+               System.out.println(t.getOrigin());\r
+               System.out.println(t.getBasis());\r
+               System.out.println();\r
+\r
+               System.out.println(t.getRotation());\r
+               t.setRotation(q);\r
+               System.out.println(t.getRotation());\r
+\r
+               t.delete();\r
+       }\r
+\r
+       public static void testBounce () {\r
+\r
+               // Create the collision and dynamics worlds\r
+               btDefaultCollisionConfiguration collisionConfiguration = new btDefaultCollisionConfiguration();\r
+               btCollisionDispatcher dispatcher = new btCollisionDispatcher(collisionConfiguration);\r
+               btDbvtBroadphase broadphase = new btDbvtBroadphase();\r
+               btSequentialImpulseConstraintSolver solver = new btSequentialImpulseConstraintSolver();\r
+               btDiscreteDynamicsWorld dynamicsWorld = new btDiscreteDynamicsWorld(dispatcher, broadphase, solver, collisionConfiguration);\r
+\r
+               // Configure gravity at 10 ms/s/s toward -z\r
+               dynamicsWorld.setGravity(new Vector3(0f, 0f, -10f));\r
+\r
+               // Rigid object at +100m\r
+               btRigidBody dropBody = createDropObject(100);\r
+               dynamicsWorld.addRigidBody(dropBody);\r
+\r
+               // Ground plane at +0m\r
+               btRigidBody planeBody = createGroundPlane();\r
+               dynamicsWorld.addRigidBody(planeBody);\r
+\r
+               // Simulate 10 seconds\r
+               int durationSeconds = 10;\r
+               int hertz = 60;\r
+               float timeStep = 1f / (float)hertz;\r
+               for (int i = 0; i < hertz * durationSeconds; i++) {\r
+                       dynamicsWorld.stepSimulation(timeStep);\r
+                       if (i % hertz == 0) {\r
+                               printZ(dropBody);\r
+                       }\r
+               }\r
+\r
+               // Clean up\r
+               dynamicsWorld.removeRigidBody(planeBody);\r
+               planeBody.delete();\r
+               dynamicsWorld.removeRigidBody(dropBody);\r
+               dropBody.delete();\r
+               dynamicsWorld.delete();\r
+               solver.delete();\r
+               broadphase.delete();\r
+               dispatcher.delete();\r
+               collisionConfiguration.delete();\r
+       }\r
+\r
+       private static btRigidBody createGroundPlane () {\r
+\r
+               btTransform startTransform = new btTransform();\r
+               startTransform.setIdentity();\r
+\r
+               // Ground is the x,y plane\r
+               btRigidBody body = new btRigidBody(0, new btDefaultMotionState(startTransform), new btStaticPlaneShape(\r
+                       new Vector3(0, 0, 1), 0), new Vector3(0, 0, 0));\r
+\r
+               // Transform values were copied into the rigid object, delete here\r
+               startTransform.delete();\r
+\r
+               return body;\r
+       }\r
+\r
+       private static btRigidBody createDropObject (float height) {\r
+\r
+               float mass = 100f;\r
+\r
+               btTransform startTransform = new btTransform();\r
+               startTransform.setIdentity();\r
+               startTransform.setOrigin(new Vector3(0, 0, height));\r
+\r
+               Vector3 localInertia = new Vector3();\r
+\r
+               btBoxShape shape = new btBoxShape(new Vector3(0.5f, 0.5f, 0.5f));\r
+               shape.calculateLocalInertia(mass, localInertia);\r
+\r
+               btRigidBody body = new btRigidBody(mass, new btDefaultMotionState(startTransform), shape, localInertia);\r
+\r
+               // Transform values were copied into the rigid object, delete here\r
+               startTransform.delete();\r
+\r
+               return body;\r
+       }\r
+\r
+       private static void printZ (btRigidBody body) {\r
+               btTransform transform = body.getWorldTransform();\r
+               System.out.println(transform.getOrigin().z);\r
+               // We didn't create the transform, don't delete it\r
+       }\r
+}\r
index 7a31a74..b194a56 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g2d.freetype;\r
 \r
 import java.nio.ByteBuffer;\r
@@ -27,6 +28,7 @@ import com.badlogic.gdx.utils.LongMap;
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
 \r
 public class FreeType {\r
+       // @off\r
        /*JNI\r
        #include <ft2build.h>\r
        #include FT_FREETYPE_H\r
index e33d0f8..1172270 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g2d.freetype;\r
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.graphics.Pixmap;\r
-import com.badlogic.gdx.graphics.PixmapIO;\r
 import com.badlogic.gdx.graphics.Pixmap.Format;\r
 import com.badlogic.gdx.graphics.Texture.TextureFilter;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
+import com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData;\r
+import com.badlogic.gdx.graphics.g2d.BitmapFont.Glyph;\r
 import com.badlogic.gdx.graphics.g2d.PixmapPacker;\r
 import com.badlogic.gdx.graphics.g2d.TextureAtlas;\r
 import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
-import com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData;\r
-import com.badlogic.gdx.graphics.g2d.BitmapFont.Glyph;\r
 import com.badlogic.gdx.graphics.g2d.freetype.FreeType.Bitmap;\r
 import com.badlogic.gdx.graphics.g2d.freetype.FreeType.Face;\r
 import com.badlogic.gdx.graphics.g2d.freetype.FreeType.GlyphMetrics;\r
@@ -38,32 +38,28 @@ import com.badlogic.gdx.math.Rectangle;
 import com.badlogic.gdx.utils.Disposable;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
-/**\r
- * Generates {@link BitmapFont} and {@link BitmapFontData} instances from TrueType font files.</p>\r
+/** Generates {@link BitmapFont} and {@link BitmapFontData} instances from TrueType font files.</p>\r
+ * \r
+ * Usage example:\r
  * \r
- * Usage example: \r
  * <pre>\r
- * FreeTypeFontGenerator gen = new FreeTypeFontGenerator(Gdx.files.internal("myfont.ttf"));\r
+ * FreeTypeFontGenerator gen = new FreeTypeFontGenerator(Gdx.files.internal(&quot;myfont.ttf&quot;));\r
  * BitmapFont font = gen.generateFont(16);\r
  * gen.dispose();\r
  * </pre>\r
  * \r
- * The generator has to be disposed once it is no longer used. The returned {@link BitmapFont} \r
- * instances are managed by the user and have to be disposed as usual.\r
+ * The generator has to be disposed once it is no longer used. The returned {@link BitmapFont} instances are managed by the user\r
+ * and have to be disposed as usual.\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class FreeTypeFontGenerator implements Disposable {\r
        public static final String DEFAULT_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\"!`?'.,;:()[]{}<>|/@\\^$-%+=#_&~*\7f\u0080\u0081\u0082\u0083\u0084\u0085\u0086\u0087\u0088\u0089\u008A\u008B\u008C\u008D\u008E\u008F\u0090\u0091\u0092\u0093\u0094\u0095\u0096\u0097\u0098\u0099\u009A\u009B\u009C\u009D\u009E\u009F\u00A0\u00A1\u00A2\u00A3\u00A4\u00A5\u00A6\u00A7\u00A8\u00A9\u00AA\u00AB\u00AC\u00AD\u00AE\u00AF\u00B0\u00B1\u00B2\u00B3\u00B4\u00B5\u00B6\u00B7\u00B8\u00B9\u00BA\u00BB\u00BC\u00BD\u00BE\u00BF\u00C0\u00C1\u00C2\u00C3\u00C4\u00C5\u00C6\u00C7\u00C8\u00C9\u00CA\u00CB\u00CC\u00CD\u00CE\u00CF\u00D0\u00D1\u00D2\u00D3\u00D4\u00D5\u00D6\u00D7\u00D8\u00D9\u00DA\u00DB\u00DC\u00DD\u00DE\u00DF\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5\u00E6\u00E7\u00E8\u00E9\u00EA\u00EB\u00EC\u00ED\u00EE\u00EF\u00F0\u00F1\u00F2\u00F3\u00F4\u00F5\u00F6\u00F7\u00F8\u00F9\u00FA\u00FB\u00FC\u00FD\u00FE\u00FF";\r
        final Library library;\r
        final Face face;\r
 \r
-       /**\r
-        * Creates a new generator from the given TrueType font file. Throws a {@link GdxRuntimeException}\r
-        * in case loading did not succeed.\r
-        * @param font the {@link FileHandle} to the TrueType font file\r
-        */\r
+       /** Creates a new generator from the given TrueType font file. Throws a {@link GdxRuntimeException} in case loading did not\r
+        * succeed.\r
+        * @param font the {@link FileHandle} to the TrueType font file */\r
        public FreeTypeFontGenerator (FileHandle font) {\r
                library = FreeType.initFreeType();\r
                if (library == null) throw new GdxRuntimeException("Couldn't initialize FreeType");\r
@@ -71,50 +67,39 @@ public class FreeTypeFontGenerator implements Disposable {
                if (face == null) throw new GdxRuntimeException("Couldn't create face for font '" + font + "'");\r
                if (!FreeType.setPixelSizes(face, 0, 15)) throw new GdxRuntimeException("Couldn't set size for font '" + font + "'");\r
        }\r
-       \r
-       /**\r
-        * Generates a new {@link BitmapFont}, containing glyphs for the given characters. The size \r
-        * is expressed in pixels. Throws a GdxRuntimeException in case the font could not be generated.\r
-        * Using big sizes might cause such an exception. All characters need to fit onto a single\r
-        * texture.\r
+\r
+       /** Generates a new {@link BitmapFont}, containing glyphs for the given characters. The size is expressed in pixels. Throws a\r
+        * GdxRuntimeException in case the font could not be generated. Using big sizes might cause such an exception. All characters\r
+        * need to fit onto a single texture.\r
         * @param size the size in pixels\r
         * @param characters the characters the font should contain\r
-        * @param flip whether to flip the font horizontally, see {@link BitmapFont#BitmapFont(FileHandle, TextureRegion, boolean)}\r
-        */\r
-       public BitmapFont generateFont(int size, String characters, boolean flip) {\r
+        * @param flip whether to flip the font horizontally, see {@link BitmapFont#BitmapFont(FileHandle, TextureRegion, boolean)} */\r
+       public BitmapFont generateFont (int size, String characters, boolean flip) {\r
                FreeTypeBitmapFontData data = generateData(size, characters, flip);\r
                return new BitmapFont(data, data.getTextureRegion(), false);\r
        }\r
-       \r
-       /**\r
-        * Generates a new {@link BitmapFont}. The size is expressed in pixels. Throws\r
-        * a GdxRuntimeException in case the font could not be generated. Using big\r
-        * sizes might cause such an exception. All characters need to fit onto a single\r
-        * texture.\r
+\r
+       /** Generates a new {@link BitmapFont}. The size is expressed in pixels. Throws a GdxRuntimeException in case the font could not\r
+        * be generated. Using big sizes might cause such an exception. All characters need to fit onto a single texture.\r
         * \r
-        * @param size the size of the font in pixels\r
-        */\r
-       public BitmapFont generateFont(int size) {\r
+        * @param size the size of the font in pixels */\r
+       public BitmapFont generateFont (int size) {\r
                return generateFont(size, DEFAULT_CHARS, false);\r
        }\r
 \r
-       /**\r
-        * Generates a new {@link BitmapFontData} instance, expert usage only. Throws\r
-        * a GdxRuntimeException in case something went wrong.\r
-        * @param size the size in pixels\r
-        */\r
+       /** Generates a new {@link BitmapFontData} instance, expert usage only. Throws a GdxRuntimeException in case something went\r
+        * wrong.\r
+        * @param size the size in pixels */\r
        public FreeTypeBitmapFontData generateData (int size) {\r
                return generateData(size, DEFAULT_CHARS, false);\r
        }\r
-       \r
-       /**\r
-        * Generates a new {@link BitmapFontData} instance, expert usage only. Throws\r
-        * a GdxRuntimeException in case something went wrong.\r
+\r
+       /** Generates a new {@link BitmapFontData} instance, expert usage only. Throws a GdxRuntimeException in case something went\r
+        * wrong.\r
         * \r
         * @param size the size in pixels\r
         * @param characters the characters the font should contain\r
-        * @param flip whether to flip the font horizontally, see {@link BitmapFont#BitmapFont(FileHandle, TextureRegion, boolean)}\r
-        */\r
+        * @param flip whether to flip the font horizontally, see {@link BitmapFont#BitmapFont(FileHandle, TextureRegion, boolean)} */\r
        public FreeTypeBitmapFontData generateData (int size, String characters, boolean flip) {\r
                FreeTypeBitmapFontData data = new FreeTypeBitmapFontData();\r
                if (!FreeType.setPixelSizes(face, 0, size)) throw new GdxRuntimeException("Couldn't set size for font");\r
@@ -165,9 +150,9 @@ public class FreeTypeFontGenerator implements Disposable {
                PixmapPacker atlas = new PixmapPacker(pageWidth, pageWidth, Format.RGBA8888, 2, false);\r
                for (int i = 0; i < characters.length(); i++) {\r
                        char c = characters.charAt(i);\r
-                       if (!FreeType.loadChar(face, c, FreeType.FT_LOAD_DEFAULT)) { \r
-                               Gdx.app.log("FreeTypeFontGenerator", "Couldn't load char '" + c + "'"); \r
-                               continue; \r
+                       if (!FreeType.loadChar(face, c, FreeType.FT_LOAD_DEFAULT)) {\r
+                               Gdx.app.log("FreeTypeFontGenerator", "Couldn't load char '" + c + "'");\r
+                               continue;\r
                        }\r
                        if (!FreeType.renderGlyph(face.getGlyph(), FreeType.FT_RENDER_MODE_NORMAL)) {\r
                                Gdx.app.log("FreeTypeFontGenerator", "Couldn't render char '" + c + "'");\r
@@ -211,24 +196,17 @@ public class FreeTypeFontGenerator implements Disposable {
                return data;\r
        }\r
 \r
-       /**\r
-        * Cleans up all resources of the generator. Call this if you no longer\r
-        * use the generator.\r
-        */\r
+       /** Cleans up all resources of the generator. Call this if you no longer use the generator. */\r
        @Override\r
        public void dispose () {\r
                FreeType.doneFace(face);\r
                FreeType.doneFreeType(library);\r
        }\r
-       \r
-       /**\r
-        * {@link BitmapFontData} used for fonts generated via the {@link FreeTypeFontGenerator}. The\r
-        * texture storing the glyphs is held in memory, thus the {@link #getImagePath()} and {@link #getFontFile()}\r
-        * methods will return null.\r
-        *  \r
-        * @author mzechner\r
-        *\r
-        */\r
+\r
+       /** {@link BitmapFontData} used for fonts generated via the {@link FreeTypeFontGenerator}. The texture storing the glyphs is\r
+        * held in memory, thus the {@link #getImagePath()} and {@link #getFontFile()} methods will return null.\r
+        * \r
+        * @author mzechner */\r
        public static class FreeTypeBitmapFontData extends BitmapFontData {\r
                TextureRegion region;\r
 \r
@@ -236,4 +214,4 @@ public class FreeTypeFontGenerator implements Disposable {
                        return region;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 55d405b..0d88b03 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g2d.freetype;\r
 \r
 import com.badlogic.gdx.jnigen.AntScriptGenerator;\r
 import com.badlogic.gdx.jnigen.BuildConfig;\r
 import com.badlogic.gdx.jnigen.BuildExecutor;\r
 import com.badlogic.gdx.jnigen.BuildTarget;\r
-import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;\r
+import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 \r
 public class FreetypeBuild {\r
        public static void main (String[] args) throws Exception {\r
-               String[] headers = { "freetype-2.4.8/include" };\r
-               String[] sources = { \r
-                       // BASE \r
-                       "freetype-2.4.8/src/base/ftsystem.c",\r
-             "freetype-2.4.8/src/base/ftinit.c",\r
-             "freetype-2.4.8/src/base/ftdebug.c",\r
-             "freetype-2.4.8/src/base/ftbase.c",\r
-             "freetype-2.4.8/src/base/ftbbox.c",       \r
-             "freetype-2.4.8/src/base/ftglyph.c",      \r
-             "freetype-2.4.8/src/base/ftbdf.c",        \r
-             "freetype-2.4.8/src/base/ftbitmap.c",     \r
-             "freetype-2.4.8/src/base/ftcid.c",        \r
-             "freetype-2.4.8/src/base/ftfstype.c",     \r
-             "freetype-2.4.8/src/base/ftgasp.c",       \r
-             "freetype-2.4.8/src/base/ftgxval.c",      \r
-             "freetype-2.4.8/src/base/ftlcdfil.c",     \r
-             "freetype-2.4.8/src/base/ftmm.c",         \r
-             "freetype-2.4.8/src/base/ftotval.c",      \r
-             "freetype-2.4.8/src/base/ftpatent.c",     \r
-             "freetype-2.4.8/src/base/ftpfr.c",        \r
-             "freetype-2.4.8/src/base/ftstroke.c",     \r
-             "freetype-2.4.8/src/base/ftsynth.c",      \r
-             "freetype-2.4.8/src/base/fttype1.c",      \r
-             "freetype-2.4.8/src/base/ftwinfnt.c",     \r
-             "freetype-2.4.8/src/base/ftxf86.c",       \r
-//           "freetype-2.4.8/src/base/ftmac.c",\r
-             \r
-             // DRIVERS\r
-             "freetype-2.4.8/src/bdf/bdf.c",          \r
-             "freetype-2.4.8/src/cff/cff.c",           \r
-             "freetype-2.4.8/src/cid/type1cid.c",      \r
-             "freetype-2.4.8/src/pcf/pcf.c",           \r
-             "freetype-2.4.8/src/pfr/pfr.c",           \r
-             "freetype-2.4.8/src/sfnt/sfnt.c",       \r
-             "freetype-2.4.8/src/truetype/truetype.c", \r
-             "freetype-2.4.8/src/type1/type1.c",       \r
-             "freetype-2.4.8/src/type42/type42.c",     \r
-             "freetype-2.4.8/src/winfonts/winfnt.c",  \r
-             \r
-             // RASTERIZERS\r
-             "freetype-2.4.8/src/raster/raster.c",\r
-             "freetype-2.4.8/src/smooth/smooth.c",\r
-             \r
-             // AUX\r
-             "freetype-2.4.8/src/autofit/autofit.c",\r
-             "freetype-2.4.8/src/cache/ftcache.c", \r
-             "freetype-2.4.8/src/gzip/ftgzip.c",\r
-             "freetype-2.4.8/src/lzw/ftlzw.c",\r
-             "freetype-2.4.8/src/bzip2/ftbzip2.c",\r
-             "freetype-2.4.8/src/gxvalid/gxvalid.c",\r
-             "freetype-2.4.8/src/otvalid/otvalid.c",\r
-             "freetype-2.4.8/src/psaux/psaux.c",\r
-             "freetype-2.4.8/src/pshinter/pshinter.c",\r
-             "freetype-2.4.8/src/psnames/psnames.c",\r
-               };\r
-               \r
+               String[] headers = {"freetype-2.4.8/include"};\r
+               String[] sources = {\r
+                       // BASE\r
+                       "freetype-2.4.8/src/base/ftsystem.c", "freetype-2.4.8/src/base/ftinit.c", "freetype-2.4.8/src/base/ftdebug.c",\r
+                       "freetype-2.4.8/src/base/ftbase.c", "freetype-2.4.8/src/base/ftbbox.c",\r
+                       "freetype-2.4.8/src/base/ftglyph.c",\r
+                       "freetype-2.4.8/src/base/ftbdf.c",\r
+                       "freetype-2.4.8/src/base/ftbitmap.c",\r
+                       "freetype-2.4.8/src/base/ftcid.c",\r
+                       "freetype-2.4.8/src/base/ftfstype.c",\r
+                       "freetype-2.4.8/src/base/ftgasp.c",\r
+                       "freetype-2.4.8/src/base/ftgxval.c",\r
+                       "freetype-2.4.8/src/base/ftlcdfil.c",\r
+                       "freetype-2.4.8/src/base/ftmm.c",\r
+                       "freetype-2.4.8/src/base/ftotval.c",\r
+                       "freetype-2.4.8/src/base/ftpatent.c",\r
+                       "freetype-2.4.8/src/base/ftpfr.c",\r
+                       "freetype-2.4.8/src/base/ftstroke.c",\r
+                       "freetype-2.4.8/src/base/ftsynth.c",\r
+                       "freetype-2.4.8/src/base/fttype1.c",\r
+                       "freetype-2.4.8/src/base/ftwinfnt.c",\r
+                       "freetype-2.4.8/src/base/ftxf86.c",\r
+// "freetype-2.4.8/src/base/ftmac.c",\r
+\r
+                       // DRIVERS\r
+                       "freetype-2.4.8/src/bdf/bdf.c", "freetype-2.4.8/src/cff/cff.c", "freetype-2.4.8/src/cid/type1cid.c",\r
+                       "freetype-2.4.8/src/pcf/pcf.c", "freetype-2.4.8/src/pfr/pfr.c",\r
+                       "freetype-2.4.8/src/sfnt/sfnt.c",\r
+                       "freetype-2.4.8/src/truetype/truetype.c",\r
+                       "freetype-2.4.8/src/type1/type1.c",\r
+                       "freetype-2.4.8/src/type42/type42.c",\r
+                       "freetype-2.4.8/src/winfonts/winfnt.c",\r
+\r
+                       // RASTERIZERS\r
+                       "freetype-2.4.8/src/raster/raster.c",\r
+                       "freetype-2.4.8/src/smooth/smooth.c",\r
+\r
+                       // AUX\r
+                       "freetype-2.4.8/src/autofit/autofit.c", "freetype-2.4.8/src/cache/ftcache.c", "freetype-2.4.8/src/gzip/ftgzip.c",\r
+                       "freetype-2.4.8/src/lzw/ftlzw.c", "freetype-2.4.8/src/bzip2/ftbzip2.c", "freetype-2.4.8/src/gxvalid/gxvalid.c",\r
+                       "freetype-2.4.8/src/otvalid/otvalid.c", "freetype-2.4.8/src/psaux/psaux.c", "freetype-2.4.8/src/pshinter/pshinter.c",\r
+                       "freetype-2.4.8/src/psnames/psnames.c",};\r
+\r
                BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32home.compilerPrefix = "";\r
                win32home.buildFileName = "build-windows32home.xml";\r
@@ -88,48 +76,48 @@ public class FreetypeBuild {
                win32home.cIncludes = sources;\r
                win32home.cFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                win32home.cppFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
-               \r
+\r
                BuildTarget win32 = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32.headerDirs = headers;\r
                win32.cIncludes = sources;\r
                win32.cFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                win32.cppFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
-               \r
+\r
                BuildTarget win64 = BuildTarget.newDefaultTarget(TargetOs.Windows, true);\r
                win64.headerDirs = headers;\r
                win64.cIncludes = sources;\r
                win64.cFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                win64.cppFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
-               \r
+\r
                BuildTarget lin32 = BuildTarget.newDefaultTarget(TargetOs.Linux, false);\r
                lin32.headerDirs = headers;\r
                lin32.cIncludes = sources;\r
                lin32.cFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                lin32.cppFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
-               \r
+\r
                BuildTarget lin64 = BuildTarget.newDefaultTarget(TargetOs.Linux, true);\r
                lin64.headerDirs = headers;\r
                lin64.cIncludes = sources;\r
                lin64.cFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                lin64.cppFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
-               \r
+\r
                BuildTarget mac = BuildTarget.newDefaultTarget(TargetOs.MacOsX, false);\r
                mac.headerDirs = headers;\r
                mac.cIncludes = sources;\r
                mac.cFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                mac.cppFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                mac.linkerFlags += " -framework CoreServices -framework Carbon";\r
-               \r
+\r
                BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android, false);\r
                android.headerDirs = headers;\r
                android.cIncludes = sources;\r
                android.cFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
                android.cppFlags += " -std=c99 -DFT2_BUILD_LIBRARY";\r
-               \r
+\r
                new NativeCodeGenerator().generate();\r
                new AntScriptGenerator().generate(new BuildConfig("gdx-freetype"), win32home, win32, win64, lin32, lin64, mac, android);\r
-//             BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v clean");\r
-//             BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
+// BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v clean");\r
+// BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
                BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");\r
        }\r
-}
\ No newline at end of file
+}\r
index ecedfcd..5bda83c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
 import com.badlogic.gdx.jnigen.AntScriptGenerator;\r
@@ -25,10 +26,10 @@ import com.badlogic.gdx.jnigen.NativeCodeGenerator;
 public class ImageBuild {\r
        public static void main (String[] args) throws Exception {\r
                new NativeCodeGenerator().generate();\r
-               \r
-               String[] excludes = { };\r
-               String[] headers = { "libjpeg/", "giflib/", "../../../gdx/jni/gdx2d/" };\r
-               \r
+\r
+               String[] excludes = {};\r
+               String[] headers = {"libjpeg/", "giflib/", "../../../gdx/jni/gdx2d/"};\r
+\r
                BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32home.compilerPrefix = "";\r
                win32home.buildFileName = "build-windows32home.xml";\r
@@ -36,41 +37,41 @@ public class ImageBuild {
                win32home.cExcludes = win32home.cppExcludes = excludes;\r
                win32home.cFlags += " -DHAVE_CONFIG_H";\r
                win32home.headerDirs = headers;\r
-               \r
+\r
                BuildTarget win32 = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32.cExcludes = win32.cppExcludes = excludes;\r
                win32.headerDirs = headers;\r
                win32.cFlags += " -DHAVE_CONFIG_H";\r
-               \r
+\r
                BuildTarget win64 = BuildTarget.newDefaultTarget(TargetOs.Windows, true);\r
                win64.cExcludes = win64.cppExcludes = excludes;\r
                win64.headerDirs = headers;\r
                win64.cFlags += " -DHAVE_CONFIG_H";\r
-               \r
+\r
                BuildTarget lin32 = BuildTarget.newDefaultTarget(TargetOs.Linux, false);\r
                lin32.cExcludes = lin32.cppExcludes = excludes;\r
                lin32.headerDirs = headers;\r
                lin32.cFlags += " -DHAVE_CONFIG_H";\r
-               \r
+\r
                BuildTarget lin64 = BuildTarget.newDefaultTarget(TargetOs.Linux, true);\r
                lin64.cExcludes = lin64.cppExcludes = excludes;\r
                lin64.headerDirs = headers;\r
                lin64.cFlags += " -DHAVE_CONFIG_H";\r
-               \r
+\r
                BuildTarget mac = BuildTarget.newDefaultTarget(TargetOs.MacOsX, false);\r
                mac.cExcludes = mac.cppExcludes = excludes;\r
                mac.headerDirs = headers;\r
                mac.cFlags += " -DHAVE_CONFIG_H";\r
-               \r
+\r
                BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android, false);\r
                android.cExcludes = android.cppExcludes = excludes;\r
                android.headerDirs = headers;\r
                android.cFlags += " -DHAVE_CONFIG_H";\r
-               \r
+\r
                new AntScriptGenerator().generate(new BuildConfig("gdx-image"), win32home, android, win32, win64, lin32, lin64, mac);\r
 \r
                // build natives\r
-//             BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
+// BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
                BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");\r
        }\r
-}
\ No newline at end of file
+}\r
index 8a44bb5..6e2472d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
 import java.nio.ByteBuffer;\r
@@ -24,38 +25,33 @@ import com.badlogic.gdx.utils.GdxNativesLoader;
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
 \r
-/**\r
- * Very thin wrapper around libjpeg. Returns Pixmaps given a file or raw jpeg data in a byte array.\r
- * The returned Pixmap will always have the {@link Format#RGB888} format.\r
+/** Very thin wrapper around libjpeg. Returns Pixmaps given a file or raw jpeg data in a byte array. The returned Pixmap will\r
+ * always have the {@link Format#RGB888} format.\r
  * @author mzechner\r
- * @author Nathan Sweet\r
- */\r
+ * @author Nathan Sweet */\r
 public class Jpeg {\r
        static {\r
                new SharedLibraryLoader().load("gdx-image");\r
        }\r
-       \r
-       /**\r
-        * Reads a jpeg from the given file, throws a GdxRuntimeException in case something went wrong.\r
-        */\r
-       public static synchronized Pixmap read(FileHandle file) {\r
+\r
+       /** Reads a jpeg from the given file, throws a GdxRuntimeException in case something went wrong. */\r
+       public static synchronized Pixmap read (FileHandle file) {\r
                byte[] bytes = file.readBytes();\r
                long[] out = new long[4];\r
                ByteBuffer pixels = read(bytes, 0, bytes.length, out);\r
-               if(pixels == null) throw new GdxRuntimeException("Couldn't load jpeg '" + file + "'");\r
+               if (pixels == null) throw new GdxRuntimeException("Couldn't load jpeg '" + file + "'");\r
                return new Pixmap(new Gdx2DPixmap(pixels, out));\r
        }\r
-       \r
-       /**\r
-        * Reads a jpeg from the byte array, throws a GdxRuntimeException in case something went wrong.\r
-        */\r
-       public static Pixmap read(byte[] compressedData, int offset, int length) {\r
+\r
+       /** Reads a jpeg from the byte array, throws a GdxRuntimeException in case something went wrong. */\r
+       public static Pixmap read (byte[] compressedData, int offset, int length) {\r
                long[] out = new long[4];\r
                ByteBuffer pixels = read(compressedData, offset, length, out);\r
-               if(pixels == null) throw new GdxRuntimeException("Couldn't load jpeg");\r
+               if (pixels == null) throw new GdxRuntimeException("Couldn't load jpeg");\r
                return new Pixmap(new Gdx2DPixmap(pixels, out));\r
        }\r
-       \r
+\r
+       // @off\r
        /*JNI\r
        #include "gdx2d.h"\r
        #include "libjpeg/jpeglib.h"\r
index 39c966b..b8f2609 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
 import java.util.ArrayList;\r
@@ -21,57 +22,69 @@ import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;
 import com.badlogic.gdx.jnigen.FileDescriptor.FileType;\r
 \r
 public class AndroidNdkScriptGenerator {\r
-       public void generate(BuildConfig config, BuildTarget target) {\r
-               if(target.os != TargetOs.Android) throw new IllegalArgumentException("target os must be Android");\r
-               \r
+       public void generate (BuildConfig config, BuildTarget target) {\r
+               if (target.os != TargetOs.Android) throw new IllegalArgumentException("target os must be Android");\r
+\r
                // create all the directories for outputing object files, shared libs and natives jar as well as build scripts.\r
-               if(!config.libsDir.exists()) {\r
-                       if(!config.libsDir.mkdirs()) throw new RuntimeException("Couldn't create directory for shared library files in '" + config.libsDir + "'");\r
+               if (!config.libsDir.exists()) {\r
+                       if (!config.libsDir.mkdirs())\r
+                               throw new RuntimeException("Couldn't create directory for shared library files in '" + config.libsDir + "'");\r
                }\r
-               if(!config.jniDir.exists()) {\r
-                       if(!config.jniDir.mkdirs()) throw new RuntimeException("Couldn't create native code directory '" + config.jniDir + "'");\r
+               if (!config.jniDir.exists()) {\r
+                       if (!config.jniDir.mkdirs())\r
+                               throw new RuntimeException("Couldn't create native code directory '" + config.jniDir + "'");\r
                }\r
-               \r
+\r
                ArrayList<FileDescriptor> files = new ArrayList<FileDescriptor>();\r
 \r
                int idx = 0;\r
                String[] includes = new String[target.cIncludes.length + target.cppIncludes.length];\r
-               for(String include: target.cIncludes) includes[idx++] = config.jniDir + "/" + include;\r
-               for(String include: target.cppIncludes) includes[idx++] = config.jniDir + "/" + include;\r
-               \r
+               for (String include : target.cIncludes)\r
+                       includes[idx++] = config.jniDir + "/" + include;\r
+               for (String include : target.cppIncludes)\r
+                       includes[idx++] = config.jniDir + "/" + include;\r
+\r
                idx = 0;\r
                String[] excludes = new String[target.cExcludes.length + target.cppExcludes.length + 1];\r
-               for(String exclude: target.cExcludes) excludes[idx++] = config.jniDir + "/" + exclude;\r
-               for(String exclude: target.cppExcludes) excludes[idx++] = config.jniDir + "/" + exclude;\r
+               for (String exclude : target.cExcludes)\r
+                       excludes[idx++] = config.jniDir + "/" + exclude;\r
+               for (String exclude : target.cppExcludes)\r
+                       excludes[idx++] = config.jniDir + "/" + exclude;\r
                excludes[idx] = "**/target/*";\r
 \r
                gatherSourceFiles(config.jniDir, includes, excludes, files);\r
-               \r
+\r
                // create androidManifest.xml if it doesn't exist.\r
                FileDescriptor manifest = config.jniDir.parent();\r
-               if(manifest.path().equals("/") || manifest.path().equals("\\")) manifest = new FileDescriptor("AndroidManifest.xml");\r
-               else manifest = config.jniDir.parent().child("AndroidManifest.xml");\r
-               if(!manifest.exists()) {\r
+               if (manifest.path().equals("/") || manifest.path().equals("\\"))\r
+                       manifest = new FileDescriptor("AndroidManifest.xml");\r
+               else\r
+                       manifest = config.jniDir.parent().child("AndroidManifest.xml");\r
+               if (!manifest.exists()) {\r
                        manifest.writeString("", false);\r
                }\r
-               \r
+\r
                // create Application.mk file\r
                FileDescriptor application = config.jniDir.child("Application.mk");\r
-               application.writeString(new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/Application.mk.template", FileType.Classpath).readString(), false);\r
+               application.writeString(new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/Application.mk.template",\r
+                       FileType.Classpath).readString(), false);\r
 \r
                // create Android.mk file\r
-               String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/Android.mk.template", FileType.Classpath).readString();\r
-       \r
+               String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/Android.mk.template", FileType.Classpath)\r
+                       .readString();\r
+\r
                StringBuffer srcFiles = new StringBuffer();\r
-               for(int i = 0; i < files.size(); i++) {\r
-                       if(i > 0) srcFiles.append("\t");\r
+               for (int i = 0; i < files.size(); i++) {\r
+                       if (i > 0) srcFiles.append("\t");\r
                        srcFiles.append(files.get(i).path().replace('\\', '/').replace(config.jniDir.toString() + "/", ""));\r
-                       if(i <files.size() - 1) srcFiles.append("\\\n");\r
-                       else srcFiles.append("\n");\r
+                       if (i < files.size() - 1)\r
+                               srcFiles.append("\\\n");\r
+                       else\r
+                               srcFiles.append("\n");\r
                }\r
-               \r
+\r
                StringBuffer headerDirs = new StringBuffer();\r
-               for(String headerDir: target.headerDirs) {\r
+               for (String headerDir : target.headerDirs) {\r
                        headerDirs.append(headerDir);\r
                        headerDirs.append(" ");\r
                }\r
@@ -82,24 +95,24 @@ public class AndroidNdkScriptGenerator {
                template = template.replace("%cppFlags%", target.cppFlags);\r
                template = template.replace("%linkerFlags%", target.linkerFlags);\r
                template = template.replace("%srcFiles%", srcFiles);\r
-               \r
+\r
                System.out.println(template);\r
                config.jniDir.child("Android.mk").writeString(template, false);\r
        }\r
-       \r
-       private void gatherSourceFiles(FileDescriptor file, String[] includes, String[] excludes, ArrayList<FileDescriptor> files) {\r
+\r
+       private void gatherSourceFiles (FileDescriptor file, String[] includes, String[] excludes, ArrayList<FileDescriptor> files) {\r
                String fileName = file.path().replace('\\', '/');\r
-               if(file.isDirectory()) {\r
-                       if(match(fileName, excludes)) return;\r
-                       for(FileDescriptor child: file.list()) {\r
+               if (file.isDirectory()) {\r
+                       if (match(fileName, excludes)) return;\r
+                       for (FileDescriptor child : file.list()) {\r
                                gatherSourceFiles(child, includes, excludes, files);\r
                        }\r
                } else {\r
-                       if(match(fileName, includes) && !match(fileName, excludes)) files.add(file);\r
+                       if (match(fileName, includes) && !match(fileName, excludes)) files.add(file);\r
                }\r
        }\r
-       \r
-       private boolean match(String file, String[] patterns) {\r
+\r
+       private boolean match (String file, String[] patterns) {\r
                return new AntPathMatcher().match(file, patterns);\r
        }\r
-}
\ No newline at end of file
+}\r
index 96114b1..38b67aa 100644 (file)
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
  */\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
 import java.util.ArrayList;\r
 import java.util.List;\r
 import java.util.StringTokenizer;\r
 \r
-/**\r
- * PathMatcher implementation for Ant-style path patterns. Examples are provided\r
- * below.\r
+/** PathMatcher implementation for Ant-style path patterns. Examples are provided below.\r
  * \r
  * <p>\r
- * Part of this mapping code has been kindly borrowed from <a\r
- * href="http://ant.apache.org">Apache Ant</a>.\r
+ * Part of this mapping code has been kindly borrowed from <a href="http://ant.apache.org">Apache Ant</a>.\r
  * \r
  * <p>\r
  * The mapping matches URLs using the following rules:<br>\r
@@ -40,27 +38,22 @@ import java.util.StringTokenizer;
  * <ul>\r
  * <li>com/t?st.jsp - matches test.jsp but also tast.jsp or txst.jsp</li>\r
  * <li>com/*.jsp - matches all .jsp files in the com directory</li>\r
- * <li>com/&#42;&#42;/test.jsp - matches all test.jsp path underneath the com\r
- * path</li>\r
- * <li>org/springframework/&#42;&#42;/*.jsp - matches all .jsp files underneath\r
- * the org/springframework path</li>\r
- * <li>org/&#42;&#42;/servlet/bla.jsp - matches\r
- * org/springframework/servlet/bla.jsp but also\r
+ * <li>com/&#42;&#42;/test.jsp - matches all test.jsp path underneath the com path</li>\r
+ * <li>org/springframework/&#42;&#42;/*.jsp - matches all .jsp files underneath the org/springframework path</li>\r
+ * <li>org/&#42;&#42;/servlet/bla.jsp - matches org/springframework/servlet/bla.jsp but also\r
  * org/springframework/testing/servlet/bla.jsp and com/servlet/bla.jsp</li>\r
  * </ul>\r
  * \r
  * @author Alef Arendsen\r
  * @author Juergen Hoeller\r
- * @since 16.07.2003\r
- */\r
+ * @since 16.07.2003 */\r
 public class AntPathMatcher {\r
 \r
-       public boolean isPattern(String str) {\r
+       public boolean isPattern (String str) {\r
                return (str.indexOf('*') != -1 || str.indexOf('?') != -1);\r
        }\r
 \r
-       public static String[] tokenizeToStringArray(String str, String delimiters,\r
-                       boolean trimTokens, boolean ignoreEmptyTokens) {\r
+       public static String[] tokenizeToStringArray (String str, String delimiters, boolean trimTokens, boolean ignoreEmptyTokens) {\r
                if (str == null) {\r
                        return null;\r
                }\r
@@ -77,18 +70,18 @@ public class AntPathMatcher {
                }\r
                return tokens.toArray(new String[tokens.size()]);\r
        }\r
-       \r
-       public boolean match(String file, String[] patterns) {\r
-               if(patterns == null || patterns.length == 0) return true;\r
-               for(String pattern: patterns) {\r
-                       if(match(pattern, file)) {\r
+\r
+       public boolean match (String file, String[] patterns) {\r
+               if (patterns == null || patterns.length == 0) return true;\r
+               for (String pattern : patterns) {\r
+                       if (match(pattern, file)) {\r
                                return true;\r
                        }\r
                }\r
                return false;\r
        }\r
 \r
-       public boolean match(String pattern, String str) {\r
+       public boolean match (String pattern, String str) {\r
                if (str.startsWith("/") != pattern.startsWith("/")) {\r
                        return false;\r
                }\r
@@ -103,11 +96,11 @@ public class AntPathMatcher {
 \r
                // Match all elements up to the first **\r
                while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) {\r
-                       String patDir = (String) patDirs[patIdxStart];\r
+                       String patDir = (String)patDirs[patIdxStart];\r
                        if (patDir.equals("**")) {\r
                                break;\r
                        }\r
-                       if (!matchStrings(patDir, (String) strDirs[strIdxStart])) {\r
+                       if (!matchStrings(patDir, (String)strDirs[strIdxStart])) {\r
                                return false;\r
                        }\r
                        patIdxStart++;\r
@@ -131,11 +124,11 @@ public class AntPathMatcher {
 \r
                // up to last '**'\r
                while (patIdxStart <= patIdxEnd && strIdxStart <= strIdxEnd) {\r
-                       String patDir = (String) patDirs[patIdxEnd];\r
+                       String patDir = (String)patDirs[patIdxEnd];\r
                        if (patDir.equals("**")) {\r
                                break;\r
                        }\r
-                       if (!matchStrings(patDir, (String) strDirs[strIdxEnd])) {\r
+                       if (!matchStrings(patDir, (String)strDirs[strIdxEnd])) {\r
                                return false;\r
                        }\r
                        patIdxEnd--;\r
@@ -169,10 +162,11 @@ public class AntPathMatcher {
                        int patLength = (patIdxTmp - patIdxStart - 1);\r
                        int strLength = (strIdxEnd - strIdxStart + 1);\r
                        int foundIdx = -1;\r
-                       strLoop: for (int i = 0; i <= strLength - patLength; i++) {\r
+                       strLoop:\r
+                       for (int i = 0; i <= strLength - patLength; i++) {\r
                                for (int j = 0; j < patLength; j++) {\r
-                                       String subPat = (String) patDirs[patIdxStart + j + 1];\r
-                                       String subStr = (String) strDirs[strIdxStart + i + j];\r
+                                       String subPat = (String)patDirs[patIdxStart + j + 1];\r
+                                       String subStr = (String)strDirs[strIdxStart + i + j];\r
                                        if (!matchStrings(subPat, subStr)) {\r
                                                continue strLoop;\r
                                        }\r
@@ -199,21 +193,14 @@ public class AntPathMatcher {
                return true;\r
        }\r
 \r
-       /**\r
-        * Tests whether or not a string matches against a pattern. The pattern may\r
-        * contain two special characters:<br>\r
+       /** Tests whether or not a string matches against a pattern. The pattern may contain two special characters:<br>\r
         * '*' means zero or more characters<br>\r
         * '?' means one and only one character\r
         * \r
-        * @param pattern\r
-        *            pattern to match against. Must not be <code>null</code>.\r
-        * @param str\r
-        *            string which must be matched against the pattern. Must not be\r
-        *            <code>null</code>.\r
-        * @return <code>true</code> if the string matches against the pattern, or\r
-        *         <code>false</code> otherwise.\r
-        */\r
-       private boolean matchStrings(String pattern, String str) {\r
+        * @param pattern pattern to match against. Must not be <code>null</code>.\r
+        * @param str string which must be matched against the pattern. Must not be <code>null</code>.\r
+        * @return <code>true</code> if the string matches against the pattern, or <code>false</code> otherwise. */\r
+       private boolean matchStrings (String pattern, String str) {\r
                char[] patArr = pattern.toCharArray();\r
                char[] strArr = str.toCharArray();\r
                int patIdxStart = 0;\r
@@ -312,7 +299,8 @@ public class AntPathMatcher {
                        int patLength = (patIdxTmp - patIdxStart - 1);\r
                        int strLength = (strIdxEnd - strIdxStart + 1);\r
                        int foundIdx = -1;\r
-                       strLoop: for (int i = 0; i <= strLength - patLength; i++) {\r
+                       strLoop:\r
+                       for (int i = 0; i <= strLength - patLength; i++) {\r
                                for (int j = 0; j < patLength; j++) {\r
                                        ch = patArr[patIdxStart + j + 1];\r
                                        if (ch != '?') {\r
@@ -345,4 +333,4 @@ public class AntPathMatcher {
                return true;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 00c151f..c41e35a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
 import java.util.ArrayList;\r
@@ -20,16 +21,14 @@ import java.util.ArrayList;
 import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;\r
 import com.badlogic.gdx.jnigen.FileDescriptor.FileType;\r
 \r
-/**\r
- * Generates Ant scripts for multiple native build targets based on the given {@link BuildConfig}.</p>\r
+/** Generates Ant scripts for multiple native build targets based on the given {@link BuildConfig}.</p>\r
  * \r
- * For each build target, an Ant build script is created that will compile C/C++ files to a shared library\r
- * for a specific platform. A master build script is generated that will execute the build scripts for\r
- * each platform and bundles their shared libraries into a Jar file containing all shared libraries for\r
- * all desktop platform targets, and armeabi/ and armeabi-v7a/ folders containing the shard libraries for\r
- * Android. The scripts can be executed from the command line or via the {@link BuildExecutor}. The resulting\r
- * shared libraries can be loaded with the {@link JniGenSharedLibraryLoader} which will load the correct\r
- * shared library from the natives jar/arm folders based on the platform the application is running on</p>\r
+ * For each build target, an Ant build script is created that will compile C/C++ files to a shared library for a specific\r
+ * platform. A master build script is generated that will execute the build scripts for each platform and bundles their shared\r
+ * libraries into a Jar file containing all shared libraries for all desktop platform targets, and armeabi/ and armeabi-v7a/\r
+ * folders containing the shard libraries for Android. The scripts can be executed from the command line or via the\r
+ * {@link BuildExecutor}. The resulting shared libraries can be loaded with the {@link JniGenSharedLibraryLoader} which will load\r
+ * the correct shared library from the natives jar/arm folders based on the platform the application is running on</p>\r
  * \r
  * A common use case looks like this:\r
  * \r
@@ -49,178 +48,171 @@ import com.badlogic.gdx.jnigen.FileDescriptor.FileType;
  * new SharedLibraryLoader().load("mysharedlibrary)\r
  * </pre>\r
  * \r
- * This will create the build scripts and execute the build of the shared libraries for each \r
- * platform, provided that the compilers are available on the system. Mac OS X might have to be\r
- * treated separately as there are no cross-compilers for it.</p>\r
+ * This will create the build scripts and execute the build of the shared libraries for each platform, provided that the compilers\r
+ * are available on the system. Mac OS X might have to be treated separately as there are no cross-compilers for it.</p>\r
  * \r
- * The generator will also copy the necessary JNI headers to the jni/jni-headers folder for Windows, Linux and\r
- * Mac OS X.</p>\r
+ * The generator will also copy the necessary JNI headers to the jni/jni-headers folder for Windows, Linux and Mac OS X.</p>\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class AntScriptGenerator {\r
-       /**\r
-        * Creates a master build script and one build script for each target to generated\r
-        * native shared libraries. \r
+       /** Creates a master build script and one build script for each target to generated native shared libraries.\r
         * @param config the {@link BuildConfig}\r
-        * @param targets list of {@link BuildTarget} instances\r
-        */\r
-       public void generate(BuildConfig config, BuildTarget ... targets) {\r
+        * @param targets list of {@link BuildTarget} instances */\r
+       public void generate (BuildConfig config, BuildTarget... targets) {\r
                // create all the directories for outputing object files, shared libs and natives jar as well as build scripts.\r
-               if(!config.libsDir.exists()) {\r
-                       if(!config.libsDir.mkdirs()) throw new RuntimeException("Couldn't create directory for shared library files in '" + config.libsDir + "'");\r
+               if (!config.libsDir.exists()) {\r
+                       if (!config.libsDir.mkdirs())\r
+                               throw new RuntimeException("Couldn't create directory for shared library files in '" + config.libsDir + "'");\r
                }\r
-               if(!config.jniDir.exists()) {\r
-                       if(!config.jniDir.mkdirs()) throw new RuntimeException("Couldn't create native code directory '" + config.jniDir + "'");\r
+               if (!config.jniDir.exists()) {\r
+                       if (!config.jniDir.mkdirs())\r
+                               throw new RuntimeException("Couldn't create native code directory '" + config.jniDir + "'");\r
                }\r
-               \r
+\r
                // copy jni headers\r
                copyJniHeaders(config.jniDir.path());\r
-               \r
+\r
                ArrayList<String> buildFiles = new ArrayList<String>();\r
                ArrayList<String> libsDirs = new ArrayList<String>();\r
                ArrayList<String> sharedLibFiles = new ArrayList<String>();\r
-               \r
+\r
                // generate an Ant build script for each target\r
-               for(BuildTarget target: targets) {\r
+               for (BuildTarget target : targets) {\r
                        String buildFile = generateBuildTargetTemplate(config, target);\r
                        FileDescriptor libsDir = new FileDescriptor(getLibsDirectory(config, target));\r
-                       \r
-                       if(!libsDir.exists()) {\r
-                               if(!libsDir.mkdirs()) throw new RuntimeException("Couldn't create libs directory '" + libsDir + "'");\r
+\r
+                       if (!libsDir.exists()) {\r
+                               if (!libsDir.mkdirs()) throw new RuntimeException("Couldn't create libs directory '" + libsDir + "'");\r
                        }\r
-                       \r
-                       String buildFileName = "build-" + target.os.toString().toLowerCase() + (target.is64Bit?"64":"32") + ".xml";\r
-                       if(target.buildFileName != null) buildFileName = target.buildFileName;\r
+\r
+                       String buildFileName = "build-" + target.os.toString().toLowerCase() + (target.is64Bit ? "64" : "32") + ".xml";\r
+                       if (target.buildFileName != null) buildFileName = target.buildFileName;\r
                        config.jniDir.child(buildFileName).writeString(buildFile, false);\r
-                       System.out.println("Wrote target '" + target.os + (target.is64Bit?"64":"") + "' build script '" + config.jniDir.child(buildFileName) + "'");\r
-                       \r
-                       if(!target.excludeFromMasterBuildFile) {\r
-                               if(target.os != TargetOs.MacOsX) {\r
+                       System.out.println("Wrote target '" + target.os + (target.is64Bit ? "64" : "") + "' build script '"\r
+                               + config.jniDir.child(buildFileName) + "'");\r
+\r
+                       if (!target.excludeFromMasterBuildFile) {\r
+                               if (target.os != TargetOs.MacOsX) {\r
                                        buildFiles.add(buildFileName);\r
                                }\r
                                sharedLibFiles.add(getSharedLibFilename(target.os, target.is64Bit, config.sharedLibName));\r
                                libsDirs.add("../" + libsDir.path().replace('\\', '/'));\r
                        }\r
                }\r
-               \r
+\r
                // generate the master build script\r
-               String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build.xml.template", FileType.Classpath).readString();\r
+               String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build.xml.template", FileType.Classpath)\r
+                       .readString();\r
                StringBuffer clean = new StringBuffer();\r
                StringBuffer compile = new StringBuffer();\r
                StringBuffer pack = new StringBuffer();\r
-               \r
-               for(int i = 0; i < buildFiles.size(); i++) {\r
+\r
+               for (int i = 0; i < buildFiles.size(); i++) {\r
                        clean.append("\t\t<ant antfile=\"" + buildFiles.get(i) + "\" target=\"clean\"/>\n");\r
                        compile.append("\t\t<ant antfile=\"" + buildFiles.get(i) + "\"/>\n");\r
                }\r
-               for(int i = 0; i < libsDirs.size(); i++ ) {\r
+               for (int i = 0; i < libsDirs.size(); i++) {\r
                        pack.append("\t\t\t<fileset dir=\"" + libsDirs.get(i) + "\" includes=\"" + sharedLibFiles.get(i) + "\"/>\n");\r
                }\r
-               \r
+\r
                template = template.replace("%projectName%", config.sharedLibName + "-natives");\r
                template = template.replace("<clean/>", clean.toString());\r
                template = template.replace("<compile/>", compile.toString());\r
-               template = template.replace("%packFile%", "../" + config.libsDir.path().replace('\\', '/') + "/" + config.sharedLibName + "-natives.jar");\r
+               template = template.replace("%packFile%", "../" + config.libsDir.path().replace('\\', '/') + "/" + config.sharedLibName\r
+                       + "-natives.jar");\r
                template = template.replace("<pack/>", pack);\r
-               \r
+\r
                config.jniDir.child("build.xml").writeString(template, false);\r
                System.out.println("Wrote master build script '" + config.jniDir.child("build.xml") + "'");\r
        }\r
-       \r
-       private void copyJniHeaders(String jniDir) {\r
+\r
+       private void copyJniHeaders (String jniDir) {\r
                final String pack = "com/badlogic/gdx/jnigen/resources/headers";\r
-               String files[] = {\r
-                       "classfile_constants.h",\r
-                       "jawt.h",\r
-                       "jdwpTransport.h",\r
-                       "jni.h",\r
-                       "linux/jawt_md.h",\r
-                       "linux/jni_md.h",\r
-                       "mac/jni_md.h",\r
-                       "win32/jawt_md.h",\r
-                       "win32/jni_md.h"\r
-               };\r
-               \r
-               for(String file: files) {\r
-                       new FileDescriptor(pack, FileType.Classpath).child(file).copyTo(new FileDescriptor(jniDir).child("jni-headers").child(file));\r
+               String files[] = {"classfile_constants.h", "jawt.h", "jdwpTransport.h", "jni.h", "linux/jawt_md.h", "linux/jni_md.h",\r
+                       "mac/jni_md.h", "win32/jawt_md.h", "win32/jni_md.h"};\r
+\r
+               for (String file : files) {\r
+                       new FileDescriptor(pack, FileType.Classpath).child(file).copyTo(\r
+                               new FileDescriptor(jniDir).child("jni-headers").child(file));\r
                }\r
        }\r
-       \r
-       private String getSharedLibFilename(TargetOs os, boolean is64Bit, String sharedLibName) {\r
+\r
+       private String getSharedLibFilename (TargetOs os, boolean is64Bit, String sharedLibName) {\r
                // generate shared lib prefix and suffix, determine jni platform headers directory\r
                String libPrefix = "";\r
                String libSuffix = "";\r
-               if(os == TargetOs.Windows) {\r
-                       libSuffix = (is64Bit?"64":"") + ".dll";\r
+               if (os == TargetOs.Windows) {\r
+                       libSuffix = (is64Bit ? "64" : "") + ".dll";\r
                }\r
-               if(os == TargetOs.Linux || os == TargetOs.Android) {\r
+               if (os == TargetOs.Linux || os == TargetOs.Android) {\r
                        libPrefix = "lib";\r
-                       libSuffix = (is64Bit?"64":"") + ".so";\r
+                       libSuffix = (is64Bit ? "64" : "") + ".so";\r
                }\r
-               if(os == TargetOs.MacOsX) {\r
+               if (os == TargetOs.MacOsX) {\r
                        libPrefix = "lib";\r
                        libSuffix = ".dylib";\r
                }\r
                return libPrefix + sharedLibName + libSuffix;\r
        }\r
-       \r
-       private String getJniPlatform(TargetOs os) {\r
-               if(os == TargetOs.Windows) return "win32";\r
-               if(os == TargetOs.Linux) return "linux";\r
-               if(os == TargetOs.MacOsX) return "mac";\r
+\r
+       private String getJniPlatform (TargetOs os) {\r
+               if (os == TargetOs.Windows) return "win32";\r
+               if (os == TargetOs.Linux) return "linux";\r
+               if (os == TargetOs.MacOsX) return "mac";\r
                return "";\r
        }\r
-       \r
-       private String getLibsDirectory(BuildConfig config, BuildTarget target) {\r
-               return config.libsDir.child(target.os.toString().toLowerCase() + (target.is64Bit?"64":"32")).path().replace('\\', '/');\r
+\r
+       private String getLibsDirectory (BuildConfig config, BuildTarget target) {\r
+               return config.libsDir.child(target.os.toString().toLowerCase() + (target.is64Bit ? "64" : "32")).path().replace('\\', '/');\r
        }\r
-       \r
-       private String generateBuildTargetTemplate(BuildConfig config, BuildTarget target) {\r
+\r
+       private String generateBuildTargetTemplate (BuildConfig config, BuildTarget target) {\r
                // special case for android\r
-               if(target.os == TargetOs.Android) {\r
+               if (target.os == TargetOs.Android) {\r
                        new AndroidNdkScriptGenerator().generate(config, target);\r
-                       String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build-android.xml.template", FileType.Classpath).readString();\r
-                       template = template.replace("%precompile%", target.preCompileTask == null? "": target.preCompileTask);\r
-                       template = template.replace("%postcompile%", target.postCompileTask == null? "": target.postCompileTask);\r
+                       String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build-android.xml.template",\r
+                               FileType.Classpath).readString();\r
+                       template = template.replace("%precompile%", target.preCompileTask == null ? "" : target.preCompileTask);\r
+                       template = template.replace("%postcompile%", target.postCompileTask == null ? "" : target.postCompileTask);\r
                        return template;\r
                }\r
-               \r
+\r
                // read template file from resources\r
-               String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build-target.xml.template", FileType.Classpath).readString();\r
-               \r
+               String template = new FileDescriptor("com/badlogic/gdx/jnigen/resources/scripts/build-target.xml.template",\r
+                       FileType.Classpath).readString();\r
+\r
                // generate shared lib filename and jni platform headers directory name\r
                String libName = getSharedLibFilename(target.os, target.is64Bit, config.sharedLibName);\r
                String jniPlatform = getJniPlatform(target.os);\r
-               \r
+\r
                // generate include and exclude fileset Ant description for C/C++\r
                StringBuffer cIncludes = new StringBuffer();\r
-               for(String cInclude: target.cIncludes) {\r
+               for (String cInclude : target.cIncludes) {\r
                        cIncludes.append("\t\t<include name=\"" + cInclude + "\"/>\n");\r
                }\r
                StringBuffer cppIncludes = new StringBuffer();\r
-               for(String cppInclude: target.cppIncludes) {\r
+               for (String cppInclude : target.cppIncludes) {\r
                        cppIncludes.append("\t\t<include name=\"" + cppInclude + "\"/>\n");\r
                }\r
                StringBuffer cExcludes = new StringBuffer();\r
-               for(String cExclude: target.cExcludes) {\r
+               for (String cExclude : target.cExcludes) {\r
                        cExcludes.append("\t\t<exclude name=\"" + cExclude + "\"/>\n");\r
                }\r
                StringBuffer cppExcludes = new StringBuffer();\r
-               for(String cppExclude: target.cppExcludes) {\r
+               for (String cppExclude : target.cppExcludes) {\r
                        cppExcludes.append("\t\t<exclude name=\"" + cppExclude + "\"/>\n");\r
                }\r
-                       \r
+\r
                // generate C/C++ header directories\r
                StringBuffer headerDirs = new StringBuffer();\r
-               for(String headerDir: target.headerDirs) {\r
+               for (String headerDir : target.headerDirs) {\r
                        headerDirs.append("\t\t\t<arg value=\"-I" + headerDir + "\"/>\n");\r
                }\r
-               \r
+\r
                // replace template vars with proper values\r
-               template = template.replace("%projectName%", config.sharedLibName + "-" + target.os + "-" + (target.is64Bit?"64":"32"));\r
-               template = template.replace("%buildDir%", config.buildDir.child(target.os.toString().toLowerCase() + (target.is64Bit?"64":"32")).path().replace('\\', '/'));\r
+               template = template.replace("%projectName%", config.sharedLibName + "-" + target.os + "-" + (target.is64Bit ? "64" : "32"));\r
+               template = template.replace("%buildDir%",\r
+                       config.buildDir.child(target.os.toString().toLowerCase() + (target.is64Bit ? "64" : "32")).path().replace('\\', '/'));\r
                template = template.replace("%libsDir%", "../" + getLibsDirectory(config, target));\r
                template = template.replace("%libName%", libName);\r
                template = template.replace("%jniPlatform%", jniPlatform);\r
@@ -233,9 +225,9 @@ public class AntScriptGenerator {
                template = template.replace("%cppIncludes%", cppIncludes);\r
                template = template.replace("%cppExcludes%", cppExcludes);\r
                template = template.replace("%headerDirs%", headerDirs);\r
-               template = template.replace("%precompile%", target.preCompileTask == null? "": target.preCompileTask);\r
-               template = template.replace("%postcompile%", target.postCompileTask == null? "": target.postCompileTask);\r
-               \r
+               template = template.replace("%precompile%", target.preCompileTask == null ? "" : target.preCompileTask);\r
+               template = template.replace("%postcompile%", target.postCompileTask == null ? "" : target.postCompileTask);\r
+\r
                return template;\r
        }\r
-}
\ No newline at end of file
+}\r
index f458a24..e9f443a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
-/**\r
- * Specifies the global properties of a native build.</p>\r
+/** Specifies the global properties of a native build.</p>\r
  * \r
- * The shared library name will be used to generate the shared libraries. The build\r
- * directory is used to store the object files during compilation for each {@link BuildTarget}. It is relative\r
- * to the jni directory which houses the C/C++ source code. The libs directory is the final\r
- * output directory where the natives jar and arm shared libraries will be written to.\r
+ * The shared library name will be used to generate the shared libraries. The build directory is used to store the object files\r
+ * during compilation for each {@link BuildTarget}. It is relative to the jni directory which houses the C/C++ source code. The\r
+ * libs directory is the final output directory where the natives jar and arm shared libraries will be written to.\r
  * \r
  * Used with {@link AntScriptGenerator} to generate the build scripts for build targets.\r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class BuildConfig {\r
        /** the name of the shared library, without prefix or suffix, e.g. 'gdx', 'bullet' **/\r
        public final String sharedLibName;\r
@@ -36,31 +33,26 @@ public class BuildConfig {
        public final FileDescriptor libsDir;\r
        /** the directory containing the native code **/\r
        public final FileDescriptor jniDir;\r
-       \r
-       /**\r
-        * Creates a new BuildConfig. The build directory, the libs directory and\r
-        * the jni directory are assumed to be "target", "libs" and "jni". All\r
-        * paths are relative to the application's working directory.\r
-        * @param sharedLibName the shared library name, without prefix or suffix, e.g. 'gdx', 'bullet'\r
-        */\r
-       public BuildConfig(String sharedLibName) {\r
+\r
+       /** Creates a new BuildConfig. The build directory, the libs directory and the jni directory are assumed to be "target", "libs"\r
+        * and "jni". All paths are relative to the application's working directory.\r
+        * @param sharedLibName the shared library name, without prefix or suffix, e.g. 'gdx', 'bullet' */\r
+       public BuildConfig (String sharedLibName) {\r
                this.sharedLibName = sharedLibName;\r
                this.buildDir = new FileDescriptor("target");\r
                this.libsDir = new FileDescriptor("libs");\r
                this.jniDir = new FileDescriptor("jni");\r
        }\r
-       \r
-       /**\r
-        * Creates a new BuildConfig. All paths are relative to the application's working directory.\r
+\r
+       /** Creates a new BuildConfig. All paths are relative to the application's working directory.\r
         * @param sharedLibName the shared library name, without prefix or suffix, e.g. 'gdx', 'bullet'\r
         * @param temporaryDir\r
         * @param libsDir\r
-        * @param jniDir\r
-        */\r
-       public BuildConfig(String sharedLibName, String temporaryDir, String libsDir, String jniDir) {\r
+        * @param jniDir */\r
+       public BuildConfig (String sharedLibName, String temporaryDir, String libsDir, String jniDir) {\r
                this.sharedLibName = sharedLibName;\r
                this.buildDir = new FileDescriptor(temporaryDir);\r
                this.libsDir = new FileDescriptor(libsDir);\r
                this.jniDir = new FileDescriptor(jniDir);\r
        }\r
-}
\ No newline at end of file
+}\r
index 2b1ce52..9fe3289 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
 import java.io.BufferedReader;\r
@@ -22,124 +23,121 @@ import java.io.InputStreamReader;
 import java.util.regex.Matcher;\r
 import java.util.regex.Pattern;\r
 \r
-/**\r
- * Executes an ant script and its targets or an Android NDK build. See {@link AntScriptGenerator}.\r
- * @author mzechner\r
- *\r
- */\r
+/** Executes an ant script and its targets or an Android NDK build. See {@link AntScriptGenerator}.\r
+ * @author mzechner */\r
 public class BuildExecutor {\r
-       /** \r
-        * Execute the Ant script file with the given parameters.\r
+       /** Execute the Ant script file with the given parameters.\r
         * @param buildFile\r
-        * @param params\r
-        */\r
-       public static void executeAnt(String buildFile, String params) {\r
-                       FileDescriptor build = new FileDescriptor(buildFile);\r
-                       String ant = System.getProperty("os.name").contains("Windows")?"ant.bat":"ant";\r
-                       String command = ant + " -f " + build.name() + " " + params;\r
-                       System.out.println("Executing '" + command + "'");\r
-                       startProcess(command, build.parent().file());\r
+        * @param params */\r
+       public static void executeAnt (String buildFile, String params) {\r
+               FileDescriptor build = new FileDescriptor(buildFile);\r
+               String ant = System.getProperty("os.name").contains("Windows") ? "ant.bat" : "ant";\r
+               String command = ant + " -f " + build.name() + " " + params;\r
+               System.out.println("Executing '" + command + "'");\r
+               startProcess(command, build.parent().file());\r
        }\r
-       \r
-       /**\r
-        * Execute ndk-build in the given directory\r
-        * @param directory\r
-        */\r
-       public static void executeNdk(String directory) {\r
+\r
+       /** Execute ndk-build in the given directory\r
+        * @param directory */\r
+       public static void executeNdk (String directory) {\r
                FileDescriptor build = new FileDescriptor(directory);\r
                String command = "ndk-build";\r
                startProcess(command, build.file());\r
        }\r
-       \r
-       private static void startProcess(String command, File directory) {\r
+\r
+       private static void startProcess (String command, File directory) {\r
                try {\r
                        final Process process = Runtime.getRuntime().exec(command, null, directory);\r
                        Thread t = new Thread(new Runnable() {\r
                                @Override\r
-                               public void run() {\r
+                               public void run () {\r
                                        BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));\r
                                        String line = null;\r
                                        try {\r
-                                               while((line = reader.readLine()) != null) {\r
+                                               while ((line = reader.readLine()) != null) {\r
                                                        // augment output with java file line references :D\r
                                                        printFileLineNumber(line);\r
                                                }\r
                                        } catch (IOException e) {\r
                                                e.printStackTrace();\r
-                                       }                                       \r
+                                       }\r
                                }\r
 \r
-                               private void printFileLineNumber(String line) {\r
-                                               if(line.contains("warning") || line.contains("error")) {\r
-                                                       try {\r
-                                                               String fileName = getFileName(line);\r
-                                                               String error = getError(line);\r
-                                                               int lineNumber = getLineNumber(line) - 1;\r
-                                                               if(fileName != null && lineNumber >= 0) {\r
-                                                                       FileDescriptor file = new FileDescriptor(fileName);\r
-                                                                       if(file.exists()) {\r
-                                                                               String[] content = file.readString().split("\n");\r
-                                                                               if(lineNumber < content.length) {\r
-                                                                                       for(int i = lineNumber; i >= 0; i--) {\r
-                                                                                               String contentLine = content[i];\r
-                                                                                               if(contentLine.startsWith("//@line:")) {\r
-                                                                                                       int javaLineNumber = Integer.parseInt(contentLine.split(":")[1].trim());\r
+                               private void printFileLineNumber (String line) {\r
+                                       if (line.contains("warning") || line.contains("error")) {\r
+                                               try {\r
+                                                       String fileName = getFileName(line);\r
+                                                       String error = getError(line);\r
+                                                       int lineNumber = getLineNumber(line) - 1;\r
+                                                       if (fileName != null && lineNumber >= 0) {\r
+                                                               FileDescriptor file = new FileDescriptor(fileName);\r
+                                                               if (file.exists()) {\r
+                                                                       String[] content = file.readString().split("\n");\r
+                                                                       if (lineNumber < content.length) {\r
+                                                                               for (int i = lineNumber; i >= 0; i--) {\r
+                                                                                       String contentLine = content[i];\r
+                                                                                       if (contentLine.startsWith("//@line:")) {\r
+                                                                                               int javaLineNumber = Integer.parseInt(contentLine.split(":")[1].trim());\r
+                                                                                               System.out.flush();\r
+                                                                                               if (line.contains("warning")) {\r
+                                                                                                       System.out.println("(" + file.nameWithoutExtension() + ".java:"\r
+                                                                                                               + (javaLineNumber + (lineNumber - i) - 1) + "): " + error + ", original: " + line);\r
                                                                                                        System.out.flush();\r
-                                                                                                       if(line.contains("warning")) {\r
-                                                                                                               System.out.println("(" + file.nameWithoutExtension() + ".java:" + (javaLineNumber + (lineNumber - i) - 1) + "): " + error + ", original: " + line);\r
-                                                                                                               System.out.flush();\r
-                                                                                                       } else {\r
-                                                                                                               System.err.println("(" + file.nameWithoutExtension() + ".java:" + (javaLineNumber + (lineNumber - i) - 1) + "): " + error + ", original: " + line);\r
-                                                                                                               System.err.flush();\r
-                                                                                                       }\r
-                                                                                                       return;\r
+                                                                                               } else {\r
+                                                                                                       System.err.println("(" + file.nameWithoutExtension() + ".java:"\r
+                                                                                                               + (javaLineNumber + (lineNumber - i) - 1) + "): " + error + ", original: " + line);\r
+                                                                                                       System.err.flush();\r
                                                                                                }\r
+                                                                                               return;\r
                                                                                        }\r
                                                                                }\r
-                                                                       } else {\r
-                                                                               System.out.println(line);\r
                                                                        }\r
+                                                               } else {\r
+                                                                       System.out.println(line);\r
                                                                }\r
-                                                       } catch(Throwable t) {\r
-                                                               System.out.println(line);\r
-                                                               // silent death...\r
                                                        }\r
-                                               } else {\r
+                                               } catch (Throwable t) {\r
                                                        System.out.println(line);\r
+                                                       // silent death...\r
                                                }\r
+                                       } else {\r
+                                               System.out.println(line);\r
+                                       }\r
                                }\r
-                               \r
-                               private String getFileName(String line) {\r
+\r
+                               private String getFileName (String line) {\r
                                        Pattern pattern = Pattern.compile("(.*):([0-9])+:[0-9]+:");\r
                                        Matcher matcher = pattern.matcher(line);\r
                                        matcher.find();\r
-                                       String fileName = matcher.groupCount() >= 2?matcher.group(1).trim():null;\r
-                                       if(fileName == null) return null;\r
+                                       String fileName = matcher.groupCount() >= 2 ? matcher.group(1).trim() : null;\r
+                                       if (fileName == null) return null;\r
                                        int index = fileName.indexOf(" ");\r
-                                       if(index != -1) return fileName.substring(index).trim();\r
-                                       else return fileName;\r
+                                       if (index != -1)\r
+                                               return fileName.substring(index).trim();\r
+                                       else\r
+                                               return fileName;\r
                                }\r
-                               \r
-                               private String getError(String line) {\r
+\r
+                               private String getError (String line) {\r
                                        Pattern pattern = Pattern.compile(":[0-9]+:[0-9]+:(.+)");\r
                                        Matcher matcher = pattern.matcher(line);\r
                                        matcher.find();\r
-                                       return matcher.groupCount() >= 1?matcher.group(1).trim():null;\r
+                                       return matcher.groupCount() >= 1 ? matcher.group(1).trim() : null;\r
                                }\r
-                               \r
-                               private int getLineNumber(String line) {\r
+\r
+                               private int getLineNumber (String line) {\r
                                        Pattern pattern = Pattern.compile(":([0-9]+):[0-9]+:");\r
                                        Matcher matcher = pattern.matcher(line);\r
                                        matcher.find();\r
-                                       return matcher.groupCount() >= 1?Integer.parseInt(matcher.group(1)):-1;\r
+                                       return matcher.groupCount() >= 1 ? Integer.parseInt(matcher.group(1)) : -1;\r
                                }\r
                        });\r
                        t.setDaemon(true);\r
                        t.start();\r
                        // FIXME this will hang if Ant detects an error while executing GCC in a process. Why?\r
                        process.waitFor();\r
-               } catch(Exception e) {\r
+               } catch (Exception e) {\r
                        e.printStackTrace();\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 988248c..9bb75ff 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
-/**\r
- * Defines the configuration for building a native shared library for a specific platform. Used\r
- * with {@link AntScriptGenerator} to create Ant build files that invoke the compiler toolchain to\r
- * create the shared libraries.\r
- */\r
+/** Defines the configuration for building a native shared library for a specific platform. Used with {@link AntScriptGenerator} to\r
+ * create Ant build files that invoke the compiler toolchain to create the shared libraries. */\r
 public class BuildTarget {\r
-       /**\r
-        * The target operating system of a build target.\r
-        */\r
+       /** The target operating system of a build target. */\r
        public enum TargetOs {\r
-               Windows,\r
-               Linux,\r
-               MacOsX,\r
-               Android\r
+               Windows, Linux, MacOsX, Android\r
        }\r
-       \r
+\r
        /** the target operating system **/\r
        public BuildTarget.TargetOs os;\r
        /** whether this is a 64-bit build, not used for Android **/\r
@@ -61,22 +54,22 @@ public class BuildTarget {
        public String preCompileTask;\r
        /** Ant Xml executed in a target after compilation **/\r
        public String postCompileTask;\r
-       \r
-       /**\r
-        * Creates a new build target. See members of this class for a description of the parameters.\r
-        */\r
-       public BuildTarget(BuildTarget.TargetOs targetType, boolean is64Bit, String[] cIncludes, String[] cExcludes, String[] cppIncludes, String[] cppExcludes, String[] headerDirs, String compilerPrefix, String cFlags, String cppFlags, String linkerFlags) {\r
-               if(targetType == null) throw new IllegalArgumentException("targetType must not be null");\r
-               if(cIncludes == null) cIncludes = new String[0];\r
-               if(cExcludes == null) cExcludes = new String[0];\r
-               if(cppIncludes == null) cppIncludes = new String[0];\r
-               if(cppExcludes == null) cppExcludes = new String[0];\r
-               if(headerDirs == null) headerDirs = new String[0];\r
-               if(compilerPrefix == null) compilerPrefix = "";\r
-               if(cFlags == null) cFlags = "";\r
-               if(cppFlags == null) cppFlags = "";\r
-               if(linkerFlags == null) linkerFlags = "";\r
-               \r
+\r
+       /** Creates a new build target. See members of this class for a description of the parameters. */\r
+       public BuildTarget (BuildTarget.TargetOs targetType, boolean is64Bit, String[] cIncludes, String[] cExcludes,\r
+               String[] cppIncludes, String[] cppExcludes, String[] headerDirs, String compilerPrefix, String cFlags, String cppFlags,\r
+               String linkerFlags) {\r
+               if (targetType == null) throw new IllegalArgumentException("targetType must not be null");\r
+               if (cIncludes == null) cIncludes = new String[0];\r
+               if (cExcludes == null) cExcludes = new String[0];\r
+               if (cppIncludes == null) cppIncludes = new String[0];\r
+               if (cppExcludes == null) cppExcludes = new String[0];\r
+               if (headerDirs == null) headerDirs = new String[0];\r
+               if (compilerPrefix == null) compilerPrefix = "";\r
+               if (cFlags == null) cFlags = "";\r
+               if (cppFlags == null) cppFlags = "";\r
+               if (linkerFlags == null) linkerFlags = "";\r
+\r
                this.os = targetType;\r
                this.is64Bit = is64Bit;\r
                this.cIncludes = cIncludes;\r
@@ -89,72 +82,55 @@ public class BuildTarget {
                this.cppFlags = cppFlags;\r
                this.linkerFlags = linkerFlags;\r
        }\r
-       \r
-       /**\r
-        * Creates a new default BuildTarget for the given OS, using common default values. \r
-        */\r
-       public static BuildTarget newDefaultTarget(BuildTarget.TargetOs type, boolean is64Bit) {\r
-               if(type == TargetOs.Windows && !is64Bit) {\r
+\r
+       /** Creates a new default BuildTarget for the given OS, using common default values. */\r
+       public static BuildTarget newDefaultTarget (BuildTarget.TargetOs type, boolean is64Bit) {\r
+               if (type == TargetOs.Windows && !is64Bit) {\r
                        // Windows 32-Bit\r
-                       return new BuildTarget(TargetOs.Windows, false, \r
-                                                       new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0], \r
-                                                       "i586-mingw32msvc-", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m32", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m32",\r
-                                                       "-Wl,--kill-at -shared -m32");\r
+                       return new BuildTarget(TargetOs.Windows, false, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},\r
+                               new String[0], new String[0], "i586-mingw32msvc-", "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m32",\r
+                               "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m32", "-Wl,--kill-at -shared -m32");\r
                }\r
-               \r
-               if(type == TargetOs.Windows && is64Bit) {\r
+\r
+               if (type == TargetOs.Windows && is64Bit) {\r
                        // Windows 64-Bit\r
-                       return new BuildTarget(TargetOs.Windows, true, \r
-                                                       new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0], \r
-                                                       "x86_64-w64-mingw32-", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m64", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m64",\r
-                                                       "-Wl,--kill-at -shared -static-libgcc -static-libstdc++ -m64");\r
+                       return new BuildTarget(TargetOs.Windows, true, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},\r
+                               new String[0], new String[0], "x86_64-w64-mingw32-", "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m64",\r
+                               "-c -Wall -O2 -mfpmath=sse -msse2 -fmessage-length=0 -m64",\r
+                               "-Wl,--kill-at -shared -static-libgcc -static-libstdc++ -m64");\r
                }\r
-               \r
-               if(type == TargetOs.Linux && !is64Bit) {\r
+\r
+               if (type == TargetOs.Linux && !is64Bit) {\r
                        // Linux 32-Bit\r
-                       return new BuildTarget(TargetOs.Linux, false, \r
-                                                       new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0], \r
-                                                       "", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m32 -fPIC", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m32 -fPIC",\r
-                                                       "-shared -m32");\r
+                       return new BuildTarget(TargetOs.Linux, false, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},\r
+                               new String[0], new String[0], "", "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m32 -fPIC",\r
+                               "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m32 -fPIC", "-shared -m32");\r
                }\r
-               \r
-               if(type == TargetOs.Linux && is64Bit) {\r
+\r
+               if (type == TargetOs.Linux && is64Bit) {\r
                        // Linux 64-Bit\r
-                       return new BuildTarget(TargetOs.Linux, true, \r
-                                                       new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0], \r
-                                                       "", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC", \r
-                                                       "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC",\r
-                                                       "-shared -m64");\r
+                       return new BuildTarget(TargetOs.Linux, true, new String[] {"**/*.c"}, new String[0], new String[] {"**/*.cpp"},\r
+                               new String[0], new String[0], "", "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC",\r
+                               "-c -Wall -O2 -mfpmath=sse -msse -fmessage-length=0 -m64 -fPIC", "-shared -m64");\r
                }\r
-               \r
-               if(type == TargetOs.MacOsX) {\r
+\r
+               if (type == TargetOs.MacOsX) {\r
                        // Mac OS X x86 & x86_64\r
-                       BuildTarget mac = new BuildTarget(TargetOs.MacOsX, false, \r
-                                                       new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0],\r
-                                                       "",\r
-                                                       "-c -Wall -O2 -arch i386 -arch x86_64 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",\r
-                                                       "-c -Wall -O2 -arch i386 -arch x86_64 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",\r
-                                                       "-shared -arch i386 -arch x86_64 -mmacosx-version-min=10.5");\r
+                       BuildTarget mac = new BuildTarget(TargetOs.MacOsX, false, new String[] {"**/*.c"}, new String[0],\r
+                               new String[] {"**/*.cpp"}, new String[0], new String[0], "",\r
+                               "-c -Wall -O2 -arch i386 -arch x86_64 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",\r
+                               "-c -Wall -O2 -arch i386 -arch x86_64 -DFIXED_POINT -fmessage-length=0 -fPIC -mmacosx-version-min=10.5",\r
+                               "-shared -arch i386 -arch x86_64 -mmacosx-version-min=10.5");\r
                        return mac;\r
                }\r
-               \r
-               if(type == TargetOs.Android) {\r
-                       BuildTarget android = new BuildTarget(TargetOs.Android, false,\r
-                                                                                                 new String[] { "**/*.c" }, new String[0], new String[] { "**/*.cpp" }, new String[0], new String[0],\r
-                                                                                                 "",\r
-                                                                                                 "-O2 -Wall -D__ANDROID__",\r
-                                                                                                 "-O2 -Wall -D__ANDROID__",\r
-                                                                                                 "-lm");\r
+\r
+               if (type == TargetOs.Android) {\r
+                       BuildTarget android = new BuildTarget(TargetOs.Android, false, new String[] {"**/*.c"}, new String[0],\r
+                               new String[] {"**/*.cpp"}, new String[0], new String[0], "", "-O2 -Wall -D__ANDROID__", "-O2 -Wall -D__ANDROID__",\r
+                               "-lm");\r
                        return android;\r
                }\r
-               \r
+\r
                throw new RuntimeException("Unknown target type");\r
        }\r
-}
\ No newline at end of file
+}\r
index 672ebb6..7e2d1bd 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
 import java.io.File;\r
@@ -27,32 +28,25 @@ import java.util.zip.ZipFile;
 \r
 import com.badlogic.gdx.jnigen.test.MyJniClass;\r
 \r
-/**\r
- * Loads shared libraries from a natives jar file (desktop) or arm folders (Android). For desktop projects,\r
- * have the natives jar in the classpath, for Android projects put the shared libraries in the libs/armeabi\r
- * and libs/armeabi-v7a folders.\r
- *\r
+/** Loads shared libraries from a natives jar file (desktop) or arm folders (Android). For desktop projects, have the natives jar\r
+ * in the classpath, for Android projects put the shared libraries in the libs/armeabi and libs/armeabi-v7a folders.\r
+ * \r
  * See {@link AntScriptGenerator}.\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class JniGenSharedLibraryLoader {\r
        private static Set<String> loadedLibraries = new HashSet<String>();\r
        private String nativesJar;\r
-       \r
-       public JniGenSharedLibraryLoader() {\r
+\r
+       public JniGenSharedLibraryLoader () {\r
        }\r
-       \r
-       /**\r
-        * Fetches the natives from the given natives jar file. Used\r
-        * for testing a shared lib on the fly, see {@link MyJniClass}.\r
-        * @param nativesJar\r
-        */\r
-       public JniGenSharedLibraryLoader(String nativesJar) {\r
+\r
+       /** Fetches the natives from the given natives jar file. Used for testing a shared lib on the fly, see {@link MyJniClass}.\r
+        * @param nativesJar */\r
+       public JniGenSharedLibraryLoader (String nativesJar) {\r
                this.nativesJar = nativesJar;\r
        }\r
-       \r
+\r
        private String crc (String nativeFile) {\r
                InputStream input = JniGenSharedLibraryLoader.class.getResourceAsStream("/" + nativeFile);\r
                if (input == null) return "" + System.nanoTime(); // fallback\r
@@ -72,7 +66,7 @@ public class JniGenSharedLibraryLoader {
                }\r
                return Long.toString(crc.getValue());\r
        }\r
-       \r
+\r
        private boolean loadLibrary (String sharedLibName) {\r
                String path = extractLibrary(sharedLibName);\r
                if (path != null) System.load(path);\r
@@ -85,8 +79,10 @@ public class JniGenSharedLibraryLoader {
                try {\r
                        // Extract native from classpath to temp dir.\r
                        InputStream input = null;\r
-                       if(nativesJar == null) input = JniGenSharedLibraryLoader.class.getResourceAsStream("/" + sharedLibName);\r
-                       else input = getFromJar(nativesJar, sharedLibName);\r
+                       if (nativesJar == null)\r
+                               input = JniGenSharedLibraryLoader.class.getResourceAsStream("/" + sharedLibName);\r
+                       else\r
+                               input = getFromJar(nativesJar, sharedLibName);\r
                        if (input == null) return null;\r
                        nativesDir.mkdirs();\r
                        FileOutputStream output = new FileOutputStream(nativeFile);\r
@@ -105,50 +101,52 @@ public class JniGenSharedLibraryLoader {
                return nativeFile.exists() ? nativeFile.getAbsolutePath() : null;\r
        }\r
 \r
-       private InputStream getFromJar(String jarFile, String sharedLibrary) throws IOException {\r
+       private InputStream getFromJar (String jarFile, String sharedLibrary) throws IOException {\r
                ZipFile file = new ZipFile(nativesJar);\r
                ZipEntry entry = file.getEntry(sharedLibrary);\r
                return file.getInputStream(entry);\r
        }\r
 \r
-       /**\r
-        * Loads a shared library with the given name for the platform the application\r
-        * is running on. The name should not contain a prefix (e.g. 'lib') or suffix (e.g. '.dll).\r
-        * @param sharedLibName\r
-        */\r
+       /** Loads a shared library with the given name for the platform the application is running on. The name should not contain a\r
+        * prefix (e.g. 'lib') or suffix (e.g. '.dll).\r
+        * @param sharedLibName */\r
        public synchronized void load (String sharedLibName) {\r
                if (loadedLibraries.contains(sharedLibName)) return;\r
-               \r
+\r
                boolean isWindows = System.getProperty("os.name").contains("Windows");\r
                boolean isLinux = System.getProperty("os.name").contains("Linux");\r
                boolean isMac = System.getProperty("os.name").contains("Mac");\r
                boolean isAndroid = false;\r
                boolean is64Bit = System.getProperty("os.arch").equals("amd64");\r
                String vm = System.getProperty("java.vm.name");\r
-               if(vm != null && vm.contains("Dalvik")) {\r
+               if (vm != null && vm.contains("Dalvik")) {\r
                        isAndroid = true;\r
                        isWindows = false;\r
                        isLinux = false;\r
                        isMac = false;\r
                        is64Bit = false;\r
                }\r
-               \r
+\r
                boolean loaded = false;\r
-               if(isWindows) {\r
-                       if(!is64Bit) loaded = loadLibrary(sharedLibName + ".dll");\r
-                       else loaded = loadLibrary(sharedLibName + "64.dll");\r
+               if (isWindows) {\r
+                       if (!is64Bit)\r
+                               loaded = loadLibrary(sharedLibName + ".dll");\r
+                       else\r
+                               loaded = loadLibrary(sharedLibName + "64.dll");\r
                }\r
-               if(isLinux) {\r
-                       if(!is64Bit) loaded = loadLibrary("lib" + sharedLibName + ".so");\r
-                       else loaded = loadLibrary("lib" + sharedLibName + "64.so");\r
+               if (isLinux) {\r
+                       if (!is64Bit)\r
+                               loaded = loadLibrary("lib" + sharedLibName + ".so");\r
+                       else\r
+                               loaded = loadLibrary("lib" + sharedLibName + "64.so");\r
                }\r
-               if(isMac) {\r
+               if (isMac) {\r
                        loaded = loadLibrary("lib" + sharedLibName + ".dylib");\r
                }\r
-               if(isAndroid) {\r
+               if (isAndroid) {\r
                        System.loadLibrary(sharedLibName);\r
                        loaded = true;\r
                }\r
-               if(loaded) loadedLibraries.add(sharedLibName);\r
+               if (loaded) loadedLibraries.add(sharedLibName);\r
        }\r
-}
\ No newline at end of file
+}\r
index 0dab44a..46cefa8 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen;\r
 \r
 import java.io.InputStream;\r
 import java.nio.Buffer;\r
 import java.util.ArrayList;\r
 \r
-import com.badlogic.gdx.jnigen.FileDescriptor.FileType;\r
 import com.badlogic.gdx.jnigen.parsing.CMethodParser;\r
 import com.badlogic.gdx.jnigen.parsing.CMethodParser.CMethod;\r
 import com.badlogic.gdx.jnigen.parsing.CMethodParser.CMethodParserResult;\r
@@ -31,16 +31,15 @@ import com.badlogic.gdx.jnigen.parsing.JavaMethodParser.JniSection;
 import com.badlogic.gdx.jnigen.parsing.JniHeaderCMethodParser;\r
 import com.badlogic.gdx.jnigen.parsing.RobustJavaMethodParser;\r
 \r
-/**\r
- * Goes through a Java source directory, checks each .java file for native methods and emits\r
- * C/C++ code accordingly, both .h and .cpp files.\r
+/** Goes through a Java source directory, checks each .java file for native methods and emits C/C++ code accordingly, both .h and\r
+ * .cpp files.\r
  * \r
- * <h2>Augmenting Java Files with C/C++</h2>\r
- * C/C++ code can be directly added to native methods in the Java file as block comments starting at the\r
- * same line as the method signature. Custom JNI code that is not associated with a native method can be\r
- * added via a special block comment as shown below.</p>\r
+ * <h2>Augmenting Java Files with C/C++</h2> C/C++ code can be directly added to native methods in the Java file as block comments\r
+ * starting at the same line as the method signature. Custom JNI code that is not associated with a native method can be added via\r
+ * a special block comment as shown below.</p>\r
  * \r
- * All arguments can be accessed by the name specified in the Java native method signature (unless you use $ in your identifier which is allowed in Java).\r
+ * All arguments can be accessed by the name specified in the Java native method signature (unless you use $ in your identifier\r
+ * which is allowed in Java).\r
  * \r
  * <pre>\r
  * package com.badlogic.jnigen;\r
@@ -58,49 +57,102 @@ import com.badlogic.gdx.jnigen.parsing.RobustJavaMethodParser;
  * }\r
  * </pre>\r
  * \r
- * The generated header file is automatically included in the .cpp file. Methods and custom JNI code\r
- * can be mixed throughout the Java file, their order is preserved in the generated .cpp file. Method\r
- * overloading is supported but not recommended as the overloading detection is very basic.</p>\r
+ * The generated header file is automatically included in the .cpp file. Methods and custom JNI code can be mixed throughout the\r
+ * Java file, their order is preserved in the generated .cpp file. Method overloading is supported but not recommended as the\r
+ * overloading detection is very basic.</p>\r
  * \r
- * If a native method has strings, one dimensional primitive arrays or direct {@link Buffer} instances as arguments,\r
- * JNI setup and cleanup code is automatically generated.</p>\r
+ * If a native method has strings, one dimensional primitive arrays or direct {@link Buffer} instances as arguments, JNI setup and\r
+ * cleanup code is automatically generated.</p>\r
  * \r
- * The following list gives the mapping from Java\r
- * to C/C++ types for arguments:\r
+ * The following list gives the mapping from Java to C/C++ types for arguments:\r
  * \r
  * <table border="1">\r
- * <tr><td>Java</td><td>C/C++</td></tr>\r
- * <tr><td>String</td><td>char* (UTF-8)</td></tr>\r
- * <tr><td>boolean[]</td><td>bool*</td></tr>\r
- * <tr><td>byte[]</td><td>char*</td></tr>\r
- * <tr><td>char[]</td><td>unsigned short*</td></tr>\r
- * <tr><td>short[]</td><td>short*</td></tr>\r
- * <tr><td>int[]</td><td>int*</td></tr>\r
- * <tr><td>long[]</td><td>long long*</td></tr>\r
- * <tr><td>float[]</td><td>float*</td></tr>\r
- * <tr><td>double[]</td><td>double*</td></tr>\r
- * <tr><td>Buffer</td><td>unsigned char*</td></tr>\r
- * <tr><td>ByteBuffer</td><td>char*</td></tr>\r
- * <tr><td>CharBuffer</td><td>unsigned short*</td></tr>\r
- * <tr><td>ShortBuffer</td><td>short*</td></tr>\r
- * <tr><td>IntBuffer</td><td>int*</td></tr>\r
- * <tr><td>LongBuffer</td><td>long long*</td></tr>\r
- * <tr><td>FloatBuffer</td><td>float*</td></tr>\r
- * <tr><td>DoubleBuffer</td><td>double*</td></tr>\r
- * <tr><td>Anything else</td><td>jobject/jobjectArray</td></tr>\r
+ * <tr>\r
+ * <td>Java</td>\r
+ * <td>C/C++</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>String</td>\r
+ * <td>char* (UTF-8)</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>boolean[]</td>\r
+ * <td>bool*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>byte[]</td>\r
+ * <td>char*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>char[]</td>\r
+ * <td>unsigned short*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>short[]</td>\r
+ * <td>short*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>int[]</td>\r
+ * <td>int*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>long[]</td>\r
+ * <td>long long*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>float[]</td>\r
+ * <td>float*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>double[]</td>\r
+ * <td>double*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>Buffer</td>\r
+ * <td>unsigned char*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>ByteBuffer</td>\r
+ * <td>char*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>CharBuffer</td>\r
+ * <td>unsigned short*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>ShortBuffer</td>\r
+ * <td>short*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>IntBuffer</td>\r
+ * <td>int*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>LongBuffer</td>\r
+ * <td>long long*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>FloatBuffer</td>\r
+ * <td>float*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>DoubleBuffer</td>\r
+ * <td>double*</td>\r
+ * </tr>\r
+ * <tr>\r
+ * <td>Anything else</td>\r
+ * <td>jobject/jobjectArray</td>\r
+ * </tr>\r
  * </table>\r
  * \r
- * If you need control over setting up and cleaning up arrays/strings and direct buffers you can\r
- * tell the NativeCodeGenerator to omit setup and cleanup code by starting the native code block\r
- * comment with "/*MANUAL" instead of just "/*" to the\r
- * method name. See libgdx's Gdx2DPixmap load() method for\r
- * an example.\r
+ * If you need control over setting up and cleaning up arrays/strings and direct buffers you can tell the NativeCodeGenerator to\r
+ * omit setup and cleanup code by starting the native code block comment with "/*MANUAL" instead of just "/*" to the method name.\r
+ * See libgdx's Gdx2DPixmap load() method for an example.\r
+ * \r
+ * <h2>.h/.cpp File Generation</h2> The .h files are created via javah, which has to be on your path. The Java classes have to be\r
+ * compiled and accessible to the javah tool. The name of the generated .h/.cpp files is the fully qualified name of the class,\r
+ * e.g. com.badlogic.jnigen.MyJniClass.h/.cpp. The generator takes the following parameters as input:\r
  * \r
- * <h2>.h/.cpp File Generation</h2>\r
- * The .h files are created via javah, which has to be on your path. The Java classes have to be compiled and\r
- * accessible to the javah tool. The name of the generated .h/.cpp files is the fully qualified name of the\r
- *  class, e.g. com.badlogic.jnigen.MyJniClass.h/.cpp. The generator takes the following parameters as input:\r
- *  \r
  * <ul>\r
  * <li>Java source directory, containing the .java files, e.g. src/ in an Eclipse project</li>\r
  * <li>Java class directory, containing the compiled .class files, e.g. bin/ in an Eclipse project</li>\r
@@ -110,20 +162,17 @@ import com.badlogic.gdx.jnigen.parsing.RobustJavaMethodParser;
  * A default invocation of the generator looks like this:\r
  * \r
  * <pre>\r
- * new NativeCodeGenerator().generate("src", "bin", "jni");\r
+ * new NativeCodeGenerator().generate(&quot;src&quot;, &quot;bin&quot;, &quot;jni&quot;);\r
  * </pre>\r
  * \r
- * To automatically compile and load the native code, see the classes {@link AntScriptGenerator}, {@link BuildExecutor}\r
- * and {@link JniGenSharedLibraryLoader} classes.\r
- * </p>\r
+ * To automatically compile and load the native code, see the classes {@link AntScriptGenerator}, {@link BuildExecutor} and\r
+ * {@link JniGenSharedLibraryLoader} classes. </p>\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class NativeCodeGenerator {\r
        private static final String JNI_METHOD_MARKER = "native";\r
        private static final String JNI_ARG_PREFIX = "obj_";\r
-       private static final String JNI_RETURN_VALUE = "JNI_returnValue"; \r
+       private static final String JNI_RETURN_VALUE = "JNI_returnValue";\r
        private static final String JNI_WRAPPER_PREFIX = "wrapped_";\r
        FileDescriptor sourceDir;\r
        String classpath;\r
@@ -134,89 +183,82 @@ public class NativeCodeGenerator {
        JavaMethodParser javaMethodParser = new RobustJavaMethodParser();\r
        CMethodParser cMethodParser = new JniHeaderCMethodParser();\r
        CMethodParserResult cResult;\r
-       \r
-       /**\r
-        * Generates .h/.cpp files from the Java files found in "src/", with their .class files\r
-        * being in "bin/". The generated files will be stored in "jni/". All paths are relative\r
-        * to the applications working directory. \r
-        * @throws Exception\r
-        */\r
-       public void generate() throws Exception {\r
+\r
+       /** Generates .h/.cpp files from the Java files found in "src/", with their .class files being in "bin/". The generated files\r
+        * will be stored in "jni/". All paths are relative to the applications working directory.\r
+        * @throws Exception */\r
+       public void generate () throws Exception {\r
                generate("src", "bin", "jni", null, null);\r
        }\r
-       \r
-       /**\r
-        * Generates .h/.cpp fiels from the Java files found in <code>sourceDir</code>, with\r
-        * their .class files being in <code>classpath</code>. The generated files will be stored\r
-        * in <code>jniDir</code>. All paths are relative to the applications working directory.\r
+\r
+       /** Generates .h/.cpp fiels from the Java files found in <code>sourceDir</code>, with their .class files being in\r
+        * <code>classpath</code>. The generated files will be stored in <code>jniDir</code>. All paths are relative to the\r
+        * applications working directory.\r
         * @param sourceDir the directory containing the Java files\r
         * @param classpath the directory containing the .class files\r
         * @param jniDir the output directory\r
-        * @throws Exception\r
-        */\r
-       public void generate(String sourceDir, String classpath, String jniDir) throws Exception {\r
+        * @throws Exception */\r
+       public void generate (String sourceDir, String classpath, String jniDir) throws Exception {\r
                generate(sourceDir, classpath, jniDir, null, null);\r
        }\r
-       \r
-       /**\r
-        * Generates .h/.cpp fiels from the Java files found in <code>sourceDir</code>, with\r
-        * their .class files being in <code>classpath</code>. The generated files will be stored\r
-        * in <code>jniDir</code>. The <code>includes</code> and <code>excludes</code> parameters\r
-        * allow to specify directories and files that should be included/excluded from the generation.\r
-        * These can be given in the Ant path format. All paths are relative to the applications working directory.\r
+\r
+       /** Generates .h/.cpp fiels from the Java files found in <code>sourceDir</code>, with their .class files being in\r
+        * <code>classpath</code>. The generated files will be stored in <code>jniDir</code>. The <code>includes</code> and\r
+        * <code>excludes</code> parameters allow to specify directories and files that should be included/excluded from the\r
+        * generation. These can be given in the Ant path format. All paths are relative to the applications working directory.\r
         * @param sourceDir the directory containing the Java files\r
         * @param classpath the directory containing the .class files\r
         * @param jniDir the output directory\r
         * @param includes files/directories to include, can be null (all files are used)\r
         * @param excludes files/directories to exclude, can be null (no files are excluded)\r
-        * @throws Exception\r
-        */\r
-       public void generate(String sourceDir, String classpath, String jniDir, String[] includes, String[] excludes) throws Exception {\r
+        * @throws Exception */\r
+       public void generate (String sourceDir, String classpath, String jniDir, String[] includes, String[] excludes)\r
+               throws Exception {\r
                this.sourceDir = new FileDescriptor(sourceDir);\r
                this.jniDir = new FileDescriptor(jniDir);\r
                this.classpath = classpath;\r
                this.includes = includes;\r
                this.excludes = excludes;\r
-               \r
+\r
                // check if source directory exists\r
-               if(!this.sourceDir.exists()) {\r
+               if (!this.sourceDir.exists()) {\r
                        throw new Exception("Java source directory '" + sourceDir + "' does not exist");\r
                }\r
-               \r
+\r
                // generate jni directory if necessary\r
-               if(!this.jniDir.exists()) {\r
-                       if(!this.jniDir.mkdirs()) {\r
+               if (!this.jniDir.exists()) {\r
+                       if (!this.jniDir.mkdirs()) {\r
                                throw new Exception("Couldn't create JNI directory '" + jniDir + "'");\r
                        }\r
                }\r
-               \r
+\r
                // process the source directory, emitting c/c++ files to jniDir\r
                processDirectory(this.sourceDir);\r
        }\r
 \r
-       private void processDirectory(FileDescriptor dir) throws Exception {\r
+       private void processDirectory (FileDescriptor dir) throws Exception {\r
                FileDescriptor[] files = dir.list();\r
                for (FileDescriptor file : files) {\r
                        if (file.isDirectory()) {\r
-                               if(file.path().contains(".svn")) continue;\r
-                               if(excludes != null && matcher.match(file.path(), excludes)) continue;\r
+                               if (file.path().contains(".svn")) continue;\r
+                               if (excludes != null && matcher.match(file.path(), excludes)) continue;\r
                                processDirectory(file);\r
                        } else {\r
                                if (file.extension().equals("java")) {\r
-                                       if(file.name().contains("NativeCodeGenerator")) continue;\r
-                                       if(includes != null && !matcher.match(file.path(), includes)) continue;\r
-                                       if(excludes != null && matcher.match(file.path(), excludes)) continue;\r
+                                       if (file.name().contains("NativeCodeGenerator")) continue;\r
+                                       if (includes != null && !matcher.match(file.path(), includes)) continue;\r
+                                       if (excludes != null && matcher.match(file.path(), excludes)) continue;\r
                                        String className = getFullyQualifiedClassName(file);\r
                                        FileDescriptor hFile = new FileDescriptor(jniDir.path() + "/" + className + ".h");\r
                                        FileDescriptor cppFile = new FileDescriptor(jniDir + "/" + className + ".cpp");\r
-                                       if(file.lastModified() < cppFile.lastModified()) {\r
+                                       if (file.lastModified() < cppFile.lastModified()) {\r
                                                System.out.println("C/C++ for '" + file.path() + "' up to date");\r
                                                continue;\r
                                        }\r
                                        String javaContent = file.readString();\r
                                        if (javaContent.contains(JNI_METHOD_MARKER)) {\r
                                                ArrayList<JavaSegment> javaSegments = javaMethodParser.parse(javaContent);\r
-                                               if(javaSegments.size() == 0) {\r
+                                               if (javaSegments.size() == 0) {\r
                                                        System.out.println("Skipping '" + file + "', no JNI code found.");\r
                                                        continue;\r
                                                }\r
@@ -230,71 +272,71 @@ public class NativeCodeGenerator {
                }\r
        }\r
 \r
-       private String getFullyQualifiedClassName(FileDescriptor file) {\r
+       private String getFullyQualifiedClassName (FileDescriptor file) {\r
                String className = file.path().replace(sourceDir.path(), "").replace('\\', '.').replace('/', '.').replace(".java", "");\r
-               if (className.startsWith("."))\r
-                       className = className.substring(1);\r
+               if (className.startsWith(".")) className = className.substring(1);\r
                return className;\r
        }\r
-       \r
-       private void generateHFile(FileDescriptor file) throws Exception {\r
+\r
+       private void generateHFile (FileDescriptor file) throws Exception {\r
                String className = getFullyQualifiedClassName(file);\r
-               String command = "javah -classpath " + classpath + " -o "\r
-                               + jniDir.path() + "/" + className + ".h "\r
-                               + className;\r
+               String command = "javah -classpath " + classpath + " -o " + jniDir.path() + "/" + className + ".h " + className;\r
                Process process = Runtime.getRuntime().exec(command);\r
                process.waitFor();\r
                if (process.exitValue() != 0) {\r
                        InputStream errorStream = process.getErrorStream();\r
                        int c = 0;\r
                        while ((c = errorStream.read()) != -1) {\r
-                               System.out.print((char) c);\r
+                               System.out.print((char)c);\r
                        }\r
                }\r
        }\r
 \r
-       private void generateCppFile(ArrayList<JavaSegment> javaSegments, FileDescriptor hFile, FileDescriptor cppFile) throws Exception {\r
+       private void generateCppFile (ArrayList<JavaSegment> javaSegments, FileDescriptor hFile, FileDescriptor cppFile)\r
+               throws Exception {\r
                String headerFileContent = hFile.readString();\r
                ArrayList<CMethod> cMethods = cMethodParser.parse(headerFileContent).getMethods();\r
-               \r
+\r
                StringBuffer buffer = new StringBuffer();\r
                buffer.append("#include <" + hFile.name() + ">\n");\r
-               \r
-               for(JavaSegment segment: javaSegments) {\r
-                       if(segment instanceof JniSection) {\r
+\r
+               for (JavaSegment segment : javaSegments) {\r
+                       if (segment instanceof JniSection) {\r
                                emitJniSection(buffer, (JniSection)segment);\r
                        }\r
-                       \r
-                       if(segment instanceof JavaMethod) {\r
+\r
+                       if (segment instanceof JavaMethod) {\r
                                JavaMethod javaMethod = (JavaMethod)segment;\r
-                               if(javaMethod.getNativeCode() == null) {\r
+                               if (javaMethod.getNativeCode() == null) {\r
                                        throw new RuntimeException("Method '" + javaMethod.getName() + "' has no body");\r
                                }\r
                                CMethod cMethod = findCMethod(javaMethod, cMethods);\r
-                               if(cMethod == null) throw new RuntimeException("Couldn't find C method for Java method '" + javaMethod.getClassName() + "#" + javaMethod.getName() + "'");\r
+                               if (cMethod == null)\r
+                                       throw new RuntimeException("Couldn't find C method for Java method '" + javaMethod.getClassName() + "#"\r
+                                               + javaMethod.getName() + "'");\r
                                emitJavaMethod(buffer, javaMethod, cMethod);\r
                        }\r
                }\r
                cppFile.writeString(buffer.toString(), false, "UTF-8");\r
        }\r
-       \r
-       private CMethod findCMethod(JavaMethod javaMethod, ArrayList<CMethod> cMethods) {\r
-               for(CMethod cMethod: cMethods) {\r
-                       if(cMethod.getHead().contains(javaMethod.getClassName() + "_" + javaMethod.getName())) {\r
+\r
+       private CMethod findCMethod (JavaMethod javaMethod, ArrayList<CMethod> cMethods) {\r
+               for (CMethod cMethod : cMethods) {\r
+                       if (cMethod.getHead().contains(javaMethod.getClassName() + "_" + javaMethod.getName())) {\r
                                // FIXME poor man's overloaded method check...\r
                                // FIXME float test[] won't work, needs to be float[] test.\r
-                               if(cMethod.getArgumentTypes().length - 2 == javaMethod.getArguments().size()) {\r
+                               if (cMethod.getArgumentTypes().length - 2 == javaMethod.getArguments().size()) {\r
                                        boolean match = true;\r
-                                       for(int i = 2; i < cMethod.getArgumentTypes().length; i++) {\r
+                                       for (int i = 2; i < cMethod.getArgumentTypes().length; i++) {\r
                                                String cType = cMethod.getArgumentTypes()[i];\r
-                                               String javaType = javaMethod.getArguments().get(i-2).getType().getJniType();\r
-                                               if(!cType.equals(javaType)) {\r
+                                               String javaType = javaMethod.getArguments().get(i - 2).getType().getJniType();\r
+                                               if (!cType.equals(javaType)) {\r
                                                        match = false;\r
                                                        break;\r
                                                }\r
                                        }\r
-                                       \r
-                                       if(match) {\r
+\r
+                                       if (match) {\r
                                                return cMethod;\r
                                        }\r
                                }\r
@@ -303,18 +345,18 @@ public class NativeCodeGenerator {
                return null;\r
        }\r
 \r
-       private void emitLineMarker(StringBuffer buffer, int line) {\r
+       private void emitLineMarker (StringBuffer buffer, int line) {\r
                buffer.append("\n//@line:");\r
                buffer.append(line);\r
                buffer.append("\n");\r
        }\r
-       \r
-       private void emitJniSection(StringBuffer buffer, JniSection section) {\r
+\r
+       private void emitJniSection (StringBuffer buffer, JniSection section) {\r
                emitLineMarker(buffer, section.getStartIndex());\r
                buffer.append(section.getNativeCode().replace("\r", ""));\r
        }\r
-       \r
-       private void emitJavaMethod(StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod) {\r
+\r
+       private void emitJavaMethod (StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod) {\r
                // get the setup and cleanup code for arrays, buffers and strings\r
                StringBuffer jniSetupCode = new StringBuffer();\r
                StringBuffer jniCleanupCode = new StringBuffer();\r
@@ -325,13 +367,13 @@ public class NativeCodeGenerator {
 \r
                // check if the user wants to do manual setup of JNI args\r
                boolean isManual = javaMethod.isManual();\r
-               \r
+\r
                // if we have disposable arguments (string, buffer, array) and if there is a return\r
                // in the native code (conservative, not syntactically checked), emit a wrapper method.\r
-               if(javaMethod.hasDisposableArgument() && javaMethod.getNativeCode().contains("return")) {\r
+               if (javaMethod.hasDisposableArgument() && javaMethod.getNativeCode().contains("return")) {\r
                        // if the method is marked as manual, we just emit the signature and let the\r
                        // user do whatever she wants.\r
-                       if(isManual) {\r
+                       if (isManual) {\r
                                emitMethodSignature(buffer, javaMethod, cMethod, null, false);\r
                                emitMethodBody(buffer, javaMethod);\r
                                buffer.append("}\n\n");\r
@@ -341,22 +383,23 @@ public class NativeCodeGenerator {
                                String wrappedMethodName = emitMethodSignature(buffer, javaMethod, cMethod, additionalArgs.toString());\r
                                emitMethodBody(buffer, javaMethod);\r
                                buffer.append("}\n\n");\r
-                               \r
+\r
                                // emit the wrapper method, the one with the declaration in the header file\r
                                emitMethodSignature(buffer, javaMethod, cMethod, null);\r
-                               if(!isManual) {\r
+                               if (!isManual) {\r
                                        buffer.append(jniSetupCode);\r
                                }\r
-                               \r
-                               if(cMethod.getReturnType().equals("void")) {\r
+\r
+                               if (cMethod.getReturnType().equals("void")) {\r
                                        buffer.append("\t" + wrappedMethodName + "(" + wrapperArgs.toString() + ");\n\n");\r
-                                       if(!isManual) {\r
+                                       if (!isManual) {\r
                                                buffer.append(jniCleanupCode);\r
                                        }\r
                                        buffer.append("\treturn;\n");\r
                                } else {\r
-                                       buffer.append("\t" + cMethod.getReturnType() + " " + JNI_RETURN_VALUE + " = " + wrappedMethodName + "(" + wrapperArgs.toString() + ");\n\n");\r
-                                       if(!isManual) {\r
+                                       buffer.append("\t" + cMethod.getReturnType() + " " + JNI_RETURN_VALUE + " = " + wrappedMethodName + "("\r
+                                               + wrapperArgs.toString() + ");\n\n");\r
+                                       if (!isManual) {\r
                                                buffer.append(jniCleanupCode);\r
                                        }\r
                                        buffer.append("\treturn " + JNI_RETURN_VALUE + ";\n");\r
@@ -365,36 +408,37 @@ public class NativeCodeGenerator {
                        }\r
                } else {\r
                        emitMethodSignature(buffer, javaMethod, cMethod, null);\r
-                       if(!isManual) {\r
+                       if (!isManual) {\r
                                buffer.append(jniSetupCode);\r
                        }\r
                        emitMethodBody(buffer, javaMethod);\r
-                       if(!isManual) {\r
+                       if (!isManual) {\r
                                buffer.append(jniCleanupCode);\r
                        }\r
                        buffer.append("}\n\n");\r
                }\r
-               \r
+\r
        }\r
-       \r
-       private void emitMethodBody(StringBuffer buffer, JavaMethod javaMethod) {\r
+\r
+       private void emitMethodBody (StringBuffer buffer, JavaMethod javaMethod) {\r
                // emit a line marker\r
                emitLineMarker(buffer, javaMethod.getEndIndex());\r
-               \r
+\r
                // FIXME add tabs cleanup\r
                buffer.append(javaMethod.getNativeCode());\r
                buffer.append("\n");\r
        }\r
 \r
-       private String emitMethodSignature(StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod, String additionalArguments) {\r
+       private String emitMethodSignature (StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod, String additionalArguments) {\r
                return emitMethodSignature(buffer, javaMethod, cMethod, additionalArguments, true);\r
        }\r
-       \r
-       private String emitMethodSignature(StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod, String additionalArguments, boolean appendPrefix) {\r
+\r
+       private String emitMethodSignature (StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod, String additionalArguments,\r
+               boolean appendPrefix) {\r
                // emit head, consisting of JNIEXPORT,return type and method name\r
                // if this is a wrapped method, prefix the method name\r
                String wrappedMethodName = null;\r
-               if(additionalArguments != null) {\r
+               if (additionalArguments != null) {\r
                        String[] tokens = cMethod.getHead().replace("\r\n", "").replace("\n", "").split(" ");\r
                        wrappedMethodName = JNI_WRAPPER_PREFIX + tokens[3];\r
                        buffer.append("static inline ");\r
@@ -402,74 +446,75 @@ public class NativeCodeGenerator {
                        buffer.append(" ");\r
                        buffer.append(wrappedMethodName);\r
                        buffer.append("\n");\r
-               } else {                        \r
+               } else {\r
                        buffer.append(cMethod.getHead());\r
                }\r
-               \r
+\r
                // construct argument list\r
                // Differentiate between static and instance method, then output each argument\r
-               if(javaMethod.isStatic()) {\r
+               if (javaMethod.isStatic()) {\r
                        buffer.append("(JNIEnv* env, jclass clazz");\r
                } else {\r
                        buffer.append("(JNIEnv* env, jobject object");\r
                }\r
-               if(javaMethod.getArguments().size() > 0) buffer.append(", ");\r
-               for(int i = 0; i < javaMethod.getArguments().size(); i++) {\r
+               if (javaMethod.getArguments().size() > 0) buffer.append(", ");\r
+               for (int i = 0; i < javaMethod.getArguments().size(); i++) {\r
                        // output the argument type as defined in the header\r
-                       buffer.append(cMethod.getArgumentTypes()[i+2]);\r
+                       buffer.append(cMethod.getArgumentTypes()[i + 2]);\r
                        buffer.append(" ");\r
                        // if this is not a POD or an object, we need to add a prefix\r
                        // as we will output JNI code to get pointers to strings, arrays\r
                        // and direct buffers.\r
                        Argument javaArg = javaMethod.getArguments().get(i);\r
-                       if(!javaArg.getType().isPlainOldDataType() && !javaArg.getType().isObject() && appendPrefix) {\r
+                       if (!javaArg.getType().isPlainOldDataType() && !javaArg.getType().isObject() && appendPrefix) {\r
                                buffer.append(JNI_ARG_PREFIX);\r
                        }\r
                        // output the name of the argument\r
                        buffer.append(javaArg.getName());\r
-                       \r
+\r
                        // comma, if this is not the last argument\r
-                       if(i < javaMethod.getArguments().size() - 1) buffer.append(", ");\r
+                       if (i < javaMethod.getArguments().size() - 1) buffer.append(", ");\r
                }\r
-               \r
+\r
                // if this is a wrapper method signature, add the additional arguments\r
-               if(additionalArguments != null) {\r
+               if (additionalArguments != null) {\r
                        buffer.append(additionalArguments);\r
                }\r
-               \r
+\r
                // close signature, open method body\r
                buffer.append(") {\n");\r
-               \r
+\r
                // return the wrapped method name if any\r
                return wrappedMethodName;\r
        }\r
-       \r
-       private void emitJniSetupCode(StringBuffer buffer, JavaMethod javaMethod, StringBuffer additionalArgs, StringBuffer wrapperArgs) {\r
-               // add environment and class/object as the two first arguments for \r
+\r
+       private void emitJniSetupCode (StringBuffer buffer, JavaMethod javaMethod, StringBuffer additionalArgs,\r
+               StringBuffer wrapperArgs) {\r
+               // add environment and class/object as the two first arguments for\r
                // wrapped method.\r
-               if(javaMethod.isStatic()) {\r
+               if (javaMethod.isStatic()) {\r
                        wrapperArgs.append("env, clazz, ");\r
                } else {\r
                        wrapperArgs.append("env, object, ");\r
                }\r
-               \r
+\r
                // arguments for wrapper method\r
-               for(int i = 0; i < javaMethod.getArguments().size(); i++) {\r
+               for (int i = 0; i < javaMethod.getArguments().size(); i++) {\r
                        Argument arg = javaMethod.getArguments().get(i);\r
-                       if(!arg.getType().isPlainOldDataType() && !arg.getType().isObject()) {\r
+                       if (!arg.getType().isPlainOldDataType() && !arg.getType().isObject()) {\r
                                wrapperArgs.append(JNI_ARG_PREFIX);\r
                        }\r
                        // output the name of the argument\r
                        wrapperArgs.append(arg.getName());\r
-                       if(i < javaMethod.getArguments().size() - 1) wrapperArgs.append(", ");\r
+                       if (i < javaMethod.getArguments().size() - 1) wrapperArgs.append(", ");\r
                }\r
-               \r
-               \r
+\r
                // direct buffer pointers\r
-               for(Argument arg: javaMethod.getArguments()) {\r
-                       if(arg.getType().isBuffer()) {\r
+               for (Argument arg : javaMethod.getArguments()) {\r
+                       if (arg.getType().isBuffer()) {\r
                                String type = arg.getType().getBufferCType();\r
-                               buffer.append("\t" + type + " " + arg.getName() + " = (" + type + ")env->GetDirectBufferAddress(" + JNI_ARG_PREFIX + arg.getName() + ");\n");\r
+                               buffer.append("\t" + type + " " + arg.getName() + " = (" + type + ")env->GetDirectBufferAddress(" + JNI_ARG_PREFIX\r
+                                       + arg.getName() + ");\n");\r
                                additionalArgs.append(", ");\r
                                additionalArgs.append(type);\r
                                additionalArgs.append(" ");\r
@@ -478,12 +523,13 @@ public class NativeCodeGenerator {
                                wrapperArgs.append(arg.getName());\r
                        }\r
                }\r
-               \r
+\r
                // string pointers\r
-               for(Argument arg: javaMethod.getArguments()) {\r
-                       if(arg.getType().isString()) {\r
+               for (Argument arg : javaMethod.getArguments()) {\r
+                       if (arg.getType().isString()) {\r
                                String type = "char*";\r
-                               buffer.append("\t" + type + " " + arg.getName() + " = (" + type + ")env->GetStringUTFChars(" + JNI_ARG_PREFIX + arg.getName() + ", 0);\n");\r
+                               buffer.append("\t" + type + " " + arg.getName() + " = (" + type + ")env->GetStringUTFChars(" + JNI_ARG_PREFIX\r
+                                       + arg.getName() + ", 0);\n");\r
                                additionalArgs.append(", ");\r
                                additionalArgs.append(type);\r
                                additionalArgs.append(" ");\r
@@ -492,13 +538,14 @@ public class NativeCodeGenerator {
                                wrapperArgs.append(arg.getName());\r
                        }\r
                }\r
-               \r
-               // Array pointers, we have to collect those last as GetPrimitiveArrayCritical \r
+\r
+               // Array pointers, we have to collect those last as GetPrimitiveArrayCritical\r
                // will explode into our face if we call another JNI method after that.\r
-               for(Argument arg: javaMethod.getArguments()) {\r
-                       if(arg.getType().isPrimitiveArray()) {\r
-                               String type = arg.getType().getArrayCType(); \r
-                               buffer.append("\t" + type + " " + arg.getName() + " = (" + type + ")env->GetPrimitiveArrayCritical(" + JNI_ARG_PREFIX + arg.getName() + ", 0);\n");\r
+               for (Argument arg : javaMethod.getArguments()) {\r
+                       if (arg.getType().isPrimitiveArray()) {\r
+                               String type = arg.getType().getArrayCType();\r
+                               buffer.append("\t" + type + " " + arg.getName() + " = (" + type + ")env->GetPrimitiveArrayCritical(" + JNI_ARG_PREFIX\r
+                                       + arg.getName() + ", 0);\n");\r
                                additionalArgs.append(", ");\r
                                additionalArgs.append(type);\r
                                additionalArgs.append(" ");\r
@@ -507,27 +554,28 @@ public class NativeCodeGenerator {
                                wrapperArgs.append(arg.getName());\r
                        }\r
                }\r
-               \r
+\r
                // new line for separation\r
                buffer.append("\n");\r
        }\r
-       \r
-       private void emitJniCleanupCode(StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod) {\r
+\r
+       private void emitJniCleanupCode (StringBuffer buffer, JavaMethod javaMethod, CMethod cMethod) {\r
                // emit cleanup code for arrays, must come first\r
-               for(Argument arg: javaMethod.getArguments()) {\r
-                       if(arg.getType().isPrimitiveArray()) {\r
-                               buffer.append("\tenv->ReleasePrimitiveArrayCritical(" + JNI_ARG_PREFIX + arg.getName() + ", " + arg.getName() + ", 0);\n");\r
+               for (Argument arg : javaMethod.getArguments()) {\r
+                       if (arg.getType().isPrimitiveArray()) {\r
+                               buffer.append("\tenv->ReleasePrimitiveArrayCritical(" + JNI_ARG_PREFIX + arg.getName() + ", " + arg.getName()\r
+                                       + ", 0);\n");\r
                        }\r
                }\r
-               \r
+\r
                // emit cleanup code for strings\r
-               for(Argument arg: javaMethod.getArguments()) {\r
-                       if(arg.getType().isString()) {\r
+               for (Argument arg : javaMethod.getArguments()) {\r
+                       if (arg.getType().isString()) {\r
                                buffer.append("\tenv->ReleaseStringUTFChars(" + JNI_ARG_PREFIX + arg.getName() + ", " + arg.getName() + ");\n");\r
                        }\r
                }\r
-               \r
+\r
                // new line for separation\r
                buffer.append("\n");\r
        }\r
-}
\ No newline at end of file
+}\r
index db4436e..ff13f7b 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen.parsing;\r
 \r
 import java.util.ArrayList;\r
 \r
 public interface CMethodParser {\r
-       public CMethodParserResult parse(String headerFile);\r
-       \r
+       public CMethodParserResult parse (String headerFile);\r
+\r
        public class CMethodParserResult {\r
                final ArrayList<CMethod> methods;\r
-               \r
-               public CMethodParserResult(ArrayList<CMethod> methods) {\r
+\r
+               public CMethodParserResult (ArrayList<CMethod> methods) {\r
                        this.methods = methods;\r
                }\r
 \r
-               public ArrayList<CMethod> getMethods() {\r
+               public ArrayList<CMethod> getMethods () {\r
                        return methods;\r
                }\r
        }\r
-       \r
+\r
        public static class CMethod {\r
                final String returnType;\r
                final String head;\r
                final String[] argumentTypes;\r
                final int startIndex;\r
                final int endIndex;\r
-               \r
-               public CMethod(String returnType, String head, String[] argumentTypes, int startIndex, int endIndex) {\r
+\r
+               public CMethod (String returnType, String head, String[] argumentTypes, int startIndex, int endIndex) {\r
                        this.returnType = returnType;\r
                        this.head = head;\r
                        this.argumentTypes = argumentTypes;\r
                        this.startIndex = startIndex;\r
                        this.endIndex = endIndex;\r
-                       \r
-                       for(int i = 0; i < argumentTypes.length; i++) {\r
+\r
+                       for (int i = 0; i < argumentTypes.length; i++) {\r
                                argumentTypes[i] = argumentTypes[i].trim();\r
                        }\r
                }\r
-               \r
-               public String getReturnType() {\r
+\r
+               public String getReturnType () {\r
                        return returnType;\r
                }\r
 \r
-               public String getHead() {\r
+               public String getHead () {\r
                        return head;\r
                }\r
 \r
-               public String[] getArgumentTypes() {\r
+               public String[] getArgumentTypes () {\r
                        return argumentTypes;\r
                }\r
 \r
-               public int getStartIndex() {\r
+               public int getStartIndex () {\r
                        return startIndex;\r
                }\r
 \r
-               public int getEndIndex() {\r
+               public int getEndIndex () {\r
                        return endIndex;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 07cf381..8f940c2 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen.parsing;\r
 \r
 import java.util.ArrayList;\r
 \r
 public interface JavaMethodParser {\r
-       public ArrayList<JavaSegment> parse(String classFile) throws Exception;\r
-       \r
+       public ArrayList<JavaSegment> parse (String classFile) throws Exception;\r
+\r
        public interface JavaSegment {\r
-               public int getStartIndex();\r
-               \r
-               public int getEndIndex();\r
+               public int getStartIndex ();\r
+\r
+               public int getEndIndex ();\r
        }\r
-       \r
+\r
        public class JniSection implements JavaSegment {\r
                private String nativeCode;\r
                private final int startIndex;\r
                private final int endIndex;\r
-               \r
-               public JniSection(String nativeCode, int startIndex, int endIndex) {\r
+\r
+               public JniSection (String nativeCode, int startIndex, int endIndex) {\r
                        this.nativeCode = nativeCode;\r
                        this.startIndex = startIndex;\r
                        this.endIndex = endIndex;\r
                }\r
 \r
-               public String getNativeCode() {\r
+               public String getNativeCode () {\r
                        return nativeCode;\r
                }\r
-               \r
-               public void setNativeCode(String nativeCode) {\r
+\r
+               public void setNativeCode (String nativeCode) {\r
                        this.nativeCode = nativeCode;\r
                }\r
 \r
-               public int getStartIndex() {\r
+               public int getStartIndex () {\r
                        return startIndex;\r
                }\r
 \r
-               public int getEndIndex() {\r
+               public int getEndIndex () {\r
                        return endIndex;\r
                }\r
 \r
                @Override\r
-               public String toString() {\r
-                       return "JniSection [nativeCode=" + nativeCode + ", startIndex="\r
-                                       + startIndex + ", endIndex=" + endIndex + "]";\r
+               public String toString () {\r
+                       return "JniSection [nativeCode=" + nativeCode + ", startIndex=" + startIndex + ", endIndex=" + endIndex + "]";\r
                }\r
        }\r
-       \r
+\r
        public enum ArgumentType {\r
-               Boolean("jboolean"), \r
-               Byte("jbyte"), \r
-               Char("jchar"), \r
-               Short("jshort"), \r
-               Integer("jint"), \r
-               Long("jlong"), \r
-               Float("jfloat"), \r
-               Double("jdouble"), \r
-               Buffer("jobject"), \r
-               ByteBuffer("jobject"), \r
-               CharBuffer("jobject"), \r
-               ShortBuffer("jobject"), \r
-               IntBuffer("jobject"), \r
-               LongBuffer("jobject"), \r
-               FloatBuffer("jobject"), \r
-               DoubleBuffer("jobject"), \r
-               BooleanArray("jbooleanArray"),\r
-               ByteArray("jbyteArray"),\r
-               CharArray("jcharArray"), \r
-               ShortArray("jshortArray"), \r
-               IntegerArray("jintArray"), \r
-               LongArray("jlongArray"), \r
-               FloatArray("jfloatArray"), \r
-               DoubleArray("jdoubleArray"),\r
-               String("jstring"), \r
-               Object("jobject"), \r
-               ObjectArray("jobjectArray");\r
-               \r
+               Boolean("jboolean"), Byte("jbyte"), Char("jchar"), Short("jshort"), Integer("jint"), Long("jlong"), Float("jfloat"), Double(\r
+                       "jdouble"), Buffer("jobject"), ByteBuffer("jobject"), CharBuffer("jobject"), ShortBuffer("jobject"), IntBuffer("jobject"), LongBuffer(\r
+                       "jobject"), FloatBuffer("jobject"), DoubleBuffer("jobject"), BooleanArray("jbooleanArray"), ByteArray("jbyteArray"), CharArray(\r
+                       "jcharArray"), ShortArray("jshortArray"), IntegerArray("jintArray"), LongArray("jlongArray"), FloatArray("jfloatArray"), DoubleArray(\r
+                       "jdoubleArray"), String("jstring"), Object("jobject"), ObjectArray("jobjectArray");\r
+\r
                private final String jniType;\r
-               \r
-               ArgumentType(String jniType) {\r
+\r
+               ArgumentType (String jniType) {\r
                        this.jniType = jniType;\r
                }\r
-               \r
-               public boolean isPrimitiveArray() {\r
+\r
+               public boolean isPrimitiveArray () {\r
                        return toString().endsWith("Array") && this != ObjectArray;\r
                }\r
-               \r
-               public boolean isBuffer() {\r
+\r
+               public boolean isBuffer () {\r
                        return toString().endsWith("Buffer");\r
                }\r
-               \r
-               public boolean isObject() {\r
+\r
+               public boolean isObject () {\r
                        return toString().equals("Object") || this == ObjectArray;\r
                }\r
-               \r
-               public boolean isString() {\r
+\r
+               public boolean isString () {\r
                        return toString().equals("String");\r
                }\r
-               \r
-               public boolean isPlainOldDataType() {\r
+\r
+               public boolean isPlainOldDataType () {\r
                        return !isString() && !isPrimitiveArray() && !isBuffer() && !isObject();\r
                }\r
-               \r
-               public String getBufferCType() {\r
-                       if(!this.isBuffer()) throw new RuntimeException("ArgumentType " + this + " is not a Buffer!");\r
-                       if(this == Buffer) return "unsigned char*";\r
-                       if(this == ByteBuffer) return "char*";\r
-                       if(this == CharBuffer) return "unsigned short*";\r
-                       if(this == ShortBuffer) return "short*";\r
-                       if(this == IntBuffer) return "int*";\r
-                       if(this == LongBuffer) return "long long*";\r
-                       if(this == FloatBuffer) return "float*";\r
-                       if(this == DoubleBuffer) return "double*";\r
+\r
+               public String getBufferCType () {\r
+                       if (!this.isBuffer()) throw new RuntimeException("ArgumentType " + this + " is not a Buffer!");\r
+                       if (this == Buffer) return "unsigned char*";\r
+                       if (this == ByteBuffer) return "char*";\r
+                       if (this == CharBuffer) return "unsigned short*";\r
+                       if (this == ShortBuffer) return "short*";\r
+                       if (this == IntBuffer) return "int*";\r
+                       if (this == LongBuffer) return "long long*";\r
+                       if (this == FloatBuffer) return "float*";\r
+                       if (this == DoubleBuffer) return "double*";\r
                        throw new RuntimeException("Unknown Buffer type " + this);\r
                }\r
-               \r
-               public String getArrayCType() {\r
-                       if(!this.isPrimitiveArray()) throw new RuntimeException("ArgumentType " + this + " is not an Array!");\r
-                       if(this == BooleanArray) return "bool*";\r
-                       if(this == ByteArray) return "char*";\r
-                       if(this == CharArray) return "unsigned short*";\r
-                       if(this == ShortArray) return "short*";\r
-                       if(this == IntegerArray) return "int*";\r
-                       if(this == LongArray) return "long long*";\r
-                       if(this == FloatArray) return "float*";\r
-                       if(this == DoubleArray) return "double*";\r
+\r
+               public String getArrayCType () {\r
+                       if (!this.isPrimitiveArray()) throw new RuntimeException("ArgumentType " + this + " is not an Array!");\r
+                       if (this == BooleanArray) return "bool*";\r
+                       if (this == ByteArray) return "char*";\r
+                       if (this == CharArray) return "unsigned short*";\r
+                       if (this == ShortArray) return "short*";\r
+                       if (this == IntegerArray) return "int*";\r
+                       if (this == LongArray) return "long long*";\r
+                       if (this == FloatArray) return "float*";\r
+                       if (this == DoubleArray) return "double*";\r
                        throw new RuntimeException("Unknown Array type " + this);\r
                }\r
-               \r
-               public String getJniType() {\r
+\r
+               public String getJniType () {\r
                        return jniType;\r
                }\r
        }\r
@@ -150,29 +128,26 @@ public interface JavaMethodParser {
                final ArgumentType type;\r
                private final String name;\r
 \r
-               public Argument(ArgumentType type, String name) {\r
+               public Argument (ArgumentType type, String name) {\r
                        this.type = type;\r
                        this.name = name;\r
                }\r
 \r
-               public ArgumentType getType() {\r
+               public ArgumentType getType () {\r
                        return type;\r
                }\r
 \r
-               public String getName() {\r
+               public String getName () {\r
                        return name;\r
                }\r
 \r
                @Override\r
-               public String toString() {\r
+               public String toString () {\r
                        return "Argument [type=" + type + ", name=" + name + "]";\r
                }\r
        }\r
-       \r
-       /**\r
-        * @author mzechner\r
-        *\r
-        */\r
+\r
+       /** @author mzechner */\r
        public static class JavaMethod implements JavaSegment {\r
                private final String className;\r
                private final String name;\r
@@ -185,7 +160,8 @@ public interface JavaMethodParser {
                private final int startIndex;\r
                private final int endIndex;\r
 \r
-               public JavaMethod(String className, String name, boolean isStatic, String returnType, String nativeCode, ArrayList<Argument> arguments, int startIndex, int endIndex) {\r
+               public JavaMethod (String className, String name, boolean isStatic, String returnType, String nativeCode,\r
+                       ArrayList<Argument> arguments, int startIndex, int endIndex) {\r
                        this.className = className;\r
                        this.name = name;\r
                        this.isStatic = isStatic;\r
@@ -194,73 +170,70 @@ public interface JavaMethodParser {
                        this.arguments = arguments;\r
                        this.startIndex = startIndex;\r
                        this.endIndex = endIndex;\r
-                       for(Argument arg: arguments) {\r
-                               if(arg.type.isPrimitiveArray() || arg.type.isBuffer() || arg.type.isString()) {\r
+                       for (Argument arg : arguments) {\r
+                               if (arg.type.isPrimitiveArray() || arg.type.isBuffer() || arg.type.isString()) {\r
                                        hasDisposableArgument = true;\r
                                        return;\r
                                }\r
                        }\r
                        hasDisposableArgument = false;\r
-               }               \r
-               \r
-               public String getName() {\r
+               }\r
+\r
+               public String getName () {\r
                        return name;\r
                }\r
-               \r
-               public boolean isStatic() {\r
+\r
+               public boolean isStatic () {\r
                        return isStatic;\r
                }\r
-               \r
-               public void setManual(boolean isManual) {\r
+\r
+               public void setManual (boolean isManual) {\r
                        this.isManual = isManual;\r
                }\r
-               \r
-               public boolean isManual() {\r
+\r
+               public boolean isManual () {\r
                        return this.isManual;\r
                }\r
 \r
-               public String getReturnType() {\r
+               public String getReturnType () {\r
                        return returnType;\r
                }\r
 \r
-               public String getNativeCode() {\r
+               public String getNativeCode () {\r
                        return nativeCode;\r
                }\r
-               \r
-               public void setNativeCode(String nativeCode) {\r
+\r
+               public void setNativeCode (String nativeCode) {\r
                        this.nativeCode = nativeCode;\r
                }\r
 \r
-               public ArrayList<Argument> getArguments() {\r
+               public ArrayList<Argument> getArguments () {\r
                        return arguments;\r
                }\r
 \r
-               public boolean hasDisposableArgument() {\r
+               public boolean hasDisposableArgument () {\r
                        return hasDisposableArgument;\r
                }\r
-               \r
+\r
                @Override\r
-               public int getStartIndex() {\r
+               public int getStartIndex () {\r
                        return startIndex;\r
                }\r
 \r
                @Override\r
-               public int getEndIndex() {\r
+               public int getEndIndex () {\r
                        return endIndex;\r
                }\r
 \r
-               public CharSequence getClassName() {\r
+               public CharSequence getClassName () {\r
                        return className;\r
                }\r
 \r
                @Override\r
-               public String toString() {\r
-                       return "JavaMethod [className=" + className + ", name=" + name\r
-                                       + ", isStatic=" + isStatic + ", returnType=" + returnType\r
-                                       + ", nativeCode=" + nativeCode + ", arguments=" + arguments\r
-                                       + ", hasDisposableArgument=" + hasDisposableArgument\r
-                                       + ", startIndex=" + startIndex + ", endIndex=" + endIndex\r
-                                       + "]";\r
+               public String toString () {\r
+                       return "JavaMethod [className=" + className + ", name=" + name + ", isStatic=" + isStatic + ", returnType=" + returnType\r
+                               + ", nativeCode=" + nativeCode + ", arguments=" + arguments + ", hasDisposableArgument=" + hasDisposableArgument\r
+                               + ", startIndex=" + startIndex + ", endIndex=" + endIndex + "]";\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 4c77ac5..5476af8 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen.parsing;\r
 \r
 import java.util.ArrayList;\r
 \r
 public class JniHeaderCMethodParser implements CMethodParser {\r
        private static final String C_METHOD_MARKER = "JNIEXPORT";\r
-       \r
-       public CMethodParserResult parse(String headerFile) {\r
+\r
+       public CMethodParserResult parse (String headerFile) {\r
                ArrayList<CMethod> methods = new ArrayList<CMethod>();\r
-               \r
+\r
                int index = headerFile.indexOf(C_METHOD_MARKER);\r
-               if (index == -1)\r
-                       return null;\r
+               if (index == -1) return null;\r
                while (index >= 0) {\r
                        CMethod method = parseCMethod(headerFile, index);\r
-                       if (method == null)\r
-                               throw new RuntimeException("Couldn't parse method");\r
+                       if (method == null) throw new RuntimeException("Couldn't parse method");\r
                        methods.add(method);\r
                        index = headerFile.indexOf(C_METHOD_MARKER, method.endIndex);\r
                }\r
                return new CMethodParserResult(methods);\r
        }\r
-       \r
-       private CMethod parseCMethod(String headerFile, int start) {\r
+\r
+       private CMethod parseCMethod (String headerFile, int start) {\r
                int headEnd = headerFile.indexOf('(', start);\r
                String head = headerFile.substring(start, headEnd).trim();\r
-               \r
+\r
                String returnType = head.split(" ")[1].trim();\r
-               \r
+\r
                int argsStart = headEnd + 1;\r
                int argsEnd = headerFile.indexOf(')', argsStart);\r
                String[] args = headerFile.substring(argsStart, argsEnd).split(",");\r
-               \r
+\r
                return new CMethod(returnType, head, args, start, argsEnd + 1);\r
        }\r
-}
\ No newline at end of file
+}\r
index 20c0cdc..7f5e1ad 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen.parsing;\r
 \r
 import japa.parser.JavaParser;\r
-import japa.parser.ast.BlockComment;\r
-import japa.parser.ast.Comment;\r
 import japa.parser.ast.CompilationUnit;\r
 import japa.parser.ast.body.BodyDeclaration;\r
 import japa.parser.ast.body.ClassOrInterfaceDeclaration;\r
@@ -41,8 +40,7 @@ public class RobustJavaMethodParser implements JavaMethodParser {
        private static final Map<String, ArgumentType> plainOldDataTypes;\r
        private static final Map<String, ArgumentType> arrayTypes;\r
        private static final Map<String, ArgumentType> bufferTypes;\r
-       \r
-       \r
+\r
        static {\r
                plainOldDataTypes = new HashMap<String, ArgumentType>();\r
                plainOldDataTypes.put("boolean", ArgumentType.Boolean);\r
@@ -53,7 +51,7 @@ public class RobustJavaMethodParser implements JavaMethodParser {
                plainOldDataTypes.put("long", ArgumentType.Long);\r
                plainOldDataTypes.put("float", ArgumentType.Float);\r
                plainOldDataTypes.put("double", ArgumentType.Double);\r
-               \r
+\r
                arrayTypes = new HashMap<String, ArgumentType>();\r
                arrayTypes.put("boolean", ArgumentType.BooleanArray);\r
                arrayTypes.put("byte", ArgumentType.ByteArray);\r
@@ -63,7 +61,7 @@ public class RobustJavaMethodParser implements JavaMethodParser {
                arrayTypes.put("long", ArgumentType.LongArray);\r
                arrayTypes.put("float", ArgumentType.FloatArray);\r
                arrayTypes.put("double", ArgumentType.DoubleArray);\r
-               \r
+\r
                bufferTypes = new HashMap<String, ArgumentType>();\r
                bufferTypes.put("Buffer", ArgumentType.Buffer);\r
                bufferTypes.put("ByteBuffer", ArgumentType.ByteBuffer);\r
@@ -74,11 +72,11 @@ public class RobustJavaMethodParser implements JavaMethodParser {
                bufferTypes.put("FloatBuffer", ArgumentType.FloatBuffer);\r
                bufferTypes.put("DoubleBuffer", ArgumentType.DoubleBuffer);\r
        }\r
-       \r
+\r
        Stack<TypeDeclaration> classStack = new Stack<TypeDeclaration>();\r
-       \r
+\r
        @Override\r
-       public ArrayList<JavaSegment> parse(String classFile) throws Exception {\r
+       public ArrayList<JavaSegment> parse (String classFile) throws Exception {\r
                CompilationUnit unit = JavaParser.parse(new ByteArrayInputStream(classFile.getBytes()));\r
                ArrayList<JavaMethod> methods = new ArrayList<JavaMethod>();\r
                getJavaMethods(methods, getOuterClass(unit));\r
@@ -88,25 +86,25 @@ public class RobustJavaMethodParser implements JavaMethodParser {
                ArrayList<JavaSegment> segments = sortMethodsAndSections(methods, sections);\r
                return segments;\r
        }\r
-       \r
-       private ArrayList<JavaSegment> sortMethodsAndSections(ArrayList<JavaMethod> methods, ArrayList<JniSection> sections) {\r
+\r
+       private ArrayList<JavaSegment> sortMethodsAndSections (ArrayList<JavaMethod> methods, ArrayList<JniSection> sections) {\r
                ArrayList<JavaSegment> segments = new ArrayList<JavaSegment>();\r
                segments.addAll(methods);\r
                segments.addAll(sections);\r
                Collections.sort(segments, new Comparator<JavaSegment>() {\r
                        @Override\r
-                       public int compare(JavaSegment o1, JavaSegment o2) {\r
+                       public int compare (JavaSegment o1, JavaSegment o2) {\r
                                return o1.getStartIndex() - o2.getStartIndex();\r
                        }\r
                });\r
                return segments;\r
        }\r
 \r
-       private void alignMethodBodies(ArrayList<JavaMethod> methods, ArrayList<JniSection> methodBodies) {\r
-               for(JavaMethod method: methods) {\r
-                       for(JniSection section: methodBodies) {\r
-                               if(method.getEndIndex() == section.getStartIndex()) {\r
-                                       if(section.getNativeCode().startsWith(JNI_MANUAL)) {\r
+       private void alignMethodBodies (ArrayList<JavaMethod> methods, ArrayList<JniSection> methodBodies) {\r
+               for (JavaMethod method : methods) {\r
+                       for (JniSection section : methodBodies) {\r
+                               if (method.getEndIndex() == section.getStartIndex()) {\r
+                                       if (section.getNativeCode().startsWith(JNI_MANUAL)) {\r
                                                section.setNativeCode(section.getNativeCode().substring(JNI_MANUAL.length()));\r
                                                method.setManual(true);\r
                                        }\r
@@ -117,16 +115,16 @@ public class RobustJavaMethodParser implements JavaMethodParser {
                }\r
        }\r
 \r
-       private void getJavaMethods(ArrayList<JavaMethod> methods, TypeDeclaration type) {\r
-               classStack.push(type);          \r
-               if(type.getMembers() != null) {\r
-                       for(BodyDeclaration member: type.getMembers()) {\r
-                               if(member instanceof ClassOrInterfaceDeclaration || member instanceof EnumDeclaration) {\r
+       private void getJavaMethods (ArrayList<JavaMethod> methods, TypeDeclaration type) {\r
+               classStack.push(type);\r
+               if (type.getMembers() != null) {\r
+                       for (BodyDeclaration member : type.getMembers()) {\r
+                               if (member instanceof ClassOrInterfaceDeclaration || member instanceof EnumDeclaration) {\r
                                        getJavaMethods(methods, (TypeDeclaration)member);\r
                                } else {\r
-                                       if(member instanceof MethodDeclaration) {\r
+                                       if (member instanceof MethodDeclaration) {\r
                                                MethodDeclaration method = (MethodDeclaration)member;\r
-                                               if(!ModifierSet.hasModifier(((MethodDeclaration) member).getModifiers(), ModifierSet.NATIVE)) continue;\r
+                                               if (!ModifierSet.hasModifier(((MethodDeclaration)member).getModifiers(), ModifierSet.NATIVE)) continue;\r
                                                methods.add(createMethod(method));\r
                                        }\r
                                }\r
@@ -134,61 +132,60 @@ public class RobustJavaMethodParser implements JavaMethodParser {
                }\r
                classStack.pop();\r
        }\r
-       \r
-       private JavaMethod createMethod(MethodDeclaration method) {\r
+\r
+       private JavaMethod createMethod (MethodDeclaration method) {\r
                String className = classStack.peek().getName();\r
                String name = method.getName();\r
                boolean isStatic = ModifierSet.hasModifier(method.getModifiers(), ModifierSet.STATIC);\r
                String returnType = method.getType().toString();\r
                ArrayList<Argument> arguments = new ArrayList<Argument>();\r
-               \r
-               if(method.getParameters() != null) {\r
-                       for(Parameter parameter: method.getParameters()) {\r
+\r
+               if (method.getParameters() != null) {\r
+                       for (Parameter parameter : method.getParameters()) {\r
                                arguments.add(new Argument(getArgumentType(parameter), parameter.getId().getName()));\r
                        }\r
                }\r
-               \r
+\r
                return new JavaMethod(className, name, isStatic, returnType, null, arguments, method.getBeginLine(), method.getEndLine());\r
        }\r
 \r
-       private ArgumentType getArgumentType(Parameter parameter) {\r
+       private ArgumentType getArgumentType (Parameter parameter) {\r
                String[] typeTokens = parameter.getType().toString().split("\\.");\r
-               String type = typeTokens[typeTokens.length-1];\r
+               String type = typeTokens[typeTokens.length - 1];\r
                int arrayDim = 0;\r
-               for(int i = 0; i < type.length(); i++) {\r
-                       if(type.charAt(i) == '[') arrayDim++;\r
+               for (int i = 0; i < type.length(); i++) {\r
+                       if (type.charAt(i) == '[') arrayDim++;\r
                }\r
                type = type.replace("[", "").replace("]", "");\r
-               \r
-               if(arrayDim >= 1) {\r
-                       if(arrayDim > 1) return ArgumentType.ObjectArray;\r
+\r
+               if (arrayDim >= 1) {\r
+                       if (arrayDim > 1) return ArgumentType.ObjectArray;\r
                        ArgumentType arrayType = arrayTypes.get(type);\r
-                       if(arrayType == null) {\r
+                       if (arrayType == null) {\r
                                throw new RuntimeException("Unknown array type " + type);\r
                        }\r
                        return arrayType;\r
                }\r
-               \r
-               if(plainOldDataTypes.containsKey(type)) return plainOldDataTypes.get(type);\r
-               if(bufferTypes.containsKey(type)) return bufferTypes.get(type);\r
-               if(type.equals("String")) return ArgumentType.String;\r
+\r
+               if (plainOldDataTypes.containsKey(type)) return plainOldDataTypes.get(type);\r
+               if (bufferTypes.containsKey(type)) return bufferTypes.get(type);\r
+               if (type.equals("String")) return ArgumentType.String;\r
                return ArgumentType.Object;\r
        }\r
 \r
-       private TypeDeclaration getOuterClass(CompilationUnit unit) {\r
-               for(TypeDeclaration type: unit.getTypes()) {\r
-                       if(type instanceof ClassOrInterfaceDeclaration || type instanceof EnumDeclaration)\r
-                               return type;\r
+       private TypeDeclaration getOuterClass (CompilationUnit unit) {\r
+               for (TypeDeclaration type : unit.getTypes()) {\r
+                       if (type instanceof ClassOrInterfaceDeclaration || type instanceof EnumDeclaration) return type;\r
                }\r
                throw new RuntimeException("Couldn't find class, is your java file empty?");\r
        }\r
-       \r
-       private ArrayList<JniSection> getJniSections(String classFile) {\r
+\r
+       private ArrayList<JniSection> getJniSections (String classFile) {\r
                ArrayList<JniSection> sections = getComments(classFile);\r
                Iterator<JniSection> iter = sections.iterator();\r
-               while(iter.hasNext()) {\r
+               while (iter.hasNext()) {\r
                        JniSection section = iter.next();\r
-                       if(!section.getNativeCode().startsWith("JNI")) {\r
+                       if (!section.getNativeCode().startsWith("JNI")) {\r
                                iter.remove();\r
                        } else {\r
                                section.setNativeCode(section.getNativeCode().substring(3));\r
@@ -196,44 +193,44 @@ public class RobustJavaMethodParser implements JavaMethodParser {
                }\r
                return sections;\r
        }\r
-       \r
-       private ArrayList<JniSection> getNativeCodeBodies(String classFile) {\r
+\r
+       private ArrayList<JniSection> getNativeCodeBodies (String classFile) {\r
                ArrayList<JniSection> sections = getComments(classFile);\r
                Iterator<JniSection> iter = sections.iterator();\r
-               while(iter.hasNext()) {\r
+               while (iter.hasNext()) {\r
                        JniSection section = iter.next();\r
-                       if(section.getNativeCode().startsWith("JNI")) iter.remove();\r
-                       if(section.getNativeCode().startsWith("-{")) iter.remove();\r
+                       if (section.getNativeCode().startsWith("JNI")) iter.remove();\r
+                       if (section.getNativeCode().startsWith("-{")) iter.remove();\r
                }\r
                return sections;\r
        }\r
-       \r
-       private ArrayList<JniSection> getComments(String classFile) {\r
+\r
+       private ArrayList<JniSection> getComments (String classFile) {\r
                ArrayList<JniSection> sections = new ArrayList<JniSection>();\r
-               \r
+\r
                boolean inComment = false;\r
                int start = 0;\r
                int startLine = 0;\r
                int line = 1;\r
-               for(int i = 0; i <classFile.length() - 2; i++) {\r
+               for (int i = 0; i < classFile.length() - 2; i++) {\r
                        char c1 = classFile.charAt(i);\r
-                       char c2 = classFile.charAt(i+1);\r
-                       char c3 = classFile.charAt(i+2);\r
-                       if(c1 == '\n') line++;\r
-                       if(!inComment) {\r
-                               if(c1 == '/' && c2 == '*' && c3 != '*') {\r
+                       char c2 = classFile.charAt(i + 1);\r
+                       char c3 = classFile.charAt(i + 2);\r
+                       if (c1 == '\n') line++;\r
+                       if (!inComment) {\r
+                               if (c1 == '/' && c2 == '*' && c3 != '*') {\r
                                        inComment = true;\r
                                        start = i;\r
                                        startLine = line;\r
                                }\r
                        } else {\r
-                               if(c1 == '*' && c2 == '/') {\r
-                                       sections.add(new JniSection(classFile.substring(start + 2, i),startLine, line));\r
+                               if (c1 == '*' && c2 == '/') {\r
+                                       sections.add(new JniSection(classFile.substring(start + 2, i), startLine, line));\r
                                        inComment = false;\r
                                }\r
                        }\r
                }\r
-               \r
+\r
                return sections;\r
        }\r
-}
\ No newline at end of file
+}\r
index 8a6b690..96ba160 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.jnigen.test;\r
 \r
 import java.nio.Buffer;\r
@@ -23,47 +24,108 @@ import com.badlogic.gdx.jnigen.BuildConfig;
 import com.badlogic.gdx.jnigen.BuildExecutor;\r
 import com.badlogic.gdx.jnigen.BuildTarget;\r
 import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;\r
-import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 import com.badlogic.gdx.jnigen.JniGenSharedLibraryLoader;\r
+import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 \r
 public class MyJniClass {\r
-       public static native void test(boolean boolArg, \r
-                                                                 byte byteArg, \r
-                                                                 char charArg, \r
-                                                                 short shortArg, \r
-                                                                 int intArg, \r
-                                                                 long longArg, \r
-                                                                 float floatArg, \r
-                                                                 double doubleArg, \r
-                                                                 Buffer byteBuffer,\r
-                                                                 boolean[] boolArray,\r
-                                                                 char[] charArray,\r
-                                                                 short[] shortArray,\r
-                                                                 int[] intArray,\r
-                                                                 long[] longArray,\r
-                                                                 float[] floatArray,\r
-                                                                 double[] doubleArray,\r
-                                                                 double[][] multidim,\r
-                                                                 String string); /*\r
-               printf("boolean: %s\n", boolArg?"true":"false");\r
-               printf("byte: %d\n", byteArg);\r
-               printf("char: %c\n", charArg);\r
-               printf("short: %d\n", shortArg);\r
-               printf("int: %d\n", intArg);\r
-               printf("long: %l\n", longArg);\r
-               printf("float: %f\n", floatArg);\r
-               printf("double: %d\n", doubleArg);\r
-               printf("byteBuffer: %d\n", byteBuffer[0]);\r
-               printf("bool[0]: %s\n", boolArray[0]?"true":"false");\r
-               printf("char[0]: %c\n", charArray[0]);\r
-               printf("short[0]: %d\n", shortArray[0]);\r
-               printf("int[0]: %d\n", intArray[0]);\r
-               printf("long[0]: %ll\n", longArray[0]);\r
-               printf("float[0]: %f\n", floatArray[0]);\r
-               printf("double[0]: %f\n", doubleArray[0]);\r
-               printf("string: %s fuck this nuts\n", string);\r
-       */                                      \r
-       \r
+       public static native void test (boolean boolArg, byte byteArg, char charArg, short shortArg, int intArg, long longArg,\r
+               float floatArg, double doubleArg, Buffer byteBuffer, boolean[] boolArray, char[] charArray, short[] shortArray,\r
+               int[] intArray, long[] longArray, float[] floatArray, double[] doubleArray, double[][] multidim, String string); /*\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "boolean: %s\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * boolArg\r
+                                                                                                                                                                                                                                                                                                                                * ?\r
+                                                                                                                                                                                                                                                                                                                                * "true":\r
+                                                                                                                                                                                                                                                                                                                                * "false"\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "byte: %d\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * byteArg\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "char: %c\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * charArg\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "short: %d\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * shortArg\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "int: %d\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * intArg\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "long: %l\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * longArg\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "float: %f\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * floatArg\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "double: %d\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * doubleArg\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "byteBuffer: %d\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * byteBuffer\r
+                                                                                                                                                                                                                                                                                                                                * [0]);\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "bool[0]: %s\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * boolArray\r
+                                                                                                                                                                                                                                                                                                                                * [\r
+                                                                                                                                                                                                                                                                                                                                * 0]?"true"\r
+                                                                                                                                                                                                                                                                                                                                * :\r
+                                                                                                                                                                                                                                                                                                                                * "false"\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "char[0]: %c\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * charArray\r
+                                                                                                                                                                                                                                                                                                                                * [0]);\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "short[0]: %d\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * shortArray\r
+                                                                                                                                                                                                                                                                                                                                * [0]);\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "int[0]: %d\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * intArray\r
+                                                                                                                                                                                                                                                                                                                                * [0]);\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "long[0]: %ll\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * longArray\r
+                                                                                                                                                                                                                                                                                                                                * [0]);\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "float[0]: %f\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * floatArray\r
+                                                                                                                                                                                                                                                                                                                                * [0]);\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "double[0]: %f\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * doubleArray\r
+                                                                                                                                                                                                                                                                                                                                * [0]);\r
+                                                                                                                                                                                                                                                                                                                                * printf(\r
+                                                                                                                                                                                                                                                                                                                                * "string: %s fuck this nuts\n"\r
+                                                                                                                                                                                                                                                                                                                                * ,\r
+                                                                                                                                                                                                                                                                                                                                * string\r
+                                                                                                                                                                                                                                                                                                                                * );\r
+                                                                                                                                                                                                                                                                                                                                */\r
+\r
+       // @off\r
        /*JNI\r
        #include <stdio.h>\r
         */\r
index 16a28e9..12dd240 100644 (file)
@@ -1,28 +1,29 @@
-\r
-import aurelienribon.libgdx.LibraryDef;\r
-import aurelienribon.libgdx.ui.Ctx;\r
-import aurelienribon.libgdx.ui.MainPanel;\r
-import aurelienribon.ui.components.ArStyle;\r
-import aurelienribon.ui.css.swing.SwingStyle;\r
 import java.io.File;\r
 import java.io.IOException;\r
 import java.net.MalformedURLException;\r
 import java.net.URL;\r
+\r
 import javax.swing.JFrame;\r
 import javax.swing.SwingUtilities;\r
 import javax.swing.UIManager;\r
 import javax.swing.UnsupportedLookAndFeelException;\r
+\r
 import org.apache.commons.io.FileUtils;\r
 \r
-/**\r
- * @author Aurelien Ribon | http://www.aurelienribon.com/\r
- */\r
+import aurelienribon.libgdx.LibraryDef;\r
+import aurelienribon.libgdx.ui.Ctx;\r
+import aurelienribon.libgdx.ui.MainPanel;\r
+import aurelienribon.ui.components.ArStyle;\r
+import aurelienribon.ui.css.swing.SwingStyle;\r
+\r
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */\r
 public class Main {\r
-       public static void main(String[] args) {\r
+       public static void main (String[] args) {\r
                parseArgs(args);\r
 \r
                SwingUtilities.invokeLater(new Runnable() {\r
-                       @Override public void run() {\r
+                       @Override\r
+                       public void run () {\r
                                try {\r
                                        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r
                                } catch (ClassNotFoundException ex) {\r
@@ -44,16 +45,16 @@ public class Main {
                });\r
        }\r
 \r
-       private static void parseArgs(String[] args) {\r
-               for (int i=0; i<args.length; i++) {\r
-                       if (args[i].equals("-testliburl") && i<args.length) {\r
+       private static void parseArgs (String[] args) {\r
+               for (int i = 0; i < args.length; i++) {\r
+                       if (args[i].equals("-testliburl") && i < args.length) {\r
                                try {\r
-                                       Ctx.testLibUrl = new URL(args[i+1]);\r
+                                       Ctx.testLibUrl = new URL(args[i + 1]);\r
                                } catch (MalformedURLException ex) {\r
                                        System.err.println("[warning] Test url is malformed");\r
                                }\r
-                       } else if (args[i].equals("-testlibdef") && i<args.length) {\r
-                               File file = new File(args[i+1]);\r
+                       } else if (args[i].equals("-testlibdef") && i < args.length) {\r
+                               File file = new File(args[i + 1]);\r
                                try {\r
                                        Ctx.testLibDef = new LibraryDef(FileUtils.readFileToString(file));\r
                                } catch (IOException ex) {\r
index 473a06a..e9660f6 100644 (file)
@@ -1,7 +1,6 @@
+
 package aurelienribon.libgdx;
 
-import aurelienribon.utils.HttpUtils;
-import aurelienribon.utils.ParseUtils;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.net.MalformedURLException;
@@ -12,29 +11,33 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+import aurelienribon.utils.HttpUtils;
+import aurelienribon.utils.ParseUtils;
+
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class DownloadManager {
        private final URL configUrl;
        private final List<String> libraries = new ArrayList<String>();
        private final Map<String, URL> librariesUrls = new HashMap<String, URL>();
        private final Map<String, LibraryDef> librariesDefs = new HashMap<String, LibraryDef>();
 
-       public DownloadManager(String configUrl) throws MalformedURLException {
+       public DownloadManager (String configUrl) throws MalformedURLException {
                this.configUrl = new URL(configUrl);
        }
 
        public static class Callback {
-               public void completed() {}
-               public void error() {}
+               public void completed () {
+               }
+
+               public void error () {
+               }
        }
 
        // -------------------------------------------------------------------------
        // Public API
        // -------------------------------------------------------------------------
 
-       public void downloadConfigFile(final Callback callback) {
+       public void downloadConfigFile (final Callback callback) {
                libraries.clear();
                librariesUrls.clear();
                librariesDefs.clear();
@@ -42,45 +45,61 @@ public class DownloadManager {
                final ByteArrayOutputStream output = new ByteArrayOutputStream();
 
                HttpUtils.downloadAsync(configUrl, output, new HttpUtils.Callback() {
-                       @Override public void completed() {parseLibraries(output.toString()); callback.completed();}
-                       @Override public void error(IOException ex) {callback.error();}
+                       @Override
+                       public void completed () {
+                               parseLibraries(output.toString());
+                               callback.completed();
+                       }
+
+                       @Override
+                       public void error (IOException ex) {
+                               callback.error();
+                       }
                });
        }
 
-       public void downloadLibraryDef(final String name, final Callback callback) {
+       public void downloadLibraryDef (final String name, final Callback callback) {
                if (!librariesUrls.containsKey(name)) return;
 
                final ByteArrayOutputStream output = new ByteArrayOutputStream();
 
                HttpUtils.downloadAsync(librariesUrls.get(name), output, new HttpUtils.Callback() {
-                       @Override public void completed() {librariesDefs.put(name, new LibraryDef(output.toString())); callback.completed();}
-                       @Override public void error(IOException ex) {callback.error();}
+                       @Override
+                       public void completed () {
+                               librariesDefs.put(name, new LibraryDef(output.toString()));
+                               callback.completed();
+                       }
+
+                       @Override
+                       public void error (IOException ex) {
+                               callback.error();
+                       }
                });
        }
 
-       public void addTestLibraryUrl(String name, URL url) {
+       public void addTestLibraryUrl (String name, URL url) {
                libraries.add(name);
                librariesUrls.put(name, url);
        }
 
-       public void addTestLibraryDef(String name, LibraryDef def) {
+       public void addTestLibraryDef (String name, LibraryDef def) {
                libraries.add(name);
                librariesDefs.put(name, def);
        }
 
-       public URL getConfigUrl() {
+       public URL getConfigUrl () {
                return configUrl;
        }
 
-       public List<String> getLibrariesNames() {
+       public List<String> getLibrariesNames () {
                return Collections.unmodifiableList(libraries);
        }
 
-       public URL getLibraryUrl(String name) {
+       public URL getLibraryUrl (String name) {
                return librariesUrls.get(name);
        }
 
-       public LibraryDef getLibraryDef(String name) {
+       public LibraryDef getLibraryDef (String name) {
                return librariesDefs.get(name);
        }
 
@@ -88,7 +107,7 @@ public class DownloadManager {
        // Helpers
        // -------------------------------------------------------------------------
 
-       private void parseLibraries(String str) {
+       private void parseLibraries (String str) {
                List<String> lines = ParseUtils.parseBlockAsList(str, "libraries");
 
                for (String line : lines) {
index 71f80da..642c1e4 100644 (file)
@@ -1,11 +1,11 @@
+
 package aurelienribon.libgdx;
 
-import aurelienribon.utils.ParseUtils;
 import java.util.List;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+import aurelienribon.utils.ParseUtils;
+
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class LibraryDef {
        public final String name;
        public final String author;
@@ -22,7 +22,7 @@ public class LibraryDef {
        public final List<String> libsAndroid;
        public final List<String> libsHtml;
 
-       public LibraryDef(String content) {
+       public LibraryDef (String content) {
                this.name = ParseUtils.parseBlock(content, "name", "<unknown>");
                this.author = ParseUtils.parseBlock(content, "author", "<unknown>");
                this.authorWebsite = ParseUtils.parseBlock(content, "author-website", null);
index 4915446..86c0c06 100644 (file)
@@ -1,3 +1,4 @@
+
 package aurelienribon.libgdx;
 
 import java.util.ArrayList;
@@ -5,9 +6,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ProjectConfiguration {
        public String projectName = "my-gdx-game";
        public String mainClassName = "MyGdxGame";
@@ -33,18 +32,34 @@ public class ProjectConfiguration {
        // -------------------------------------------------------------------------
 
        public class Libraries {
-               public void add(String name, LibraryDef def) {
+               public void add (String name, LibraryDef def) {
                        librariesDefs.put(name, def);
                        if (!librariesUsages.containsKey(name)) librariesUsages.put(name, Boolean.FALSE);
                        if (!librariesPaths.containsKey(name)) librariesPaths.put(name, null);
                }
 
-               public void setUsage(String name, boolean used) {librariesUsages.put(name, used);}
-               public void setPath(String name, String path) {librariesPaths.put(name, path);}
+               public void setUsage (String name, boolean used) {
+                       librariesUsages.put(name, used);
+               }
+
+               public void setPath (String name, String path) {
+                       librariesPaths.put(name, path);
+               }
+
+               public List<String> getNames () {
+                       return new ArrayList<String>(librariesDefs.keySet());
+               }
 
-               public List<String> getNames() {return new ArrayList<String>(librariesDefs.keySet());}
-               public LibraryDef getDef(String name) {return librariesDefs.get(name);}
-               public boolean isUsed(String name) {return librariesUsages.get(name);}
-               public String getPath(String name) {return librariesPaths.get(name);}
+               public LibraryDef getDef (String name) {
+                       return librariesDefs.get(name);
+               }
+
+               public boolean isUsed (String name) {
+                       return librariesUsages.get(name);
+               }
+
+               public String getPath (String name) {
+                       return librariesPaths.get(name);
+               }
        }
 }
index b1f625f..1971082 100644 (file)
@@ -1,12 +1,11 @@
+
 package aurelienribon.libgdx;
 
 import java.io.File;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ProjectConfigurationHelper {
-       public static boolean isValid(ProjectConfiguration cfg) {
+       public static boolean isValid (ProjectConfiguration cfg) {
                if (cfg.projectName.trim().equals("")) return false;
                if (cfg.packageName.trim().equals("")) return false;
                if (cfg.packageName.endsWith(".")) return false;
@@ -19,7 +18,7 @@ public class ProjectConfigurationHelper {
                return true;
        }
 
-       public static boolean isLibraryValid(ProjectConfiguration cfg, String libraryName) {
+       public static boolean isLibraryValid (ProjectConfiguration cfg, String libraryName) {
                if (!cfg.libs.isUsed(libraryName)) return true;
                String path = cfg.libs.getPath(libraryName);
                if (path == null) return false;
@@ -28,15 +27,14 @@ public class ProjectConfigurationHelper {
                return true;
        }
 
-       public static String getErrorMessage(ProjectConfiguration cfg) {
+       public static String getErrorMessage (ProjectConfiguration cfg) {
                if (cfg.projectName.trim().equals("")) return "Project name is not set.";
                if (cfg.packageName.trim().equals("")) return "Package name is not set.";
                if (cfg.packageName.endsWith(".")) return "Package name ends with a dot.";
                if (cfg.mainClassName.trim().equals("")) return "Main class name is not set.";
 
                for (String libraryName : cfg.libs.getNames()) {
-                       if (!isLibraryValid(cfg, libraryName))
-                               return "At least one selected library has a missing or invalid archive.";
+                       if (!isLibraryValid(cfg, libraryName)) return "At least one selected library has a missing or invalid archive.";
                }
 
                return "No error found";
index 569f1ac..44363d9 100644 (file)
@@ -1,6 +1,6 @@
+
 package aurelienribon.libgdx;
 
-import aurelienribon.utils.TemplateManager;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.FileOutputStream;
@@ -10,20 +10,21 @@ import java.io.OutputStream;
 import java.util.List;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
+
 import res.Res;
+import aurelienribon.utils.TemplateManager;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ProjectSetup {
        private final ProjectConfiguration cfg;
        private final File tmpDst = new File("__libgdx_setup_tmp");
        private final TemplateManager templateManager = new TemplateManager();
 
-       public ProjectSetup(ProjectConfiguration cfg) {
+       public ProjectSetup (ProjectConfiguration cfg) {
                this.cfg = cfg;
 
                templateManager.define("PROJECT_NAME", cfg.projectName);
@@ -39,14 +40,15 @@ public class ProjectSetup {
                if (!cfg.androidMinSdkVersion.equals("")) templateManager.define("ANDROID_MIN_SDK", cfg.androidMinSdkVersion);
                if (!cfg.androidTargetSdkVersion.equals("")) templateManager.define("ANDROID_TARGET_SDK", cfg.androidTargetSdkVersion);
                if (!cfg.androidMaxSdkVersion.equals("")) templateManager.define("ANDROID_MAX_SDK", cfg.androidMaxSdkVersion);
-               if (!cfg.androidMinSdkVersion.equals("") || !cfg.androidTargetSdkVersion.equals("") || !cfg.androidMaxSdkVersion.equals("")) templateManager.define("ANDROID_USES_SDK");
+               if (!cfg.androidMinSdkVersion.equals("") || !cfg.androidTargetSdkVersion.equals("") || !cfg.androidMaxSdkVersion.equals(""))
+                       templateManager.define("ANDROID_USES_SDK");
        }
 
        // -------------------------------------------------------------------------
        // Public API
        // -------------------------------------------------------------------------
 
-       public void inflateProjects() throws IOException {
+       public void inflateProjects () throws IOException {
                FileUtils.forceMkdir(tmpDst);
                FileUtils.cleanDirectory(tmpDst);
 
@@ -68,7 +70,7 @@ public class ProjectSetup {
                zis.close();
        }
 
-       public void inflateLibraries() throws IOException {
+       public void inflateLibraries () throws IOException {
                File commonPrjLibsDir = new File(tmpDst, "/prj-common/libs");
                File desktopPrjLibsDir = new File(tmpDst, "/prj-desktop/libs");
                File androidPrjLibsDir = new File(tmpDst, "/prj-android/libs");
@@ -102,7 +104,7 @@ public class ProjectSetup {
                }
        }
 
-       public void configureLibraries() throws IOException {
+       public void configureLibraries () throws IOException {
                String entriesCommon = "";
                String entriesDesktop = "";
                String entriesAndroid = "";
@@ -195,7 +197,7 @@ public class ProjectSetup {
                templateManager.processOver(new File(tmpDst, "prj-html/src/GwtDefinition.gwt.xml"));
        }
 
-       public void postProcess() throws IOException {
+       public void postProcess () throws IOException {
                {
                        File src = new File(tmpDst, "prj-common");
                        File dst = new File(tmpDst, cfg.projectName + cfg.commonSuffix);
@@ -231,7 +233,7 @@ public class ProjectSetup {
                }
        }
 
-       public void copy() throws IOException {
+       public void copy () throws IOException {
                File src = new File(tmpDst, cfg.projectName + cfg.commonSuffix);
                File dst = new File(cfg.destinationPath);
                FileUtils.copyDirectoryToDirectory(src, dst);
@@ -252,7 +254,7 @@ public class ProjectSetup {
                }
        }
 
-       public void clean() throws IOException {
+       public void clean () throws IOException {
                FileUtils.deleteDirectory(tmpDst);
        }
 
@@ -260,7 +262,7 @@ public class ProjectSetup {
        // Helpers
        // -------------------------------------------------------------------------
 
-       private void templateDir(File dir) throws IOException {
+       private void templateDir (File dir) throws IOException {
                if (dir.getName().equals("libs")) return;
 
                for (File file : dir.listFiles()) {
@@ -273,7 +275,7 @@ public class ProjectSetup {
                }
        }
 
-       private void copyEntry(ZipInputStream zis, String name, File dst) throws IOException {
+       private void copyEntry (ZipInputStream zis, String name, File dst) throws IOException {
                File file = new File(dst, name);
                file.getParentFile().mkdirs();
 
@@ -282,21 +284,24 @@ public class ProjectSetup {
                os.close();
        }
 
-       private void move(File base, String path1, String path2) throws IOException {
+       private void move (File base, String path1, String path2) throws IOException {
                if (path1.equals(path2)) return;
                File file1 = new File(base, FilenameUtils.normalize(path1));
                File file2 = new File(base, FilenameUtils.normalize(path2));
                FileUtils.deleteQuietly(file2);
-               if (file1.isDirectory()) FileUtils.moveDirectory(file1, file2);
-               else FileUtils.moveFile(file1, file2);
+               if (file1.isDirectory())
+                       FileUtils.moveDirectory(file1, file2);
+               else
+                       FileUtils.moveFile(file1, file2);
        }
 
-       private boolean endsWidth(String str, String... ends) {
-               for (String end : ends) if (str.endsWith(end)) return true;
+       private boolean endsWidth (String str, String... ends) {
+               for (String end : ends)
+                       if (str.endsWith(end)) return true;
                return false;
        }
 
-       private String getSource(List<String> files, String file) {
+       private String getSource (List<String> files, String file) {
                String path = FilenameUtils.getFullPath(file);
                String name = FilenameUtils.getBaseName(file);
                String ext = FilenameUtils.getExtension(file);
index 97f5992..24a0a59 100644 (file)
@@ -1,7 +1,6 @@
+
 package aurelienribon.libgdx.ui;
 
-import aurelienribon.libgdx.ui.dialogs.AdvancedSettingsDialog;
-import aurelienribon.ui.css.Style;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyAdapter;
@@ -13,18 +12,20 @@ import java.awt.event.MouseListener;
 import java.io.File;
 import java.io.IOException;
 import java.util.regex.Pattern;
+
 import javax.swing.JFileChooser;
 import javax.swing.JFrame;
 import javax.swing.JOptionPane;
 import javax.swing.JTextField;
 import javax.swing.SwingUtilities;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+import aurelienribon.libgdx.ui.dialogs.AdvancedSettingsDialog;
+import aurelienribon.ui.css.Style;
+
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ConfigPanel extends javax.swing.JPanel {
-    public ConfigPanel() {
-        initComponents();
+       public ConfigPanel () {
+               initComponents();
 
                nameField.setText(Ctx.cfg.projectName);
                packageField.setText(Ctx.cfg.packageName);
@@ -47,14 +48,35 @@ public class ConfigPanel extends javax.swing.JPanel {
                mainClassField.addKeyListener(updateOnTypeKeyListener);
                mainClassField.addKeyListener(mainClassNameKeyListener);
 
-               browseBtn.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {browse();}});
-               genDesktopPrjChk.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {update();}});
-               genAndroidPrjChk.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {update();}});
-               genHtmlPrjChk.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {update();}});
+               browseBtn.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               browse();
+                       }
+               });
+               genDesktopPrjChk.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               update();
+                       }
+               });
+               genAndroidPrjChk.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               update();
+                       }
+               });
+               genHtmlPrjChk.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               update();
+                       }
+               });
 
                advancedSettingsLabel.addMouseListener(new MouseAdapter() {
-                       @Override public void mousePressed(MouseEvent e) {
-                               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(ConfigPanel.this);
+                       @Override
+                       public void mousePressed (MouseEvent e) {
+                               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(ConfigPanel.this);
                                AdvancedSettingsDialog dialog = new AdvancedSettingsDialog(frame);
                                dialog.setLocationRelativeTo(frame);
                                dialog.setResizable(false);
@@ -70,11 +92,11 @@ public class ConfigPanel extends javax.swing.JPanel {
 
                nameField.requestFocusInWindow();
                nameField.selectAll();
-    }
+       }
 
-       private void browse() {
+       private void browse () {
                String path = Ctx.cfg.destinationPath;
-               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(this);
+               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(this);
 
                JFileChooser chooser = new JFileChooser(new File(path));
                chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
@@ -86,7 +108,7 @@ public class ConfigPanel extends javax.swing.JPanel {
                }
        }
 
-       private void update() {
+       private void update () {
                Ctx.cfg.projectName = nameField.getText();
                Ctx.cfg.packageName = packageField.getText();
                Ctx.cfg.mainClassName = mainClassField.getText();
@@ -99,15 +121,15 @@ public class ConfigPanel extends javax.swing.JPanel {
 
        private final KeyListener updateOnTypeKeyListener = new KeyAdapter() {
                @Override
-               public void keyReleased(KeyEvent e) {
+               public void keyReleased (KeyEvent e) {
                        update();
                }
        };
 
        private final MouseListener selectOnFocusMouseListener = new MouseAdapter() {
                @Override
-               public void mousePressed(MouseEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void mousePressed (MouseEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        if (!field.isFocusOwner()) field.selectAll();
                }
        };
@@ -116,17 +138,17 @@ public class ConfigPanel extends javax.swing.JPanel {
                private String backup;
 
                @Override
-               public void keyPressed(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyPressed (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        backup = field.getText();
                }
 
                @Override
-               public void keyReleased(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyReleased (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        if (!Pattern.compile("[a-zA-Z0-9_-]*").matcher(field.getText()).matches()) {
                                String msg = "Only alphanumeric, '-' and '_' characters are allowed for project name.";
-                               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(ConfigPanel.this);
+                               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(ConfigPanel.this);
                                JOptionPane.showMessageDialog(frame, msg);
                                field.setText(backup);
                                update();
@@ -138,17 +160,17 @@ public class ConfigPanel extends javax.swing.JPanel {
                private String backup;
 
                @Override
-               public void keyPressed(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyPressed (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        backup = field.getText();
                }
 
                @Override
-               public void keyReleased(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyReleased (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        if (!Pattern.compile("[a-zA-Z0-9_\\.]*").matcher(field.getText()).matches()) {
                                String msg = "Only alphanumeric, '_' and '.' characters are allowed for package name.";
-                               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(ConfigPanel.this);
+                               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(ConfigPanel.this);
                                JOptionPane.showMessageDialog(frame, msg);
                                field.setText(backup);
                                update();
@@ -160,17 +182,17 @@ public class ConfigPanel extends javax.swing.JPanel {
                private String backup;
 
                @Override
-               public void keyPressed(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyPressed (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        backup = field.getText();
                }
 
                @Override
-               public void keyReleased(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyReleased (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        if (!Pattern.compile("[a-zA-Z0-9_]*").matcher(field.getText()).matches()) {
                                String msg = "Only alphanumeric and '_' characters are allowed for class name.\n";
-                               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(ConfigPanel.this);
+                               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(ConfigPanel.this);
 
                                JOptionPane.showMessageDialog(frame, msg);
                                field.setText(backup);
@@ -183,181 +205,205 @@ public class ConfigPanel extends javax.swing.JPanel {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        headerPanel = new javax.swing.JPanel();
-        jLabel4 = new javax.swing.JLabel();
-        numberLabel = new javax.swing.JLabel();
-        jPanel1 = new javax.swing.JPanel();
-        genCommonPrjChk = new javax.swing.JCheckBox();
-        destinationField = new javax.swing.JTextField();
-        nameField = new javax.swing.JTextField();
-        jLabel2 = new javax.swing.JLabel();
-        browseBtn = new javax.swing.JButton();
-        packageField = new javax.swing.JTextField();
-        jLabel1 = new javax.swing.JLabel();
-        jLabel3 = new javax.swing.JLabel();
-        genAndroidPrjChk = new javax.swing.JCheckBox();
-        genDesktopPrjChk = new javax.swing.JCheckBox();
-        genHtmlPrjChk = new javax.swing.JCheckBox();
-        jLabel5 = new javax.swing.JLabel();
-        mainClassField = new javax.swing.JTextField();
-        advancedSettingsLabel = new javax.swing.JLabel();
-
-        setLayout(new java.awt.BorderLayout());
-
-        jLabel4.setText("<html> Main parameters defining your project. See the overview panel to know if it suits your needs.");
-        jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
-        numberLabel.setText("1");
-
-        javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
-        headerPanel.setLayout(headerPanelLayout);
-        headerPanelLayout.setHorizontalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, headerPanelLayout.createSequentialGroup()
-                .addComponent(numberLabel)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE))
-        );
-        headerPanelLayout.setVerticalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
-            .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-        );
-
-        add(headerPanel, java.awt.BorderLayout.NORTH);
-
-        jPanel1.setOpaque(false);
-
-        genCommonPrjChk.setSelected(true);
-        genCommonPrjChk.setText("generate common project (required)");
-        genCommonPrjChk.setEnabled(false);
-
-        destinationField.setEditable(false);
-
-        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel2.setText("Package");
-
-        browseBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_browse.png"))); // NOI18N
-
-        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel1.setText("Name");
-
-        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel3.setText("Destination");
-
-        genAndroidPrjChk.setSelected(true);
-        genAndroidPrjChk.setText("generate android project");
-
-        genDesktopPrjChk.setSelected(true);
-        genDesktopPrjChk.setText("generate desktop project");
-
-        genHtmlPrjChk.setSelected(true);
-        genHtmlPrjChk.setText("generate html project");
-
-        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel5.setText("Game class");
-
-        advancedSettingsLabel.setText("Advanced settings >");
-
-        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
-        jPanel1.setLayout(jPanel1Layout);
-        jPanel1Layout.setHorizontalGroup(
-            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(nameField, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE))
-                    .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(packageField))
-                    .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
-                            .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(jPanel1Layout.createSequentialGroup()
-                                .addComponent(destinationField, javax.swing.GroupLayout.DEFAULT_SIZE, 179, Short.MAX_VALUE)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                .addComponent(browseBtn))
-                            .addComponent(mainClassField)))
-                    .addGroup(jPanel1Layout.createSequentialGroup()
-                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(genHtmlPrjChk)
-                            .addComponent(genAndroidPrjChk)
-                            .addComponent(genDesktopPrjChk)
-                            .addComponent(genCommonPrjChk))
-                        .addGap(0, 0, Short.MAX_VALUE))
-                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
-                        .addGap(0, 0, Short.MAX_VALUE)
-                        .addComponent(advancedSettingsLabel)))
-                .addContainerGap())
-        );
-        jPanel1Layout.setVerticalGroup(
-            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel1)
-                    .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel2)
-                    .addComponent(packageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel5)
-                    .addComponent(mainClassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel3)
-                    .addComponent(destinationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(browseBtn))
-                .addGap(18, 18, 18)
-                .addComponent(genCommonPrjChk)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(genDesktopPrjChk)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(genAndroidPrjChk)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(genHtmlPrjChk)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addComponent(advancedSettingsLabel)
-                .addContainerGap())
-        );
-
-        jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {browseBtn, destinationField, jLabel1, jLabel2, jLabel3, jLabel5, mainClassField, nameField, packageField});
-
-        add(jPanel1, java.awt.BorderLayout.CENTER);
-    }// </editor-fold>//GEN-END:initComponents
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel advancedSettingsLabel;
-    private javax.swing.JButton browseBtn;
-    private javax.swing.JTextField destinationField;
-    private javax.swing.JCheckBox genAndroidPrjChk;
-    private javax.swing.JCheckBox genCommonPrjChk;
-    private javax.swing.JCheckBox genDesktopPrjChk;
-    private javax.swing.JCheckBox genHtmlPrjChk;
-    private javax.swing.JPanel headerPanel;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JLabel jLabel5;
-    private javax.swing.JPanel jPanel1;
-    private javax.swing.JTextField mainClassField;
-    private javax.swing.JTextField nameField;
-    private javax.swing.JLabel numberLabel;
-    private javax.swing.JTextField packageField;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               headerPanel = new javax.swing.JPanel();
+               jLabel4 = new javax.swing.JLabel();
+               numberLabel = new javax.swing.JLabel();
+               jPanel1 = new javax.swing.JPanel();
+               genCommonPrjChk = new javax.swing.JCheckBox();
+               destinationField = new javax.swing.JTextField();
+               nameField = new javax.swing.JTextField();
+               jLabel2 = new javax.swing.JLabel();
+               browseBtn = new javax.swing.JButton();
+               packageField = new javax.swing.JTextField();
+               jLabel1 = new javax.swing.JLabel();
+               jLabel3 = new javax.swing.JLabel();
+               genAndroidPrjChk = new javax.swing.JCheckBox();
+               genDesktopPrjChk = new javax.swing.JCheckBox();
+               genHtmlPrjChk = new javax.swing.JCheckBox();
+               jLabel5 = new javax.swing.JLabel();
+               mainClassField = new javax.swing.JTextField();
+               advancedSettingsLabel = new javax.swing.JLabel();
+
+               setLayout(new java.awt.BorderLayout());
+
+               jLabel4.setText("<html> Main parameters defining your project. See the overview panel to know if it suits your needs.");
+               jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+               numberLabel.setText("1");
+
+               javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
+               headerPanel.setLayout(headerPanelLayout);
+               headerPanelLayout.setHorizontalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               javax.swing.GroupLayout.Alignment.TRAILING,
+                               headerPanelLayout.createSequentialGroup().addComponent(numberLabel)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)));
+               headerPanelLayout.setVerticalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
+                       .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
+
+               add(headerPanel, java.awt.BorderLayout.NORTH);
+
+               jPanel1.setOpaque(false);
+
+               genCommonPrjChk.setSelected(true);
+               genCommonPrjChk.setText("generate common project (required)");
+               genCommonPrjChk.setEnabled(false);
+
+               destinationField.setEditable(false);
+
+               jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel2.setText("Package");
+
+               browseBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_browse.png"))); // NOI18N
+
+               jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel1.setText("Name");
+
+               jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel3.setText("Destination");
+
+               genAndroidPrjChk.setSelected(true);
+               genAndroidPrjChk.setText("generate android project");
+
+               genDesktopPrjChk.setSelected(true);
+               genDesktopPrjChk.setText("generate desktop project");
+
+               genHtmlPrjChk.setSelected(true);
+               genHtmlPrjChk.setText("generate html project");
+
+               jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel5.setText("Game class");
+
+               advancedSettingsLabel.setText("Advanced settings >");
+
+               javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+               jPanel1.setLayout(jPanel1Layout);
+               jPanel1Layout
+                       .setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                               .addGroup(
+                                       jPanel1Layout
+                                               .createSequentialGroup()
+                                               .addContainerGap()
+                                               .addGroup(
+                                                       jPanel1Layout
+                                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                               .addGroup(
+                                                                       jPanel1Layout
+                                                                               .createSequentialGroup()
+                                                                               .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
+                                                                                       javax.swing.GroupLayout.PREFERRED_SIZE)
+                                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                               .addComponent(nameField, javax.swing.GroupLayout.DEFAULT_SIZE, 234, Short.MAX_VALUE))
+                                                               .addGroup(
+                                                                       jPanel1Layout
+                                                                               .createSequentialGroup()
+                                                                               .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54,
+                                                                                       javax.swing.GroupLayout.PREFERRED_SIZE)
+                                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(packageField))
+                                                               .addGroup(
+                                                                       jPanel1Layout
+                                                                               .createSequentialGroup()
+                                                                               .addGroup(
+                                                                                       jPanel1Layout
+                                                                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                                                                                               .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                                                                       javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                                                                               .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                                                                       javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                               .addGroup(
+                                                                                       jPanel1Layout
+                                                                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                                                               .addGroup(
+                                                                                                       jPanel1Layout
+                                                                                                               .createSequentialGroup()
+                                                                                                               .addComponent(destinationField, javax.swing.GroupLayout.DEFAULT_SIZE, 179,
+                                                                                                                       Short.MAX_VALUE).addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                                                               .addComponent(browseBtn)).addComponent(mainClassField)))
+                                                               .addGroup(
+                                                                       jPanel1Layout
+                                                                               .createSequentialGroup()
+                                                                               .addGroup(
+                                                                                       jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                                                               .addComponent(genHtmlPrjChk).addComponent(genAndroidPrjChk).addComponent(genDesktopPrjChk)
+                                                                                               .addComponent(genCommonPrjChk)).addGap(0, 0, Short.MAX_VALUE))
+                                                               .addGroup(
+                                                                       javax.swing.GroupLayout.Alignment.TRAILING,
+                                                                       jPanel1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
+                                                                               .addComponent(advancedSettingsLabel))).addContainerGap()));
+               jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       jPanel1Layout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       jPanel1Layout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                               .addComponent(jLabel1)
+                                               .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       javax.swing.GroupLayout.PREFERRED_SIZE))
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addGroup(
+                                       jPanel1Layout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                               .addComponent(jLabel2)
+                                               .addComponent(packageField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       javax.swing.GroupLayout.PREFERRED_SIZE))
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addGroup(
+                                       jPanel1Layout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                               .addComponent(jLabel5)
+                                               .addComponent(mainClassField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       javax.swing.GroupLayout.PREFERRED_SIZE))
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addGroup(
+                                       jPanel1Layout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                               .addComponent(jLabel3)
+                                               .addComponent(destinationField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       javax.swing.GroupLayout.PREFERRED_SIZE).addComponent(browseBtn))
+                               .addGap(18, 18, 18)
+                               .addComponent(genCommonPrjChk)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addComponent(genDesktopPrjChk)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addComponent(genAndroidPrjChk)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addComponent(genHtmlPrjChk)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       Short.MAX_VALUE).addComponent(advancedSettingsLabel).addContainerGap()));
+
+               jPanel1Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {browseBtn, destinationField, jLabel1,
+                       jLabel2, jLabel3, jLabel5, mainClassField, nameField, packageField});
+
+               add(jPanel1, java.awt.BorderLayout.CENTER);
+       }// </editor-fold>//GEN-END:initComponents
+
+       // Variables declaration - do not modify//GEN-BEGIN:variables
+       private javax.swing.JLabel advancedSettingsLabel;
+       private javax.swing.JButton browseBtn;
+       private javax.swing.JTextField destinationField;
+       private javax.swing.JCheckBox genAndroidPrjChk;
+       private javax.swing.JCheckBox genCommonPrjChk;
+       private javax.swing.JCheckBox genDesktopPrjChk;
+       private javax.swing.JCheckBox genHtmlPrjChk;
+       private javax.swing.JPanel headerPanel;
+       private javax.swing.JLabel jLabel1;
+       private javax.swing.JLabel jLabel2;
+       private javax.swing.JLabel jLabel3;
+       private javax.swing.JLabel jLabel4;
+       private javax.swing.JLabel jLabel5;
+       private javax.swing.JPanel jPanel1;
+       private javax.swing.JTextField mainClassField;
+       private javax.swing.JTextField nameField;
+       private javax.swing.JLabel numberLabel;
+       private javax.swing.JTextField packageField;
+       // End of variables declaration//GEN-END:variables
 
 }
index 698ca90..9204e88 100644 (file)
@@ -1,14 +1,14 @@
+
 package aurelienribon.libgdx.ui;
 
-import aurelienribon.libgdx.LibraryDef;
-import aurelienribon.libgdx.ProjectConfiguration;
 import java.net.URL;
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+import aurelienribon.libgdx.LibraryDef;
+import aurelienribon.libgdx.ProjectConfiguration;
+
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class Ctx {
        public static final ProjectConfiguration cfg = new ProjectConfiguration();
        public static final List<Listener> listeners = new CopyOnWriteArrayList<Listener>();
@@ -16,10 +16,11 @@ public class Ctx {
        public static LibraryDef testLibDef = null;
 
        public static interface Listener {
-               public void configChanged();
+               public void configChanged ();
        }
 
-       public static void fireConfigChanged() {
-               for (Listener l : listeners) l.configChanged();
+       public static void fireConfigChanged () {
+               for (Listener l : listeners)
+                       l.configChanged();
        }
 }
index dd36c83..9d74fa7 100644 (file)
@@ -1,40 +1,47 @@
+
 package aurelienribon.libgdx.ui;
 
-import aurelienribon.libgdx.ProjectConfigurationHelper;
-import aurelienribon.libgdx.ui.dialogs.GoDialog;
-import aurelienribon.ui.css.Style;
 import java.awt.Color;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+
 import javax.swing.JFrame;
 import javax.swing.SwingUtilities;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+import aurelienribon.libgdx.ProjectConfigurationHelper;
+import aurelienribon.libgdx.ui.dialogs.GoDialog;
+import aurelienribon.ui.css.Style;
+
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class GoPanel extends javax.swing.JPanel {
-    public GoPanel() {
-        initComponents();
+       public GoPanel () {
+               initComponents();
                Style.registerCssClasses(headerPanel, ".header");
                Style.registerCssClasses(numberLabel, ".headerNumber");
 
-               Ctx.listeners.add(new Ctx.Listener() {@Override public void configChanged() {update();}});
+               Ctx.listeners.add(new Ctx.Listener() {
+                       @Override
+                       public void configChanged () {
+                               update();
+                       }
+               });
 
                goBtn.addActionListener(new ActionListener() {
-                       @Override public void actionPerformed(ActionEvent e) {
-                               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(GoPanel.this);
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(GoPanel.this);
                                GoDialog dialog = new GoDialog(frame);
                                dialog.setLocationRelativeTo(frame);
                                dialog.setVisible(true);
                        }
                });
-    }
+       }
 
-       public void init() {
+       public void init () {
                update();
        }
 
-       private void update() {
+       private void update () {
                if (ProjectConfigurationHelper.isValid(Ctx.cfg)) {
                        goBtn.setEnabled(true);
                        errorLabel.setText("<html>Your configuration is valid.");
@@ -50,81 +57,80 @@ public class GoPanel extends javax.swing.JPanel {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        jPanel1 = new javax.swing.JPanel();
-        goBtn = new javax.swing.JButton();
-        errorLabel = new javax.swing.JLabel();
-        headerPanel = new javax.swing.JPanel();
-        jLabel4 = new javax.swing.JLabel();
-        numberLabel = new javax.swing.JLabel();
-
-        setLayout(new java.awt.BorderLayout());
-
-        jPanel1.setOpaque(false);
-
-        goBtn.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
-        goBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_run.png"))); // NOI18N
-        goBtn.setText("Generate projects");
-
-        errorLabel.setText("...");
-        errorLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
-        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
-        jPanel1.setLayout(jPanel1Layout);
-        jPanel1Layout.setHorizontalGroup(
-            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(goBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addContainerGap())
-        );
-        jPanel1Layout.setVerticalGroup(
-            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(goBtn)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addContainerGap())
-        );
-
-        add(jPanel1, java.awt.BorderLayout.CENTER);
-
-        jLabel4.setText("<html> Ready to go?");
-        jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
-        numberLabel.setText("4");
-
-        javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
-        headerPanel.setLayout(headerPanelLayout);
-        headerPanelLayout.setHorizontalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, headerPanelLayout.createSequentialGroup()
-                .addComponent(numberLabel)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE))
-        );
-        headerPanelLayout.setVerticalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
-            .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-        );
-
-        add(headerPanel, java.awt.BorderLayout.NORTH);
-    }// </editor-fold>//GEN-END:initComponents
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel errorLabel;
-    private javax.swing.JButton goBtn;
-    private javax.swing.JPanel headerPanel;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JPanel jPanel1;
-    private javax.swing.JLabel numberLabel;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               jPanel1 = new javax.swing.JPanel();
+               goBtn = new javax.swing.JButton();
+               errorLabel = new javax.swing.JLabel();
+               headerPanel = new javax.swing.JPanel();
+               jLabel4 = new javax.swing.JLabel();
+               numberLabel = new javax.swing.JLabel();
+
+               setLayout(new java.awt.BorderLayout());
+
+               jPanel1.setOpaque(false);
+
+               goBtn.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
+               goBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_run.png"))); // NOI18N
+               goBtn.setText("Generate projects");
+
+               errorLabel.setText("...");
+               errorLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+               javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+               jPanel1.setLayout(jPanel1Layout);
+               jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       jPanel1Layout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       jPanel1Layout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addComponent(goBtn, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)
+                                               .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)).addContainerGap()));
+               jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               jPanel1Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addComponent(goBtn)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addComponent(errorLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                               Short.MAX_VALUE).addContainerGap()));
+
+               add(jPanel1, java.awt.BorderLayout.CENTER);
+
+               jLabel4.setText("<html> Ready to go?");
+               jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+               numberLabel.setText("4");
+
+               javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
+               headerPanel.setLayout(headerPanelLayout);
+               headerPanelLayout.setHorizontalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               javax.swing.GroupLayout.Alignment.TRAILING,
+                               headerPanelLayout.createSequentialGroup().addComponent(numberLabel)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 163, Short.MAX_VALUE)));
+               headerPanelLayout.setVerticalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
+                       .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
+
+               add(headerPanel, java.awt.BorderLayout.NORTH);
+       }// </editor-fold>//GEN-END:initComponents
+
+       // Variables declaration - do not modify//GEN-BEGIN:variables
+       private javax.swing.JLabel errorLabel;
+       private javax.swing.JButton goBtn;
+       private javax.swing.JPanel headerPanel;
+       private javax.swing.JLabel jLabel4;
+       private javax.swing.JPanel jPanel1;
+       private javax.swing.JLabel numberLabel;
+       // End of variables declaration//GEN-END:variables
 
 }
index fbb41bd..ffcc7e0 100644 (file)
@@ -1,10 +1,6 @@
+
 package aurelienribon.libgdx.ui;
 
-import aurelienribon.libgdx.DownloadManager;
-import aurelienribon.libgdx.LibraryDef;
-import aurelienribon.libgdx.ui.dialogs.DownloadDialog;
-import aurelienribon.libgdx.ui.dialogs.LibraryInfoDialog;
-import aurelienribon.ui.css.Style;
 import java.awt.BorderLayout;
 import java.awt.Color;
 import java.awt.Dimension;
@@ -19,6 +15,7 @@ import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+
 import javax.swing.AbstractAction;
 import javax.swing.Action;
 import javax.swing.Box;
@@ -33,13 +30,18 @@ import javax.swing.JToolBar;
 import javax.swing.SwingConstants;
 import javax.swing.SwingUtilities;
 import javax.swing.filechooser.FileNameExtensionFilter;
+
 import org.apache.commons.io.FilenameUtils;
 import org.apache.commons.io.IOUtils;
+
 import res.Res;
+import aurelienribon.libgdx.DownloadManager;
+import aurelienribon.libgdx.LibraryDef;
+import aurelienribon.libgdx.ui.dialogs.DownloadDialog;
+import aurelienribon.libgdx.ui.dialogs.LibraryInfoDialog;
+import aurelienribon.ui.css.Style;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class LibrarySetupPanel extends javax.swing.JPanel {
        private static final Color LIB_FOUND_COLOR = new Color(0x008800);
        private static final Color LIB_NOTFOUND_COLOR = new Color(0x880000);
@@ -49,15 +51,35 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
        private final Map<String, JComponent> libsNamesCmps = new HashMap<String, JComponent>();
        private int count = 0;
 
-    public LibrarySetupPanel() {
-        initComponents();
+       public LibrarySetupPanel () {
+               initComponents();
 
                librariesScrollPane.getViewport().setOpaque(false);
 
-               libgdxInfoBtn.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {showInfo("libgdx");}});
-               libgdxBrowseBtn.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {browse("libgdx");}});
-               libgdxGetStableBtn.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {getStable("libgdx");}});
-               libgdxGetNightliesBtn.addActionListener(new ActionListener() {@Override public void actionPerformed(ActionEvent e) {getLatest("libgdx");}});
+               libgdxInfoBtn.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               showInfo("libgdx");
+                       }
+               });
+               libgdxBrowseBtn.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               browse("libgdx");
+                       }
+               });
+               libgdxGetStableBtn.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               getStable("libgdx");
+                       }
+               });
+               libgdxGetNightliesBtn.addActionListener(new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               getLatest("libgdx");
+                       }
+               });
 
                Style.registerCssClasses(headerPanel, ".header");
                Style.registerCssClasses(numberLabel, ".headerNumber");
@@ -67,14 +89,14 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                Style.registerCssClasses(legendLabel, ".legendLabel");
 
                try {
-                       //dlManager = new DownloadManager("http://www.aurelienribon.com/libgdx-setup/config.txt");
+                       // dlManager = new DownloadManager("http://www.aurelienribon.com/libgdx-setup/config.txt");
                        dlManager = new DownloadManager("http://libgdx.googlecode.com/svn/trunk/extensions/gdx-setup-ui/config/config.txt");
                } catch (MalformedURLException ex) {
                        System.err.println("[warning] Malformed url for the configuration file");
                }
-    }
+       }
 
-       public void init() {
+       public void init () {
                libsNamesCmps.put("libgdx", libgdxLabel);
                libgdxLabel.setForeground(LIB_NOTFOUND_COLOR);
 
@@ -89,7 +111,8 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                }
 
                dlManager.downloadConfigFile(new DownloadManager.Callback() {
-                       @Override public void completed() {
+                       @Override
+                       public void completed () {
                                System.out.println("Successfully retrieved the configuration file.");
 
                                if (Ctx.testLibUrl != null) {
@@ -101,9 +124,12 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                                        registerLibrary("__test_def__");
                                }
 
-                               for (String name : dlManager.getLibrariesNames()) downloadLibraryDef(name);
+                               for (String name : dlManager.getLibrariesNames())
+                                       downloadLibraryDef(name);
                        }
-                       @Override public void error() {
+
+                       @Override
+                       public void error () {
                                System.err.println("[warning] Cannot download the configuration file.");
                                librariesUpdateLabel.setText("Cannot download the configuration file");
                        }
@@ -114,24 +140,33 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
        // Initialization of libraries
        // -------------------------------------------------------------------------
 
-       private void downloadLibraryDef(final String libraryName) {
+       private void downloadLibraryDef (final String libraryName) {
                dlManager.downloadLibraryDef(libraryName, new DownloadManager.Callback() {
-                       @Override public void completed() {
+                       @Override
+                       public void completed () {
                                System.out.println("Successfully retrieved definition for library '" + libraryName + "'");
-                               SwingUtilities.invokeLater(new Runnable() {@Override public void run() {
-                                       registerLibrary(libraryName);
-                               }});
+                               SwingUtilities.invokeLater(new Runnable() {
+                                       @Override
+                                       public void run () {
+                                               registerLibrary(libraryName);
+                                       }
+                               });
                        }
-                       @Override public void error() {
+
+                       @Override
+                       public void error () {
                                System.err.println("[warning] Cannot download definition for library '" + libraryName + "'");
-                               SwingUtilities.invokeLater(new Runnable() {@Override public void run() {
-                                       registerLibrary(null);
-                               }});
+                               SwingUtilities.invokeLater(new Runnable() {
+                                       @Override
+                                       public void run () {
+                                               registerLibrary(null);
+                                       }
+                               });
                        }
                });
        }
 
-       private void registerLibrary(String libraryName) {
+       private void registerLibrary (String libraryName) {
                if (libraryName != null) {
                        Ctx.cfg.libs.add(libraryName, dlManager.getLibraryDef(libraryName));
                        Ctx.cfg.libs.setUsage(libraryName, libraryName.equals("libgdx"));
@@ -146,7 +181,8 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                        List<String> names = new ArrayList<String>(Ctx.cfg.libs.getNames());
 
                        Collections.sort(names, new Comparator<String>() {
-                               @Override public int compare(String o1, String o2) {
+                               @Override
+                               public int compare (String o1, String o2) {
                                        String name1 = Ctx.cfg.libs.getDef(o1).name;
                                        String name2 = Ctx.cfg.libs.getDef(o2).name;
                                        return name1.compareToIgnoreCase(name2);
@@ -169,22 +205,45 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                                        if (!Ctx.cfg.libs.getNames().contains(name)) msg += "'" + name + "', ";
                                }
                                sectionLabel2.setHorizontalTextPosition(SwingConstants.LEFT);
-                               sectionLabel2.setToolTipText(msg.substring(0, msg.length()-2));
+                               sectionLabel2.setToolTipText(msg.substring(0, msg.length() - 2));
                                sectionLabel2.setIcon(Res.getImage("gfx/ic_error.png"));
                        }
                }
        }
 
-       private void buildLibraryPanel(final String libraryName) {
-               ActionListener nameChkAL = new ActionListener() {@Override public void actionPerformed(ActionEvent e) {
-                       Ctx.cfg.libs.setUsage(libraryName, ((JCheckBox) e.getSource()).isSelected());
-                       Ctx.fireConfigChanged();
-               }};
+       private void buildLibraryPanel (final String libraryName) {
+               ActionListener nameChkAL = new ActionListener() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               Ctx.cfg.libs.setUsage(libraryName, ((JCheckBox)e.getSource()).isSelected());
+                               Ctx.fireConfigChanged();
+                       }
+               };
 
-               Action infoAction = new AbstractAction() {@Override public void actionPerformed(ActionEvent e) {showInfo(libraryName);}};
-               Action browseAction = new AbstractAction() {@Override public void actionPerformed(ActionEvent e) {browse(libraryName);}};
-               Action getStableAction = new AbstractAction() {@Override public void actionPerformed(ActionEvent e) {getStable(libraryName);}};
-               Action getLatestAction = new AbstractAction() {@Override public void actionPerformed(ActionEvent e) {getLatest(libraryName);}};
+               Action infoAction = new AbstractAction() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               showInfo(libraryName);
+                       }
+               };
+               Action browseAction = new AbstractAction() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               browse(libraryName);
+                       }
+               };
+               Action getStableAction = new AbstractAction() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               getStable(libraryName);
+                       }
+               };
+               Action getLatestAction = new AbstractAction() {
+                       @Override
+                       public void actionPerformed (ActionEvent e) {
+                               getLatest(libraryName);
+                       }
+               };
 
                LibraryDef def = Ctx.cfg.libs.getDef(libraryName);
 
@@ -208,8 +267,14 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                toolBar.add(Box.createHorizontalGlue());
                toolBar.add(infoBtn);
                toolBar.add(browseBtn);
-               if (def.stableUrl != null) toolBar.add(getStableBtn); else toolBar.add(Box.createHorizontalStrut(libgdxGetStableBtn.getWidth()));
-               if (def.latestUrl != null) toolBar.add(getLatestBtn); else toolBar.add(Box.createHorizontalStrut(libgdxGetNightliesBtn.getWidth()));
+               if (def.stableUrl != null)
+                       toolBar.add(getStableBtn);
+               else
+                       toolBar.add(Box.createHorizontalStrut(libgdxGetStableBtn.getWidth()));
+               if (def.latestUrl != null)
+                       toolBar.add(getLatestBtn);
+               else
+                       toolBar.add(Box.createHorizontalStrut(libgdxGetNightliesBtn.getWidth()));
 
                JPanel leftPanel = new JPanel(new BorderLayout());
                leftPanel.setOpaque(false);
@@ -228,14 +293,15 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                libsNamesCmps.put(libraryName, nameChk);
        }
 
-       private void preselectLibraryArchive(String libraryName) {
+       private void preselectLibraryArchive (String libraryName) {
                LibraryDef def = Ctx.cfg.libs.getDef(libraryName);
                String stableName = FilenameUtils.getName(def.stableUrl);
                String latestName = FilenameUtils.getName(def.latestUrl);
 
                for (File file : new File(".").listFiles()) {
                        if (file.isFile()) {
-                               if (file.getName().equals(latestName)) select(libraryName, file);
+                               if (file.getName().equals(latestName))
+                                       select(libraryName, file);
                                else if (file.getName().equals(stableName)) select(libraryName, file);
                        }
                }
@@ -245,17 +311,17 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
        // Actions
        // -------------------------------------------------------------------------
 
-       private void showInfo(String libraryName) {
-               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(this);
+       private void showInfo (String libraryName) {
+               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(this);
                LibraryInfoDialog dialog = new LibraryInfoDialog(frame, libraryName);
                dialog.setLocationRelativeTo(frame);
                dialog.setVisible(true);
        }
 
-       private void browse(String libraryName) {
+       private void browse (String libraryName) {
                File file = libsSelectedFiles.get(libraryName);
                String path = file != null ? file.getPath() : ".";
-               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(this);
+               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(this);
 
                JFileChooser chooser = new JFileChooser(new File(path));
                chooser.setFileFilter(new FileNameExtensionFilter("Zip files (*.zip)", "zip"));
@@ -266,32 +332,35 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
                }
        }
 
-       private void getStable(String libraryName) {
+       private void getStable (String libraryName) {
                String input = Ctx.cfg.libs.getDef(libraryName).stableUrl;
                String output = FilenameUtils.getName(input);
                getFile(libraryName, input, output);
        }
 
-       private void getLatest(String libraryName) {
+       private void getLatest (String libraryName) {
                String input = Ctx.cfg.libs.getDef(libraryName).latestUrl;
                String output = FilenameUtils.getName(input);
                getFile(libraryName, input, output);
        }
 
-       private void getFile(final String libraryName, String input, String output) {
+       private void getFile (final String libraryName, String input, String output) {
                final File zipFile = new File(output);
 
                DownloadDialog.Callback callback = new DownloadDialog.Callback() {
-                       @Override public void completed() {select(libraryName, zipFile);}
+                       @Override
+                       public void completed () {
+                               select(libraryName, zipFile);
+                       }
                };
 
-               JFrame frame = (JFrame) SwingUtilities.getWindowAncestor(this);
+               JFrame frame = (JFrame)SwingUtilities.getWindowAncestor(this);
                DownloadDialog dialog = new DownloadDialog(frame, callback, input, output);
                dialog.setLocationRelativeTo(frame);
                dialog.setVisible(true);
        }
 
-       private void select(String libraryName, File zipFile) {
+       private void select (String libraryName, File zipFile) {
                libsSelectedFiles.put(libraryName, zipFile);
                Ctx.cfg.libs.setPath(libraryName, zipFile.getPath());
 
@@ -305,175 +374,175 @@ public class LibrarySetupPanel extends javax.swing.JPanel {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        headerPanel = new javax.swing.JPanel();
-        jLabel4 = new javax.swing.JLabel();
-        numberLabel = new javax.swing.JLabel();
-        jPanel3 = new javax.swing.JPanel();
-        sectionLabel1 = new javax.swing.JLabel();
-        libgdxPanel = new javax.swing.JPanel();
-        libgdxLabel = new javax.swing.JLabel();
-        libgdxToolBar = new javax.swing.JToolBar();
-        libgdxInfoBtn = new javax.swing.JButton();
-        libgdxBrowseBtn = new javax.swing.JButton();
-        libgdxGetStableBtn = new javax.swing.JButton();
-        libgdxGetNightliesBtn = new javax.swing.JButton();
-        sectionLabel2 = new javax.swing.JLabel();
-        legendPanel = new aurelienribon.ui.components.PaintedPanel();
-        legendLabel = new javax.swing.JLabel();
-        librariesScrollPane = new javax.swing.JScrollPane();
-        librariesPanel = new javax.swing.JPanel();
-        librariesUpdateLabel = new javax.swing.JLabel();
-
-        setLayout(new java.awt.BorderLayout());
-
-        jLabel4.setText("<html> Select the libraries you want to include. Direct downloads are available to stable and nightly releases.");
-        jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
-        numberLabel.setText("2");
-
-        javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
-        headerPanel.setLayout(headerPanelLayout);
-        headerPanelLayout.setHorizontalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, headerPanelLayout.createSequentialGroup()
-                .addComponent(numberLabel)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))
-        );
-        headerPanelLayout.setVerticalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
-            .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-        );
-
-        add(headerPanel, java.awt.BorderLayout.NORTH);
-
-        jPanel3.setOpaque(false);
-
-        sectionLabel1.setText("Required");
-
-        libgdxPanel.setOpaque(false);
-
-        libgdxLabel.setText("LibGDX");
-
-        libgdxToolBar.setFloatable(false);
-        libgdxToolBar.setRollover(true);
-
-        libgdxInfoBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_info.png"))); // NOI18N
-        libgdxInfoBtn.setToolTipText("Information");
-        libgdxToolBar.add(libgdxInfoBtn);
-
-        libgdxBrowseBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_browse.png"))); // NOI18N
-        libgdxBrowseBtn.setToolTipText("Browse to select the archive");
-        libgdxToolBar.add(libgdxBrowseBtn);
-
-        libgdxGetStableBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_download_stable.png"))); // NOI18N
-        libgdxGetStableBtn.setToolTipText("Download latest stable version");
-        libgdxToolBar.add(libgdxGetStableBtn);
-
-        libgdxGetNightliesBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_download_nightlies.png"))); // NOI18N
-        libgdxGetNightliesBtn.setToolTipText("Download latest nightlies version");
-        libgdxToolBar.add(libgdxGetNightliesBtn);
-
-        javax.swing.GroupLayout libgdxPanelLayout = new javax.swing.GroupLayout(libgdxPanel);
-        libgdxPanel.setLayout(libgdxPanelLayout);
-        libgdxPanelLayout.setHorizontalGroup(
-            libgdxPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, libgdxPanelLayout.createSequentialGroup()
-                .addComponent(libgdxLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(libgdxToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-        );
-        libgdxPanelLayout.setVerticalGroup(
-            libgdxPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(libgdxLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, libgdxPanelLayout.createSequentialGroup()
-                .addGap(0, 0, Short.MAX_VALUE)
-                .addComponent(libgdxToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))
-        );
-
-        sectionLabel2.setText("Third-party");
-
-        legendLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/legend.png"))); // NOI18N
-
-        javax.swing.GroupLayout legendPanelLayout = new javax.swing.GroupLayout(legendPanel);
-        legendPanel.setLayout(legendPanelLayout);
-        legendPanelLayout.setHorizontalGroup(
-            legendPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(legendPanelLayout.createSequentialGroup()
-                .addComponent(legendLabel)
-                .addGap(0, 47, Short.MAX_VALUE))
-        );
-        legendPanelLayout.setVerticalGroup(
-            legendPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(legendLabel)
-        );
-
-        librariesScrollPane.setOpaque(false);
-
-        librariesPanel.setOpaque(false);
-        librariesPanel.setLayout(new javax.swing.BoxLayout(librariesPanel, javax.swing.BoxLayout.Y_AXIS));
-
-        librariesUpdateLabel.setText("Retrieving libraries: ...");
-        librariesPanel.add(librariesUpdateLabel);
-
-        librariesScrollPane.setViewportView(librariesPanel);
-
-        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
-        jPanel3.setLayout(jPanel3Layout);
-        jPanel3Layout.setHorizontalGroup(
-            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(legendPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .addGroup(jPanel3Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(libgdxPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(sectionLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(sectionLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(librariesScrollPane))
-                .addContainerGap())
-        );
-        jPanel3Layout.setVerticalGroup(
-            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel3Layout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(sectionLabel1)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(libgdxPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addGap(20, 20, 20)
-                .addComponent(sectionLabel2)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(librariesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(legendPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-        );
-
-        add(jPanel3, java.awt.BorderLayout.CENTER);
-    }// </editor-fold>//GEN-END:initComponents
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JPanel headerPanel;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JPanel jPanel3;
-    private javax.swing.JLabel legendLabel;
-    private aurelienribon.ui.components.PaintedPanel legendPanel;
-    private javax.swing.JButton libgdxBrowseBtn;
-    private javax.swing.JButton libgdxGetNightliesBtn;
-    private javax.swing.JButton libgdxGetStableBtn;
-    private javax.swing.JButton libgdxInfoBtn;
-    private javax.swing.JLabel libgdxLabel;
-    private javax.swing.JPanel libgdxPanel;
-    private javax.swing.JToolBar libgdxToolBar;
-    private javax.swing.JPanel librariesPanel;
-    private javax.swing.JScrollPane librariesScrollPane;
-    private javax.swing.JLabel librariesUpdateLabel;
-    private javax.swing.JLabel numberLabel;
-    private javax.swing.JLabel sectionLabel1;
-    private javax.swing.JLabel sectionLabel2;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               headerPanel = new javax.swing.JPanel();
+               jLabel4 = new javax.swing.JLabel();
+               numberLabel = new javax.swing.JLabel();
+               jPanel3 = new javax.swing.JPanel();
+               sectionLabel1 = new javax.swing.JLabel();
+               libgdxPanel = new javax.swing.JPanel();
+               libgdxLabel = new javax.swing.JLabel();
+               libgdxToolBar = new javax.swing.JToolBar();
+               libgdxInfoBtn = new javax.swing.JButton();
+               libgdxBrowseBtn = new javax.swing.JButton();
+               libgdxGetStableBtn = new javax.swing.JButton();
+               libgdxGetNightliesBtn = new javax.swing.JButton();
+               sectionLabel2 = new javax.swing.JLabel();
+               legendPanel = new aurelienribon.ui.components.PaintedPanel();
+               legendLabel = new javax.swing.JLabel();
+               librariesScrollPane = new javax.swing.JScrollPane();
+               librariesPanel = new javax.swing.JPanel();
+               librariesUpdateLabel = new javax.swing.JLabel();
+
+               setLayout(new java.awt.BorderLayout());
+
+               jLabel4
+                       .setText("<html> Select the libraries you want to include. Direct downloads are available to stable and nightly releases.");
+               jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+               numberLabel.setText("2");
+
+               javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
+               headerPanel.setLayout(headerPanelLayout);
+               headerPanelLayout.setHorizontalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               javax.swing.GroupLayout.Alignment.TRAILING,
+                               headerPanelLayout.createSequentialGroup().addComponent(numberLabel)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)));
+               headerPanelLayout.setVerticalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
+                       .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
+
+               add(headerPanel, java.awt.BorderLayout.NORTH);
+
+               jPanel3.setOpaque(false);
+
+               sectionLabel1.setText("Required");
+
+               libgdxPanel.setOpaque(false);
+
+               libgdxLabel.setText("LibGDX");
+
+               libgdxToolBar.setFloatable(false);
+               libgdxToolBar.setRollover(true);
+
+               libgdxInfoBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_info.png"))); // NOI18N
+               libgdxInfoBtn.setToolTipText("Information");
+               libgdxToolBar.add(libgdxInfoBtn);
+
+               libgdxBrowseBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_browse.png"))); // NOI18N
+               libgdxBrowseBtn.setToolTipText("Browse to select the archive");
+               libgdxToolBar.add(libgdxBrowseBtn);
+
+               libgdxGetStableBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_download_stable.png"))); // NOI18N
+               libgdxGetStableBtn.setToolTipText("Download latest stable version");
+               libgdxToolBar.add(libgdxGetStableBtn);
+
+               libgdxGetNightliesBtn.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic_download_nightlies.png"))); // NOI18N
+               libgdxGetNightliesBtn.setToolTipText("Download latest nightlies version");
+               libgdxToolBar.add(libgdxGetNightliesBtn);
+
+               javax.swing.GroupLayout libgdxPanelLayout = new javax.swing.GroupLayout(libgdxPanel);
+               libgdxPanel.setLayout(libgdxPanelLayout);
+               libgdxPanelLayout.setHorizontalGroup(libgdxPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               javax.swing.GroupLayout.Alignment.TRAILING,
+                               libgdxPanelLayout
+                                       .createSequentialGroup()
+                                       .addComponent(libgdxLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                               Short.MAX_VALUE)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addComponent(libgdxToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                               javax.swing.GroupLayout.PREFERRED_SIZE)));
+               libgdxPanelLayout.setVerticalGroup(libgdxPanelLayout
+                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(libgdxLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                       .addGroup(
+                               javax.swing.GroupLayout.Alignment.TRAILING,
+                               libgdxPanelLayout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
+                                       .addComponent(libgdxToolBar, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)));
+
+               sectionLabel2.setText("Third-party");
+
+               legendLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/legend.png"))); // NOI18N
+
+               javax.swing.GroupLayout legendPanelLayout = new javax.swing.GroupLayout(legendPanel);
+               legendPanel.setLayout(legendPanelLayout);
+               legendPanelLayout.setHorizontalGroup(legendPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(legendPanelLayout.createSequentialGroup().addComponent(legendLabel).addGap(0, 47, Short.MAX_VALUE)));
+               legendPanelLayout.setVerticalGroup(legendPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(legendLabel));
+
+               librariesScrollPane.setOpaque(false);
+
+               librariesPanel.setOpaque(false);
+               librariesPanel.setLayout(new javax.swing.BoxLayout(librariesPanel, javax.swing.BoxLayout.Y_AXIS));
+
+               librariesUpdateLabel.setText("Retrieving libraries: ...");
+               librariesPanel.add(librariesUpdateLabel);
+
+               librariesScrollPane.setViewportView(librariesPanel);
+
+               javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
+               jPanel3.setLayout(jPanel3Layout);
+               jPanel3Layout.setHorizontalGroup(jPanel3Layout
+                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(legendPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                       .addGroup(
+                               jPanel3Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               jPanel3Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                       .addComponent(libgdxPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                               Short.MAX_VALUE)
+                                                       .addComponent(sectionLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                               Short.MAX_VALUE)
+                                                       .addComponent(sectionLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                               Short.MAX_VALUE).addComponent(librariesScrollPane)).addContainerGap()));
+               jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       jPanel3Layout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addComponent(sectionLabel1)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addComponent(libgdxPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE)
+                               .addGap(20, 20, 20)
+                               .addComponent(sectionLabel2)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addComponent(librariesScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 228, Short.MAX_VALUE)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addComponent(legendPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE)));
+
+               add(jPanel3, java.awt.BorderLayout.CENTER);
+       }// </editor-fold>//GEN-END:initComponents
+
+       // Variables declaration - do not modify//GEN-BEGIN:variables
+       private javax.swing.JPanel headerPanel;
+       private javax.swing.JLabel jLabel4;
+       private javax.swing.JPanel jPanel3;
+       private javax.swing.JLabel legendLabel;
+       private aurelienribon.ui.components.PaintedPanel legendPanel;
+       private javax.swing.JButton libgdxBrowseBtn;
+       private javax.swing.JButton libgdxGetNightliesBtn;
+       private javax.swing.JButton libgdxGetStableBtn;
+       private javax.swing.JButton libgdxInfoBtn;
+       private javax.swing.JLabel libgdxLabel;
+       private javax.swing.JPanel libgdxPanel;
+       private javax.swing.JToolBar libgdxToolBar;
+       private javax.swing.JPanel librariesPanel;
+       private javax.swing.JScrollPane librariesScrollPane;
+       private javax.swing.JLabel librariesUpdateLabel;
+       private javax.swing.JLabel numberLabel;
+       private javax.swing.JLabel sectionLabel1;
+       private javax.swing.JLabel sectionLabel2;
+       // End of variables declaration//GEN-END:variables
 
 }
index c1dbe81..e0261e8 100644 (file)
@@ -1,9 +1,6 @@
+
 package aurelienribon.libgdx.ui;
 
-import aurelienribon.ui.components.PaintedPanel;
-import aurelienribon.ui.css.Style;
-import aurelienribon.utils.HttpUtils;
-import aurelienribon.utils.ParseUtils;
 import java.awt.Desktop;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
@@ -16,14 +13,17 @@ import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.List;
+
 import res.Res;
+import aurelienribon.ui.components.PaintedPanel;
+import aurelienribon.ui.css.Style;
+import aurelienribon.utils.HttpUtils;
+import aurelienribon.utils.ParseUtils;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class MainPanel extends PaintedPanel {
-    public MainPanel() {
-        initComponents();
+       public MainPanel () {
+               initComponents();
 
                Style.registerCssClasses(this, ".rootPanel");
                Style.registerCssClasses(librarySetupPanel, ".groupPanel", "#librarySetupPanel");
@@ -37,29 +37,43 @@ public class MainPanel extends PaintedPanel {
                goPanel.init();
 
                checkUpdates();
-    }
+       }
 
-       private void checkUpdates() {
+       private void checkUpdates () {
                final String version = "2.0.2";
                versionLabel.setText("v" + version + " (...)");
 
                URL tmpUrl;
-               //try {tmpUrl = new URL("http://www.aurelienribon.com/libgdx-setup/config.txt");}
-               try {tmpUrl = new URL("http://libgdx.badlogicgames.com/nightlies/config/config.txt");}
-               catch (MalformedURLException ex) {throw new RuntimeException(ex);}
+               // try {tmpUrl = new URL("http://www.aurelienribon.com/libgdx-setup/config.txt");}
+               try {
+                       tmpUrl = new URL("http://libgdx.badlogicgames.com/nightlies/config/config.txt");
+               } catch (MalformedURLException ex) {
+                       throw new RuntimeException(ex);
+               }
 
                final URL url = tmpUrl;
                final ByteArrayOutputStream stream = new ByteArrayOutputStream();
 
                final HttpUtils.Callback callback = new HttpUtils.Callback() {
-                       @Override public void canceled() {}
-                       @Override public void updated(int length, int totalLength) {}
-                       @Override public void completed() {
-                               try {testUpdate(version, stream.toString("UTF-8"));}
-                               catch (UnsupportedEncodingException ex) {System.err.println("[error] " + ex.getMessage());
+                       @Override
+                       public void canceled () {
+                       }
+
+                       @Override
+                       public void updated (int length, int totalLength) {
+                       }
+
+                       @Override
+                       public void completed () {
+                               try {
+                                       testUpdate(version, stream.toString("UTF-8"));
+                               } catch (UnsupportedEncodingException ex) {
+                                       System.err.println("[error] " + ex.getMessage());
                                }
                        }
-                       @Override public void error(IOException ex) {
+
+                       @Override
+                       public void error (IOException ex) {
                                versionLabel.setText("v" + version + " (error1)");
                                Style.registerCssClasses(versionLabel, ".versionLabelError");
                                Style.apply(versionLabel, new Style(Res.getUrl("css/style.css")));
@@ -69,12 +83,13 @@ public class MainPanel extends PaintedPanel {
                HttpUtils.downloadAsync(url, stream, callback);
        }
 
-       private void testUpdate(String version, String str) {
+       private void testUpdate (String version, String str) {
                List<String> versions = ParseUtils.parseBlockAsList(str, "versions");
                int versionIdx = versions.indexOf(version);
 
                MouseListener mouseListener = new MouseAdapter() {
-                       @Override public void mousePressed(MouseEvent e) {
+                       @Override
+                       public void mousePressed (MouseEvent e) {
                                if (Desktop.isDesktopSupported()) {
                                        try {
                                                URI uri = new URI("http://code.google.com/p/libgdx/");
@@ -107,103 +122,99 @@ public class MainPanel extends PaintedPanel {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        groupsWrapper = new javax.swing.JPanel();
-        jPanel4 = new javax.swing.JPanel();
-        configPanel = new aurelienribon.libgdx.ui.ConfigPanel();
-        logoLabel = new javax.swing.JLabel();
-        versionLabel = new javax.swing.JLabel();
-        jPanel3 = new javax.swing.JPanel();
-        librarySetupPanel = new aurelienribon.libgdx.ui.LibrarySetupPanel();
-        jPanel1 = new javax.swing.JPanel();
-        goPanel = new aurelienribon.libgdx.ui.GoPanel();
-        resultPanel = new aurelienribon.libgdx.ui.ResultPanel();
-
-        setLayout(new java.awt.BorderLayout());
-
-        groupsWrapper.setBorder(javax.swing.BorderFactory.createEmptyBorder(15, 15, 15, 15));
-        groupsWrapper.setOpaque(false);
-        groupsWrapper.setLayout(new java.awt.GridLayout(1, 0, 15, 0));
-
-        jPanel4.setOpaque(false);
-
-        logoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/logo.png"))); // NOI18N
-
-        versionLabel.setText("v1.0.0");
-
-        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
-        jPanel4.setLayout(jPanel4Layout);
-        jPanel4Layout.setHorizontalGroup(
-            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel4Layout.createSequentialGroup()
-                .addComponent(logoLabel)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addComponent(versionLabel))
-            .addComponent(configPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
-        );
-        jPanel4Layout.setVerticalGroup(
-            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel4Layout.createSequentialGroup()
-                .addComponent(configPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 134, Short.MAX_VALUE)
-                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(logoLabel, javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(versionLabel, javax.swing.GroupLayout.Alignment.TRAILING)))
-        );
-
-        groupsWrapper.add(jPanel4);
-
-        jPanel3.setOpaque(false);
-
-        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
-        jPanel3.setLayout(jPanel3Layout);
-        jPanel3Layout.setHorizontalGroup(
-            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(librarySetupPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
-        );
-        jPanel3Layout.setVerticalGroup(
-            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(librarySetupPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE)
-        );
-
-        groupsWrapper.add(jPanel3);
-
-        jPanel1.setOpaque(false);
-
-        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
-        jPanel1.setLayout(jPanel1Layout);
-        jPanel1Layout.setHorizontalGroup(
-            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(resultPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
-            .addComponent(goPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
-        );
-        jPanel1Layout.setVerticalGroup(
-            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(jPanel1Layout.createSequentialGroup()
-                .addComponent(resultPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
-                .addGap(18, 18, 18)
-                .addComponent(goPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-        );
-
-        groupsWrapper.add(jPanel1);
-
-        add(groupsWrapper, java.awt.BorderLayout.CENTER);
-    }// </editor-fold>//GEN-END:initComponents
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private aurelienribon.libgdx.ui.ConfigPanel configPanel;
-    private aurelienribon.libgdx.ui.GoPanel goPanel;
-    private javax.swing.JPanel groupsWrapper;
-    private javax.swing.JPanel jPanel1;
-    private javax.swing.JPanel jPanel3;
-    private javax.swing.JPanel jPanel4;
-    private aurelienribon.libgdx.ui.LibrarySetupPanel librarySetupPanel;
-    private javax.swing.JLabel logoLabel;
-    private aurelienribon.libgdx.ui.ResultPanel resultPanel;
-    private javax.swing.JLabel versionLabel;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               groupsWrapper = new javax.swing.JPanel();
+               jPanel4 = new javax.swing.JPanel();
+               configPanel = new aurelienribon.libgdx.ui.ConfigPanel();
+               logoLabel = new javax.swing.JLabel();
+               versionLabel = new javax.swing.JLabel();
+               jPanel3 = new javax.swing.JPanel();
+               librarySetupPanel = new aurelienribon.libgdx.ui.LibrarySetupPanel();
+               jPanel1 = new javax.swing.JPanel();
+               goPanel = new aurelienribon.libgdx.ui.GoPanel();
+               resultPanel = new aurelienribon.libgdx.ui.ResultPanel();
+
+               setLayout(new java.awt.BorderLayout());
+
+               groupsWrapper.setBorder(javax.swing.BorderFactory.createEmptyBorder(15, 15, 15, 15));
+               groupsWrapper.setOpaque(false);
+               groupsWrapper.setLayout(new java.awt.GridLayout(1, 0, 15, 0));
+
+               jPanel4.setOpaque(false);
+
+               logoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/logo.png"))); // NOI18N
+
+               versionLabel.setText("v1.0.0");
+
+               javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
+               jPanel4.setLayout(jPanel4Layout);
+               jPanel4Layout.setHorizontalGroup(jPanel4Layout
+                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               jPanel4Layout
+                                       .createSequentialGroup()
+                                       .addComponent(logoLabel)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                               Short.MAX_VALUE).addComponent(versionLabel))
+                       .addComponent(configPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE));
+               jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       jPanel4Layout
+                               .createSequentialGroup()
+                               .addComponent(configPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 134, Short.MAX_VALUE)
+                               .addGroup(
+                                       jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addComponent(logoLabel, javax.swing.GroupLayout.Alignment.TRAILING)
+                                               .addComponent(versionLabel, javax.swing.GroupLayout.Alignment.TRAILING))));
+
+               groupsWrapper.add(jPanel4);
+
+               jPanel3.setOpaque(false);
+
+               javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
+               jPanel3.setLayout(jPanel3Layout);
+               jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
+                       librarySetupPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE));
+               jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(
+                       librarySetupPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE));
+
+               groupsWrapper.add(jPanel3);
+
+               jPanel1.setOpaque(false);
+
+               javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
+               jPanel1.setLayout(jPanel1Layout);
+               jPanel1Layout.setHorizontalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(resultPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE)
+                       .addComponent(goPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 362, Short.MAX_VALUE));
+               jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       jPanel1Layout
+                               .createSequentialGroup()
+                               .addComponent(resultPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
+                               .addGap(18, 18, 18)
+                               .addComponent(goPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE)));
+
+               groupsWrapper.add(jPanel1);
+
+               add(groupsWrapper, java.awt.BorderLayout.CENTER);
+       }// </editor-fold>//GEN-END:initComponents
+
+       // Variables declaration - do not modify//GEN-BEGIN:variables
+       private aurelienribon.libgdx.ui.ConfigPanel configPanel;
+       private aurelienribon.libgdx.ui.GoPanel goPanel;
+       private javax.swing.JPanel groupsWrapper;
+       private javax.swing.JPanel jPanel1;
+       private javax.swing.JPanel jPanel3;
+       private javax.swing.JPanel jPanel4;
+       private aurelienribon.libgdx.ui.LibrarySetupPanel librarySetupPanel;
+       private javax.swing.JLabel logoLabel;
+       private aurelienribon.libgdx.ui.ResultPanel resultPanel;
+       private javax.swing.JLabel versionLabel;
+       // End of variables declaration//GEN-END:variables
 
 }
index 4e43ea0..a105fd2 100644 (file)
@@ -1,69 +1,65 @@
+
 package aurelienribon.libgdx.ui;
 
 import aurelienribon.ui.css.Style;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ResultPanel extends javax.swing.JPanel {
-    public ResultPanel() {
-        initComponents();
+       public ResultPanel () {
+               initComponents();
                Style.registerCssClasses(headerPanel, ".header");
                Style.registerCssClasses(numberLabel, ".headerNumber");
 
                jScrollPane1.setOpaque(false);
                jScrollPane1.getViewport().setOpaque(false);
-    }
+       }
 
        // -------------------------------------------------------------------------
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        headerPanel = new javax.swing.JPanel();
-        jLabel4 = new javax.swing.JLabel();
-        numberLabel = new javax.swing.JLabel();
-        jScrollPane1 = new javax.swing.JScrollPane();
-        resultTree1 = new aurelienribon.libgdx.ui.ResultTree();
-
-        setLayout(new java.awt.BorderLayout());
-
-        jLabel4.setText("<html> Virtual view of the file tree that will be generated.");
-        jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
-        numberLabel.setText("3");
-
-        javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
-        headerPanel.setLayout(headerPanelLayout);
-        headerPanelLayout.setHorizontalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, headerPanelLayout.createSequentialGroup()
-                .addComponent(numberLabel)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE))
-        );
-        headerPanelLayout.setVerticalGroup(
-            headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jLabel4)
-            .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-        );
-
-        add(headerPanel, java.awt.BorderLayout.NORTH);
-
-        jScrollPane1.setViewportView(resultTree1);
-
-        add(jScrollPane1, java.awt.BorderLayout.CENTER);
-    }// </editor-fold>//GEN-END:initComponents
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JPanel headerPanel;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JScrollPane jScrollPane1;
-    private javax.swing.JLabel numberLabel;
-    private aurelienribon.libgdx.ui.ResultTree resultTree1;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               headerPanel = new javax.swing.JPanel();
+               jLabel4 = new javax.swing.JLabel();
+               numberLabel = new javax.swing.JLabel();
+               jScrollPane1 = new javax.swing.JScrollPane();
+               resultTree1 = new aurelienribon.libgdx.ui.ResultTree();
+
+               setLayout(new java.awt.BorderLayout());
+
+               jLabel4.setText("<html> Virtual view of the file tree that will be generated.");
+               jLabel4.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+               numberLabel.setText("3");
+
+               javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
+               headerPanel.setLayout(headerPanelLayout);
+               headerPanelLayout.setHorizontalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               javax.swing.GroupLayout.Alignment.TRAILING,
+                               headerPanelLayout.createSequentialGroup().addComponent(numberLabel)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)));
+               headerPanelLayout.setVerticalGroup(headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(jLabel4)
+                       .addComponent(numberLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
+
+               add(headerPanel, java.awt.BorderLayout.NORTH);
+
+               jScrollPane1.setViewportView(resultTree1);
+
+               add(jScrollPane1, java.awt.BorderLayout.CENTER);
+       }// </editor-fold>//GEN-END:initComponents
+
+       // Variables declaration - do not modify//GEN-BEGIN:variables
+       private javax.swing.JPanel headerPanel;
+       private javax.swing.JLabel jLabel4;
+       private javax.swing.JScrollPane jScrollPane1;
+       private javax.swing.JLabel numberLabel;
+       private aurelienribon.libgdx.ui.ResultTree resultTree1;
+       // End of variables declaration//GEN-END:variables
 
 }
index f19f1c1..a0da8f5 100644 (file)
@@ -1,29 +1,31 @@
+
 package aurelienribon.libgdx.ui;
 
-import aurelienribon.libgdx.LibraryDef;
 import java.awt.Component;
 import java.io.IOException;
 import java.util.Map;
 import java.util.TreeMap;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
+
 import javax.swing.JLabel;
 import javax.swing.JTree;
 import javax.swing.border.EmptyBorder;
 import javax.swing.tree.DefaultMutableTreeNode;
 import javax.swing.tree.DefaultTreeModel;
 import javax.swing.tree.TreeCellRenderer;
+
 import org.apache.commons.io.FilenameUtils;
+
 import res.Res;
+import aurelienribon.libgdx.LibraryDef;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ResultTree extends JTree {
        private final Map<String, DefaultMutableTreeNode> nodes = new TreeMap<String, DefaultMutableTreeNode>();
        private final DefaultMutableTreeNode rootNode = new DefaultMutableTreeNode();
 
-       public ResultTree() {
+       public ResultTree () {
                setBorder(new EmptyBorder(5, 5, 5, 5));
                setRootVisible(false);
                setShowsRootHandles(true);
@@ -31,7 +33,8 @@ public class ResultTree extends JTree {
                setOpaque(false);
 
                Ctx.listeners.add(new Ctx.Listener() {
-                       @Override public void configChanged() {
+                       @Override
+                       public void configChanged () {
                                update();
                        }
                });
@@ -40,7 +43,7 @@ public class ResultTree extends JTree {
                update();
        }
 
-       private void build() {
+       private void build () {
                try {
                        ZipInputStream zis = new ZipInputStream(Res.getStream("projects.zip"));
                        ZipEntry entry;
@@ -48,7 +51,7 @@ public class ResultTree extends JTree {
                        while ((entry = zis.getNextEntry()) != null) {
                                String name = entry.getName();
                                name = entry.isDirectory() ? "#DIR#" + name : name; // this makes name sorting easier :p
-                               name = entry.isDirectory() ? name.substring(0, name.length()-1) : name;
+                               name = entry.isDirectory() ? name.substring(0, name.length() - 1) : name;
 
                                DefaultMutableTreeNode node = new DefaultMutableTreeNode(name);
                                nodes.put(name, node);
@@ -59,13 +62,15 @@ public class ResultTree extends JTree {
                        for (String name : nodes.keySet()) {
                                String pName = name.startsWith("#DIR#") ? name : "#DIR#" + name;
                                pName = FilenameUtils.getPath(pName);
-                               pName = pName.endsWith("/") ? pName.substring(0, pName.length()-1) : pName;
+                               pName = pName.endsWith("/") ? pName.substring(0, pName.length() - 1) : pName;
 
                                DefaultMutableTreeNode node = nodes.get(name);
                                DefaultMutableTreeNode pNode = nodes.get(pName);
 
-                               if (pNode != null) pNode.add(node);
-                               else rootNode.add(node);
+                               if (pNode != null)
+                                       pNode.add(node);
+                               else
+                                       rootNode.add(node);
                        }
 
                } catch (IOException ex) {
@@ -73,7 +78,7 @@ public class ResultTree extends JTree {
                }
        }
 
-       private void update() {
+       private void update () {
                DefaultMutableTreeNode commonPrjNode = nodes.get("#DIR#prj-common");
                DefaultMutableTreeNode desktopPrjNode = nodes.get("#DIR#prj-desktop");
                DefaultMutableTreeNode androidPrjNode = nodes.get("#DIR#prj-android");
@@ -91,7 +96,7 @@ public class ResultTree extends JTree {
                setModel(new DefaultTreeModel(rootNode));
        }
 
-       private void updateSrc() {
+       private void updateSrc () {
                DefaultMutableTreeNode previousNode;
 
                // common
@@ -181,7 +186,7 @@ public class ResultTree extends JTree {
                }
        }
 
-       private void updateLibs() {
+       private void updateLibs () {
                DefaultMutableTreeNode commonLibsNode = nodes.get("#DIR#prj-common/libs");
                DefaultMutableTreeNode desktopLibsNode = nodes.get("#DIR#prj-desktop/libs");
                DefaultMutableTreeNode androidLibsNode = nodes.get("#DIR#prj-android/libs");
@@ -195,30 +200,38 @@ public class ResultTree extends JTree {
                for (String libraryName : Ctx.cfg.libs.getNames()) {
                        if (Ctx.cfg.libs.isUsed(libraryName)) {
                                LibraryDef def = Ctx.cfg.libs.getDef(libraryName);
-                               for (String path : def.libsCommon) pathToNodes(path, commonLibsNode);
-                               for (String path : def.libsDesktop) pathToNodes(path, desktopLibsNode);
-                               for (String path : def.libsAndroid) pathToNodes(path, androidLibsNode);
-                               for (String path : def.libsHtml) pathToNodes(path, htmlLibsNode);
+                               for (String path : def.libsCommon)
+                                       pathToNodes(path, commonLibsNode);
+                               for (String path : def.libsDesktop)
+                                       pathToNodes(path, desktopLibsNode);
+                               for (String path : def.libsAndroid)
+                                       pathToNodes(path, androidLibsNode);
+                               for (String path : def.libsHtml)
+                                       pathToNodes(path, htmlLibsNode);
                        }
                }
        }
 
-       private void pathToNodes(String path, DefaultMutableTreeNode parentNode) {
-               String parentPath = (String) parentNode.getUserObject();
+       private void pathToNodes (String path, DefaultMutableTreeNode parentNode) {
+               String parentPath = (String)parentNode.getUserObject();
                String[] names = path.split("/");
 
-               for (int i=0; i<names.length; i++) {
-                       if (i == 0) names[i] = parentPath + "/" + names[i];
-                       else names[i] = names[i-1] + "/" + names[i];
+               for (int i = 0; i < names.length; i++) {
+                       if (i == 0)
+                               names[i] = parentPath + "/" + names[i];
+                       else
+                               names[i] = names[i - 1] + "/" + names[i];
 
-                       if (i == names.length-1) names[i] = names[i].replaceFirst("#DIR#", "");
+                       if (i == names.length - 1) names[i] = names[i].replaceFirst("#DIR#", "");
 
                        DefaultMutableTreeNode node = nodes.get(names[i]);
                        if (node == null) {
                                node = new DefaultMutableTreeNode(names[i]);
                                nodes.put(names[i], node);
-                               if (i == 0) parentNode.add(node);
-                               else nodes.get(names[i-1]).add(node);
+                               if (i == 0)
+                                       parentNode.add(node);
+                               else
+                                       nodes.get(names[i - 1]).add(node);
                        } else if (i == 0) {
                                parentNode.add(node);
                        }
@@ -229,10 +242,11 @@ public class ResultTree extends JTree {
                private final JLabel label = new JLabel();
 
                @Override
-               public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
-                       DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
+               public Component getTreeCellRendererComponent (JTree tree, Object value, boolean sel, boolean expanded, boolean leaf,
+                       int row, boolean hasFocus) {
+                       DefaultMutableTreeNode node = (DefaultMutableTreeNode)value;
                        if (node.getUserObject() instanceof String) {
-                               String name = (String) node.getUserObject();
+                               String name = (String)node.getUserObject();
                                boolean isDir = name.startsWith("#DIR#");
 
                                name = name.replaceFirst("#DIR#", "");
index d95f12e..4076c09 100644 (file)
@@ -1,7 +1,6 @@
+
 package aurelienribon.libgdx.ui.dialogs;
 
-import aurelienribon.libgdx.ui.Ctx;
-import aurelienribon.ui.css.Style;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
@@ -9,18 +8,20 @@ import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.awt.event.MouseListener;
 import java.util.regex.Pattern;
+
 import javax.swing.JFrame;
 import javax.swing.JOptionPane;
 import javax.swing.JTextField;
+
 import res.Res;
+import aurelienribon.libgdx.ui.Ctx;
+import aurelienribon.ui.css.Style;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class AdvancedSettingsDialog extends javax.swing.JDialog {
-    public AdvancedSettingsDialog(JFrame parent) {
-        super(parent, true);
-        initComponents();
+       public AdvancedSettingsDialog (JFrame parent) {
+               super(parent, true);
+               initComponents();
 
                commonSuffixField.setText(Ctx.cfg.commonSuffix);
                desktopSuffixField.setText(Ctx.cfg.desktopSuffix);
@@ -55,9 +56,9 @@ public class AdvancedSettingsDialog extends javax.swing.JDialog {
                Style.registerCssClasses(paintedPanel1, ".optionGroupPanel");
                Style.registerCssClasses(paintedPanel2, ".optionGroupPanel");
                Style.apply(getContentPane(), new Style(Res.getUrl("css/style.css")));
-    }
+       }
 
-       private void update() {
+       private void update () {
                Ctx.cfg.commonSuffix = commonSuffixField.getText();
                Ctx.cfg.desktopSuffix = desktopSuffixField.getText();
                Ctx.cfg.androidSuffix = androidSuffixField.getText();
@@ -69,32 +70,31 @@ public class AdvancedSettingsDialog extends javax.swing.JDialog {
 
        private final KeyListener updateOnTypeKeyListener = new KeyAdapter() {
                @Override
-               public void keyReleased(KeyEvent e) {
+               public void keyReleased (KeyEvent e) {
                        update();
                }
        };
 
        private final MouseListener selectOnFocusMouseListener = new MouseAdapter() {
                @Override
-               public void mousePressed(MouseEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void mousePressed (MouseEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        if (!field.isFocusOwner()) field.selectAll();
                }
        };
 
-
        private final KeyListener numbersOnlyKeyListener = new KeyAdapter() {
                private String backup;
 
                @Override
-               public void keyPressed(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyPressed (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        backup = field.getText();
                }
 
                @Override
-               public void keyReleased(KeyEvent e) {
-                       JTextField field = (JTextField) e.getSource();
+               public void keyReleased (KeyEvent e) {
+                       JTextField field = (JTextField)e.getSource();
                        if (!Pattern.compile("[0-9]*").matcher(field.getText()).matches()) {
                                String msg = "Only numbers are allowed.";
                                JOptionPane.showMessageDialog(AdvancedSettingsDialog.this, msg);
@@ -108,229 +108,282 @@ public class AdvancedSettingsDialog extends javax.swing.JDialog {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        rootPanel = new aurelienribon.ui.components.PaintedPanel();
-        title1 = new javax.swing.JLabel();
-        paintedPanel1 = new aurelienribon.ui.components.PaintedPanel();
-        jLabel7 = new javax.swing.JLabel();
-        androidMaxSdkField = new javax.swing.JTextField();
-        jLabel6 = new javax.swing.JLabel();
-        jLabel5 = new javax.swing.JLabel();
-        androidTargetSdkField = new javax.swing.JTextField();
-        androidMinSdkField = new javax.swing.JTextField();
-        jLabel8 = new javax.swing.JLabel();
-        paintedPanel2 = new aurelienribon.ui.components.PaintedPanel();
-        jLabel1 = new javax.swing.JLabel();
-        androidSuffixField = new javax.swing.JTextField();
-        jLabel4 = new javax.swing.JLabel();
-        commonSuffixField = new javax.swing.JTextField();
-        desktopSuffixField = new javax.swing.JTextField();
-        htmlSuffixField = new javax.swing.JTextField();
-        jLabel3 = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
-        jLabel9 = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-        setTitle("Advanced settings");
-
-        title1.setText("Advanced Settings");
-
-        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel7.setText("android:maxSdkVersion");
-
-        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel6.setText("android:targetSdkVersion");
-
-        jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel5.setText("android:minSdkVersion");
-
-        androidTargetSdkField.setText("15");
-
-        androidMinSdkField.setText("5");
-
-        jLabel8.setText("Leave a field blank to unset the value");
-
-        javax.swing.GroupLayout paintedPanel1Layout = new javax.swing.GroupLayout(paintedPanel1);
-        paintedPanel1.setLayout(paintedPanel1Layout);
-        paintedPanel1Layout.setHorizontalGroup(
-            paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(paintedPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(paintedPanel1Layout.createSequentialGroup()
-                        .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(jLabel6)
-                            .addComponent(jLabel7))
-                        .addGap(302, 302, 302))
-                    .addGroup(paintedPanel1Layout.createSequentialGroup()
-                        .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(paintedPanel1Layout.createSequentialGroup()
-                                .addComponent(jLabel5)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                    .addComponent(androidMaxSdkField, javax.swing.GroupLayout.Alignment.TRAILING)
-                                    .addComponent(androidTargetSdkField)
-                                    .addComponent(androidMinSdkField)))
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, paintedPanel1Layout.createSequentialGroup()
-                                .addGap(0, 0, Short.MAX_VALUE)
-                                .addComponent(jLabel8)))
-                        .addContainerGap())))
-        );
-
-        paintedPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel5, jLabel6, jLabel7});
-
-        paintedPanel1Layout.setVerticalGroup(
-            paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(paintedPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel5)
-                    .addComponent(androidMinSdkField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel6)
-                    .addComponent(androidTargetSdkField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel7)
-                    .addComponent(androidMaxSdkField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addGap(18, 18, 18)
-                .addComponent(jLabel8)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
-        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel1.setText("Main project suffix");
-
-        androidSuffixField.setText("-android");
-
-        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel4.setText("Html project suffix");
-
-        desktopSuffixField.setText("-desktop");
-
-        htmlSuffixField.setText("-html");
-
-        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel3.setText("Android project suffix");
-
-        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        jLabel2.setText("Desktop project suffix");
-
-        jLabel9.setText("Do not use twice the same suffix to avoid undefined behavior");
-
-        javax.swing.GroupLayout paintedPanel2Layout = new javax.swing.GroupLayout(paintedPanel2);
-        paintedPanel2.setLayout(paintedPanel2Layout);
-        paintedPanel2Layout.setHorizontalGroup(
-            paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(paintedPanel2Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(paintedPanel2Layout.createSequentialGroup()
-                        .addGroup(paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, paintedPanel2Layout.createSequentialGroup()
-                                .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                .addComponent(desktopSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE))
-                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, paintedPanel2Layout.createSequentialGroup()
-                                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                .addComponent(commonSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                .addGap(0, 0, Short.MAX_VALUE)))
-                        .addGap(18, 18, 18)
-                        .addGroup(paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(paintedPanel2Layout.createSequentialGroup()
-                                .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                .addComponent(htmlSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))
-                            .addGroup(paintedPanel2Layout.createSequentialGroup()
-                                .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                                .addComponent(androidSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE))))
-                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, paintedPanel2Layout.createSequentialGroup()
-                        .addGap(0, 0, Short.MAX_VALUE)
-                        .addComponent(jLabel9)))
-                .addContainerGap())
-        );
-
-        paintedPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3, jLabel4});
-
-        paintedPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {androidSuffixField, commonSuffixField, desktopSuffixField, htmlSuffixField});
-
-        paintedPanel2Layout.setVerticalGroup(
-            paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(paintedPanel2Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel1)
-                    .addComponent(commonSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(jLabel3)
-                    .addComponent(androidSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel4)
-                    .addComponent(htmlSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(jLabel2)
-                    .addComponent(desktopSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addGap(18, 18, 18)
-                .addComponent(jLabel9)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
-        paintedPanel2Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {androidSuffixField, commonSuffixField, desktopSuffixField, htmlSuffixField, jLabel1, jLabel2, jLabel3, jLabel4});
-
-        javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
-        rootPanel.setLayout(rootPanelLayout);
-        rootPanelLayout.setHorizontalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(title1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(paintedPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addContainerGap())
-        );
-        rootPanelLayout.setVerticalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(title1)
-                .addGap(18, 18, 18)
-                .addComponent(paintedPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
-        getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JTextField androidMaxSdkField;
-    private javax.swing.JTextField androidMinSdkField;
-    private javax.swing.JTextField androidSuffixField;
-    private javax.swing.JTextField androidTargetSdkField;
-    private javax.swing.JTextField commonSuffixField;
-    private javax.swing.JTextField desktopSuffixField;
-    private javax.swing.JTextField htmlSuffixField;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JLabel jLabel5;
-    private javax.swing.JLabel jLabel6;
-    private javax.swing.JLabel jLabel7;
-    private javax.swing.JLabel jLabel8;
-    private javax.swing.JLabel jLabel9;
-    private aurelienribon.ui.components.PaintedPanel paintedPanel1;
-    private aurelienribon.ui.components.PaintedPanel paintedPanel2;
-    private aurelienribon.ui.components.PaintedPanel rootPanel;
-    private javax.swing.JLabel title1;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               rootPanel = new aurelienribon.ui.components.PaintedPanel();
+               title1 = new javax.swing.JLabel();
+               paintedPanel1 = new aurelienribon.ui.components.PaintedPanel();
+               jLabel7 = new javax.swing.JLabel();
+               androidMaxSdkField = new javax.swing.JTextField();
+               jLabel6 = new javax.swing.JLabel();
+               jLabel5 = new javax.swing.JLabel();
+               androidTargetSdkField = new javax.swing.JTextField();
+               androidMinSdkField = new javax.swing.JTextField();
+               jLabel8 = new javax.swing.JLabel();
+               paintedPanel2 = new aurelienribon.ui.components.PaintedPanel();
+               jLabel1 = new javax.swing.JLabel();
+               androidSuffixField = new javax.swing.JTextField();
+               jLabel4 = new javax.swing.JLabel();
+               commonSuffixField = new javax.swing.JTextField();
+               desktopSuffixField = new javax.swing.JTextField();
+               htmlSuffixField = new javax.swing.JTextField();
+               jLabel3 = new javax.swing.JLabel();
+               jLabel2 = new javax.swing.JLabel();
+               jLabel9 = new javax.swing.JLabel();
+
+               setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+               setTitle("Advanced settings");
+
+               title1.setText("Advanced Settings");
+
+               jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel7.setText("android:maxSdkVersion");
+
+               jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel6.setText("android:targetSdkVersion");
+
+               jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel5.setText("android:minSdkVersion");
+
+               androidTargetSdkField.setText("15");
+
+               androidMinSdkField.setText("5");
+
+               jLabel8.setText("Leave a field blank to unset the value");
+
+               javax.swing.GroupLayout paintedPanel1Layout = new javax.swing.GroupLayout(paintedPanel1);
+               paintedPanel1.setLayout(paintedPanel1Layout);
+               paintedPanel1Layout.setHorizontalGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               paintedPanel1Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               paintedPanel1Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                       .addGroup(
+                                                               paintedPanel1Layout
+                                                                       .createSequentialGroup()
+                                                                       .addGroup(
+                                                                               paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                                                       .addComponent(jLabel6).addComponent(jLabel7)).addGap(302, 302, 302))
+                                                       .addGroup(
+                                                               paintedPanel1Layout
+                                                                       .createSequentialGroup()
+                                                                       .addGroup(
+                                                                               paintedPanel1Layout
+                                                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                                                       .addGroup(
+                                                                                               paintedPanel1Layout
+                                                                                                       .createSequentialGroup()
+                                                                                                       .addComponent(jLabel5)
+                                                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                                                       .addGroup(
+                                                                                                               paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                                                                                       .addComponent(androidMaxSdkField, javax.swing.GroupLayout.Alignment.TRAILING)
+                                                                                                                       .addComponent(androidTargetSdkField).addComponent(androidMinSdkField)))
+                                                                                       .addGroup(
+                                                                                               javax.swing.GroupLayout.Alignment.TRAILING,
+                                                                                               paintedPanel1Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE)
+                                                                                                       .addComponent(jLabel8))).addContainerGap()))));
+
+               paintedPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel5, jLabel6, jLabel7});
+
+               paintedPanel1Layout.setVerticalGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               paintedPanel1Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               paintedPanel1Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                                       .addComponent(jLabel5)
+                                                       .addComponent(androidMinSdkField, javax.swing.GroupLayout.PREFERRED_SIZE,
+                                                               javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addGroup(
+                                               paintedPanel1Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                                       .addComponent(jLabel6)
+                                                       .addComponent(androidTargetSdkField, javax.swing.GroupLayout.PREFERRED_SIZE,
+                                                               javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addGroup(
+                                               paintedPanel1Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                                       .addComponent(jLabel7)
+                                                       .addComponent(androidMaxSdkField, javax.swing.GroupLayout.PREFERRED_SIZE,
+                                                               javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(18, 18, 18)
+                                       .addComponent(jLabel8).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+
+               jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel1.setText("Main project suffix");
+
+               androidSuffixField.setText("-android");
+
+               jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel4.setText("Html project suffix");
+
+               desktopSuffixField.setText("-desktop");
+
+               htmlSuffixField.setText("-html");
+
+               jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel3.setText("Android project suffix");
+
+               jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               jLabel2.setText("Desktop project suffix");
+
+               jLabel9.setText("Do not use twice the same suffix to avoid undefined behavior");
+
+               javax.swing.GroupLayout paintedPanel2Layout = new javax.swing.GroupLayout(paintedPanel2);
+               paintedPanel2.setLayout(paintedPanel2Layout);
+               paintedPanel2Layout.setHorizontalGroup(paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               paintedPanel2Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               paintedPanel2Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                       .addGroup(
+                                                               paintedPanel2Layout
+                                                                       .createSequentialGroup()
+                                                                       .addGroup(
+                                                                               paintedPanel2Layout
+                                                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                                                                                       .addGroup(
+                                                                                               javax.swing.GroupLayout.Alignment.LEADING,
+                                                                                               paintedPanel2Layout
+                                                                                                       .createSequentialGroup()
+                                                                                                       .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                                                                               javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                                                       .addComponent(desktopSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 88,
+                                                                                                               javax.swing.GroupLayout.PREFERRED_SIZE))
+                                                                                       .addGroup(
+                                                                                               javax.swing.GroupLayout.Alignment.LEADING,
+                                                                                               paintedPanel2Layout
+                                                                                                       .createSequentialGroup()
+                                                                                                       .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 106,
+                                                                                                               javax.swing.GroupLayout.PREFERRED_SIZE)
+                                                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                                                       .addComponent(commonSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 88,
+                                                                                                               javax.swing.GroupLayout.PREFERRED_SIZE).addGap(0, 0, Short.MAX_VALUE)))
+                                                                       .addGap(18, 18, 18)
+                                                                       .addGroup(
+                                                                               paintedPanel2Layout
+                                                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                                                       .addGroup(
+                                                                                               paintedPanel2Layout
+                                                                                                       .createSequentialGroup()
+                                                                                                       .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                                                                               javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                                                       .addComponent(htmlSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 84,
+                                                                                                               javax.swing.GroupLayout.PREFERRED_SIZE))
+                                                                                       .addGroup(
+                                                                                               paintedPanel2Layout
+                                                                                                       .createSequentialGroup()
+                                                                                                       .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                                                                               javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                                                                       .addComponent(androidSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, 84,
+                                                                                                               javax.swing.GroupLayout.PREFERRED_SIZE))))
+                                                       .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
+                                                               paintedPanel2Layout.createSequentialGroup().addGap(0, 0, Short.MAX_VALUE).addComponent(jLabel9)))
+                                       .addContainerGap()));
+
+               paintedPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3,
+                       jLabel4});
+
+               paintedPanel2Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {androidSuffixField,
+                       commonSuffixField, desktopSuffixField, htmlSuffixField});
+
+               paintedPanel2Layout.setVerticalGroup(paintedPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               paintedPanel2Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               paintedPanel2Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                                       .addComponent(jLabel1)
+                                                       .addComponent(commonSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE,
+                                                               javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                                       .addComponent(jLabel3)
+                                                       .addComponent(androidSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE,
+                                                               javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addGroup(
+                                               paintedPanel2Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                                                       .addComponent(jLabel4)
+                                                       .addComponent(htmlSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                               javax.swing.GroupLayout.PREFERRED_SIZE)
+                                                       .addComponent(jLabel2)
+                                                       .addComponent(desktopSuffixField, javax.swing.GroupLayout.PREFERRED_SIZE,
+                                                               javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)).addGap(18, 18, 18)
+                                       .addComponent(jLabel9).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+
+               paintedPanel2Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {androidSuffixField,
+                       commonSuffixField, desktopSuffixField, htmlSuffixField, jLabel1, jLabel2, jLabel3, jLabel4});
+
+               javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
+               rootPanel.setLayout(rootPanelLayout);
+               rootPanelLayout.setHorizontalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       rootPanelLayout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addComponent(title1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)
+                                               .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)
+                                               .addComponent(paintedPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)).addContainerGap()));
+               rootPanelLayout.setVerticalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addComponent(title1)
+                               .addGap(18, 18, 18)
+                               .addComponent(paintedPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                               .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+
+               getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
+
+               pack();
+       }// </editor-fold>//GEN-END:initComponents
+               // Variables declaration - do not modify//GEN-BEGIN:variables
+
+       private javax.swing.JTextField androidMaxSdkField;
+       private javax.swing.JTextField androidMinSdkField;
+       private javax.swing.JTextField androidSuffixField;
+       private javax.swing.JTextField androidTargetSdkField;
+       private javax.swing.JTextField commonSuffixField;
+       private javax.swing.JTextField desktopSuffixField;
+       private javax.swing.JTextField htmlSuffixField;
+       private javax.swing.JLabel jLabel1;
+       private javax.swing.JLabel jLabel2;
+       private javax.swing.JLabel jLabel3;
+       private javax.swing.JLabel jLabel4;
+       private javax.swing.JLabel jLabel5;
+       private javax.swing.JLabel jLabel6;
+       private javax.swing.JLabel jLabel7;
+       private javax.swing.JLabel jLabel8;
+       private javax.swing.JLabel jLabel9;
+       private aurelienribon.ui.components.PaintedPanel paintedPanel1;
+       private aurelienribon.ui.components.PaintedPanel paintedPanel2;
+       private aurelienribon.ui.components.PaintedPanel rootPanel;
+       private javax.swing.JLabel title1;
+       // End of variables declaration//GEN-END:variables
 
 }
index 3df7dd1..f3c1836 100644 (file)
@@ -1,7 +1,6 @@
+
 package aurelienribon.libgdx.ui.dialogs;
 
-import aurelienribon.ui.css.Style;
-import aurelienribon.utils.HttpUtils;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
 import java.io.BufferedOutputStream;
@@ -11,19 +10,22 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
+
 import javax.swing.JFrame;
 import javax.swing.JOptionPane;
+
 import org.apache.commons.io.FileUtils;
+
 import res.Res;
+import aurelienribon.ui.css.Style;
+import aurelienribon.utils.HttpUtils;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class DownloadDialog extends javax.swing.JDialog {
        private final Callback callback;
        private final String out;
 
-       public DownloadDialog(JFrame parent, Callback callback, String in, String out) {
+       public DownloadDialog (JFrame parent, Callback callback, String in, String out) {
                super(parent, true);
                this.callback = callback;
                this.out = out;
@@ -47,10 +49,13 @@ public class DownloadDialog extends javax.swing.JDialog {
 
                        final HttpUtils.DownloadTask task = HttpUtils.downloadAsync(inputURL, outputStream, fullCallback);
 
-                       addWindowListener(new WindowAdapter() {@Override public void windowClosing(WindowEvent e) {
-                               task.stop();
-                               dispose();
-                       }});
+                       addWindowListener(new WindowAdapter() {
+                               @Override
+                               public void windowClosing (WindowEvent e) {
+                                       task.stop();
+                                       dispose();
+                               }
+                       });
 
                } catch (MalformedURLException ex) {
                        JOptionPane.showMessageDialog(getContentPane(), ex.getMessage());
@@ -60,12 +65,12 @@ public class DownloadDialog extends javax.swing.JDialog {
        }
 
        public static interface Callback {
-               public void completed();
+               public void completed ();
        }
 
        private final HttpUtils.Callback fullCallback = new HttpUtils.Callback() {
                @Override
-               public void completed() {
+               public void completed () {
                        try {
                                FileUtils.deleteQuietly(new File(out));
                                FileUtils.moveFile(new File(out + ".tmp"), new File(out));
@@ -79,29 +84,28 @@ public class DownloadDialog extends javax.swing.JDialog {
                }
 
                @Override
-               public void canceled() {
+               public void canceled () {
                        FileUtils.deleteQuietly(new File(out + ".tmp"));
                        dispose();
                }
 
                @Override
-               public void error(IOException ex) {
+               public void error (IOException ex) {
                        FileUtils.deleteQuietly(new File(out + ".tmp"));
-                       String msg = "Something went wrong during the download.\n"
-                               + ex.getClass().getSimpleName() + ": " + ex.getMessage();
+                       String msg = "Something went wrong during the download.\n" + ex.getClass().getSimpleName() + ": " + ex.getMessage();
                        JOptionPane.showMessageDialog(getContentPane(), msg);
                        dispose();
                }
 
                @Override
-               public void updated(int length, int totalLength) {
+               public void updated (int length, int totalLength) {
                        if (totalLength > 0) {
                                progressBar.setIndeterminate(false);
-                               progressBar.setValue((int) Math.round((double) length * 100 / totalLength));
-                               countLabel.setText((length/1024) + " / " + (totalLength/1024));
+                               progressBar.setValue((int)Math.round((double)length * 100 / totalLength));
+                               countLabel.setText((length / 1024) + " / " + (totalLength / 1024));
                        } else {
                                progressBar.setIndeterminate(true);
-                               countLabel.setText((length/1024) + " / unknown");
+                               countLabel.setText((length / 1024) + " / unknown");
                        }
                }
        };
@@ -110,81 +114,94 @@ public class DownloadDialog extends javax.swing.JDialog {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        rootPanel = new aurelienribon.ui.components.PaintedPanel();
-        jLabel3 = new javax.swing.JLabel();
-        jLabel1 = new javax.swing.JLabel();
-        progressBar = new javax.swing.JProgressBar();
-        countLabel = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
-        nameLabel = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
-        setTitle("Download in progress...");
-        setResizable(false);
-
-        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic64_download.png"))); // NOI18N
-
-        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
-        jLabel1.setText("Downloading: ");
-
-        countLabel.setText("xxx");
-
-        jLabel2.setText("KiloBytes downloaded: ");
-
-        nameLabel.setText("xxx");
-
-        javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
-        rootPanel.setLayout(rootPanelLayout);
-        rootPanelLayout.setHorizontalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addComponent(jLabel3)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 471, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(jLabel1)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 387, javax.swing.GroupLayout.PREFERRED_SIZE))
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(jLabel2)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(countLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-        rootPanelLayout.setVerticalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
-                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(nameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel2)
-                    .addComponent(countLabel))
-                .addContainerGap())
-        );
-
-        getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel countLabel;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel nameLabel;
-    private javax.swing.JProgressBar progressBar;
-    private aurelienribon.ui.components.PaintedPanel rootPanel;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               rootPanel = new aurelienribon.ui.components.PaintedPanel();
+               jLabel3 = new javax.swing.JLabel();
+               jLabel1 = new javax.swing.JLabel();
+               progressBar = new javax.swing.JProgressBar();
+               countLabel = new javax.swing.JLabel();
+               jLabel2 = new javax.swing.JLabel();
+               nameLabel = new javax.swing.JLabel();
+
+               setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
+               setTitle("Download in progress...");
+               setResizable(false);
+
+               jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/ic64_download.png"))); // NOI18N
+
+               jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
+               jLabel1.setText("Downloading: ");
+
+               countLabel.setText("xxx");
+
+               jLabel2.setText("KiloBytes downloaded: ");
+
+               nameLabel.setText("xxx");
+
+               javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
+               rootPanel.setLayout(rootPanelLayout);
+               rootPanelLayout.setHorizontalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addComponent(jLabel3)
+                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                               .addGroup(
+                                       rootPanelLayout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 471, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                               .addGroup(
+                                                       rootPanelLayout
+                                                               .createSequentialGroup()
+                                                               .addComponent(jLabel1)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                               .addComponent(nameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 387,
+                                                                       javax.swing.GroupLayout.PREFERRED_SIZE))
+                                               .addGroup(
+                                                       rootPanelLayout
+                                                               .createSequentialGroup()
+                                                               .addComponent(jLabel2)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                               .addComponent(countLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 354,
+                                                                       javax.swing.GroupLayout.PREFERRED_SIZE)))
+                               .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+               rootPanelLayout.setVerticalGroup(rootPanelLayout
+                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
+                       .addGroup(
+                               rootPanelLayout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               rootPanelLayout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                                                       .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                               Short.MAX_VALUE)
+                                                       .addComponent(nameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                               Short.MAX_VALUE))
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addComponent(progressBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                               Short.MAX_VALUE)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addGroup(
+                                               rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel2)
+                                                       .addComponent(countLabel)).addContainerGap()));
+
+               getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
+
+               pack();
+       }// </editor-fold>//GEN-END:initComponents
+               // Variables declaration - do not modify//GEN-BEGIN:variables
+
+       private javax.swing.JLabel countLabel;
+       private javax.swing.JLabel jLabel1;
+       private javax.swing.JLabel jLabel2;
+       private javax.swing.JLabel jLabel3;
+       private javax.swing.JLabel nameLabel;
+       private javax.swing.JProgressBar progressBar;
+       private aurelienribon.ui.components.PaintedPanel rootPanel;
+       // End of variables declaration//GEN-END:variables
 
 }
index 283bd61..590f1f2 100644 (file)
+
 package aurelienribon.libgdx.ui.dialogs;
 
-import aurelienribon.ui.css.Style;
 import javax.swing.JFrame;
+
 import res.Res;
+import aurelienribon.ui.css.Style;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class FixHtmlHelpDialog extends javax.swing.JDialog {
-    public FixHtmlHelpDialog(JFrame parent) {
-        super(parent, true);
-        initComponents();
+       public FixHtmlHelpDialog (JFrame parent) {
+               super(parent, true);
+               initComponents();
 
                Style.registerCssClasses(rootPanel, ".rootPanel");
                Style.registerCssClasses(num1, ".helpNumber");
                Style.registerCssClasses(num2, ".helpNumber");
                Style.registerCssClasses(num3, ".helpNumber");
                Style.apply(getContentPane(), new Style(Res.getUrl("css/style.css")));
-    }
+       }
 
        // -------------------------------------------------------------------------
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        rootPanel = new aurelienribon.ui.components.PaintedPanel();
-        jLabel1 = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
-        jLabel4 = new javax.swing.JLabel();
-        num1 = new javax.swing.JLabel();
-        num2 = new javax.swing.JLabel();
-        num3 = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-        setTitle("Fix error in html project");
-
-        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/fixhtml1.jpg"))); // NOI18N
-
-        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/fixhtml2.jpg"))); // NOI18N
-
-        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/fixhtml3.jpg"))); // NOI18N
-
-        num1.setText("1");
-
-        num2.setText("2");
-
-        num3.setText("3");
-
-        javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
-        rootPanel.setLayout(rootPanelLayout);
-        rootPanelLayout.setHorizontalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(num2)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jLabel2)
-                        .addGap(18, 18, 18)
-                        .addComponent(num3)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jLabel4))
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(num1)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jLabel1)))
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-        rootPanelLayout.setVerticalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(num1)
-                    .addComponent(jLabel1))
-                .addGap(18, 18, 18)
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(jLabel2)
-                    .addComponent(jLabel4)
-                    .addComponent(num2)
-                    .addComponent(num3))
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
-        getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JLabel num1;
-    private javax.swing.JLabel num2;
-    private javax.swing.JLabel num3;
-    private aurelienribon.ui.components.PaintedPanel rootPanel;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               rootPanel = new aurelienribon.ui.components.PaintedPanel();
+               jLabel1 = new javax.swing.JLabel();
+               jLabel2 = new javax.swing.JLabel();
+               jLabel4 = new javax.swing.JLabel();
+               num1 = new javax.swing.JLabel();
+               num2 = new javax.swing.JLabel();
+               num3 = new javax.swing.JLabel();
+
+               setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+               setTitle("Fix error in html project");
+
+               jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/fixhtml1.jpg"))); // NOI18N
+
+               jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/fixhtml2.jpg"))); // NOI18N
+
+               jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/fixhtml3.jpg"))); // NOI18N
+
+               num1.setText("1");
+
+               num2.setText("2");
+
+               num3.setText("3");
+
+               javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
+               rootPanel.setLayout(rootPanelLayout);
+               rootPanelLayout.setHorizontalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       rootPanelLayout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addGroup(
+                                                       rootPanelLayout.createSequentialGroup().addComponent(num2)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel2)
+                                                               .addGap(18, 18, 18).addComponent(num3)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel4))
+                                               .addGroup(
+                                                       rootPanelLayout.createSequentialGroup().addComponent(num1)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel1)))
+                               .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+               rootPanelLayout.setVerticalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(num1)
+                                               .addComponent(jLabel1))
+                               .addGap(18, 18, 18)
+                               .addGroup(
+                                       rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel2)
+                                               .addComponent(jLabel4).addComponent(num2).addComponent(num3))
+                               .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+
+               getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
+
+               pack();
+       }// </editor-fold>//GEN-END:initComponents
+               // Variables declaration - do not modify//GEN-BEGIN:variables
+
+       private javax.swing.JLabel jLabel1;
+       private javax.swing.JLabel jLabel2;
+       private javax.swing.JLabel jLabel4;
+       private javax.swing.JLabel num1;
+       private javax.swing.JLabel num2;
+       private javax.swing.JLabel num3;
+       private aurelienribon.ui.components.PaintedPanel rootPanel;
+       // End of variables declaration//GEN-END:variables
 
 }
index d237fd3..20b2eb8 100644 (file)
@@ -1,25 +1,25 @@
+
 package aurelienribon.libgdx.ui.dialogs;
 
-import aurelienribon.libgdx.ProjectConfiguration;
-import aurelienribon.libgdx.ProjectSetup;
-import aurelienribon.libgdx.ui.Ctx;
-import aurelienribon.ui.css.Style;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
 import java.io.IOException;
+
 import javax.swing.JFrame;
 import javax.swing.SwingUtilities;
+
 import res.Res;
+import aurelienribon.libgdx.ProjectSetup;
+import aurelienribon.libgdx.ui.Ctx;
+import aurelienribon.ui.css.Style;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class GoDialog extends javax.swing.JDialog {
        private final ProjectSetup setup;
 
-    public GoDialog(JFrame parent) {
-        super(parent, true);
-        initComponents();
+       public GoDialog (JFrame parent) {
+               super(parent, true);
+               initComponents();
 
                Style.registerCssClasses(rootPanel, ".rootPanel");
                Style.registerCssClasses(title1, ".titleLabel");
@@ -31,7 +31,8 @@ public class GoDialog extends javax.swing.JDialog {
                Style.apply(getContentPane(), new Style(Res.getUrl("css/style.css")));
 
                importQuestion.addMouseListener(new MouseAdapter() {
-                       @Override public void mousePressed(MouseEvent e) {
+                       @Override
+                       public void mousePressed (MouseEvent e) {
                                ImportHelpDialog dialog = new ImportHelpDialog(null);
                                dialog.setLocationRelativeTo(GoDialog.this);
                                dialog.pack();
@@ -40,7 +41,8 @@ public class GoDialog extends javax.swing.JDialog {
                });
 
                fixHtmlQuestion.addMouseListener(new MouseAdapter() {
-                       @Override public void mousePressed(MouseEvent e) {
+                       @Override
+                       public void mousePressed (MouseEvent e) {
                                FixHtmlHelpDialog dialog = new FixHtmlHelpDialog(null);
                                dialog.setLocationRelativeTo(GoDialog.this);
                                dialog.pack();
@@ -51,7 +53,8 @@ public class GoDialog extends javax.swing.JDialog {
                setup = new ProjectSetup(Ctx.cfg);
 
                new Thread(new Runnable() {
-                       @Override public void run() {
+                       @Override
+                       public void run () {
                                try {
                                        report("Decompressing projects...");
                                        setup.inflateProjects();
@@ -71,11 +74,12 @@ public class GoDialog extends javax.swing.JDialog {
                                }
                        }
                }).start();
-    }
+       }
 
-       private void report(final String txt) {
+       private void report (final String txt) {
                SwingUtilities.invokeLater(new Runnable() {
-                       @Override public void run() {
+                       @Override
+                       public void run () {
                                progressArea.append(txt);
                        }
                });
@@ -85,98 +89,95 @@ public class GoDialog extends javax.swing.JDialog {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        rootPanel = new aurelienribon.ui.components.PaintedPanel();
-        title1 = new javax.swing.JLabel();
-        title2 = new javax.swing.JLabel();
-        paintedPanel1 = new aurelienribon.ui.components.PaintedPanel();
-        importQuestion = new javax.swing.JLabel();
-        fixHtmlQuestion = new javax.swing.JLabel();
-        jScrollPane1 = new javax.swing.JScrollPane();
-        progressArea = new javax.swing.JTextArea();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-        setTitle("Generation");
-
-        title1.setText("Generation in progress");
-
-        title2.setText("Frequently Asked Questions");
-
-        paintedPanel1.setOpaque(false);
-
-        importQuestion.setText("How do I import the projects into eclipse?");
-
-        fixHtmlQuestion.setText("How do I fix the \"gwt-servlet not found\" error in my html project?");
-
-        javax.swing.GroupLayout paintedPanel1Layout = new javax.swing.GroupLayout(paintedPanel1);
-        paintedPanel1.setLayout(paintedPanel1Layout);
-        paintedPanel1Layout.setHorizontalGroup(
-            paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(paintedPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(importQuestion)
-                    .addComponent(fixHtmlQuestion))
-                .addContainerGap(71, Short.MAX_VALUE))
-        );
-        paintedPanel1Layout.setVerticalGroup(
-            paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(paintedPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(importQuestion)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(fixHtmlQuestion)
-                .addContainerGap())
-        );
-
-        progressArea.setColumns(20);
-        progressArea.setEditable(false);
-        progressArea.setRows(5);
-        jScrollPane1.setViewportView(progressArea);
-
-        javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
-        rootPanel.setLayout(rootPanelLayout);
-        rootPanelLayout.setHorizontalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(title1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(title2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(paintedPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(jScrollPane1))
-                .addContainerGap())
-        );
-        rootPanelLayout.setVerticalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(title1)
-                .addGap(18, 18, 18)
-                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE)
-                .addGap(18, 18, 18)
-                .addComponent(title2)
-                .addGap(18, 18, 18)
-                .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addContainerGap())
-        );
-
-        getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel fixHtmlQuestion;
-    private javax.swing.JLabel importQuestion;
-    private javax.swing.JScrollPane jScrollPane1;
-    private aurelienribon.ui.components.PaintedPanel paintedPanel1;
-    private javax.swing.JTextArea progressArea;
-    private aurelienribon.ui.components.PaintedPanel rootPanel;
-    private javax.swing.JLabel title1;
-    private javax.swing.JLabel title2;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               rootPanel = new aurelienribon.ui.components.PaintedPanel();
+               title1 = new javax.swing.JLabel();
+               title2 = new javax.swing.JLabel();
+               paintedPanel1 = new aurelienribon.ui.components.PaintedPanel();
+               importQuestion = new javax.swing.JLabel();
+               fixHtmlQuestion = new javax.swing.JLabel();
+               jScrollPane1 = new javax.swing.JScrollPane();
+               progressArea = new javax.swing.JTextArea();
+
+               setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+               setTitle("Generation");
+
+               title1.setText("Generation in progress");
+
+               title2.setText("Frequently Asked Questions");
+
+               paintedPanel1.setOpaque(false);
+
+               importQuestion.setText("How do I import the projects into eclipse?");
+
+               fixHtmlQuestion.setText("How do I fix the \"gwt-servlet not found\" error in my html project?");
+
+               javax.swing.GroupLayout paintedPanel1Layout = new javax.swing.GroupLayout(paintedPanel1);
+               paintedPanel1.setLayout(paintedPanel1Layout);
+               paintedPanel1Layout.setHorizontalGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               paintedPanel1Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(importQuestion)
+                                                       .addComponent(fixHtmlQuestion)).addContainerGap(71, Short.MAX_VALUE)));
+               paintedPanel1Layout.setVerticalGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               paintedPanel1Layout.createSequentialGroup().addContainerGap().addComponent(importQuestion)
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(fixHtmlQuestion)
+                                       .addContainerGap()));
+
+               progressArea.setColumns(20);
+               progressArea.setEditable(false);
+               progressArea.setRows(5);
+               jScrollPane1.setViewportView(progressArea);
+
+               javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
+               rootPanel.setLayout(rootPanelLayout);
+               rootPanelLayout.setHorizontalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       rootPanelLayout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addComponent(title1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)
+                                               .addComponent(title2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)
+                                               .addComponent(paintedPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE).addComponent(jScrollPane1)).addContainerGap()));
+               rootPanelLayout.setVerticalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addComponent(title1)
+                               .addGap(18, 18, 18)
+                               .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE)
+                               .addGap(18, 18, 18)
+                               .addComponent(title2)
+                               .addGap(18, 18, 18)
+                               .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap()));
+
+               getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
+
+               pack();
+       }// </editor-fold>//GEN-END:initComponents
+               // Variables declaration - do not modify//GEN-BEGIN:variables
+
+       private javax.swing.JLabel fixHtmlQuestion;
+       private javax.swing.JLabel importQuestion;
+       private javax.swing.JScrollPane jScrollPane1;
+       private aurelienribon.ui.components.PaintedPanel paintedPanel1;
+       private javax.swing.JTextArea progressArea;
+       private aurelienribon.ui.components.PaintedPanel rootPanel;
+       private javax.swing.JLabel title1;
+       private javax.swing.JLabel title2;
+       // End of variables declaration//GEN-END:variables
 
 }
index d0010cf..5794927 100644 (file)
@@ -1,16 +1,16 @@
+
 package aurelienribon.libgdx.ui.dialogs;
 
-import aurelienribon.ui.css.Style;
 import javax.swing.JFrame;
+
 import res.Res;
+import aurelienribon.ui.css.Style;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ImportHelpDialog extends javax.swing.JDialog {
-    public ImportHelpDialog(JFrame parent) {
-        super(parent, true);
-        initComponents();
+       public ImportHelpDialog (JFrame parent) {
+               super(parent, true);
+               initComponents();
 
                Style.registerCssClasses(rootPanel, ".rootPanel");
                Style.registerCssClasses(num1, ".helpNumber");
@@ -18,102 +18,92 @@ public class ImportHelpDialog extends javax.swing.JDialog {
                Style.registerCssClasses(num3, ".helpNumber");
                Style.registerCssClasses(num4, ".helpNumber");
                Style.apply(getContentPane(), new Style(Res.getUrl("css/style.css")));
-    }
+       }
 
        // -------------------------------------------------------------------------
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        rootPanel = new aurelienribon.ui.components.PaintedPanel();
-        jLabel1 = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
-        jLabel3 = new javax.swing.JLabel();
-        jLabel4 = new javax.swing.JLabel();
-        num1 = new javax.swing.JLabel();
-        num2 = new javax.swing.JLabel();
-        num3 = new javax.swing.JLabel();
-        num4 = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-        setTitle("Importing into eclipse");
-
-        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import1.jpg"))); // NOI18N
-
-        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import2.jpg"))); // NOI18N
-
-        jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import4.jpg"))); // NOI18N
-
-        jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import3.jpg"))); // NOI18N
-
-        num1.setText("1");
-
-        num2.setText("2");
-
-        num3.setText("3");
-
-        num4.setText("4");
-
-        javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
-        rootPanel.setLayout(rootPanelLayout);
-        rootPanelLayout.setHorizontalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(num4)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jLabel3))
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(num1)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jLabel1)
-                        .addGap(18, 18, 18)
-                        .addComponent(num2)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jLabel2)
-                        .addGap(18, 18, 18)
-                        .addComponent(num3)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jLabel4)))
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-        rootPanelLayout.setVerticalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(num1)
-                    .addComponent(jLabel2)
-                    .addComponent(jLabel1)
-                    .addComponent(jLabel4)
-                    .addComponent(num2)
-                    .addComponent(num3))
-                .addGap(18, 18, 18)
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(jLabel3)
-                    .addComponent(num4))
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
-        getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel jLabel4;
-    private javax.swing.JLabel num1;
-    private javax.swing.JLabel num2;
-    private javax.swing.JLabel num3;
-    private javax.swing.JLabel num4;
-    private aurelienribon.ui.components.PaintedPanel rootPanel;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               rootPanel = new aurelienribon.ui.components.PaintedPanel();
+               jLabel1 = new javax.swing.JLabel();
+               jLabel2 = new javax.swing.JLabel();
+               jLabel3 = new javax.swing.JLabel();
+               jLabel4 = new javax.swing.JLabel();
+               num1 = new javax.swing.JLabel();
+               num2 = new javax.swing.JLabel();
+               num3 = new javax.swing.JLabel();
+               num4 = new javax.swing.JLabel();
+
+               setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+               setTitle("Importing into eclipse");
+
+               jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import1.jpg"))); // NOI18N
+
+               jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import2.jpg"))); // NOI18N
+
+               jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import4.jpg"))); // NOI18N
+
+               jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/help/import3.jpg"))); // NOI18N
+
+               num1.setText("1");
+
+               num2.setText("2");
+
+               num3.setText("3");
+
+               num4.setText("4");
+
+               javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
+               rootPanel.setLayout(rootPanelLayout);
+               rootPanelLayout.setHorizontalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       rootPanelLayout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                                               .addGroup(
+                                                       rootPanelLayout.createSequentialGroup().addComponent(num4)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel3))
+                                               .addGroup(
+                                                       rootPanelLayout.createSequentialGroup().addComponent(num1)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel1)
+                                                               .addGap(18, 18, 18).addComponent(num2)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel2)
+                                                               .addGap(18, 18, 18).addComponent(num3)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel4)))
+                               .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+               rootPanelLayout.setVerticalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(num1)
+                                               .addComponent(jLabel2).addComponent(jLabel1).addComponent(jLabel4).addComponent(num2).addComponent(num3))
+                               .addGap(18, 18, 18)
+                               .addGroup(
+                                       rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addComponent(jLabel3)
+                                               .addComponent(num4)).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+
+               getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
+
+               pack();
+       }// </editor-fold>//GEN-END:initComponents
+               // Variables declaration - do not modify//GEN-BEGIN:variables
+
+       private javax.swing.JLabel jLabel1;
+       private javax.swing.JLabel jLabel2;
+       private javax.swing.JLabel jLabel3;
+       private javax.swing.JLabel jLabel4;
+       private javax.swing.JLabel num1;
+       private javax.swing.JLabel num2;
+       private javax.swing.JLabel num3;
+       private javax.swing.JLabel num4;
+       private aurelienribon.ui.components.PaintedPanel rootPanel;
+       // End of variables declaration//GEN-END:variables
 
 }
index 6f3b672..b828460 100644 (file)
@@ -1,8 +1,6 @@
+
 package aurelienribon.libgdx.ui.dialogs;
 
-import aurelienribon.libgdx.LibraryDef;
-import aurelienribon.libgdx.ui.Ctx;
-import aurelienribon.ui.css.Style;
 import java.awt.Desktop;
 import java.awt.event.MouseAdapter;
 import java.awt.event.MouseEvent;
@@ -12,20 +10,23 @@ import java.net.MalformedURLException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
+
 import javax.imageio.ImageIO;
 import javax.swing.ImageIcon;
 import javax.swing.JFrame;
 import javax.swing.SwingConstants;
 import javax.swing.SwingUtilities;
+
 import res.Res;
+import aurelienribon.libgdx.LibraryDef;
+import aurelienribon.libgdx.ui.Ctx;
+import aurelienribon.ui.css.Style;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class LibraryInfoDialog extends javax.swing.JDialog {
-    public LibraryInfoDialog(JFrame parent, String libraryName) {
-        super(parent, true);
-        initComponents();
+       public LibraryInfoDialog (JFrame parent, String libraryName) {
+               super(parent, true);
+               initComponents();
 
                LibraryDef def = Ctx.cfg.libs.getDef(libraryName);
                nameLabel.setText(def.name);
@@ -55,32 +56,37 @@ public class LibraryInfoDialog extends javax.swing.JDialog {
                Style.registerCssClasses(paintedPanel1, ".optionGroupPanel");
                Style.registerCssClasses(descriptionLabel, ".libInfoDescLabel");
                Style.apply(getContentPane(), new Style(Res.getUrl("css/style.css")));
-    }
-
+       }
 
-       private void downloadLogo(final String url) {
-               new Thread(new Runnable() {@Override public void run() {
-                       try {
-                               final BufferedImage img = ImageIO.read(new URL(url));
-                               SwingUtilities.invokeLater(new Runnable() {@Override public void run() {
-                                       logoLabel.setHorizontalAlignment(SwingConstants.RIGHT);
-                                       logoLabel.setIcon(new ImageIcon(img));
-                               }});
-                       } catch (MalformedURLException ex) {
-                       } catch (IOException ex) {
+       private void downloadLogo (final String url) {
+               new Thread(new Runnable() {
+                       @Override
+                       public void run () {
+                               try {
+                                       final BufferedImage img = ImageIO.read(new URL(url));
+                                       SwingUtilities.invokeLater(new Runnable() {
+                                               @Override
+                                               public void run () {
+                                                       logoLabel.setHorizontalAlignment(SwingConstants.RIGHT);
+                                                       logoLabel.setIcon(new ImageIcon(img));
+                                               }
+                                       });
+                               } catch (MalformedURLException ex) {
+                               } catch (IOException ex) {
+                               }
                        }
-               }}).start();
+               }).start();
        }
 
        private static class BrowseMouseListener extends MouseAdapter {
                private final String url;
 
-               public BrowseMouseListener(String url) {
+               public BrowseMouseListener (String url) {
                        this.url = url;
                }
 
                @Override
-               public void mousePressed(MouseEvent e) {
+               public void mousePressed (MouseEvent e) {
                        if (!Desktop.isDesktopSupported()) return;
                        try {
                                Desktop.getDesktop().browse(new URI(url));
@@ -94,135 +100,144 @@ public class LibraryInfoDialog extends javax.swing.JDialog {
        // Generated stuff
        // -------------------------------------------------------------------------
 
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents() {
-
-        rootPanel = new aurelienribon.ui.components.PaintedPanel();
-        nameLabel = new javax.swing.JLabel();
-        paintedPanel1 = new aurelienribon.ui.components.PaintedPanel();
-        jLabel1 = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
-        jLabel3 = new javax.swing.JLabel();
-        versionLabel = new javax.swing.JLabel();
-        authorLabel = new javax.swing.JLabel();
-        homepageLabel = new javax.swing.JLabel();
-        descriptionLabel = new javax.swing.JLabel();
-        logoLabel = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
-        setTitle("Information");
-
-        nameLabel.setText("Library Name");
-
-        jLabel1.setText("Author: ");
-
-        jLabel2.setText("Project: ");
-
-        jLabel3.setText("Version: ");
-
-        versionLabel.setText("x.x.x");
-
-        authorLabel.setText("Aurelien Ribon");
-
-        homepageLabel.setText("http://www......");
-
-        javax.swing.GroupLayout paintedPanel1Layout = new javax.swing.GroupLayout(paintedPanel1);
-        paintedPanel1.setLayout(paintedPanel1Layout);
-        paintedPanel1Layout.setHorizontalGroup(
-            paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(paintedPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(paintedPanel1Layout.createSequentialGroup()
-                        .addComponent(jLabel2)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(homepageLabel))
-                    .addGroup(paintedPanel1Layout.createSequentialGroup()
-                        .addComponent(jLabel1)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(authorLabel))
-                    .addGroup(paintedPanel1Layout.createSequentialGroup()
-                        .addComponent(jLabel3)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(versionLabel)))
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
-        paintedPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3});
-
-        paintedPanel1Layout.setVerticalGroup(
-            paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, paintedPanel1Layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel3)
-                    .addComponent(versionLabel))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel1)
-                    .addComponent(authorLabel))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(homepageLabel)
-                    .addComponent(jLabel2))
-                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-        );
-
-        descriptionLabel.setText("Description");
-        descriptionLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
-        logoLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
-        logoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/noImage.png"))); // NOI18N
-        logoLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
-
-        javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
-        rootPanel.setLayout(rootPanelLayout);
-        rootPanelLayout.setHorizontalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(nameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 641, Short.MAX_VALUE)
-                    .addComponent(paintedPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(descriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(logoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                .addContainerGap())
-        );
-        rootPanelLayout.setVerticalGroup(
-            rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(rootPanelLayout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(nameLabel)
-                .addGap(18, 18, 18)
-                .addGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(descriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addGroup(rootPanelLayout.createSequentialGroup()
-                        .addComponent(logoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addGap(0, 26, Short.MAX_VALUE)))
-                .addGap(18, 18, 18)
-                .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addContainerGap())
-        );
-
-        getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel authorLabel;
-    private javax.swing.JLabel descriptionLabel;
-    private javax.swing.JLabel homepageLabel;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel logoLabel;
-    private javax.swing.JLabel nameLabel;
-    private aurelienribon.ui.components.PaintedPanel paintedPanel1;
-    private aurelienribon.ui.components.PaintedPanel rootPanel;
-    private javax.swing.JLabel versionLabel;
-    // End of variables declaration//GEN-END:variables
+       @SuppressWarnings("unchecked")
+       // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+       private void initComponents () {
+
+               rootPanel = new aurelienribon.ui.components.PaintedPanel();
+               nameLabel = new javax.swing.JLabel();
+               paintedPanel1 = new aurelienribon.ui.components.PaintedPanel();
+               jLabel1 = new javax.swing.JLabel();
+               jLabel2 = new javax.swing.JLabel();
+               jLabel3 = new javax.swing.JLabel();
+               versionLabel = new javax.swing.JLabel();
+               authorLabel = new javax.swing.JLabel();
+               homepageLabel = new javax.swing.JLabel();
+               descriptionLabel = new javax.swing.JLabel();
+               logoLabel = new javax.swing.JLabel();
+
+               setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
+               setTitle("Information");
+
+               nameLabel.setText("Library Name");
+
+               jLabel1.setText("Author: ");
+
+               jLabel2.setText("Project: ");
+
+               jLabel3.setText("Version: ");
+
+               versionLabel.setText("x.x.x");
+
+               authorLabel.setText("Aurelien Ribon");
+
+               homepageLabel.setText("http://www......");
+
+               javax.swing.GroupLayout paintedPanel1Layout = new javax.swing.GroupLayout(paintedPanel1);
+               paintedPanel1.setLayout(paintedPanel1Layout);
+               paintedPanel1Layout.setHorizontalGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               paintedPanel1Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               paintedPanel1Layout
+                                                       .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                                       .addGroup(
+                                                               paintedPanel1Layout.createSequentialGroup().addComponent(jLabel2)
+                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(homepageLabel))
+                                                       .addGroup(
+                                                               paintedPanel1Layout.createSequentialGroup().addComponent(jLabel1)
+                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(authorLabel))
+                                                       .addGroup(
+                                                               paintedPanel1Layout.createSequentialGroup().addComponent(jLabel3)
+                                                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(versionLabel)))
+                                       .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+
+               paintedPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel1, jLabel2, jLabel3});
+
+               paintedPanel1Layout.setVerticalGroup(paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                       .addGroup(
+                               javax.swing.GroupLayout.Alignment.TRAILING,
+                               paintedPanel1Layout
+                                       .createSequentialGroup()
+                                       .addContainerGap()
+                                       .addGroup(
+                                               paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel3)
+                                                       .addComponent(versionLabel))
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addGroup(
+                                               paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1)
+                                                       .addComponent(authorLabel))
+                                       .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                       .addGroup(
+                                               paintedPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(homepageLabel)
+                                                       .addComponent(jLabel2)).addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
+
+               descriptionLabel.setText("Description");
+               descriptionLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+               logoLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
+               logoLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/gfx/noImage.png"))); // NOI18N
+               logoLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
+
+               javax.swing.GroupLayout rootPanelLayout = new javax.swing.GroupLayout(rootPanel);
+               rootPanel.setLayout(rootPanelLayout);
+               rootPanelLayout.setHorizontalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addGroup(
+                                       rootPanelLayout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addComponent(nameLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 641, Short.MAX_VALUE)
+                                               .addComponent(paintedPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)
+                                               .addGroup(
+                                                       rootPanelLayout
+                                                               .createSequentialGroup()
+                                                               .addComponent(descriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                                       javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                                               .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                                                               .addComponent(logoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 200,
+                                                                       javax.swing.GroupLayout.PREFERRED_SIZE))).addContainerGap()));
+               rootPanelLayout.setVerticalGroup(rootPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
+                       rootPanelLayout
+                               .createSequentialGroup()
+                               .addContainerGap()
+                               .addComponent(nameLabel)
+                               .addGap(18, 18, 18)
+                               .addGroup(
+                                       rootPanelLayout
+                                               .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                               .addComponent(descriptionLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                                       Short.MAX_VALUE)
+                                               .addGroup(
+                                                       rootPanelLayout
+                                                               .createSequentialGroup()
+                                                               .addComponent(logoLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 250,
+                                                                       javax.swing.GroupLayout.PREFERRED_SIZE).addGap(0, 26, Short.MAX_VALUE)))
+                               .addGap(18, 18, 18)
+                               .addComponent(paintedPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
+                                       javax.swing.GroupLayout.PREFERRED_SIZE).addContainerGap()));
+
+               getContentPane().add(rootPanel, java.awt.BorderLayout.CENTER);
+
+               pack();
+       }// </editor-fold>//GEN-END:initComponents
+               // Variables declaration - do not modify//GEN-BEGIN:variables
+
+       private javax.swing.JLabel authorLabel;
+       private javax.swing.JLabel descriptionLabel;
+       private javax.swing.JLabel homepageLabel;
+       private javax.swing.JLabel jLabel1;
+       private javax.swing.JLabel jLabel2;
+       private javax.swing.JLabel jLabel3;
+       private javax.swing.JLabel logoLabel;
+       private javax.swing.JLabel nameLabel;
+       private aurelienribon.ui.components.PaintedPanel paintedPanel1;
+       private aurelienribon.ui.components.PaintedPanel rootPanel;
+       private javax.swing.JLabel versionLabel;
+       // End of variables declaration//GEN-END:variables
 
 }
index 48895d9..4fe07f1 100644 (file)
@@ -1,3 +1,4 @@
+
 package aurelienribon.utils;
 
 import java.io.BufferedInputStream;
@@ -7,15 +8,14 @@ import java.io.OutputStream;
 import java.net.HttpURLConnection;
 import java.net.URL;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class HttpUtils {
-       public static DownloadTask downloadAsync(URL input, OutputStream output, Callback callback) {
+       public static DownloadTask downloadAsync (URL input, OutputStream output, Callback callback) {
                final DownloadTask task = new DownloadTask(input, output, callback);
 
                new Thread(new Runnable() {
-                       @Override public void run() {
+                       @Override
+                       public void run () {
                                task.download();
                        }
                }).start();
@@ -24,10 +24,17 @@ public class HttpUtils {
        }
 
        public static class Callback {
-               public void completed() {}
-               public void canceled() {}
-               public void error(IOException ex) {}
-               public void updated(int length, int totalLength) {}
+               public void completed () {
+               }
+
+               public void canceled () {
+               }
+
+               public void error (IOException ex) {
+               }
+
+               public void updated (int length, int totalLength) {
+               }
        }
 
        public static class DownloadTask {
@@ -36,35 +43,35 @@ public class HttpUtils {
                private final Callback callback;
                private boolean run = true;
 
-               public DownloadTask(URL input, OutputStream output, Callback callback) {
+               public DownloadTask (URL input, OutputStream output, Callback callback) {
                        this.input = input;
                        this.output = output;
                        this.callback = callback;
                }
 
-               public void stop() {
+               public void stop () {
                        run = false;
                }
 
-               public URL getInput() {
+               public URL getInput () {
                        return input;
                }
 
-               public OutputStream getOutput() {
+               public OutputStream getOutput () {
                        return output;
                }
 
-               public Callback getCallback() {
+               public Callback getCallback () {
                        return callback;
                }
 
-               private void download() {
+               private void download () {
                        OutputStream os = null;
                        InputStream is = null;
                        IOException ex = null;
 
                        try {
-                               HttpURLConnection connection = (HttpURLConnection) input.openConnection();
+                               HttpURLConnection connection = (HttpURLConnection)input.openConnection();
                                connection.setDoInput(true);
                                connection.setDoOutput(false);
                                connection.setUseCaches(true);
@@ -89,13 +96,23 @@ public class HttpUtils {
                                ex = ex1;
 
                        } finally {
-                               if (os != null) try {os.flush(); os.close();} catch (IOException ex1) {}
-                               if (is != null) try {is.close();} catch (IOException ex1) {}
+                               if (os != null) try {
+                                       os.flush();
+                                       os.close();
+                               } catch (IOException ex1) {
+                               }
+                               if (is != null) try {
+                                       is.close();
+                               } catch (IOException ex1) {
+                               }
 
                                if (callback != null) {
-                                       if (ex != null) callback.error(ex);
-                                       else if (run == true) callback.completed();
-                                       else callback.canceled();
+                                       if (ex != null)
+                                               callback.error(ex);
+                                       else if (run == true)
+                                               callback.completed();
+                                       else
+                                               callback.canceled();
                                }
                        }
                }
index e19d1eb..3d7f322 100644 (file)
@@ -1,3 +1,4 @@
+
 package aurelienribon.utils;
 
 import java.util.ArrayList;
@@ -7,22 +8,20 @@ import java.util.List;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class ParseUtils {
-       public static String parseBlock(String input, String name, String defaultStr) {
+       public static String parseBlock (String input, String name, String defaultStr) {
                Matcher m = Pattern.compile("\\[" + name + "\\](.*?)(\\[|$)", Pattern.DOTALL).matcher(input);
                if (m.find()) return m.group(1).trim();
                return defaultStr;
        }
 
-       public static List<String> parseBlockAsList(String input, String name) {
+       public static List<String> parseBlockAsList (String input, String name) {
                Matcher m = Pattern.compile("\\[" + name + "\\](.*?)(\\[|$)", Pattern.DOTALL).matcher(input);
                if (m.find()) {
                        String str = m.group(1).trim();
                        List<String> lines = new ArrayList<String>(Arrays.asList(str.split("\n")));
-                       for (int i=lines.size()-1; i>=0; i--) {
+                       for (int i = lines.size() - 1; i >= 0; i--) {
                                String line = lines.get(i).trim();
                                lines.set(i, line);
                                if (line.equals("")) lines.remove(i);
index 4c31386..b44bea0 100644 (file)
@@ -1,3 +1,4 @@
+
 package aurelienribon.utils;
 
 import java.io.File;
@@ -8,41 +9,40 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class TemplateManager {
        private final Map<String, String> replacements = new HashMap<String, String>();
        private final String varPattern = "[a-zA-Z_][a-zA-Z0-9_]*";
 
-       public void clear() {
+       public void clear () {
                replacements.clear();
        }
 
-       public void define(String variable, String replacement) {
+       public void define (String variable, String replacement) {
                Matcher m = Pattern.compile(varPattern).matcher(variable);
                if (!m.matches()) throw new RuntimeException("Variable '" + variable + "' contains invalid characters");
                replacements.put(variable, replacement);
        }
 
-       public void define(String variable) {
+       public void define (String variable) {
                define(variable, "");
        }
 
-       public String process(File file) throws IOException {
+       public String process (File file) throws IOException {
                String input = FileUtils.readFileToString(file);
                return process(input);
        }
 
-       public void processOver(File file) throws IOException {
+       public void processOver (File file) throws IOException {
                String input = FileUtils.readFileToString(file);
                FileUtils.writeStringToFile(file, process(input));
        }
 
-       public String process(URL url) {
+       public String process (URL url) {
                try {
                        String input = IOUtils.toString(url);
                        return process(input);
@@ -51,7 +51,7 @@ public class TemplateManager {
                }
        }
 
-       public String process(InputStream stream) {
+       public String process (InputStream stream) {
                try {
                        String input = IOUtils.toString(stream);
                        return process(input);
@@ -60,7 +60,7 @@ public class TemplateManager {
                }
        }
 
-       public String process(String input) {
+       public String process (String input) {
                for (String var : replacements.keySet()) {
                        input = input.replaceAll("@\\{" + var + "\\}", replacements.get(var));
                }
@@ -73,8 +73,10 @@ public class TemplateManager {
                        String var = m.group(1);
                        String content = m.group(2);
 
-                       if (replacements.containsKey(var)) m.appendReplacement(sb, content);
-                       else m.appendReplacement(sb, "");
+                       if (replacements.containsKey(var))
+                               m.appendReplacement(sb, content);
+                       else
+                               m.appendReplacement(sb, "");
                }
 
                m.appendTail(sb);
index df60654..dfcfb94 100644 (file)
@@ -1,18 +1,18 @@
+
 package res;
 
 import java.io.InputStream;
 import java.net.URL;
 import java.util.HashMap;
 import java.util.Map;
+
 import javax.swing.ImageIcon;
 
-/**
- * @author Aurelien Ribon | http://www.aurelienribon.com/
- */
+/** @author Aurelien Ribon | http://www.aurelienribon.com/ */
 public class Res {
        private static Map<String, ImageIcon> imageIcons = new HashMap<String, ImageIcon>();
 
-       public static ImageIcon getImage(String name) {
+       public static ImageIcon getImage (String name) {
                if (!imageIcons.containsKey(name)) {
                        URL url = Res.class.getResource(name);
                        if (url == null) throw new RuntimeException("File not found: " + name);
@@ -22,13 +22,13 @@ public class Res {
                return imageIcons.get(name);
        }
 
-       public static InputStream getStream(String name) {
+       public static InputStream getStream (String name) {
                InputStream is = Res.class.getResourceAsStream(name);
                if (is == null) throw new RuntimeException("File not found: " + name);
                return is;
        }
 
-       public static URL getUrl(String name) {
+       public static URL getUrl (String name) {
                URL url = Res.class.getResource(name);
                if (url == null) throw new RuntimeException("File not found: " + name);
                return url;
index 00d4969..cc1acdb 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public class AnimatedBody extends NativeObject {\r
-       AnimatedBody(long addr) {\r
+       AnimatedBody (long addr) {\r
                super(addr);\r
        }\r
-}
\ No newline at end of file
+}\r
index bd34353..92a7e62 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public interface BreakageCallback {\r
 \r
-}
\ No newline at end of file
+}\r
index 94db2af..2d2a7c3 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public interface CollisionCallback {\r
 \r
-}
\ No newline at end of file
+}\r
index e7f4bd1..15d14fa 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 import com.badlogic.gdx.math.Vector3;\r
@@ -25,10 +26,10 @@ public class CollisionInfo {
        Geometry geometryB;\r
        int materialIdA;\r
        int materialIdB;\r
-       Vector3 bodyContactPointA;              // contact point A in body space of A\r
-       Vector3 bodyContactPointB;              // contact point B in body space of B\r
-       Vector3 worldContactPointA;     // contact point A in world space\r
-       Vector3 worldContactPointB;     // contact point B in world space\r
+       Vector3 bodyContactPointA; // contact point A in body space of A\r
+       Vector3 bodyContactPointB; // contact point B in body space of B\r
+       Vector3 worldContactPointA; // contact point A in world space\r
+       Vector3 worldContactPointB; // contact point B in world space\r
        Vector3 relativeVelocity;\r
        Vector3 collisionNormal;\r
-}
\ No newline at end of file
+}\r
index 3e72409..a051fd2 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public class CollisionTable extends NativeObject {\r
-       CollisionTable(long addr) {\r
+       CollisionTable (long addr) {\r
                super(addr);\r
        }\r
-}
\ No newline at end of file
+}\r
index 8e98f9f..1fba262 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
-/**\r
- * See <a href="http://www.tokamakphysics.com/documentation/reference/negeometry.htm">http://www.tokamakphysics.com/documentation/reference/negeometry.htm</a>\r
- * @author mzechner\r
- *\r
- */\r
+/** See <a href="http://www.tokamakphysics.com/documentation/reference/negeometry.htm">http://www.tokamakphysics.com/documentation/\r
+ * reference/negeometry.htm</a>\r
+ * @author mzechner */\r
 public class Geometry {\r
        long addr;\r
-       \r
-       Geometry(long addr) {\r
+\r
+       Geometry (long addr) {\r
                this.addr = addr;\r
        }\r
-}
\ No newline at end of file
+}\r
index dd19e5c..0814d94 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
-/**\r
- * See <a href="http://www.tokamakphysics.com/documentation/reference/nejoint.htm">http://www.tokamakphysics.com/documentation/reference/nejoint.htm</a>\r
- * @author mzechner\r
- *\r
- */\r
+/** See <a href="http://www.tokamakphysics.com/documentation/reference/nejoint.htm">http://www.tokamakphysics.com/documentation/\r
+ * reference/nejoint.htm</a>\r
+ * @author mzechner */\r
 public class Joint extends NativeObject {\r
-       Joint(long addr) {\r
+       Joint (long addr) {\r
                super(addr);\r
        }\r
-}
\ No newline at end of file
+}\r
index ca47681..a6ba087 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
-/**\r
- * Helper class for {@link Simulator#getMaterial(Material)} and {@link Simulator#setMaterial(Material)}\r
- * @author mzechner\r
- *\r
- */\r
+/** Helper class for {@link Simulator#getMaterial(Material)} and {@link Simulator#setMaterial(Material)}\r
+ * @author mzechner */\r
 public class Material {\r
        public int index;\r
        public float friction;\r
        public float restitution;\r
-       \r
-       public Material() {\r
+\r
+       public Material () {\r
        }\r
-       \r
-       public Material(int index, float friction, float restitution) {\r
+\r
+       public Material (int index, float friction, float restitution) {\r
                this.friction = friction;\r
                this.restitution = restitution;\r
        }\r
-}
\ No newline at end of file
+}\r
index 8fc0d5e..4551e27 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
-/**\r
- * Base class for all native objects. Stores the address.\r
- * @author mzechner\r
- *\r
- */\r
+/** Base class for all native objects. Stores the address.\r
+ * @author mzechner */\r
 public class NativeObject {\r
        long addr;\r
-       \r
-       NativeObject(long addr) {\r
+\r
+       NativeObject (long addr) {\r
                this.addr = addr;\r
        }\r
-}
\ No newline at end of file
+}\r
index 4ab18c7..9f63199 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
 \r
 public class RigidBody extends NativeObject {\r
+       // @off\r
        /*JNI\r
        #include <tokamak.h> \r
         */\r
index 7c09d91..557f30f 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public class RigidBodyController {\r
 \r
-}
\ No newline at end of file
+}\r
index f1d085b..a3a4090 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public interface RigidBodyControllerCallback {\r
 \r
-}
\ No newline at end of file
+}\r
index ed0baeb..2586df3 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public class Sensor extends NativeObject {\r
-       Sensor(long addr) {\r
+       Sensor (long addr) {\r
                super(addr);\r
        }\r
-}
\ No newline at end of file
+}\r
index 00fb888..cf81e7c 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 import com.badlogic.gdx.math.Vector3;\r
 import com.badlogic.gdx.utils.Disposable;\r
 import com.badlogic.gdx.utils.LongMap;\r
 \r
-/**\r
- * See <a href="http://www.tokamakphysics.com/documentation/reference/neSimulator.htm">http://www.tokamakphysics.com/documentation/reference/neSimulator.htm</a>.\r
+/** See <a\r
+ * href="http://www.tokamakphysics.com/documentation/reference/neSimulator.htm">http://www.tokamakphysics.com/documentation/\r
+ * reference/neSimulator.htm</a>.\r
  * \r
  * The original CreateSimulator and DestroySimulator methods are mapped to the constructor and the #dispose method.\r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class Simulator implements Disposable {\r
        private long addr;\r
        private LongMap<Object> objects = new LongMap<Object>();\r
        private CollisionTable collisionTable = new CollisionTable(0);\r
        private float[] tmpFloat = new float[3];\r
        private Vector3 gravity = new Vector3();\r
-       \r
+\r
+       // @off\r
        /*JNI\r
        #include <tokamak.h>\r
         */\r
index 8711c01..9c7dabd 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
-/***\r
- * See <a href="http://www.tokamakphysics.com/documentation/reference/neSimulatorSizeInfo.htm">http://www.tokamakphysics.com/documentation/reference/neSimulatorSizeInfo.htm</a>\r
- * @author mzechner\r
- *\r
- */\r
+/*** See <a href="http://www.tokamakphysics.com/documentation/reference/neSimulatorSizeInfo.htm">http://www.tokamakphysics.com/\r
+ * documentation/reference/neSimulatorSizeInfo.htm</a>\r
+ * @author mzechner */\r
 public class SimulatorSizeInfo {\r
        /** Number of rigid bodies in the simulation */\r
        public int rigidBodiesCount = 50;\r
@@ -29,14 +28,10 @@ public class SimulatorSizeInfo {
        public int rigidParticlesCount = 50;\r
        /** Number of controller instances in the simulation */\r
        public int controllersCount = 50;\r
-       /** Number of possible overlapping pairs.\r
-          This has the maximum value of (n x (n - 1)) / 2,\r
-          where n = rigidBodyCount + animatedBodyCount.\r
-          But in practice it rarely reach that high.\r
-          You can try to specify a smaller number to save memory.\r
-       */\r
+       /** Number of possible overlapping pairs. This has the maximum value of (n x (n - 1)) / 2, where n = rigidBodyCount +\r
+        * animatedBodyCount. But in practice it rarely reach that high. You can try to specify a smaller number to save memory. */\r
        public int overlappedPairsCount = 1125;\r
-       /** Number of collision geometries in the simulator*/\r
+       /** Number of collision geometries in the simulator */\r
        public int geometriesCount = 50;\r
        /** Number of joints in the simulation */\r
        public int constraintsCount = 100;\r
@@ -50,4 +45,4 @@ public class SimulatorSizeInfo {
        public int terrainNodesStartCount = 200;\r
        /** Grow by this size if run out of nodes */\r
        public int terrainNodesGrowByCount = -1;\r
-}
\ No newline at end of file
+}\r
index 5c1c05f..1460c62 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 public interface TerrainTriangleQueryCallback {\r
 \r
-}
\ No newline at end of file
+}\r
index 195c255..6fc0177 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
 import com.badlogic.gdx.jnigen.AntScriptGenerator;\r
@@ -25,62 +26,61 @@ import com.badlogic.gdx.math.Vector3;
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
 \r
 public class TokamakBuild {\r
-       public static void main(String[] args) throws Exception {\r
+       public static void main (String[] args) throws Exception {\r
                new NativeCodeGenerator().generate();\r
-               \r
-               String[] headers = { ".", "tokamak/include" };\r
-               String[] cppIncludes = { "**/*.cpp" };\r
-               \r
-               \r
+\r
+               String[] headers = {".", "tokamak/include"};\r
+               String[] cppIncludes = {"**/*.cpp"};\r
+\r
                BuildConfig config = new BuildConfig("gdx-tokamak", "../target", "libs", "jni");\r
                BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32home.compilerPrefix = "";\r
                win32home.buildFileName = "build-windows32home.xml";\r
                win32home.headerDirs = headers;\r
                win32home.cppIncludes = cppIncludes;\r
-               win32home.cppExcludes = new String[] { "**/perflinux.cpp" };\r
+               win32home.cppExcludes = new String[] {"**/perflinux.cpp"};\r
                win32home.excludeFromMasterBuildFile = true;\r
-               \r
+\r
                BuildTarget win32 = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
                win32.headerDirs = headers;\r
                win32.cppIncludes = cppIncludes;\r
-               win32.cppExcludes = new String[] { "**/perflinux.cpp" };\r
+               win32.cppExcludes = new String[] {"**/perflinux.cpp"};\r
                win32.linkerFlags += " -lm";\r
-               \r
+\r
                BuildTarget win64 = BuildTarget.newDefaultTarget(TargetOs.Windows, true);\r
                win64.headerDirs = headers;\r
                win64.cppIncludes = cppIncludes;\r
-               win64.cppExcludes = new String[] { "**/perflinux.cpp" };\r
+               win64.cppExcludes = new String[] {"**/perflinux.cpp"};\r
                win64.linkerFlags += " -lm";\r
-               \r
+\r
                BuildTarget lin32 = BuildTarget.newDefaultTarget(TargetOs.Linux, false);\r
                lin32.headerDirs = headers;\r
                lin32.cppIncludes = cppIncludes;\r
-               lin32.cppExcludes = new String[] { "**/perfwin32.cpp" };\r
+               lin32.cppExcludes = new String[] {"**/perfwin32.cpp"};\r
                lin32.linkerFlags += " -lm";\r
-               \r
+\r
                BuildTarget lin64 = BuildTarget.newDefaultTarget(TargetOs.Linux, true);\r
                lin64.headerDirs = headers;\r
                lin64.cppIncludes = cppIncludes;\r
-               lin64.cppExcludes = new String[] { "**/perfwin32.cpp" };\r
+               lin64.cppExcludes = new String[] {"**/perfwin32.cpp"};\r
                lin64.linkerFlags += " -lm";\r
-               \r
+\r
                BuildTarget mac = BuildTarget.newDefaultTarget(TargetOs.MacOsX, false);\r
                mac.headerDirs = headers;\r
                mac.cppIncludes = cppIncludes;\r
-               mac.cppExcludes = new String[] { "**/perfwin32.cpp" };\r
+               mac.cppExcludes = new String[] {"**/perfwin32.cpp"};\r
                mac.linkerFlags += " -lm";\r
-               \r
+\r
                BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android, false);\r
                android.headerDirs = headers;\r
                android.cppIncludes = cppIncludes;\r
-               android.cppExcludes = new String[] { "**/perfwin32.cpp" };\r
+               android.cppExcludes = new String[] {"**/perfwin32.cpp"};\r
                android.linkerFlags += " -lm";\r
-               \r
+\r
                new AntScriptGenerator().generate(config, win32home, win32, win64, lin32, lin64, mac, android);\r
                BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
                BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");\r
-               \r
+\r
                new SharedLibraryLoader("libs/gdx-tokamak-natives.jar").load("gdx-tokamak");\r
                Simulator sim = new Simulator(new SimulatorSizeInfo(), new Vector3(0, -10, 0));\r
                sim.setGravity(0, -1, 0);\r
@@ -89,4 +89,4 @@ public class TokamakBuild {
                sim.freeRigidBody(body);\r
                sim.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index db8bc93..3dbf2a4 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.tokamak;\r
 \r
-/**\r
- * See <a href="http://www.tokamakphysics.com/documentation/reference/neTriangleMesh.htm">http://www.tokamakphysics.com/documentation/reference/neTriangleMesh.htm</a>\r
- * @author mzechner\r
- *\r
- */\r
+/** See <a\r
+ * href="http://www.tokamakphysics.com/documentation/reference/neTriangleMesh.htm">http://www.tokamakphysics.com/documentation\r
+ * /reference/neTriangleMesh.htm</a>\r
+ * @author mzechner */\r
 public class TriangleMesh extends NativeObject {\r
-       TriangleMesh(long addr) {\r
+       TriangleMesh (long addr) {\r
                super(addr);\r
        }\r
-}
\ No newline at end of file
+}\r
index 700d417..407c132 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.tools.etc1;\r
 \r
 import java.io.File;\r
-import java.io.FilenameFilter;\r
 import java.util.ArrayList;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
index 61771d1..81adc8f 100644 (file)
@@ -340,7 +340,7 @@ public class Hiero4 extends JFrame {
                                                        }\r
 \r
                                                        @Override\r
-                                                       public void prepare () {                                                                \r
+                                                       public void prepare () {\r
                                                        }\r
                                                }));\r
                                                renderer.font = new BitmapFont(Gdx.files.absolute("out"), glyphRegion, false);\r
index 392af36..1d83fdc 100644 (file)
@@ -69,43 +69,31 @@ public class TexturePacker {
        int maxWidth, maxHeight;\r
        final Settings settings;\r
 \r
-       /**\r
-        * Used by squeeze method when ignoreBlankImages is false to add empty\r
-        * region for blank input images during the pack.\r
-        */\r
-       BufferedImage emptyImage = new BufferedImage(1, 1,\r
-                       BufferedImage.TYPE_4BYTE_ABGR);\r
-\r
-       public TexturePacker(Settings settings) {\r
+       /** Used by squeeze method when ignoreBlankImages is false to add empty region for blank input images during the pack. */\r
+       BufferedImage emptyImage = new BufferedImage(1, 1, BufferedImage.TYPE_4BYTE_ABGR);\r
+\r
+       public TexturePacker (Settings settings) {\r
                this.settings = settings;\r
                this.filter = new Filter(Direction.none, null, null, -1, -1, null, null);\r
        }\r
 \r
-       public TexturePacker(Settings settings, File inputDir, Filter filter,\r
-                       File outputDir, File packFile) throws IOException {\r
+       public TexturePacker (Settings settings, File inputDir, Filter filter, File outputDir, File packFile) throws IOException {\r
                this.settings = settings;\r
                this.filter = filter;\r
 \r
                // Collect and squeeze images.\r
                File[] files = inputDir.listFiles(filter);\r
-               if (files == null)\r
-                       return;\r
+               if (files == null) return;\r
                for (File file : files) {\r
-                       if (file.isDirectory())\r
-                               continue;\r
-                       String imageName = file.getAbsolutePath().substring(\r
-                                       inputDir.getAbsolutePath().length())\r
-                                       + "\n";\r
-                       if (imageName.startsWith("/") || imageName.startsWith("\\"))\r
-                               imageName = imageName.substring(1);\r
+                       if (file.isDirectory()) continue;\r
+                       String imageName = file.getAbsolutePath().substring(inputDir.getAbsolutePath().length()) + "\n";\r
+                       if (imageName.startsWith("/") || imageName.startsWith("\\")) imageName = imageName.substring(1);\r
                        int dotIndex = imageName.lastIndexOf('.');\r
-                       if (dotIndex != -1)\r
-                               imageName = imageName.substring(0, dotIndex);\r
+                       if (dotIndex != -1) imageName = imageName.substring(0, dotIndex);\r
                        addImage(ImageIO.read(file), imageName);\r
                }\r
 \r
-               if (images.isEmpty())\r
-                       return;\r
+               if (images.isEmpty()) return;\r
 \r
                log(inputDir.toString());\r
                if (filter.format != null)\r
@@ -115,20 +103,17 @@ public class TexturePacker {
                if (filter.minFilter != null && filter.magFilter != null)\r
                        log("Filter: " + filter.minFilter + ", " + filter.magFilter);\r
                else\r
-                       log("Filter: " + settings.defaultFilterMin + ", "\r
-                                       + settings.defaultFilterMag + " (default)");\r
-               if (filter.direction != Direction.none)\r
-                       log("Repeat: " + filter.direction);\r
+                       log("Filter: " + settings.defaultFilterMin + ", " + settings.defaultFilterMag + " (default)");\r
+               if (filter.direction != Direction.none) log("Repeat: " + filter.direction);\r
 \r
                process(outputDir, packFile, inputDir.getName());\r
        }\r
 \r
-       static void log(String message) {\r
-               if (!quiet)\r
-                       System.out.println(message);\r
+       static void log (String message) {\r
+               if (!quiet) System.out.println(message);\r
        }\r
 \r
-       public void addImage(BufferedImage image, String name) {\r
+       public void addImage (BufferedImage image, String name) {\r
                Image squeezed = squeeze(image, name, false);\r
                if (squeezed != null) {\r
                        if (settings.alias) {\r
@@ -144,10 +129,8 @@ public class TexturePacker {
                }\r
        }\r
 \r
-       public void process(File outputDir, File packFile, String prefix)\r
-                       throws IOException {\r
-               if (images.isEmpty())\r
-                       return;\r
+       public void process (File outputDir, File packFile, String prefix) throws IOException {\r
+               if (images.isEmpty()) return;\r
 \r
                minWidth = filter.width != -1 ? filter.width : settings.minWidth;\r
                minHeight = filter.height != -1 ? filter.height : settings.minHeight;\r
@@ -157,22 +140,17 @@ public class TexturePacker {
                        xPadding = !filter.direction.isX() ? settings.padding : 0;\r
                        yPadding = !filter.direction.isY() ? settings.padding : 0;\r
                } else {\r
-                       xPadding = images.size() > 1 && !filter.direction.isX() ? settings.padding\r
-                                       : 0;\r
-                       yPadding = images.size() > 1 && !filter.direction.isY() ? settings.padding\r
-                                       : 0;\r
+                       xPadding = images.size() > 1 && !filter.direction.isX() ? settings.padding : 0;\r
+                       yPadding = images.size() > 1 && !filter.direction.isY() ? settings.padding : 0;\r
                }\r
 \r
                outputDir.mkdirs();\r
                writer = new FileWriter(packFile, true);\r
                try {\r
                        while (!images.isEmpty())\r
-                               if (!writePage(prefix, outputDir))\r
-                                       break;\r
+                               if (!writePage(prefix, outputDir)) break;\r
                        if (writer != null) {\r
-                               log("Pixels eliminated: "\r
-                                               + (1 - compressedSize / (float) uncompressedSize) * 100\r
-                                               + "%");\r
+                               log("Pixels eliminated: " + (1 - compressedSize / (float)uncompressedSize) * 100 + "%");\r
                                log("");\r
                        }\r
                } finally {\r
@@ -180,7 +158,7 @@ public class TexturePacker {
                }\r
        }\r
 \r
-       private boolean writePage(String prefix, File outputDir) throws IOException {\r
+       private boolean writePage (String prefix, File outputDir) throws IOException {\r
                // Try reasonably hard to pack images into the smallest POT size.\r
                Comparator bestComparator = null;\r
                Comparator secondBestComparator = imageComparators.get(0);\r
@@ -195,8 +173,7 @@ public class TexturePacker {
                                // Pack as many images as possible, sorting the images different\r
                                // ways.\r
                                Collections.sort(images, comparator);\r
-                               int usedPixels = insert(null, new ArrayList(images), width,\r
-                                               height);\r
+                               int usedPixels = insert(null, new ArrayList(images), width, height);\r
                                // Store the best pack, in case not all images fit on the max\r
                                // texture size.\r
                                if (usedPixels > bestUsedPixels) {\r
@@ -214,10 +191,8 @@ public class TexturePacker {
                                        }\r
                                }\r
                        }\r
-                       if (width == maxWidth && height == maxHeight)\r
-                               break;\r
-                       if (bestComparator != null)\r
-                               break;\r
+                       if (width == maxWidth && height == maxHeight) break;\r
+                       if (bestComparator != null) break;\r
                        if (settings.pot) {\r
                                // 64,64 -> 128,64 -> 256,64 etc 64,128 -> 64,256 etc -> 128,128\r
                                // -> 256,128 etc.\r
@@ -230,8 +205,7 @@ public class TexturePacker {
                                                grownPixels = 0;\r
                                        }\r
                                } else if (i % 3 == 1) {\r
-                                       grownPixels += MathUtils.nextPowerOfTwo(height + 1)\r
-                                                       - height;\r
+                                       grownPixels += MathUtils.nextPowerOfTwo(height + 1) - height;\r
                                        height = MathUtils.nextPowerOfTwo(height + 1);\r
                                        if (height > maxHeight) {\r
                                                i++;\r
@@ -268,9 +242,7 @@ public class TexturePacker {
                                                grownPixels += incr;\r
                                        }\r
                                } else {\r
-                                       if (width == MathUtils.nextPowerOfTwo(width)\r
-                                                       && height == MathUtils.nextPowerOfTwo(height))\r
-                                               ii++;\r
+                                       if (width == MathUtils.nextPowerOfTwo(width) && height == MathUtils.nextPowerOfTwo(height)) ii++;\r
                                        if (ii % 2 == 1)\r
                                                width += incr;\r
                                        else\r
@@ -295,8 +267,7 @@ public class TexturePacker {
                        height = MathUtils.nextPowerOfTwo(height);\r
                }\r
                if (width > maxWidth || height > maxHeight) {\r
-                       System.out.println("ERROR: Images do not fit on max size: "\r
-                                       + maxWidth + "x" + maxHeight);\r
+                       System.out.println("ERROR: Images do not fit on max size: " + maxWidth + "x" + maxHeight);\r
                        return false;\r
                }\r
 \r
@@ -314,8 +285,7 @@ public class TexturePacker {
                        type = BufferedImage.TYPE_BYTE_GRAY;\r
                        break;\r
                default:\r
-                       throw new RuntimeException(\r
-                                       "Luminance Alpha format is not supported.");\r
+                       throw new RuntimeException("Luminance Alpha format is not supported.");\r
                }\r
 \r
                FileFormat fileFormat;\r
@@ -328,11 +298,9 @@ public class TexturePacker {
                float imageQuality = settings.defaultImageQuality;\r
 \r
                int imageNumber = 1;\r
-               File outputFile = new File(outputDir, prefix + imageNumber + "."\r
-                               + getFileExtension(fileFormat));\r
+               File outputFile = new File(outputDir, prefix + imageNumber + "." + getFileExtension(fileFormat));\r
                while (outputFile.exists())\r
-                       outputFile = new File(outputDir, prefix + ++imageNumber + "."\r
-                                       + getFileExtension(fileFormat));\r
+                       outputFile = new File(outputDir, prefix + ++imageNumber + "." + getFileExtension(fileFormat));\r
 \r
                writer.write("\n" + outputFile.getName() + "\n");\r
                Format format;\r
@@ -344,22 +312,18 @@ public class TexturePacker {
                        format = settings.defaultFormat;\r
                }\r
                if (filter.minFilter == null || filter.magFilter == null)\r
-                       writer.write("filter: " + settings.defaultFilterMin + ","\r
-                                       + settings.defaultFilterMag + "\n");\r
+                       writer.write("filter: " + settings.defaultFilterMin + "," + settings.defaultFilterMag + "\n");\r
                else\r
-                       writer.write("filter: " + filter.minFilter + "," + filter.magFilter\r
-                                       + "\n");\r
+                       writer.write("filter: " + filter.minFilter + "," + filter.magFilter + "\n");\r
                writer.write("repeat: " + filter.direction + "\n");\r
 \r
                BufferedImage canvas = new BufferedImage(width, height, type);\r
                insert(canvas, images, bestWidth, bestHeight);\r
-               log("Writing " + canvas.getWidth() + "x" + canvas.getHeight() + ": "\r
-                               + outputFile);\r
+               log("Writing " + canvas.getWidth() + "x" + canvas.getHeight() + ": " + outputFile);\r
 \r
                if (fileFormat == FileFormat.JPEG) {\r
-                       Iterator<ImageWriter> writers = ImageIO\r
-                                       .getImageWritersByFormatName("jpg");\r
-                       ImageWriter writer = (ImageWriter) writers.next();\r
+                       Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName("jpg");\r
+                       ImageWriter writer = (ImageWriter)writers.next();\r
                        ImageWriteParam param = writer.getDefaultWriteParam();\r
                        param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);\r
                        param.setCompressionQuality(imageQuality);\r
@@ -374,16 +338,14 @@ public class TexturePacker {
                        }\r
                } else {\r
                        ImageIO.write(canvas, getFileExtension(fileFormat), outputFile);\r
-                       if (!settings.pot)\r
-                               ImageIO.write(squeeze(ImageIO.read(outputFile), "", true),\r
-                                               getFileExtension(fileFormat), outputFile);\r
+                       if (!settings.pot) ImageIO.write(squeeze(ImageIO.read(outputFile), "", true), getFileExtension(fileFormat), outputFile);\r
                }\r
 \r
                compressedSize += canvas.getWidth() * canvas.getHeight();\r
                return true;\r
        }\r
 \r
-       private static String getFileExtension(FileFormat fileFormat) {\r
+       private static String getFileExtension (FileFormat fileFormat) {\r
                String retVal = "";\r
 \r
                switch (fileFormat) {\r
@@ -399,8 +361,7 @@ public class TexturePacker {
                return retVal;\r
        }\r
 \r
-       private int insert(BufferedImage canvas, ArrayList<Image> images,\r
-                       int width, int height) throws IOException {\r
+       private int insert (BufferedImage canvas, ArrayList<Image> images, int width, int height) throws IOException {\r
                if (settings.debug && canvas != null) {\r
                        Graphics g = canvas.getGraphics();\r
                        g.setColor(Color.green);\r
@@ -419,10 +380,8 @@ public class TexturePacker {
                } else {\r
                        // Pretend image is larger so padding on right and bottom edges is\r
                        // ignored.\r
-                       if (!filter.direction.isX())\r
-                               width += xPadding;\r
-                       if (!filter.direction.isY())\r
-                               height += yPadding;\r
+                       if (!filter.direction.isX()) width += xPadding;\r
+                       if (!filter.direction.isY()) height += yPadding;\r
                }\r
                Node root = new Node(x, y, width, height);\r
                int usedPixels = 0;\r
@@ -430,16 +389,14 @@ public class TexturePacker {
                        Image image = images.get(i);\r
                        Node node = root.insert(image, false);\r
                        if (node == null) {\r
-                               if (settings.rotate)\r
-                                       node = root.insert(image, true);\r
-                               if (node == null)\r
-                                       continue;\r
+                               if (settings.rotate) node = root.insert(image, true);\r
+                               if (node == null) continue;\r
                        }\r
                        usedPixels += image.getWidth() * image.getHeight();\r
                        images.remove(i);\r
                        if (canvas != null) {\r
                                node.writePackEntry();\r
-                               Graphics2D g = (Graphics2D) canvas.getGraphics();\r
+                               Graphics2D g = (Graphics2D)canvas.getGraphics();\r
                                if (image.rotate) {\r
                                        g.translate(node.left, node.top);\r
                                        g.rotate(-90 * MathUtils.degreesToRadians);\r
@@ -451,30 +408,20 @@ public class TexturePacker {
                                        int imageWidth = image.getWidth();\r
                                        int imageHeight = image.getHeight();\r
                                        // Copy corner pixels to fill corners of the padding.\r
-                                       g.drawImage(image, node.left - amount, node.top - amount,\r
-                                                       node.left, node.top, 0, 0, 1, 1, null);\r
-                                       g.drawImage(image, node.left + imageWidth, node.top\r
-                                                       - amount, node.left + imageWidth + amount,\r
-                                                       node.top, 0, 0, 1, 1, null);\r
-                                       g.drawImage(image, node.left - amount, node.top\r
-                                                       + imageHeight, node.left, node.top + imageHeight\r
-                                                       + amount, 0, 0, 1, 1, null);\r
-                                       g.drawImage(image, node.left + imageWidth, node.top\r
-                                                       + imageHeight, node.left + imageWidth + amount,\r
-                                                       node.top + imageHeight + amount, 0, 0, 1, 1, null);\r
+                                       g.drawImage(image, node.left - amount, node.top - amount, node.left, node.top, 0, 0, 1, 1, null);\r
+                                       g.drawImage(image, node.left + imageWidth, node.top - amount, node.left + imageWidth + amount, node.top, 0, 0, 1,\r
+                                               1, null);\r
+                                       g.drawImage(image, node.left - amount, node.top + imageHeight, node.left, node.top + imageHeight + amount, 0, 0,\r
+                                               1, 1, null);\r
+                                       g.drawImage(image, node.left + imageWidth, node.top + imageHeight, node.left + imageWidth + amount, node.top\r
+                                               + imageHeight + amount, 0, 0, 1, 1, null);\r
                                        // Copy edge picels into padding.\r
-                                       g.drawImage(image, node.left, node.top - amount, node.left\r
-                                                       + imageWidth, node.top, 0, 0, imageWidth, 1, null);\r
-                                       g.drawImage(image, node.left, node.top + imageHeight,\r
-                                                       node.left + imageWidth, node.top + imageHeight\r
-                                                                       + amount, 0, imageHeight - 1, imageWidth,\r
-                                                       imageHeight, null);\r
-                                       g.drawImage(image, node.left - amount, node.top, node.left,\r
-                                                       node.top + imageHeight, 0, 0, 1, imageHeight, null);\r
-                                       g.drawImage(image, node.left + imageWidth, node.top,\r
-                                                       node.left + imageWidth + amount, node.top\r
-                                                                       + imageHeight, imageWidth - 1, 0,\r
-                                                       imageWidth, imageHeight, null);\r
+                                       g.drawImage(image, node.left, node.top - amount, node.left + imageWidth, node.top, 0, 0, imageWidth, 1, null);\r
+                                       g.drawImage(image, node.left, node.top + imageHeight, node.left + imageWidth, node.top + imageHeight + amount, 0,\r
+                                               imageHeight - 1, imageWidth, imageHeight, null);\r
+                                       g.drawImage(image, node.left - amount, node.top, node.left, node.top + imageHeight, 0, 0, 1, imageHeight, null);\r
+                                       g.drawImage(image, node.left + imageWidth, node.top, node.left + imageWidth + amount, node.top + imageHeight,\r
+                                               imageWidth - 1, 0, imageWidth, imageHeight, null);\r
                                }\r
                                g.drawImage(image, node.left, node.top, null);\r
                                if (image.rotate) {\r
@@ -488,53 +435,45 @@ public class TexturePacker {
                                        int imageWidth = image.getWidth();\r
                                        int imageHeight = image.getHeight();\r
                                        if (image.rotate)\r
-                                               g.drawRect(node.left, node.top, imageHeight - 1,\r
-                                                               imageWidth - 1);\r
+                                               g.drawRect(node.left, node.top, imageHeight - 1, imageWidth - 1);\r
                                        else\r
-                                               g.drawRect(node.left, node.top, imageWidth - 1,\r
-                                                               imageHeight - 1);\r
+                                               g.drawRect(node.left, node.top, imageWidth - 1, imageHeight - 1);\r
                                }\r
                        }\r
                }\r
                return images.isEmpty() ? -1 : usedPixels;\r
        }\r
 \r
-       private Image squeeze(BufferedImage source, String name, boolean skipTopLeft) {\r
-               if (source == null)\r
-                       return null;\r
-               if (!filter.accept(source))\r
-                       return null;\r
+       private Image squeeze (BufferedImage source, String name, boolean skipTopLeft) {\r
+               if (source == null) return null;\r
+               if (!filter.accept(source)) return null;\r
                uncompressedSize += source.getWidth() * source.getHeight();\r
                WritableRaster alphaRaster = source.getAlphaRaster();\r
-               if (alphaRaster == null || !settings.stripWhitespace\r
-                               || name.contains("_ws"))\r
-                       return new Image(name, source, 0, 0, source.getWidth(),\r
-                                       source.getHeight());\r
+               if (alphaRaster == null || !settings.stripWhitespace || name.contains("_ws"))\r
+                       return new Image(name, source, 0, 0, source.getWidth(), source.getHeight());\r
                final byte[] a = new byte[1];\r
                int top = 0;\r
                int bottom = source.getHeight();\r
                if (!filter.direction.isY()) {\r
                        if (!skipTopLeft) {\r
-                               outer: for (int y = 0; y < source.getHeight(); y++) {\r
+                               outer:\r
+                               for (int y = 0; y < source.getHeight(); y++) {\r
                                        for (int x = 0; x < source.getWidth(); x++) {\r
                                                alphaRaster.getDataElements(x, y, a);\r
                                                int alpha = a[0];\r
-                                               if (alpha < 0)\r
-                                                       alpha += 256;\r
-                                               if (alpha > settings.alphaThreshold)\r
-                                                       break outer;\r
+                                               if (alpha < 0) alpha += 256;\r
+                                               if (alpha > settings.alphaThreshold) break outer;\r
                                        }\r
                                        top++;\r
                                }\r
                        }\r
-                       outer: for (int y = source.getHeight(); --y >= top;) {\r
+                       outer:\r
+                       for (int y = source.getHeight(); --y >= top;) {\r
                                for (int x = 0; x < source.getWidth(); x++) {\r
                                        alphaRaster.getDataElements(x, y, a);\r
                                        int alpha = a[0];\r
-                                       if (alpha < 0)\r
-                                               alpha += 256;\r
-                                       if (alpha > settings.alphaThreshold)\r
-                                               break outer;\r
+                                       if (alpha < 0) alpha += 256;\r
+                                       if (alpha > settings.alphaThreshold) break outer;\r
                                }\r
                                bottom--;\r
                        }\r
@@ -543,26 +482,24 @@ public class TexturePacker {
                int right = source.getWidth();\r
                if (!filter.direction.isX()) {\r
                        if (!skipTopLeft) {\r
-                               outer: for (int x = 0; x < source.getWidth(); x++) {\r
+                               outer:\r
+                               for (int x = 0; x < source.getWidth(); x++) {\r
                                        for (int y = top; y < bottom; y++) {\r
                                                alphaRaster.getDataElements(x, y, a);\r
                                                int alpha = a[0];\r
-                                               if (alpha < 0)\r
-                                                       alpha += 256;\r
-                                               if (alpha > settings.alphaThreshold)\r
-                                                       break outer;\r
+                                               if (alpha < 0) alpha += 256;\r
+                                               if (alpha > settings.alphaThreshold) break outer;\r
                                        }\r
                                        left++;\r
                                }\r
                        }\r
-                       outer: for (int x = source.getWidth(); --x >= left;) {\r
+                       outer:\r
+                       for (int x = source.getWidth(); --x >= left;) {\r
                                for (int y = top; y < bottom; y++) {\r
                                        alphaRaster.getDataElements(x, y, a);\r
                                        int alpha = a[0];\r
-                                       if (alpha < 0)\r
-                                               alpha += 256;\r
-                                       if (alpha > settings.alphaThreshold)\r
-                                               break outer;\r
+                                       if (alpha < 0) alpha += 256;\r
+                                       if (alpha > settings.alphaThreshold) break outer;\r
                                }\r
                                right--;\r
                        }\r
@@ -580,7 +517,7 @@ public class TexturePacker {
                return new Image(name, source, left, top, newWidth, newHeight);\r
        }\r
 \r
-       static private String hash(BufferedImage image) {\r
+       static private String hash (BufferedImage image) {\r
                try {\r
                        MessageDigest digest = MessageDigest.getInstance("SHA1");\r
                        WritableRaster raster = image.getRaster();\r
@@ -602,24 +539,19 @@ public class TexturePacker {
                Node child1, child2;\r
                Image image;\r
 \r
-               public Node(int left, int top, int width, int height) {\r
+               public Node (int left, int top, int width, int height) {\r
                        this.left = left;\r
                        this.top = top;\r
                        this.width = width;\r
                        this.height = height;\r
                }\r
 \r
-               /**\r
-                * Returns true if the image was inserted. If canvas != null, an entry\r
-                * is written to the pack file.\r
-                */\r
-               public Node insert(Image image, boolean rotate) throws IOException {\r
-                       if (this.image != null)\r
-                               return null;\r
+               /** Returns true if the image was inserted. If canvas != null, an entry is written to the pack file. */\r
+               public Node insert (Image image, boolean rotate) throws IOException {\r
+                       if (this.image != null) return null;\r
                        if (child1 != null) {\r
                                Node newNode = child1.insert(image, rotate);\r
-                               if (newNode != null)\r
-                                       return newNode;\r
+                               if (newNode != null) return newNode;\r
                                return child2.insert(image, rotate);\r
                        }\r
                        int imageWidth = image.getWidth();\r
@@ -631,8 +563,7 @@ public class TexturePacker {
                        }\r
                        int neededWidth = imageWidth + xPadding;\r
                        int neededHeight = imageHeight + yPadding;\r
-                       if (neededWidth > width || neededHeight > height)\r
-                               return null;\r
+                       if (neededWidth > width || neededHeight > height) return null;\r
                        if (neededWidth == width && neededHeight == height) {\r
                                this.image = image;\r
                                image.rotate = rotate;\r
@@ -642,28 +573,23 @@ public class TexturePacker {
                        int dh = height - neededHeight;\r
                        if (dw > dh) {\r
                                child1 = new Node(left, top, neededWidth, height);\r
-                               child2 = new Node(left + neededWidth, top, width - neededWidth,\r
-                                               height);\r
+                               child2 = new Node(left + neededWidth, top, width - neededWidth, height);\r
                        } else {\r
                                child1 = new Node(left, top, width, neededHeight);\r
-                               child2 = new Node(left, top + neededHeight, width, height\r
-                                               - neededHeight);\r
+                               child2 = new Node(left, top + neededHeight, width, height - neededHeight);\r
                        }\r
                        return child1.insert(image, rotate);\r
                }\r
 \r
-               void writePackEntry() throws IOException {\r
+               void writePackEntry () throws IOException {\r
                        writePackEntry(image, null);\r
                        for (Image alias : image.aliases)\r
                                writePackEntry(alias, image);\r
                }\r
 \r
-               /**\r
-                * @param image The Image to be written to the pack. \r
-                * @param source If the Image is an alias, the source is the original Image, otherwise null is expected.\r
-                */\r
-               private void writePackEntry(Image image, Image source)\r
-                               throws IOException {\r
+               /** @param image The Image to be written to the pack.\r
+                * @param source If the Image is an alias, the source is the original Image, otherwise null is expected. */\r
+               private void writePackEntry (Image image, Image source) throws IOException {\r
                        String imageName = image.name;\r
                        imageName = imageName.replace("\\", "/");\r
 \r
@@ -671,27 +597,19 @@ public class TexturePacker {
 \r
                        Matcher matcher = indexPattern.matcher(imageName);\r
                        int index = -1;\r
-                       if (matcher.matches())\r
-                               index = Integer.parseInt(matcher.group(1));\r
+                       if (matcher.matches()) index = Integer.parseInt(matcher.group(1));\r
 \r
                        int underscoreIndex = imageName.indexOf('_');\r
-                       if (underscoreIndex != -1)\r
-                               imageName = imageName.substring(0, underscoreIndex);\r
+                       if (underscoreIndex != -1) imageName = imageName.substring(0, underscoreIndex);\r
 \r
                        boolean rotate = source != null ? source.rotate : image.rotate;\r
-                       \r
+\r
                        writer.write(imageName + "\n");\r
                        writer.write("  rotate: " + rotate + "\n");\r
                        writer.write("  xy: " + left + ", " + top + "\n");\r
-                       writer.write("  size: " + image.getWidth() + ", "\r
-                                       + image.getHeight() + "\n");\r
-                       writer.write("  orig: " + image.originalWidth + ", "\r
-                                       + image.originalHeight + "\n");\r
-                       writer.write("  offset: "\r
-                                       + image.offsetX\r
-                                       + ", "\r
-                                       + (image.originalHeight - image.getHeight() - image.offsetY)\r
-                                       + "\n");\r
+                       writer.write("  size: " + image.getWidth() + ", " + image.getHeight() + "\n");\r
+                       writer.write("  orig: " + image.originalWidth + ", " + image.originalHeight + "\n");\r
+                       writer.write("  offset: " + image.offsetX + ", " + (image.originalHeight - image.getHeight() - image.offsetY) + "\n");\r
                        writer.write("  index: " + index + "\n");\r
                }\r
        }\r
@@ -703,11 +621,9 @@ public class TexturePacker {
                boolean rotate;\r
                ArrayList<Image> aliases = new ArrayList();\r
 \r
-               public Image(String name, BufferedImage src, int left, int top,\r
-                               int newWidth, int newHeight) {\r
-                       super(src.getColorModel(), src.getRaster().createWritableChild(\r
-                                       left, top, newWidth, newHeight, 0, 0, null), src\r
-                                       .getColorModel().isAlphaPremultiplied(), null);\r
+               public Image (String name, BufferedImage src, int left, int top, int newWidth, int newHeight) {\r
+                       super(src.getColorModel(), src.getRaster().createWritableChild(left, top, newWidth, newHeight, 0, 0, null), src\r
+                               .getColorModel().isAlphaPremultiplied(), null);\r
                        this.name = name;\r
                        offsetX = left;\r
                        offsetY = top;\r
@@ -715,7 +631,7 @@ public class TexturePacker {
                        originalHeight = src.getHeight();\r
                }\r
 \r
-               public String toString() {\r
+               public String toString () {\r
                        return name;\r
                }\r
        }\r
@@ -723,25 +639,22 @@ public class TexturePacker {
        static private ArrayList<Comparator> imageComparators = new ArrayList();\r
        static {\r
                imageComparators.add(new Comparator<Image>() {\r
-                       public int compare(Image image1, Image image2) {\r
+                       public int compare (Image image1, Image image2) {\r
                                int diff = image1.getHeight() - image2.getHeight();\r
-                               if (diff != 0)\r
-                                       return diff;\r
+                               if (diff != 0) return diff;\r
                                return image1.getWidth() - image2.getWidth();\r
                        }\r
                });\r
                imageComparators.add(new Comparator<Image>() {\r
-                       public int compare(Image image1, Image image2) {\r
+                       public int compare (Image image1, Image image2) {\r
                                int diff = image1.getWidth() - image2.getWidth();\r
-                               if (diff != 0)\r
-                                       return diff;\r
+                               if (diff != 0) return diff;\r
                                return image1.getHeight() - image2.getHeight();\r
                        }\r
                });\r
                imageComparators.add(new Comparator<Image>() {\r
-                       public int compare(Image image1, Image image2) {\r
-                               return image1.getWidth() * image1.getHeight()\r
-                                               - image2.getWidth() * image2.getHeight();\r
+                       public int compare (Image image1, Image image2) {\r
+                               return image1.getWidth() * image1.getHeight() - image2.getWidth() * image2.getHeight();\r
                        }\r
                });\r
        }\r
@@ -760,9 +673,8 @@ public class TexturePacker {
                int height = -1;\r
                Settings settings;\r
 \r
-               public Filter(Direction direction, FileFormat fileFormat,\r
-                               Format format, int width, int height, TextureFilter minFilter,\r
-                               TextureFilter magFilter) {\r
+               public Filter (Direction direction, FileFormat fileFormat, Format format, int width, int height, TextureFilter minFilter,\r
+                       TextureFilter magFilter) {\r
                        this.direction = direction;\r
                        this.fileFormat = fileFormat;\r
                        this.format = format;\r
@@ -772,42 +684,33 @@ public class TexturePacker {
                        this.magFilter = magFilter;\r
                }\r
 \r
-               public boolean accept(File dir, String name) {\r
+               public boolean accept (File dir, String name) {\r
                        switch (direction) {\r
                        case none:\r
-                               if (name.contains("_x") || name.contains("_y"))\r
-                                       return false;\r
+                               if (name.contains("_x") || name.contains("_y")) return false;\r
                                break;\r
                        case x:\r
-                               if (!name.contains("_x") || name.contains("_xy"))\r
-                                       return false;\r
+                               if (!name.contains("_x") || name.contains("_xy")) return false;\r
                                break;\r
                        case y:\r
-                               if (!name.contains("_y") || name.contains("_xy"))\r
-                                       return false;\r
+                               if (!name.contains("_y") || name.contains("_xy")) return false;\r
                                break;\r
                        case xy:\r
-                               if (!name.contains("_xy"))\r
-                                       return false;\r
+                               if (!name.contains("_xy")) return false;\r
                                break;\r
                        }\r
 \r
                        if (format != null) {\r
-                               if (!name.contains("_" + formatToAbbrev.get(format)))\r
-                                       return false;\r
+                               if (!name.contains("_" + formatToAbbrev.get(format))) return false;\r
                        } else {\r
                                // Return if name has a format.\r
                                for (String f : formatToAbbrev.values())\r
-                                       if (name.contains("_" + f))\r
-                                               return false;\r
+                                       if (name.contains("_" + f)) return false;\r
                        }\r
 \r
                        if (minFilter != null && magFilter != null) {\r
-                               if (!name.contains("_" + filterToAbbrev.get(minFilter) + ","\r
-                                               + filterToAbbrev.get(magFilter) + ".")\r
-                                               && !name.contains("_" + filterToAbbrev.get(minFilter)\r
-                                                               + "," + filterToAbbrev.get(magFilter) + "_"))\r
-                                       return false;\r
+                               if (!name.contains("_" + filterToAbbrev.get(minFilter) + "," + filterToAbbrev.get(magFilter) + ".")\r
+                                       && !name.contains("_" + filterToAbbrev.get(minFilter) + "," + filterToAbbrev.get(magFilter) + "_")) return false;\r
                        } else {\r
                                // Return if the name has a filter.\r
                                for (String f : filterToAbbrev.values()) {\r
@@ -816,9 +719,7 @@ public class TexturePacker {
                                        if (tagIndex != -1) {\r
                                                String rest = name.substring(tagIndex + tag.length());\r
                                                for (String f2 : filterToAbbrev.values())\r
-                                                       if (rest.startsWith(f2 + ".")\r
-                                                                       || rest.startsWith(f2 + "_"))\r
-                                                               return false;\r
+                                                       if (rest.startsWith(f2 + ".") || rest.startsWith(f2 + "_")) return false;\r
                                        }\r
                                }\r
                        }\r
@@ -826,11 +727,9 @@ public class TexturePacker {
                        return true;\r
                }\r
 \r
-               public boolean accept(BufferedImage image) {\r
-                       if (width != -1 && image.getWidth() != width)\r
-                               return false;\r
-                       if (height != -1 && image.getHeight() != height)\r
-                               return false;\r
+               public boolean accept (BufferedImage image) {\r
+                       if (width != -1 && image.getWidth() != width) return false;\r
+                       if (height != -1 && image.getHeight() != height) return false;\r
                        return true;\r
                }\r
        }\r
@@ -838,11 +737,11 @@ public class TexturePacker {
        static private enum Direction {\r
                x, y, xy, none;\r
 \r
-               public boolean isX() {\r
+               public boolean isX () {\r
                        return this == x || this == xy;\r
                }\r
 \r
-               public boolean isY() {\r
+               public boolean isY () {\r
                        return this == y || this == xy;\r
                }\r
        }\r
@@ -889,34 +788,26 @@ public class TexturePacker {
                public boolean alias = true;\r
                public boolean edgePadding = true;\r
 \r
-               /**\r
-                * True if blank images should be ignored when building the texture pack\r
-                * or false if empty regions should be created for them.\r
-                */\r
+               /** True if blank images should be ignored when building the texture pack or false if empty regions should be created for\r
+                * them. */\r
                public boolean ignoreBlankImages = true;\r
 \r
-               /**\r
-                * Specifies the crc file path used when incremental is enabled, if not\r
-                * specified the file is created in the user folder, inside the\r
-                * .texturepacker folder.\r
-                */\r
+               /** Specifies the crc file path used when incremental is enabled, if not specified the file is created in the user folder,\r
+                * inside the .texturepacker folder. */\r
                public String incrementalFilePath = null;\r
 \r
                HashMap<String, Long> crcs = new HashMap();\r
                HashMap<String, String> packSections = new HashMap();\r
        }\r
 \r
-       static private void process(Settings settings, File rootDir, File inputDir,\r
-                       File outputDir, File packFile) throws IOException {\r
-               if (inputDir.getName().startsWith("."))\r
-                       return;\r
+       static private void process (Settings settings, File rootDir, File inputDir, File outputDir, File packFile) throws IOException {\r
+               if (inputDir.getName().startsWith(".")) return;\r
 \r
                // Abort if nothing has changed.\r
                boolean skip = false;\r
                if (settings.incremental) {\r
                        File[] files = inputDir.listFiles();\r
-                       if (files == null)\r
-                               return;\r
+                       if (files == null) return;\r
                        boolean noneHaveChanged = true;\r
                        int childCountNow = 0;\r
 \r
@@ -925,24 +816,20 @@ public class TexturePacker {
                        // specified.\r
                        boolean useAbsolutePaths = true;\r
 \r
-                       if (settings.incrementalFilePath != null)\r
-                               useAbsolutePaths = false;\r
+                       if (settings.incrementalFilePath != null) useAbsolutePaths = false;\r
 \r
                        for (File file : files) {\r
-                               if (file.isDirectory())\r
-                                       continue;\r
+                               if (file.isDirectory()) continue;\r
                                String path = file.getAbsolutePath();\r
 \r
                                if (!useAbsolutePaths) {\r
                                        String rootFolderAbsolutePath = rootDir.getAbsolutePath();\r
-                                       if (isSubPath(rootFolderAbsolutePath, path))\r
-                                               path = removeSubPath(rootFolderAbsolutePath, path);\r
+                                       if (isSubPath(rootFolderAbsolutePath, path)) path = removeSubPath(rootFolderAbsolutePath, path);\r
                                }\r
 \r
                                Long crcOld = settings.crcs.get(path);\r
                                long crcNow = crc(file);\r
-                               if (crcOld == null || crcOld != crcNow)\r
-                                       noneHaveChanged = false;\r
+                               if (crcOld == null || crcOld != crcNow) noneHaveChanged = false;\r
 \r
                                settings.crcs.put(path, crcNow);\r
                                childCountNow++;\r
@@ -952,14 +839,12 @@ public class TexturePacker {
 \r
                        if (!useAbsolutePaths) {\r
                                String rootFolderAbsolutePath = rootDir.getAbsolutePath();\r
-                               if (isSubPath(rootFolderAbsolutePath, path))\r
-                                       path = removeSubPath(rootFolderAbsolutePath, path);\r
+                               if (isSubPath(rootFolderAbsolutePath, path)) path = removeSubPath(rootFolderAbsolutePath, path);\r
                        }\r
 \r
                        Long childCountOld = settings.crcs.get(path);\r
-                       if (childCountOld == null || childCountNow != childCountOld)\r
-                               noneHaveChanged = false;\r
-                       settings.crcs.put(path, (long) childCountNow);\r
+                       if (childCountOld == null || childCountNow != childCountOld) noneHaveChanged = false;\r
+                       settings.crcs.put(path, (long)childCountNow);\r
 \r
                        if (outputDir.exists()) {\r
                                boolean foundPage = false;\r
@@ -970,8 +855,7 @@ public class TexturePacker {
                                                break;\r
                                        }\r
                                }\r
-                               if (!foundPage)\r
-                                       noneHaveChanged = false;\r
+                               if (!foundPage) noneHaveChanged = false;\r
                        }\r
 \r
                        String section = settings.packSections.get(inputDir.getName());\r
@@ -993,11 +877,7 @@ public class TexturePacker {
                                String prefix = inputDir.getName();\r
                                for (File file : outputDir.listFiles())\r
                                        if (file.getName().startsWith(prefix)\r
-                                                       && file.getName()\r
-                                                                       .endsWith(\r
-                                                                                       "."\r
-                                                                                                       + getFileExtension(settings.defaultFileFormat)))\r
-                                               file.delete();\r
+                                               && file.getName().endsWith("." + getFileExtension(settings.defaultFileFormat))) file.delete();\r
                        }\r
 \r
                        // Just check all combinations, because we are extremely lazy.\r
@@ -1013,39 +893,25 @@ public class TexturePacker {
                                        TextureFilter min = filters.get(ii);\r
                                        for (int iii = 0; iii < nn; iii++) {\r
                                                TextureFilter mag = filters.get(iii);\r
-                                               if ((min == null && mag != null)\r
-                                                               || (min != null && mag == null))\r
-                                                       continue;\r
+                                               if ((min == null && mag != null) || (min != null && mag == null)) continue;\r
 \r
-                                               Filter filter = new Filter(Direction.none,\r
-                                                               settings.defaultFileFormat, format, -1, -1,\r
-                                                               min, mag);\r
-                                               new TexturePacker(settings, inputDir, filter,\r
-                                                               outputDir, packFile);\r
+                                               Filter filter = new Filter(Direction.none, settings.defaultFileFormat, format, -1, -1, min, mag);\r
+                                               new TexturePacker(settings, inputDir, filter, outputDir, packFile);\r
 \r
                                                for (int width = settings.minWidth; width <= settings.maxWidth; width <<= 1) {\r
-                                                       filter = new Filter(Direction.x,\r
-                                                                       settings.defaultFileFormat, format, width,\r
-                                                                       -1, min, mag);\r
-                                                       new TexturePacker(settings, inputDir, filter,\r
-                                                                       outputDir, packFile);\r
+                                                       filter = new Filter(Direction.x, settings.defaultFileFormat, format, width, -1, min, mag);\r
+                                                       new TexturePacker(settings, inputDir, filter, outputDir, packFile);\r
                                                }\r
 \r
                                                for (int height = settings.minHeight; height <= settings.maxHeight; height <<= 1) {\r
-                                                       filter = new Filter(Direction.y,\r
-                                                                       settings.defaultFileFormat, format, -1,\r
-                                                                       height, min, mag);\r
-                                                       new TexturePacker(settings, inputDir, filter,\r
-                                                                       outputDir, packFile);\r
+                                                       filter = new Filter(Direction.y, settings.defaultFileFormat, format, -1, height, min, mag);\r
+                                                       new TexturePacker(settings, inputDir, filter, outputDir, packFile);\r
                                                }\r
 \r
                                                for (int width = settings.minWidth; width <= settings.maxWidth; width <<= 1) {\r
                                                        for (int height = settings.minHeight; height <= settings.maxHeight; height <<= 1) {\r
-                                                               filter = new Filter(Direction.xy,\r
-                                                                               settings.defaultFileFormat, format,\r
-                                                                               width, height, min, mag);\r
-                                                               new TexturePacker(settings, inputDir, filter,\r
-                                                                               outputDir, packFile);\r
+                                                               filter = new Filter(Direction.xy, settings.defaultFileFormat, format, width, height, min, mag);\r
+                                                               new TexturePacker(settings, inputDir, filter, outputDir, packFile);\r
                                                        }\r
                                                }\r
                                        }\r
@@ -1055,19 +921,16 @@ public class TexturePacker {
 \r
                // Process subdirectories.\r
                File[] files = inputDir.listFiles();\r
-               if (files == null)\r
-                       return;\r
+               if (files == null) return;\r
                for (File file : files)\r
-                       if (file.isDirectory())\r
-                               process(settings, rootDir, file, outputDir, packFile);\r
+                       if (file.isDirectory()) process(settings, rootDir, file, outputDir, packFile);\r
        }\r
 \r
-       static public void process(Settings settings, String input, String output) {\r
+       static public void process (Settings settings, String input, String output) {\r
                process(settings, input, output, "pack");\r
        }\r
 \r
-       static public void process(Settings settings, String input, String output,\r
-                       String packFileName) {\r
+       static public void process (Settings settings, String input, String output, String packFileName) {\r
                try {\r
                        File inputDir = new File(input);\r
                        File outputDir = new File(output);\r
@@ -1088,44 +951,33 @@ public class TexturePacker {
                                String incrementalFilePath = settings.incrementalFilePath;\r
 \r
                                if (incrementalFilePath == null)\r
-                                       incrementalFilePath = System.getProperty("user.home")\r
-                                                       + "/.texturepacker/"\r
-                                                       + hash(inputDir.getAbsolutePath());\r
+                                       incrementalFilePath = System.getProperty("user.home") + "/.texturepacker/" + hash(inputDir.getAbsolutePath());\r
 \r
                                incrmentalFile = new File(incrementalFilePath);\r
 \r
                                if (incrmentalFile.exists()) {\r
-                                       BufferedReader reader = new BufferedReader(new FileReader(\r
-                                                       incrmentalFile));\r
+                                       BufferedReader reader = new BufferedReader(new FileReader(incrmentalFile));\r
                                        while (true) {\r
                                                String path = reader.readLine();\r
-                                               if (path == null)\r
-                                                       break;\r
+                                               if (path == null) break;\r
                                                String crc = reader.readLine();\r
-                                               if (crc == null)\r
-                                                       break;\r
+                                               if (crc == null) break;\r
                                                settings.crcs.put(path, Long.parseLong(crc));\r
                                        }\r
                                        reader.close();\r
                                }\r
 \r
                                // Store the pack file text for each section.\r
-                               BufferedReader reader = new BufferedReader(new FileReader(\r
-                                               packFile));\r
+                               BufferedReader reader = new BufferedReader(new FileReader(packFile));\r
                                StringBuilder buffer = new StringBuilder(2048);\r
                                while (true) {\r
                                        String imageName = reader.readLine();\r
-                                       if (imageName == null)\r
-                                               break;\r
-                                       if (imageName.length() == 0)\r
-                                               continue;\r
+                                       if (imageName == null) break;\r
+                                       if (imageName.length() == 0) continue;\r
 \r
-                                       String pageName = imageName.replaceAll("\\d+."\r
-                                                       + getFileExtension(settings.defaultFileFormat)\r
-                                                       + "$", "");\r
+                                       String pageName = imageName.replaceAll("\\d+." + getFileExtension(settings.defaultFileFormat) + "$", "");\r
                                        String section = settings.packSections.get(pageName);\r
-                                       if (section != null)\r
-                                               buffer.append(section);\r
+                                       if (section != null) buffer.append(section);\r
 \r
                                        // buffer.append("****start\n");\r
                                        buffer.append('\n');\r
@@ -1133,8 +985,7 @@ public class TexturePacker {
                                        buffer.append('\n');\r
                                        while (true) {\r
                                                String line = reader.readLine();\r
-                                               if (line == null || line.length() == 0)\r
-                                                       break;\r
+                                               if (line == null || line.length() == 0) break;\r
                                                buffer.append(line);\r
                                                buffer.append('\n');\r
                                        }\r
@@ -1164,7 +1015,7 @@ public class TexturePacker {
                }\r
        }\r
 \r
-       static private String hash(String value) {\r
+       static private String hash (String value) {\r
                try {\r
                        MessageDigest digest = MessageDigest.getInstance("SHA1");\r
                        digest.update(value.getBytes());\r
@@ -1174,15 +1025,14 @@ public class TexturePacker {
                }\r
        }\r
 \r
-       static private long crc(File file) {\r
+       static private long crc (File file) {\r
                try {\r
                        FileInputStream input = new FileInputStream(file);\r
                        byte[] buffer = new byte[4096];\r
                        CRC32 crc32 = new CRC32();\r
                        while (true) {\r
                                int length = input.read(buffer);\r
-                               if (length == -1)\r
-                                       break;\r
+                               if (length == -1) break;\r
                                crc32.update(buffer, 0, length);\r
                        }\r
                        input.close();\r
@@ -1192,22 +1042,21 @@ public class TexturePacker {
                }\r
        }\r
 \r
-       static boolean isSubPath(String path, String subPath) {\r
-               if (subPath.length() < path.length())\r
-                       return false;\r
+       static boolean isSubPath (String path, String subPath) {\r
+               if (subPath.length() < path.length()) return false;\r
                String subPathSubString = subPath.substring(0, path.length());\r
                return subPathSubString.equals(path);\r
        }\r
 \r
-       static boolean isAbsolutePath(String path) {\r
+       static boolean isAbsolutePath (String path) {\r
                return new File(path).isAbsolute();\r
        }\r
 \r
-       static String removeSubPath(String path, String subPath) {\r
+       static String removeSubPath (String path, String subPath) {\r
                return subPath.replace(path, "");\r
        }\r
 \r
-       static public void main(String[] args) throws Exception {\r
+       static public void main (String[] args) throws Exception {\r
                String input, output;\r
                if (args.length != 2) {\r
                        System.out.println("Usage: INPUTDIR OUTPUTDIR");\r
@@ -1220,4 +1069,3 @@ public class TexturePacker {
                process(settings, input, output);\r
        }\r
 }\r
-\r
index 41936e1..f94b375 100644 (file)
@@ -8,7 +8,6 @@ import java.io.File;
 import java.io.FileWriter;\r
 import java.io.IOException;\r
 import java.util.ArrayList;\r
-import java.util.HashMap;\r
 import java.util.Iterator;\r
 \r
 import javax.imageio.IIOImage;\r
index 08a6054..50b5b88 100644 (file)
@@ -3,12 +3,10 @@ package com.badlogic.gdx.tools.imagepacker;
 \r
 import java.io.File;\r
 import java.io.FileReader;\r
-import java.io.FilenameFilter;\r
 import java.util.ArrayList;\r
 import java.util.regex.Pattern;\r
 \r
 import com.badlogic.gdx.tools.FileProcessor;\r
-import com.badlogic.gdx.tools.FileProcessor.InputFile;\r
 import com.badlogic.gdx.tools.imagepacker.TexturePacker2.Settings;\r
 import com.badlogic.gdx.utils.Json;\r
 import com.badlogic.gdx.utils.JsonReader;\r
index 6bd1912..b43b044 100644 (file)
@@ -21,8 +21,6 @@ import java.awt.Insets;
 \r
 import javax.swing.JLabel;\r
 import javax.swing.JPanel;\r
-import javax.swing.JSpinner;\r
-import javax.swing.SpinnerNumberModel;\r
 import javax.swing.event.ChangeEvent;\r
 import javax.swing.event.ChangeListener;\r
 \r
index 01e474a..c35041e 100644 (file)
@@ -25,8 +25,6 @@ import javax.swing.BorderFactory;
 import javax.swing.JButton;\r
 import javax.swing.JLabel;\r
 import javax.swing.JPanel;\r
-import javax.swing.JSpinner;\r
-import javax.swing.SpinnerNumberModel;\r
 import javax.swing.event.ChangeEvent;\r
 import javax.swing.event.ChangeListener;\r
 \r
index 41face9..186f4a8 100644 (file)
@@ -28,8 +28,6 @@ import javax.swing.JButton;
 import javax.swing.JCheckBox;\r
 import javax.swing.JLabel;\r
 import javax.swing.JPanel;\r
-import javax.swing.JSpinner;\r
-import javax.swing.SpinnerNumberModel;\r
 import javax.swing.event.ChangeEvent;\r
 import javax.swing.event.ChangeListener;\r
 \r
index 9c74a60..c945839 100644 (file)
 \r
 package com.badlogic.gdx.tools.particleeditor;\r
 \r
-import java.awt.BasicStroke;\r
 import java.awt.Color;\r
 import java.awt.Dimension;\r
 import java.awt.EventQueue;\r
-import java.awt.Font;\r
 import java.awt.FontMetrics;\r
 import java.awt.Graphics;\r
 import java.awt.Graphics2D;\r
 import java.awt.GridBagLayout;\r
-import java.awt.Insets;\r
 import java.awt.event.MouseAdapter;\r
 import java.awt.event.MouseEvent;\r
 import java.awt.event.MouseMotionListener;\r
-import java.util.ArrayList;\r
 \r
-import javax.swing.BorderFactory;\r
 import javax.swing.JFrame;\r
 import javax.swing.JPanel;\r
-import javax.swing.JTextField;\r
 import javax.swing.event.ChangeEvent;\r
 import javax.swing.event.ChangeListener;\r
 \r
index 5c93859..3dc3d33 100644 (file)
@@ -21,9 +21,6 @@ import android.os.Bundle;
 import com.badlogic.gdx.backends.android.AndroidApplication;\r
 import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;\r
 import com.badlogic.gdx.graphics.g3d.experimental.HybridLightTest;\r
-import com.badlogic.gdx.graphics.g3d.test.KeyframedModelViewer;\r
-import com.badlogic.gdx.graphics.g3d.test.StillModelViewerGL20;\r
-import com.badlogic.gdx.graphics.g3d.test.Viewer;\r
 \r
 public class ModelViewerActivity extends AndroidApplication {\r
        /** Called when the activity is first created. */\r
index cebf9f2..4aafc81 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d;\r
 \r
 public interface AnimatedModelInstance extends StillModelInstance {\r
@@ -21,4 +22,4 @@ public interface AnimatedModelInstance extends StillModelInstance {
        public float getAnimationTime ();\r
 \r
        public boolean isLooping ();\r
-}
\ No newline at end of file
+}\r
index 178af13..359ac0f 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d;\r
 \r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
@@ -57,4 +58,4 @@ public class AnimatedModelNode extends StillModelNode implements AnimatedModelIn
                return copy;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 316feb3..307a146 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d;\r
 \r
 import com.badlogic.gdx.graphics.g3d.loaders.ModelLoaderRegistry;\r
@@ -26,4 +27,4 @@ public class ModelLoaderHints {
        public ModelLoaderHints (boolean flipV) {\r
                this.flipV = flipV;\r
        }\r
-}
\ No newline at end of file
+}\r
index 1958ae0..c889890 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d;\r
 \r
 import com.badlogic.gdx.graphics.g3d.model.AnimatedModel;\r
@@ -26,4 +27,4 @@ public interface ModelRenderer {
        public void draw (AnimatedModel model, AnimatedModelInstance instance);\r
 \r
        public void end ();\r
-}
\ No newline at end of file
+}\r
index e47417a..e4d80c7 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
  ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d;\r
 \r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
@@ -20,12 +21,12 @@ import com.badlogic.gdx.math.Matrix4;
 import com.badlogic.gdx.math.Vector3;\r
 \r
 public interface StillModelInstance {\r
-       public Matrix4 getTransform();\r
+       public Matrix4 getTransform ();\r
 \r
-       public Vector3 getSortCenter();\r
+       public Vector3 getSortCenter ();\r
 \r
-       public float getBoundingSphereRadius();\r
+       public float getBoundingSphereRadius ();\r
 \r
-       public Material[] getMaterials();\r
+       public Material[] getMaterials ();\r
 \r
-}
\ No newline at end of file
+}\r
index 5ddf568..374adb5 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d;\r
 \r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
-import com.badlogic.gdx.math.collision.BoundingBox;\r
 \r
 public class StillModelNode implements StillModelInstance {\r
        static final private float[] vec3 = {0, 0, 0};\r
@@ -83,4 +83,4 @@ public class StillModelNode implements StillModelInstance {
 \r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 05323a5..32cd102 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d;\r
 \r
 public class Test {\r
@@ -40,4 +41,4 @@ public class Test {
                }\r
                return acc;\r
        }\r
-}
\ No newline at end of file
+}\r
index 95dd93b..768d21b 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.graphics.g3d.experimental;\r
+ ******************************************************************************/\r
 \r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.util.ArrayList;\r
-import java.util.List;\r
+package com.badlogic.gdx.graphics.g3d.experimental;\r
 \r
 import com.badlogic.gdx.ApplicationListener;\r
 import com.badlogic.gdx.Gdx;\r
@@ -28,14 +24,10 @@ import com.badlogic.gdx.graphics.Color;
 import com.badlogic.gdx.graphics.FPSLogger;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.GL20;\r
-import com.badlogic.gdx.graphics.Mesh;\r
 import com.badlogic.gdx.graphics.PerspectiveCamera;\r
 import com.badlogic.gdx.graphics.Pixmap.Format;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.Texture.TextureFilter;\r
-import com.badlogic.gdx.graphics.Texture.TextureWrap;\r
-import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
-import com.badlogic.gdx.graphics.g3d.AnimatedModelInstance;\r
 import com.badlogic.gdx.graphics.g3d.AnimatedModelNode;\r
 import com.badlogic.gdx.graphics.g3d.StillModelNode;\r
 import com.badlogic.gdx.graphics.g3d.lights.DirectionalLight;\r
@@ -43,20 +35,14 @@ import com.badlogic.gdx.graphics.g3d.lights.LightManager;
 import com.badlogic.gdx.graphics.g3d.lights.LightManager.LightQuality;\r
 import com.badlogic.gdx.graphics.g3d.lights.PointLight;\r
 import com.badlogic.gdx.graphics.g3d.loaders.ModelLoaderRegistry;\r
-import com.badlogic.gdx.graphics.g3d.loaders.obj.ObjLoader;\r
-import com.badlogic.gdx.graphics.g3d.loaders.ogre.OgreXmlLoader;\r
 import com.badlogic.gdx.graphics.g3d.materials.BlendingAttribute;\r
 import com.badlogic.gdx.graphics.g3d.materials.ColorAttribute;\r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
 import com.badlogic.gdx.graphics.g3d.materials.MaterialAttribute;\r
 import com.badlogic.gdx.graphics.g3d.materials.TextureAttribute;\r
-import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedAnimation;\r
 import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedModel;\r
-import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedSubMesh;\r
-import com.badlogic.gdx.graphics.g3d.model.skeleton.SkeletonModel;\r
 import com.badlogic.gdx.graphics.g3d.model.still.StillModel;\r
 import com.badlogic.gdx.graphics.g3d.test.PrototypeRendererGL20;\r
-import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.math.Matrix3;\r
 import com.badlogic.gdx.math.Matrix4;\r
@@ -202,14 +188,14 @@ public class HybridLightTest implements ApplicationListener {
                MaterialAttribute c3 = new ColorAttribute(new Color(0.2f, 1f, 0.15f, 1.0f), ColorAttribute.rim);\r
                MaterialAttribute t1 = new TextureAttribute(texture, 0, TextureAttribute.diffuseTexture);\r
                MaterialAttribute t2 = new TextureAttribute(texture2, 1, TextureAttribute.specularTexture);\r
-               MaterialAttribute c4 = new ColorAttribute(new Color(0.0f,0.0f,0.0f, 0.35f), ColorAttribute.fog);\r
+               MaterialAttribute c4 = new ColorAttribute(new Color(0.0f, 0.0f, 0.0f, 0.35f), ColorAttribute.fog);\r
 \r
                MaterialAttribute b = new BlendingAttribute(BlendingAttribute.translucent);\r
 \r
-               Material material2 = new Material("basic", c2, t1,c4);\r
+               Material material2 = new Material("basic", c2, t1, c4);\r
                model2.setMaterial(material2);\r
 \r
-               Material material = new Material("shiningBall", c1, c2,c4);\r
+               Material material = new Material("shiningBall", c1, c2, c4);\r
                model.setMaterial(material);\r
 \r
                model3 = ModelLoaderRegistry.loadKeyframedModel(Gdx.files.internal("data/models/knight.md2"));\r
@@ -226,7 +212,7 @@ public class HybridLightTest implements ApplicationListener {
                texture3.setFilter(TextureFilter.MipMapLinearNearest, TextureFilter.Linear);\r
 \r
                MaterialAttribute t3 = new TextureAttribute(texture3, 0, TextureAttribute.diffuseTexture);\r
-               Material material3 = new Material("s", t2, t3,c4);\r
+               Material material3 = new Material("s", t2, t3, c4);\r
                model3.setMaterial(material3);\r
 \r
        }\r
@@ -261,4 +247,4 @@ public class HybridLightTest implements ApplicationListener {
                new JoglApplication(new HybridLightTest(), config);\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index ec54aa0..64f5cb3 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.experimental;\r
 \r
 import com.badlogic.gdx.graphics.g3d.lights.LightManager;\r
@@ -49,4 +50,4 @@ public class MaterialShaderHandler {
                        }\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 7a51d09..f50d5e4 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.experimental;\r
 \r
 import com.badlogic.gdx.Input.Keys;\r
@@ -24,10 +25,10 @@ public class PerspectiveCamController extends InputAdapter {
 \r
        static final float MOUSE_SENSITIVITY = 0.25f;\r
        static final float MOVE_SPEED = 2;\r
-       static final float MOVE_SPEED_SQRT = (float) Math.sqrt(MOVE_SPEED);\r
+       static final float MOVE_SPEED_SQRT = (float)Math.sqrt(MOVE_SPEED);\r
+\r
+       static final float NINETY_DEGREE = 89.99f; // gimbal lock prevention\r
 \r
-       static final float NINETY_DEGREE = 89.99f; //gimbal lock prevention \r
-       \r
        PerspectiveCamera cam;\r
        int lastX;\r
        int lastY;\r
@@ -36,19 +37,19 @@ public class PerspectiveCamController extends InputAdapter {
 \r
        boolean W, A, S, D;\r
 \r
-       public PerspectiveCamController(PerspectiveCamera cam) {\r
+       public PerspectiveCamController (PerspectiveCamera cam) {\r
                this.cam = cam;\r
        }\r
 \r
        @Override\r
-       public boolean touchDown(int x, int y, int pointer, int button) {\r
+       public boolean touchDown (int x, int y, int pointer, int button) {\r
                lastX = x;\r
                lastY = y;\r
                return true;\r
        }\r
 \r
        @Override\r
-       public boolean touchDragged(int x, int y, int pointer) {\r
+       public boolean touchDragged (int x, int y, int pointer) {\r
 \r
                angleX += (lastX - x) * MOUSE_SENSITIVITY;\r
                lastX = x;\r
@@ -57,8 +58,7 @@ public class PerspectiveCamController extends InputAdapter {
 \r
                if (angleY > NINETY_DEGREE)\r
                        angleY = NINETY_DEGREE;\r
-               else if (angleY < -NINETY_DEGREE)\r
-                       angleY = -NINETY_DEGREE;\r
+               else if (angleY < -NINETY_DEGREE) angleY = -NINETY_DEGREE;\r
 \r
                // first rotate around y axel\r
                // then rotate up/down, and\r
@@ -71,14 +71,14 @@ public class PerspectiveCamController extends InputAdapter {
        }\r
 \r
        @Override\r
-       public boolean scrolled(int amount) {\r
+       public boolean scrolled (int amount) {\r
                cam.fieldOfView -= -amount * 0.1f;\r
                cam.update();\r
                return true;\r
        }\r
 \r
        @Override\r
-       public boolean keyDown(int keycode) {\r
+       public boolean keyDown (int keycode) {\r
 \r
                if (keycode == Keys.A)\r
                        A = true;\r
@@ -86,31 +86,28 @@ public class PerspectiveCamController extends InputAdapter {
                        D = true;\r
                else if (keycode == Keys.S)\r
                        S = true;\r
-               else if (keycode == Keys.W)\r
-                       W = true;\r
+               else if (keycode == Keys.W) W = true;\r
 \r
                return false;\r
        }\r
 \r
        @Override\r
-       public boolean keyUp(int keycode) {\r
+       public boolean keyUp (int keycode) {\r
                if (keycode == Keys.A)\r
                        A = false;\r
                else if (keycode == Keys.D)\r
                        D = false;\r
                else if (keycode == Keys.S)\r
                        S = false;\r
-               else if (keycode == Keys.W)\r
-                       W = false;\r
+               else if (keycode == Keys.W) W = false;\r
 \r
                return false;\r
        }\r
 \r
-       void update(float delta) {\r
+       void update (float delta) {\r
 \r
                // if all is false\r
-               if (!(A | D | W | S))\r
-                       return;\r
+               if (!(A | D | W | S)) return;\r
 \r
                // is moving diagonal move speed is sqrt of normal\r
                if ((A ^ D) & (W ^ S))\r
@@ -143,4 +140,4 @@ public class PerspectiveCamController extends InputAdapter {
 \r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 9bfbe6e..68b3863 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.experimental;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -54,4 +55,4 @@ public class ShaderFactory {
                final ShaderProgram shader = new ShaderProgram(flags + vertexShader, flags + fragmentShader);\r
                return shader;\r
        }\r
-}
\ No newline at end of file
+}\r
index ffe7dab..452b6cb 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.experimental;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -31,4 +32,4 @@ public final class ShaderLoader {
                }\r
                return shader;\r
        }\r
-}
\ No newline at end of file
+}\r
index 87d4613..5b1710d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.lights;\r
 \r
 import com.badlogic.gdx.graphics.Color;\r
@@ -22,6 +23,6 @@ public class DirectionalLight {
 \r
        /** Allways normalize this */\r
        final public Vector3 direction = new Vector3();\r
-       final public Color color = new Color(); \r
+       final public Color color = new Color();\r
 \r
-}
\ No newline at end of file
+}\r
index 6b67b50..6763479 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.lights;\r
 \r
 import com.badlogic.gdx.graphics.Color;\r
-import com.badlogic.gdx.graphics.g3d.StillModelInstance;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
-import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
@@ -136,4 +135,4 @@ public class LightManager {
                        shader.setUniformf("dirLightCol", c.r, c.g, c.b);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index f59286b..94dac5a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.lights;\r
 \r
 import com.badlogic.gdx.graphics.Color;\r
@@ -37,4 +38,4 @@ public class PointLight implements Comparable {
                return this.priority - ((PointLight)other).priority;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 4da8135..7148c6d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.lights;\r
 \r
 import com.badlogic.gdx.graphics.Color;\r
@@ -23,10 +24,10 @@ public class SpotLight {
        final public Vector3 position = new Vector3();\r
        final public Vector3 direction = new Vector3();\r
        final public Color color = new Color();\r
-       //or just\r
+       // or just\r
        // public float r,g,b;\r
 \r
        public float cutOffAngle;\r
-               \r
+\r
        public float intesity;\r
-}
\ No newline at end of file
+}\r
index efd5864..2dc3236 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
@@ -23,4 +24,4 @@ import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedModel;
  * @author mzechner */\r
 public interface KeyframedModelLoader extends ModelLoader {\r
        public KeyframedModel load (FileHandle handle, ModelLoaderHints hints);\r
-}
\ No newline at end of file
+}\r
index f1240b2..24c3b69 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
@@ -25,4 +26,4 @@ import com.badlogic.gdx.graphics.g3d.model.Model;
  * @author mzechner */\r
 public interface ModelLoader {\r
        public Model load (FileHandle file, ModelLoaderHints hints);\r
-}
\ No newline at end of file
+}\r
index 5a8342c..bed1ec1 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders;\r
 \r
 import java.util.HashMap;\r
@@ -381,4 +382,4 @@ public class ModelLoaderRegistry {
                else\r
                        return model;\r
        }\r
-}
\ No newline at end of file
+}\r
index 5ba02d2..762f9f9 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
@@ -23,4 +24,4 @@ import com.badlogic.gdx.graphics.g3d.model.skeleton.SkeletonModel;
  * @author mzechner */\r
 public interface SkeletonModelLoader extends ModelLoader {\r
        public SkeletonModel load (FileHandle file, ModelLoaderHints hints);\r
-}
\ No newline at end of file
+}\r
index 99d08c1..cce9cbb 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
@@ -23,4 +24,4 @@ import com.badlogic.gdx.graphics.g3d.model.still.StillModel;
  * @author mzechner */\r
 public interface StillModelLoader extends ModelLoader {\r
        public StillModel load (FileHandle handle, ModelLoaderHints hints);\r
-}
\ No newline at end of file
+}\r
index 54fa4f6..8804eb9 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.collada;\r
 \r
 import java.io.InputStream;\r
@@ -92,4 +93,4 @@ public class ColladaLoader implements StillModelLoader {
        public StillModel load (FileHandle handle, ModelLoaderHints hints) {\r
                return loadStillModel(handle);\r
        }\r
-}
\ No newline at end of file
+}\r
index ee5b4d1..2028d4e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.collada;\r
 \r
 import java.util.Arrays;\r
@@ -275,4 +276,4 @@ public class Faces {
                        return index + ": " + Arrays.toString(indices);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 12862b6..160c43c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.collada;\r
 \r
 import java.util.HashMap;\r
@@ -68,4 +69,4 @@ public class Geometry {
        public Mesh getMesh () {\r
                return faces.getMesh();\r
        }\r
-}
\ No newline at end of file
+}\r
index 8e88a51..45b4eaa 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.collada;\r
 \r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
@@ -48,4 +49,4 @@ public class Source {
                        data[i] = Float.parseFloat(tokens[i]);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 23cf2e4..69d24e2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.g3d;\r
 \r
 public class G3dConstants {\r
@@ -39,4 +40,4 @@ public class G3dConstants {
        public static final int INDEX_LIST = 0x1111;\r
        public static final int VERTEX_ATTRIBUTES = 0x1120;\r
        public static final int VERTEX_ATTRIBUTE = 0x1121;\r
-}
\ No newline at end of file
+}\r
index 18dbc35..4706ea1 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.g3d;\r
 \r
 import java.io.IOException;\r
@@ -20,8 +21,8 @@ import java.io.InputStream;
 \r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.graphics.Mesh;\r
-import com.badlogic.gdx.graphics.VertexAttribute;\r
 import com.badlogic.gdx.graphics.Mesh.VertexDataType;\r
+import com.badlogic.gdx.graphics.VertexAttribute;\r
 import com.badlogic.gdx.graphics.g3d.ModelLoaderHints;\r
 import com.badlogic.gdx.graphics.g3d.loaders.KeyframedModelLoader;\r
 import com.badlogic.gdx.graphics.g3d.loaders.StillModelLoader;\r
@@ -240,4 +241,4 @@ public class G3dLoader {
                        return G3dLoader.loadKeyframedModel(handle);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index aa863c8..7096dac 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.g3d;\r
 \r
 import java.io.BufferedReader;\r
@@ -194,9 +195,9 @@ public class G3dtLoader {
                        animations.put(animationName, animation);\r
                }\r
 \r
-               KeyframedSubMesh mesh = new KeyframedSubMesh(name, new Mesh(VertexDataType.VertexArray, false, numVertices, indices.size, createVertexAttributes(\r
-                       hasNormals, uvSets.size)), buildVertices(numVertices, hasNormals, uvSets), animations, animatedComponents,\r
-                       GL10.GL_TRIANGLES);\r
+               KeyframedSubMesh mesh = new KeyframedSubMesh(name, new Mesh(VertexDataType.VertexArray, false, numVertices, indices.size,\r
+                       createVertexAttributes(hasNormals, uvSets.size)), buildVertices(numVertices, hasNormals, uvSets), animations,\r
+                       animatedComponents, GL10.GL_TRIANGLES);\r
                mesh.mesh.setIndices(convertToShortArray(indices));\r
                mesh.mesh.setVertices(mesh.blendedVertices);\r
                return mesh;\r
@@ -341,4 +342,4 @@ public class G3dtLoader {
                        return G3dtLoader.loadKeyframedModel(handle, hints.flipV);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index fcfba69..e8f0511 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks;\r
 \r
 import java.io.ByteArrayInputStream;\r
@@ -328,4 +329,4 @@ public class ChunkReader {
                        buf.append(c);\r
                return buf.toString();\r
        }\r
-}
\ No newline at end of file
+}\r
index 6745d14..766f078 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks;\r
 \r
 import java.io.ByteArrayOutputStream;\r
@@ -198,4 +199,4 @@ public class ChunkWriter {
                } catch (IOException e) {\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 1a75e1c..68aa59a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks;\r
 \r
 import java.io.DataInput;\r
@@ -120,4 +121,4 @@ public class CountingDataInputStream implements DataInput {
        public String readUTF () throws IOException {\r
                throw new UnsupportedOperationException("Not implemented");\r
        }\r
-}
\ No newline at end of file
+}\r
index dcc2a2a..524fa87 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks;\r
 \r
 import java.io.IOException;\r
@@ -198,4 +199,4 @@ public class G3dExporter {
                        }\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 084991c..31c2152 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.md2;\r
 \r
 public class MD2Frame {\r
        public float[] vertices;\r
        public int[] normalIndices;\r
        public String name;\r
-}
\ No newline at end of file
+}\r
index be72c7b..04674cd 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.md2;\r
 \r
 public class MD2Header {\r
@@ -33,4 +34,4 @@ public class MD2Header {
        public int offsetFrames;\r
        public int offsetGLCommands;\r
        public int offsetEnd;\r
-}
\ No newline at end of file
+}\r
index e774fa0..99a8adb 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.md2;\r
 \r
 import java.io.ByteArrayInputStream;\r
@@ -34,7 +35,6 @@ import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedAnimation;
 import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedModel;\r
 import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedSubMesh;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
-import com.badlogic.gdx.math.Vector3;\r
 import com.badlogic.gdx.utils.LittleEndianInputStream;\r
 import com.badlogic.gdx.utils.ObjectMap;\r
 \r
@@ -134,13 +134,13 @@ public class MD2Loader implements KeyframedModelLoader {
 \r
                float[] blendedVertices = new float[header.numVertices * 8];\r
                MD2Frame frame = frames[0];\r
-               \r
+\r
                idx = 0;\r
                int idxV = 0;\r
                int idxT = 0;\r
                for (int i = 0; i < header.numVertices; i++) {\r
                        VertexIndices vIdx = vertCombos.get(i);\r
-                       \r
+\r
                        blendedVertices[idx++] = frame.vertices[idxV++];\r
                        blendedVertices[idx++] = frame.vertices[idxV++];\r
                        blendedVertices[idx++] = frame.vertices[idxV++];\r
@@ -150,20 +150,20 @@ public class MD2Loader implements KeyframedModelLoader {
                        blendedVertices[idx++] = uvs[idxT++];\r
                        blendedVertices[idx++] = uvs[idxT++];\r
                }\r
-               \r
+\r
                ObjectMap<String, KeyframedAnimation> animations = new ObjectMap<String, KeyframedAnimation>();\r
-               \r
+\r
                String lastName = frames[0].name;\r
                int beginFrame = 0;\r
-               \r
-               for(int frameNum = 1; frameNum < frames.length; frameNum++) {\r
-                       if(!frames[frameNum].name.equals(lastName) || frameNum == frames.length - 1) {\r
+\r
+               for (int frameNum = 1; frameNum < frames.length; frameNum++) {\r
+                       if (!frames[frameNum].name.equals(lastName) || frameNum == frames.length - 1) {\r
                                int subAnimLen = frameNum - beginFrame;\r
                                KeyframedAnimation subAnim = new KeyframedAnimation(lastName, frameDuration, new Keyframe[subAnimLen]);\r
-                               \r
-                               for(int subFrame = beginFrame; subFrame < frameNum; subFrame++) {\r
+\r
+                               for (int subFrame = beginFrame; subFrame < frameNum; subFrame++) {\r
                                        int absFrameNum = subFrame - beginFrame;\r
-                                       \r
+\r
                                        frame = frames[subFrame];\r
                                        float[] vertices = new float[header.numVertices * 6];\r
                                        idx = 0;\r
@@ -181,7 +181,7 @@ public class MD2Loader implements KeyframedModelLoader {
                                        subAnim.keyframes[absFrameNum] = keyFrame;\r
                                        animations.put(subAnim.name, subAnim);\r
                                }\r
-                               \r
+\r
                                lastName = frames[frameNum].name;\r
                                beginFrame = frameNum;\r
                        }\r
@@ -207,12 +207,13 @@ public class MD2Loader implements KeyframedModelLoader {
                        animation.keyframes[frameNum] = keyFrame;\r
                }\r
 \r
-               Mesh mesh = new Mesh(VertexDataType.VertexArray,false, header.numVertices, indices.length, new VertexAttribute(Usage.Position, 3,\r
-                       ShaderProgram.POSITION_ATTRIBUTE), new VertexAttribute(Usage.Normal, 3, ShaderProgram.NORMAL_ATTRIBUTE),\r
+               Mesh mesh = new Mesh(VertexDataType.VertexArray, false, header.numVertices, indices.length, new VertexAttribute(\r
+                       Usage.Position, 3, ShaderProgram.POSITION_ATTRIBUTE), new VertexAttribute(Usage.Normal, 3,\r
+                       ShaderProgram.NORMAL_ATTRIBUTE),\r
                        new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE + "0"));\r
                mesh.setIndices(indices);\r
                animations.put("all", animation);\r
-               \r
+\r
                KeyframedSubMesh subMesh = new KeyframedSubMesh("md2-mesh", mesh, blendedVertices, animations, 6, GL10.GL_TRIANGLES);\r
                KeyframedModel model = new KeyframedModel(new KeyframedSubMesh[] {subMesh});\r
                model.setAnimation("all", 0, false);\r
@@ -314,7 +315,7 @@ public class MD2Loader implements KeyframedModelLoader {
                        triangle.texCoords[2] = in.readShort();\r
                        triangles[i] = triangle;\r
                }\r
-               \r
+\r
                in.close();\r
 \r
                return triangles;\r
@@ -417,4 +418,4 @@ public class MD2Loader implements KeyframedModelLoader {
                        this.frameDuration = frameDuration;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 5f1d742..fa6f751 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.md2;\r
 \r
 public class MD2Normals {\r
-       public static float[][] normals = {\r
-               { -0.525731f,  0.000000f,  0.850651f }, \r
-               { -0.442863f,  0.238856f,  0.864188f }, \r
-               { -0.295242f,  0.000000f,  0.955423f }, \r
-               { -0.309017f,  0.500000f,  0.809017f }, \r
-               { -0.162460f,  0.262866f,  0.951056f }, \r
-               {  0.000000f,  0.000000f,  1.000000f }, \r
-               {  0.000000f,  0.850651f,  0.525731f }, \r
-               { -0.147621f,  0.716567f,  0.681718f }, \r
-               {  0.147621f,  0.716567f,  0.681718f }, \r
-               {  0.000000f,  0.525731f,  0.850651f }, \r
-               {  0.309017f,  0.500000f,  0.809017f }, \r
-               {  0.525731f,  0.000000f,  0.850651f }, \r
-               {  0.295242f,  0.000000f,  0.955423f }, \r
-               {  0.442863f,  0.238856f,  0.864188f }, \r
-               {  0.162460f,  0.262866f,  0.951056f }, \r
-               { -0.681718f,  0.147621f,  0.716567f }, \r
-               { -0.809017f,  0.309017f,  0.500000f }, \r
-               { -0.587785f,  0.425325f,  0.688191f }, \r
-               { -0.850651f,  0.525731f,  0.000000f }, \r
-               { -0.864188f,  0.442863f,  0.238856f }, \r
-               { -0.716567f,  0.681718f,  0.147621f }, \r
-               { -0.688191f,  0.587785f,  0.425325f }, \r
-               { -0.500000f,  0.809017f,  0.309017f }, \r
-               { -0.238856f,  0.864188f,  0.442863f }, \r
-               { -0.425325f,  0.688191f,  0.587785f }, \r
-               { -0.716567f,  0.681718f, -0.147621f }, \r
-               { -0.500000f,  0.809017f, -0.309017f }, \r
-               { -0.525731f,  0.850651f,  0.000000f }, \r
-               {  0.000000f,  0.850651f, -0.525731f }, \r
-               { -0.238856f,  0.864188f, -0.442863f }, \r
-               {  0.000000f,  0.955423f, -0.295242f }, \r
-               { -0.262866f,  0.951056f, -0.162460f }, \r
-               {  0.000000f,  1.000000f,  0.000000f }, \r
-               {  0.000000f,  0.955423f,  0.295242f }, \r
-               { -0.262866f,  0.951056f,  0.162460f }, \r
-               {  0.238856f,  0.864188f,  0.442863f }, \r
-               {  0.262866f,  0.951056f,  0.162460f }, \r
-               {  0.500000f,  0.809017f,  0.309017f }, \r
-               {  0.238856f,  0.864188f, -0.442863f }, \r
-               {  0.262866f,  0.951056f, -0.162460f }, \r
-               {  0.500000f,  0.809017f, -0.309017f }, \r
-               {  0.850651f,  0.525731f,  0.000000f }, \r
-               {  0.716567f,  0.681718f,  0.147621f }, \r
-               {  0.716567f,  0.681718f, -0.147621f }, \r
-               {  0.525731f,  0.850651f,  0.000000f }, \r
-               {  0.425325f,  0.688191f,  0.587785f }, \r
-               {  0.864188f,  0.442863f,  0.238856f }, \r
-               {  0.688191f,  0.587785f,  0.425325f }, \r
-               {  0.809017f,  0.309017f,  0.500000f }, \r
-               {  0.681718f,  0.147621f,  0.716567f }, \r
-               {  0.587785f,  0.425325f,  0.688191f }, \r
-               {  0.955423f,  0.295242f,  0.000000f }, \r
-               {  1.000000f,  0.000000f,  0.000000f }, \r
-               {  0.951056f,  0.162460f,  0.262866f }, \r
-               {  0.850651f, -0.525731f,  0.000000f }, \r
-               {  0.955423f, -0.295242f,  0.000000f }, \r
-               {  0.864188f, -0.442863f,  0.238856f }, \r
-               {  0.951056f, -0.162460f,  0.262866f }, \r
-               {  0.809017f, -0.309017f,  0.500000f }, \r
-               {  0.681718f, -0.147621f,  0.716567f }, \r
-               {  0.850651f,  0.000000f,  0.525731f }, \r
-               {  0.864188f,  0.442863f, -0.238856f }, \r
-               {  0.809017f,  0.309017f, -0.500000f }, \r
-               {  0.951056f,  0.162460f, -0.262866f }, \r
-               {  0.525731f,  0.000000f, -0.850651f }, \r
-               {  0.681718f,  0.147621f, -0.716567f }, \r
-               {  0.681718f, -0.147621f, -0.716567f }, \r
-               {  0.850651f,  0.000000f, -0.525731f }, \r
-               {  0.809017f, -0.309017f, -0.500000f }, \r
-               {  0.864188f, -0.442863f, -0.238856f }, \r
-               {  0.951056f, -0.162460f, -0.262866f }, \r
-               {  0.147621f,  0.716567f, -0.681718f }, \r
-               {  0.309017f,  0.500000f, -0.809017f }, \r
-               {  0.425325f,  0.688191f, -0.587785f }, \r
-               {  0.442863f,  0.238856f, -0.864188f }, \r
-               {  0.587785f,  0.425325f, -0.688191f }, \r
-               {  0.688191f,  0.587785f, -0.425325f }, \r
-               { -0.147621f,  0.716567f, -0.681718f }, \r
-               { -0.309017f,  0.500000f, -0.809017f }, \r
-               {  0.000000f,  0.525731f, -0.850651f }, \r
-               { -0.525731f,  0.000000f, -0.850651f }, \r
-               { -0.442863f,  0.238856f, -0.864188f }, \r
-               { -0.295242f,  0.000000f, -0.955423f }, \r
-               { -0.162460f,  0.262866f, -0.951056f }, \r
-               {  0.000000f,  0.000000f, -1.000000f }, \r
-               {  0.295242f,  0.000000f, -0.955423f }, \r
-               {  0.162460f,  0.262866f, -0.951056f }, \r
-               { -0.442863f, -0.238856f, -0.864188f }, \r
-               { -0.309017f, -0.500000f, -0.809017f }, \r
-               { -0.162460f, -0.262866f, -0.951056f }, \r
-               {  0.000000f, -0.850651f, -0.525731f }, \r
-               { -0.147621f, -0.716567f, -0.681718f }, \r
-               {  0.147621f, -0.716567f, -0.681718f }, \r
-               {  0.000000f, -0.525731f, -0.850651f }, \r
-               {  0.309017f, -0.500000f, -0.809017f }, \r
-               {  0.442863f, -0.238856f, -0.864188f }, \r
-               {  0.162460f, -0.262866f, -0.951056f }, \r
-               {  0.238856f, -0.864188f, -0.442863f }, \r
-               {  0.500000f, -0.809017f, -0.309017f }, \r
-               {  0.425325f, -0.688191f, -0.587785f }, \r
-               {  0.716567f, -0.681718f, -0.147621f }, \r
-               {  0.688191f, -0.587785f, -0.425325f }, \r
-               {  0.587785f, -0.425325f, -0.688191f }, \r
-               {  0.000000f, -0.955423f, -0.295242f }, \r
-               {  0.000000f, -1.000000f,  0.000000f }, \r
-               {  0.262866f, -0.951056f, -0.162460f }, \r
-               {  0.000000f, -0.850651f,  0.525731f }, \r
-               {  0.000000f, -0.955423f,  0.295242f }, \r
-               {  0.238856f, -0.864188f,  0.442863f }, \r
-               {  0.262866f, -0.951056f,  0.162460f }, \r
-               {  0.500000f, -0.809017f,  0.309017f }, \r
-               {  0.716567f, -0.681718f,  0.147621f }, \r
-               {  0.525731f, -0.850651f,  0.000000f }, \r
-               { -0.238856f, -0.864188f, -0.442863f }, \r
-               { -0.500000f, -0.809017f, -0.309017f }, \r
-               { -0.262866f, -0.951056f, -0.162460f }, \r
-               { -0.850651f, -0.525731f,  0.000000f }, \r
-               { -0.716567f, -0.681718f, -0.147621f }, \r
-               { -0.716567f, -0.681718f,  0.147621f }, \r
-               { -0.525731f, -0.850651f,  0.000000f }, \r
-               { -0.500000f, -0.809017f,  0.309017f }, \r
-               { -0.238856f, -0.864188f,  0.442863f }, \r
-               { -0.262866f, -0.951056f,  0.162460f }, \r
-               { -0.864188f, -0.442863f,  0.238856f }, \r
-               { -0.809017f, -0.309017f,  0.500000f }, \r
-               { -0.688191f, -0.587785f,  0.425325f }, \r
-               { -0.681718f, -0.147621f,  0.716567f }, \r
-               { -0.442863f, -0.238856f,  0.864188f }, \r
-               { -0.587785f, -0.425325f,  0.688191f }, \r
-               { -0.309017f, -0.500000f,  0.809017f }, \r
-               { -0.147621f, -0.716567f,  0.681718f }, \r
-               { -0.425325f, -0.688191f,  0.587785f }, \r
-               { -0.162460f, -0.262866f,  0.951056f }, \r
-               {  0.442863f, -0.238856f,  0.864188f }, \r
-               {  0.162460f, -0.262866f,  0.951056f }, \r
-               {  0.309017f, -0.500000f,  0.809017f }, \r
-               {  0.147621f, -0.716567f,  0.681718f }, \r
-               {  0.000000f, -0.525731f,  0.850651f }, \r
-               {  0.425325f, -0.688191f,  0.587785f }, \r
-               {  0.587785f, -0.425325f,  0.688191f }, \r
-               {  0.688191f, -0.587785f,  0.425325f }, \r
-               { -0.955423f,  0.295242f,  0.000000f }, \r
-               { -0.951056f,  0.162460f,  0.262866f }, \r
-               { -1.000000f,  0.000000f,  0.000000f }, \r
-               { -0.850651f,  0.000000f,  0.525731f }, \r
-               { -0.955423f, -0.295242f,  0.000000f }, \r
-               { -0.951056f, -0.162460f,  0.262866f }, \r
-               { -0.864188f,  0.442863f, -0.238856f }, \r
-               { -0.951056f,  0.162460f, -0.262866f }, \r
-               { -0.809017f,  0.309017f, -0.500000f }, \r
-               { -0.864188f, -0.442863f, -0.238856f }, \r
-               { -0.951056f, -0.162460f, -0.262866f }, \r
-               { -0.809017f, -0.309017f, -0.500000f }, \r
-               { -0.681718f,  0.147621f, -0.716567f }, \r
-               { -0.681718f, -0.147621f, -0.716567f }, \r
-               { -0.850651f,  0.000000f, -0.525731f }, \r
-               { -0.688191f,  0.587785f, -0.425325f }, \r
-               { -0.587785f,  0.425325f, -0.688191f }, \r
-               { -0.425325f,  0.688191f, -0.587785f }, \r
-               { -0.425325f, -0.688191f, -0.587785f }, \r
-               { -0.587785f, -0.425325f, -0.688191f }, \r
-               { -0.688191f, -0.587785f, -0.425325f }\r
-       };\r
-}
\ No newline at end of file
+       public static float[][] normals = { {-0.525731f, 0.000000f, 0.850651f}, {-0.442863f, 0.238856f, 0.864188f},\r
+               {-0.295242f, 0.000000f, 0.955423f}, {-0.309017f, 0.500000f, 0.809017f}, {-0.162460f, 0.262866f, 0.951056f},\r
+               {0.000000f, 0.000000f, 1.000000f}, {0.000000f, 0.850651f, 0.525731f}, {-0.147621f, 0.716567f, 0.681718f},\r
+               {0.147621f, 0.716567f, 0.681718f}, {0.000000f, 0.525731f, 0.850651f}, {0.309017f, 0.500000f, 0.809017f},\r
+               {0.525731f, 0.000000f, 0.850651f}, {0.295242f, 0.000000f, 0.955423f}, {0.442863f, 0.238856f, 0.864188f},\r
+               {0.162460f, 0.262866f, 0.951056f}, {-0.681718f, 0.147621f, 0.716567f}, {-0.809017f, 0.309017f, 0.500000f},\r
+               {-0.587785f, 0.425325f, 0.688191f}, {-0.850651f, 0.525731f, 0.000000f}, {-0.864188f, 0.442863f, 0.238856f},\r
+               {-0.716567f, 0.681718f, 0.147621f}, {-0.688191f, 0.587785f, 0.425325f}, {-0.500000f, 0.809017f, 0.309017f},\r
+               {-0.238856f, 0.864188f, 0.442863f}, {-0.425325f, 0.688191f, 0.587785f}, {-0.716567f, 0.681718f, -0.147621f},\r
+               {-0.500000f, 0.809017f, -0.309017f}, {-0.525731f, 0.850651f, 0.000000f}, {0.000000f, 0.850651f, -0.525731f},\r
+               {-0.238856f, 0.864188f, -0.442863f}, {0.000000f, 0.955423f, -0.295242f}, {-0.262866f, 0.951056f, -0.162460f},\r
+               {0.000000f, 1.000000f, 0.000000f}, {0.000000f, 0.955423f, 0.295242f}, {-0.262866f, 0.951056f, 0.162460f},\r
+               {0.238856f, 0.864188f, 0.442863f}, {0.262866f, 0.951056f, 0.162460f}, {0.500000f, 0.809017f, 0.309017f},\r
+               {0.238856f, 0.864188f, -0.442863f}, {0.262866f, 0.951056f, -0.162460f}, {0.500000f, 0.809017f, -0.309017f},\r
+               {0.850651f, 0.525731f, 0.000000f}, {0.716567f, 0.681718f, 0.147621f}, {0.716567f, 0.681718f, -0.147621f},\r
+               {0.525731f, 0.850651f, 0.000000f}, {0.425325f, 0.688191f, 0.587785f}, {0.864188f, 0.442863f, 0.238856f},\r
+               {0.688191f, 0.587785f, 0.425325f}, {0.809017f, 0.309017f, 0.500000f}, {0.681718f, 0.147621f, 0.716567f},\r
+               {0.587785f, 0.425325f, 0.688191f}, {0.955423f, 0.295242f, 0.000000f}, {1.000000f, 0.000000f, 0.000000f},\r
+               {0.951056f, 0.162460f, 0.262866f}, {0.850651f, -0.525731f, 0.000000f}, {0.955423f, -0.295242f, 0.000000f},\r
+               {0.864188f, -0.442863f, 0.238856f}, {0.951056f, -0.162460f, 0.262866f}, {0.809017f, -0.309017f, 0.500000f},\r
+               {0.681718f, -0.147621f, 0.716567f}, {0.850651f, 0.000000f, 0.525731f}, {0.864188f, 0.442863f, -0.238856f},\r
+               {0.809017f, 0.309017f, -0.500000f}, {0.951056f, 0.162460f, -0.262866f}, {0.525731f, 0.000000f, -0.850651f},\r
+               {0.681718f, 0.147621f, -0.716567f}, {0.681718f, -0.147621f, -0.716567f}, {0.850651f, 0.000000f, -0.525731f},\r
+               {0.809017f, -0.309017f, -0.500000f}, {0.864188f, -0.442863f, -0.238856f}, {0.951056f, -0.162460f, -0.262866f},\r
+               {0.147621f, 0.716567f, -0.681718f}, {0.309017f, 0.500000f, -0.809017f}, {0.425325f, 0.688191f, -0.587785f},\r
+               {0.442863f, 0.238856f, -0.864188f}, {0.587785f, 0.425325f, -0.688191f}, {0.688191f, 0.587785f, -0.425325f},\r
+               {-0.147621f, 0.716567f, -0.681718f}, {-0.309017f, 0.500000f, -0.809017f}, {0.000000f, 0.525731f, -0.850651f},\r
+               {-0.525731f, 0.000000f, -0.850651f}, {-0.442863f, 0.238856f, -0.864188f}, {-0.295242f, 0.000000f, -0.955423f},\r
+               {-0.162460f, 0.262866f, -0.951056f}, {0.000000f, 0.000000f, -1.000000f}, {0.295242f, 0.000000f, -0.955423f},\r
+               {0.162460f, 0.262866f, -0.951056f}, {-0.442863f, -0.238856f, -0.864188f}, {-0.309017f, -0.500000f, -0.809017f},\r
+               {-0.162460f, -0.262866f, -0.951056f}, {0.000000f, -0.850651f, -0.525731f}, {-0.147621f, -0.716567f, -0.681718f},\r
+               {0.147621f, -0.716567f, -0.681718f}, {0.000000f, -0.525731f, -0.850651f}, {0.309017f, -0.500000f, -0.809017f},\r
+               {0.442863f, -0.238856f, -0.864188f}, {0.162460f, -0.262866f, -0.951056f}, {0.238856f, -0.864188f, -0.442863f},\r
+               {0.500000f, -0.809017f, -0.309017f}, {0.425325f, -0.688191f, -0.587785f}, {0.716567f, -0.681718f, -0.147621f},\r
+               {0.688191f, -0.587785f, -0.425325f}, {0.587785f, -0.425325f, -0.688191f}, {0.000000f, -0.955423f, -0.295242f},\r
+               {0.000000f, -1.000000f, 0.000000f}, {0.262866f, -0.951056f, -0.162460f}, {0.000000f, -0.850651f, 0.525731f},\r
+               {0.000000f, -0.955423f, 0.295242f}, {0.238856f, -0.864188f, 0.442863f}, {0.262866f, -0.951056f, 0.162460f},\r
+               {0.500000f, -0.809017f, 0.309017f}, {0.716567f, -0.681718f, 0.147621f}, {0.525731f, -0.850651f, 0.000000f},\r
+               {-0.238856f, -0.864188f, -0.442863f}, {-0.500000f, -0.809017f, -0.309017f}, {-0.262866f, -0.951056f, -0.162460f},\r
+               {-0.850651f, -0.525731f, 0.000000f}, {-0.716567f, -0.681718f, -0.147621f}, {-0.716567f, -0.681718f, 0.147621f},\r
+               {-0.525731f, -0.850651f, 0.000000f}, {-0.500000f, -0.809017f, 0.309017f}, {-0.238856f, -0.864188f, 0.442863f},\r
+               {-0.262866f, -0.951056f, 0.162460f}, {-0.864188f, -0.442863f, 0.238856f}, {-0.809017f, -0.309017f, 0.500000f},\r
+               {-0.688191f, -0.587785f, 0.425325f}, {-0.681718f, -0.147621f, 0.716567f}, {-0.442863f, -0.238856f, 0.864188f},\r
+               {-0.587785f, -0.425325f, 0.688191f}, {-0.309017f, -0.500000f, 0.809017f}, {-0.147621f, -0.716567f, 0.681718f},\r
+               {-0.425325f, -0.688191f, 0.587785f}, {-0.162460f, -0.262866f, 0.951056f}, {0.442863f, -0.238856f, 0.864188f},\r
+               {0.162460f, -0.262866f, 0.951056f}, {0.309017f, -0.500000f, 0.809017f}, {0.147621f, -0.716567f, 0.681718f},\r
+               {0.000000f, -0.525731f, 0.850651f}, {0.425325f, -0.688191f, 0.587785f}, {0.587785f, -0.425325f, 0.688191f},\r
+               {0.688191f, -0.587785f, 0.425325f}, {-0.955423f, 0.295242f, 0.000000f}, {-0.951056f, 0.162460f, 0.262866f},\r
+               {-1.000000f, 0.000000f, 0.000000f}, {-0.850651f, 0.000000f, 0.525731f}, {-0.955423f, -0.295242f, 0.000000f},\r
+               {-0.951056f, -0.162460f, 0.262866f}, {-0.864188f, 0.442863f, -0.238856f}, {-0.951056f, 0.162460f, -0.262866f},\r
+               {-0.809017f, 0.309017f, -0.500000f}, {-0.864188f, -0.442863f, -0.238856f}, {-0.951056f, -0.162460f, -0.262866f},\r
+               {-0.809017f, -0.309017f, -0.500000f}, {-0.681718f, 0.147621f, -0.716567f}, {-0.681718f, -0.147621f, -0.716567f},\r
+               {-0.850651f, 0.000000f, -0.525731f}, {-0.688191f, 0.587785f, -0.425325f}, {-0.587785f, 0.425325f, -0.688191f},\r
+               {-0.425325f, 0.688191f, -0.587785f}, {-0.425325f, -0.688191f, -0.587785f}, {-0.587785f, -0.425325f, -0.688191f},\r
+               {-0.688191f, -0.587785f, -0.425325f}};\r
+}\r
index cfb2d3a..06de713 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.md2;\r
 \r
 public class MD2Triangle {\r
        public short[] vertices = new short[3];\r
        public short[] texCoords = new short[3];\r
-}
\ No newline at end of file
+}\r
index f87e79d..7a3eb63 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre;\r
 \r
 import java.io.InputStream;\r
@@ -491,4 +492,4 @@ public class OgreXmlLoader {
                System.out.println("took: " + (System.nanoTime() - start) / 1000000000.0f);\r
                return skel;\r
        }\r
-}
\ No newline at end of file
+}\r
index 510fb90..75dfb27 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -32,14 +33,9 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "animation")\r
 public class Animation {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String name;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String length;\r
-       @XmlElement(required = true)\r
-       protected Tracks tracks;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String name;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String length;\r
+       @XmlElement(required = true) protected Tracks tracks;\r
 \r
        /** Gets the value of the name property.\r
         * \r
@@ -83,4 +79,4 @@ public class Animation {
                this.tracks = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index b96c8e9..c6bfc77 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "animations")\r
 public class Animations {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Animation> animation;\r
+       @XmlElement(required = true) protected List<Animation> animation;\r
 \r
        /** Gets the value of the animation property.\r
         * \r
@@ -59,4 +59,4 @@ public class Animations {
                return this.animation;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 3cfcf6d..a565fac 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "binormal")\r
 public class Binormal {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float x;\r
-       @XmlAttribute(required = true)\r
-       public float y;\r
-       @XmlAttribute(required = true)\r
-       public float z;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float x;\r
+       @XmlAttribute(required = true) public float y;\r
+       @XmlAttribute(required = true) public float z;\r
+}\r
index 374a52e..b6b7c51 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "boneassignments")\r
 public class Boneassignments {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Vertexboneassignment> vertexboneassignment;\r
+       @XmlElement(required = true) protected List<Vertexboneassignment> vertexboneassignment;\r
 \r
        /** Gets the value of the vertexboneassignment property.\r
         * \r
@@ -59,4 +59,4 @@ public class Boneassignments {
                return this.vertexboneassignment;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 972b07d..ee31a95 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,9 +32,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "colour_diffuse")\r
 public class ColourDiffuse {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String value;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String value;\r
 \r
        /** Gets the value of the value property.\r
         * \r
@@ -49,4 +48,4 @@ public class ColourDiffuse {
                this.value = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 8ebef85..86f818c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,9 +32,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "colour_specular")\r
 public class ColourSpecular {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String value;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String value;\r
 \r
        /** Gets the value of the value property.\r
         * \r
@@ -49,4 +48,4 @@ public class ColourSpecular {
                this.value = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 4ac6ce5..8991b85 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "extremes")\r
 public class Extremes {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Submesh> submesh;\r
+       @XmlElement(required = true) protected List<Submesh> submesh;\r
 \r
        /** Gets the value of the submesh property.\r
         * \r
@@ -59,4 +59,4 @@ public class Extremes {
                return this.submesh;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index c02f7c1..a6cec58 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "face")\r
 public class Face {\r
 \r
-       @XmlAttribute(required = true)\r
-       public int v1;\r
-       @XmlAttribute\r
-       public int v2;\r
-       @XmlAttribute\r
-       public int v3;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public int v1;\r
+       @XmlAttribute public int v2;\r
+       @XmlAttribute public int v3;\r
+}\r
index 4ae4449..abba645 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -33,10 +34,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "faces")\r
 public class Faces {\r
 \r
-       @XmlAttribute\r
-       public int count;\r
-       @XmlElement(required = true)\r
-       protected List<Face> face;\r
+       @XmlAttribute public int count;\r
+       @XmlElement(required = true) protected List<Face> face;\r
 \r
        /** Gets the value of the face property.\r
         * \r
@@ -62,4 +61,4 @@ public class Faces {
                return this.face;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index ebece0c..b38789e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -33,10 +34,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "geometry")\r
 public class Geometry {\r
 \r
-       @XmlAttribute\r
-       public int vertexcount;\r
-       @XmlElement(required = true)\r
-       protected List<Vertexbuffer> vertexbuffer;\r
+       @XmlAttribute public int vertexcount;\r
+       @XmlElement(required = true) protected List<Vertexbuffer> vertexbuffer;\r
 \r
        /** Gets the value of the vertexbuffer property.\r
         * \r
@@ -62,4 +61,4 @@ public class Geometry {
                return this.vertexbuffer;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index c4d492e..c44b16e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -36,11 +37,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "keyframe")\r
 public class Keyframe {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String time;\r
-       @XmlElements({@XmlElement(name = "position", type = Position.class), @XmlElement(name = "normal", type = Normal.class)})\r
-       protected List<Object> positionOrNormal;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String time;\r
+       @XmlElements({@XmlElement(name = "position", type = Position.class), @XmlElement(name = "normal", type = Normal.class)}) protected List<Object> positionOrNormal;\r
        protected List<Poseref> poseref;\r
 \r
        /** Gets the value of the time property.\r
@@ -105,4 +103,4 @@ public class Keyframe {
                return this.poseref;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 82bef46..4f29c93 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -57,4 +58,4 @@ public class Keyframes {
                return this.keyframe;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 1d2ec42..7d178ac 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -37,18 +38,11 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "levelofdetail")\r
 public class Levelofdetail {\r
 \r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String strategy;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String numlevels;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String manual;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String strategy;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String numlevels;\r
+       @XmlAttribute @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String manual;\r
        @XmlElements({@XmlElement(name = "lodmanual", required = true, type = Lodmanual.class),\r
-               @XmlElement(name = "lodgenerated", required = true, type = Lodgenerated.class)})\r
-       protected List<Object> lodmanualOrLodgenerated;\r
+               @XmlElement(name = "lodgenerated", required = true, type = Lodgenerated.class)}) protected List<Object> lodmanualOrLodgenerated;\r
 \r
        /** Gets the value of the strategy property.\r
         * \r
@@ -124,4 +118,4 @@ public class Levelofdetail {
                return this.lodmanualOrLodgenerated;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 7961e4b..2bcb56c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -35,14 +36,9 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "lodfacelist")\r
 public class Lodfacelist {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String submeshindex;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String numfaces;\r
-       @XmlElement(required = true)\r
-       protected List<Face> face;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String submeshindex;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String numfaces;\r
+       @XmlElement(required = true) protected List<Face> face;\r
 \r
        /** Gets the value of the submeshindex property.\r
         * \r
@@ -96,4 +92,4 @@ public class Lodfacelist {
                return this.face;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index a5e8e53..a5a1bf5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -32,14 +33,9 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "lodgenerated")\r
 public class Lodgenerated {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String value;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String meshname;\r
-       @XmlElement(required = true)\r
-       protected Lodfacelist lodfacelist;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String value;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String meshname;\r
+       @XmlElement(required = true) protected Lodfacelist lodfacelist;\r
 \r
        /** Gets the value of the value property.\r
         * \r
@@ -83,4 +79,4 @@ public class Lodgenerated {
                this.lodfacelist = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index bdb4e25..5091d1e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,12 +32,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "lodmanual")\r
 public class Lodmanual {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String value;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String meshname;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String value;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String meshname;\r
 \r
        /** Gets the value of the value property.\r
         * \r
@@ -66,4 +63,4 @@ public class Lodmanual {
                this.meshname = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 17f49ec..8b64195 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,8 +32,7 @@ import javax.xml.bind.annotation.XmlType;
 public class Mesh {\r
 \r
        protected Sharedgeometry sharedgeometry;\r
-       @XmlElement(required = true)\r
-       protected Submeshes submeshes;\r
+       @XmlElement(required = true) protected Submeshes submeshes;\r
        protected Skeletonlink skeletonlink;\r
        protected Boneassignments boneassignments;\r
        protected Levelofdetail levelofdetail;\r
@@ -167,4 +167,4 @@ public class Mesh {
                this.extremes = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index aaf88d0..4577606 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "normal")\r
 public class Normal {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float x;\r
-       @XmlAttribute(required = true)\r
-       public float y;\r
-       @XmlAttribute(required = true)\r
-       public float z;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float x;\r
+       @XmlAttribute(required = true) public float y;\r
+       @XmlAttribute(required = true) public float z;\r
+}\r
index 55c6363..6a8cb9c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlRegistry;\r
@@ -226,4 +227,4 @@ public class ObjectFactory {
                return new Submeshname();\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index e1771e6..134c489 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -36,17 +37,10 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "pose")\r
 public class Pose {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String target;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String index;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String name;\r
-       @XmlElement(required = true)\r
-       protected List<Poseoffset> poseoffset;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String target;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String index;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String name;\r
+       @XmlElement(required = true) protected List<Poseoffset> poseoffset;\r
 \r
        /** Gets the value of the target property.\r
         * \r
@@ -122,4 +116,4 @@ public class Pose {
                return this.poseoffset;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 3dfc5d0..42d361b 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,27 +32,13 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "poseoffset")\r
 public class Poseoffset {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String index;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String x;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String y;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String z;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String nx;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String ny;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String nz;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String index;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String x;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String y;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String z;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String nx;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String ny;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String nz;\r
 \r
        /** Gets the value of the index property.\r
         * \r
@@ -163,4 +150,4 @@ public class Poseoffset {
                this.nz = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index dd0f552..fadd528 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,12 +32,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "poseref")\r
 public class Poseref {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String poseindex;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String influence;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String poseindex;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String influence;\r
 \r
        /** Gets the value of the poseindex property.\r
         * \r
@@ -70,4 +67,4 @@ public class Poseref {
                this.influence = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index fd27b79..d95ace3 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "poses")\r
 public class Poses {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Pose> pose;\r
+       @XmlElement(required = true) protected List<Pose> pose;\r
 \r
        /** Gets the value of the pose property.\r
         * \r
@@ -59,4 +59,4 @@ public class Poses {
                return this.pose;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index a38b606..13cbfc2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "position")\r
 public class Position {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float x;\r
-       @XmlAttribute(required = true)\r
-       public float y;\r
-       @XmlAttribute(required = true)\r
-       public float z;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float x;\r
+       @XmlAttribute(required = true) public float y;\r
+       @XmlAttribute(required = true) public float z;\r
+}\r
index c812c1b..5f15d8a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -35,11 +36,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "sharedgeometry")\r
 public class Sharedgeometry {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String vertexcount;\r
-       @XmlElement(required = true)\r
-       protected List<Vertexbuffer> vertexbuffer;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String vertexcount;\r
+       @XmlElement(required = true) protected List<Vertexbuffer> vertexbuffer;\r
 \r
        /** Gets the value of the vertexcount property.\r
         * \r
@@ -79,4 +77,4 @@ public class Sharedgeometry {
                return this.vertexbuffer;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index fb2e9cd..28f487c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,9 +32,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "skeletonlink")\r
 public class Skeletonlink {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String name;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String name;\r
 \r
        /** Gets the value of the name property.\r
         * \r
@@ -49,4 +48,4 @@ public class Skeletonlink {
                this.name = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index ef66fce..9e973ad 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -33,19 +34,12 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "submesh")\r
 public class Submesh {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       public String material;\r
-       @XmlAttribute(name = "usesharedvertices")\r
-       public boolean useSharedVertices;\r
-       @XmlAttribute(name = "use32bitindexes")\r
-       public boolean use32Bitindexes;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String operationtype;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) public String material;\r
+       @XmlAttribute(name = "usesharedvertices") public boolean useSharedVertices;\r
+       @XmlAttribute(name = "use32bitindexes") public boolean use32Bitindexes;\r
+       @XmlAttribute @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String operationtype;\r
        protected Textures textures;\r
-       @XmlElement(required = true)\r
-       protected Faces faces;\r
+       @XmlElement(required = true) protected Faces faces;\r
        protected Geometry geometry;\r
        protected Boneassignments boneassignments;\r
 \r
@@ -137,4 +131,4 @@ public class Submesh {
                this.boneassignments = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 1384bd2..fbb66bf 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -35,11 +36,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "submesh_extremes")\r
 public class SubmeshExtremes {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String index;\r
-       @XmlElement(required = true)\r
-       protected List<Position> position;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String index;\r
+       @XmlElement(required = true) protected List<Position> position;\r
 \r
        /** Gets the value of the index property.\r
         * \r
@@ -79,4 +77,4 @@ public class SubmeshExtremes {
                return this.position;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index f01d86d..31579d2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "submeshes")\r
 public class Submeshes {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Submesh> submesh;\r
+       @XmlElement(required = true) protected List<Submesh> submesh;\r
 \r
        /** Gets the value of the submesh property.\r
         * \r
@@ -59,4 +59,4 @@ public class Submeshes {
                return this.submesh;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index e7507a9..b676838 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,12 +32,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "submeshname")\r
 public class Submeshname {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String name;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String index;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String name;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String index;\r
 \r
        /** Gets the value of the name property.\r
         * \r
@@ -66,4 +63,4 @@ public class Submeshname {
                this.index = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index f4f197e..39190c2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "submeshnames")\r
 public class Submeshnames {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Submeshname> submeshname;\r
+       @XmlElement(required = true) protected List<Submeshname> submeshname;\r
 \r
        /** Gets the value of the submeshname property.\r
         * \r
@@ -59,4 +59,4 @@ public class Submeshnames {
                return this.submeshname;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 5e8d342..6f44c5c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,12 +30,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "tangent")\r
 public class Tangent {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float x;\r
-       @XmlAttribute(required = true)\r
-       public float y;\r
-       @XmlAttribute(required = true)\r
-       public float z;\r
-       @XmlAttribute\r
-       public float w;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float x;\r
+       @XmlAttribute(required = true) public float y;\r
+       @XmlAttribute(required = true) public float z;\r
+       @XmlAttribute public float w;\r
+}\r
index 476b682..3ff1182 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -28,12 +29,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlType(name = "")\r
 @XmlRootElement(name = "texcoord")\r
 public class Texcoord {\r
-       @XmlAttribute(required = true)\r
-       public float u;\r
-       @XmlAttribute\r
-       public float v;\r
-       @XmlAttribute\r
-       public float w;\r
-       @XmlAttribute\r
-       public float x;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float u;\r
+       @XmlAttribute public float v;\r
+       @XmlAttribute public float w;\r
+       @XmlAttribute public float x;\r
+}\r
index d3b61f5..f4843bc 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,12 +32,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "texture")\r
 public class Texture {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String alias;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String name;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String alias;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String name;\r
 \r
        /** Gets the value of the alias property.\r
         * \r
@@ -66,4 +63,4 @@ public class Texture {
                this.name = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index ccc01e1..88045bc 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "textures")\r
 public class Textures {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Texture> texture;\r
+       @XmlElement(required = true) protected List<Texture> texture;\r
 \r
        /** Gets the value of the texture property.\r
         * \r
@@ -59,4 +59,4 @@ public class Textures {
                return this.texture;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 572ab01..57b7b02 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -33,17 +34,10 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "track")\r
 public class Track {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String target;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String index;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String type;\r
-       @XmlElement(required = true)\r
-       protected Keyframes keyframes;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String target;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String index;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String type;\r
+       @XmlElement(required = true) protected Keyframes keyframes;\r
 \r
        /** Gets the value of the target property.\r
         * \r
@@ -105,4 +99,4 @@ public class Track {
                this.keyframes = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index af0aace..3525259 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "tracks")\r
 public class Tracks {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Track> track;\r
+       @XmlElement(required = true) protected List<Track> track;\r
 \r
        /** Gets the value of the track property.\r
         * \r
@@ -59,4 +59,4 @@ public class Tracks {
                return this.track;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index f1c568d..7aa99f0 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -32,15 +33,12 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "vertex")\r
 public class Vertex {\r
 \r
-       @XmlElement(required = true)\r
-       protected Position position;\r
+       @XmlElement(required = true) protected Position position;\r
        protected Normal normal;\r
        protected Tangent tangent;\r
        protected Binormal binormal;\r
-       @XmlElement(name = "colour_diffuse")\r
-       protected ColourDiffuse colourDiffuse;\r
-       @XmlElement(name = "colour_specular")\r
-       protected ColourSpecular colourSpecular;\r
+       @XmlElement(name = "colour_diffuse") protected ColourDiffuse colourDiffuse;\r
+       @XmlElement(name = "colour_specular") protected ColourSpecular colourSpecular;\r
        protected List<Texcoord> texcoord;\r
 \r
        /** Gets the value of the position property.\r
@@ -151,4 +149,4 @@ public class Vertex {
                return this.texcoord;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 746bb8f..297d718 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "vertexboneassignment")\r
 public class Vertexboneassignment {\r
 \r
-       @XmlAttribute(required = true)\r
-       public int vertexindex;\r
-       @XmlAttribute(required = true)\r
-       public int boneindex;\r
-       @XmlAttribute\r
-       public float weight;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public int vertexindex;\r
+       @XmlAttribute(required = true) public int boneindex;\r
+       @XmlAttribute public float weight;\r
+}\r
index 62b0891..cf8dc11 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.mesh;\r
 \r
 import java.util.ArrayList;\r
@@ -35,48 +36,23 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "vertexbuffer")\r
 public class Vertexbuffer {\r
 \r
-       @XmlAttribute\r
-       public boolean positions;\r
-       @XmlAttribute\r
-       public boolean normals;\r
-       @XmlAttribute(name = "colours_diffuse")\r
-       public boolean coloursDiffuse;\r
-       @XmlAttribute(name = "colours_specular")\r
-       public boolean coloursSpecular;\r
-       @XmlAttribute(name = "texture_coords")\r
-       public int textureCoords;\r
-       @XmlAttribute(name = "texture_coord_dimensions_0")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions0;\r
-       @XmlAttribute(name = "texture_coord_dimensions_1")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions1;\r
-       @XmlAttribute(name = "texture_coord_dimensions_2")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions2;\r
-       @XmlAttribute(name = "texture_coord_dimensions_3")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions3;\r
-       @XmlAttribute(name = "texture_coord_dimensions_4")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions4;\r
-       @XmlAttribute(name = "texture_coord_dimensions_5")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions5;\r
-       @XmlAttribute(name = "texture_coord_dimensions_6")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions6;\r
-       @XmlAttribute(name = "texture_coord_dimensions_7")\r
-       @XmlJavaTypeAdapter(CollapsedStringAdapter.class)\r
-       protected String textureCoordDimensions7;\r
-       @XmlAttribute\r
-       public boolean tangents;\r
-       @XmlAttribute(name = "tangent_dimensions")\r
-       public int tangentDimensions;\r
-       @XmlAttribute\r
-       public boolean binormals;\r
-       @XmlElement(required = true)\r
-       protected List<Vertex> vertex;\r
+       @XmlAttribute public boolean positions;\r
+       @XmlAttribute public boolean normals;\r
+       @XmlAttribute(name = "colours_diffuse") public boolean coloursDiffuse;\r
+       @XmlAttribute(name = "colours_specular") public boolean coloursSpecular;\r
+       @XmlAttribute(name = "texture_coords") public int textureCoords;\r
+       @XmlAttribute(name = "texture_coord_dimensions_0") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions0;\r
+       @XmlAttribute(name = "texture_coord_dimensions_1") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions1;\r
+       @XmlAttribute(name = "texture_coord_dimensions_2") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions2;\r
+       @XmlAttribute(name = "texture_coord_dimensions_3") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions3;\r
+       @XmlAttribute(name = "texture_coord_dimensions_4") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions4;\r
+       @XmlAttribute(name = "texture_coord_dimensions_5") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions5;\r
+       @XmlAttribute(name = "texture_coord_dimensions_6") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions6;\r
+       @XmlAttribute(name = "texture_coord_dimensions_7") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) protected String textureCoordDimensions7;\r
+       @XmlAttribute public boolean tangents;\r
+       @XmlAttribute(name = "tangent_dimensions") public int tangentDimensions;\r
+       @XmlAttribute public boolean binormals;\r
+       @XmlElement(required = true) protected List<Vertex> vertex;\r
 \r
        /** Gets the value of the textureCoordDimensions0 property.\r
         * \r
@@ -229,4 +205,4 @@ public class Vertexbuffer {
                return this.vertex;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 685bf92..a9e9a14 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -32,13 +33,9 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "animation")\r
 public class Animation {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       public String name;\r
-       @XmlAttribute(required = true)\r
-       public float length;\r
-       @XmlElement(required = true)\r
-       protected Tracks tracks;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) public String name;\r
+       @XmlAttribute(required = true) public float length;\r
+       @XmlElement(required = true) protected Tracks tracks;\r
 \r
        /** Gets the value of the tracks property.\r
         * \r
@@ -54,4 +51,4 @@ public class Animation {
                this.tracks = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index b574c7c..ba32f70 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,12 +32,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "animationlink")\r
 public class Animationlink {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String skeletonName;\r
-       @XmlAttribute\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String scale;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String skeletonName;\r
+       @XmlAttribute @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String scale;\r
 \r
        /** Gets the value of the skeletonName property.\r
         * \r
@@ -70,4 +67,4 @@ public class Animationlink {
                this.scale = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index f51d954..bf40b05 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "animationlinks")\r
 public class Animationlinks {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Animationlink> animationlink;\r
+       @XmlElement(required = true) protected List<Animationlink> animationlink;\r
 \r
        /** Gets the value of the animationlink property.\r
         * \r
@@ -59,4 +59,4 @@ public class Animationlinks {
                return this.animationlink;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 548963d..5b27fa6 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "animations")\r
 public class Animations {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Animation> animation;\r
+       @XmlElement(required = true) protected List<Animation> animation;\r
 \r
        /** Gets the value of the animation property.\r
         * \r
@@ -59,4 +59,4 @@ public class Animations {
                return this.animation;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 8a20956..d815b5f 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "axis")\r
 public class Axis {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float x;\r
-       @XmlAttribute(required = true)\r
-       public float y;\r
-       @XmlAttribute(required = true)\r
-       public float z;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float x;\r
+       @XmlAttribute(required = true) public float y;\r
+       @XmlAttribute(required = true) public float z;\r
+}\r
index 897bb40..5bfc114 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -32,15 +33,9 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "bone")\r
 public class Bone {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       public String id;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       public String name;\r
-       @XmlElement(required = true)\r
-       public Position position;\r
-       @XmlElement(required = true)\r
-       public Rotation rotation;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) public String id;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) public String name;\r
+       @XmlElement(required = true) public Position position;\r
+       @XmlElement(required = true) public Rotation rotation;\r
        public Scale scale;\r
-}
\ No newline at end of file
+}\r
index 4833bc2..d18e045 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import java.util.ArrayList;\r
@@ -57,4 +58,4 @@ public class Bonehierarchy {
                return this.boneparent;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 7a738ed..a66efcc 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -31,12 +32,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "boneparent")\r
 public class Boneparent {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String bone;\r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String parent;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String bone;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String parent;\r
 \r
        /** Gets the value of the bone property.\r
         * \r
@@ -66,4 +63,4 @@ public class Boneparent {
                this.parent = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 61c41e4..20581e3 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "bones")\r
 public class Bones {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Bone> bone;\r
+       @XmlElement(required = true) protected List<Bone> bone;\r
 \r
        /** Gets the value of the bone property.\r
         * \r
@@ -59,4 +59,4 @@ public class Bones {
                return this.bone;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 52d6772..3b93350 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,9 +30,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "keyframe")\r
 public class Keyframe {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float time;\r
+       @XmlAttribute(required = true) public float time;\r
        public Translate translate;\r
        public Rotate rotate;\r
        public Scale scale;\r
-}
\ No newline at end of file
+}\r
index d2821b2..9983126 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "keyframes")\r
 public class Keyframes {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Keyframe> keyframe;\r
+       @XmlElement(required = true) protected List<Keyframe> keyframe;\r
 \r
        /** Gets the value of the keyframe property.\r
         * \r
@@ -59,4 +59,4 @@ public class Keyframes {
                return this.keyframe;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 7bda874..3712d98 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlRegistry;\r
@@ -126,4 +127,4 @@ public class ObjectFactory {
                return new Rotate();\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 15d8d6c..97d97a7 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "position")\r
 public class Position {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float x;\r
-       @XmlAttribute(required = true)\r
-       public float y;\r
-       @XmlAttribute(required = true)\r
-       public float z;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float x;\r
+       @XmlAttribute(required = true) public float y;\r
+       @XmlAttribute(required = true) public float z;\r
+}\r
index 304080c..38e381e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -30,8 +31,6 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "rotate")\r
 public class Rotate {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float angle;\r
-       @XmlElement(required = true)\r
-       public Axis axis;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float angle;\r
+       @XmlElement(required = true) public Axis axis;\r
+}\r
index e87e2be..c3a925c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -30,8 +31,6 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "rotation")\r
 public class Rotation {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float angle;\r
-       @XmlElement(required = true)\r
-       public Axis axis;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float angle;\r
+       @XmlElement(required = true) public Axis axis;\r
+}\r
index b9c26b9..bf42bfa 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,12 +30,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "scale")\r
 public class Scale {\r
 \r
-       @XmlAttribute\r
-       public float factor;\r
-       @XmlAttribute\r
-       public float x;\r
-       @XmlAttribute\r
-       public float y;\r
-       @XmlAttribute\r
-       public float z;\r
-}
\ No newline at end of file
+       @XmlAttribute public float factor;\r
+       @XmlAttribute public float x;\r
+       @XmlAttribute public float y;\r
+       @XmlAttribute public float z;\r
+}\r
index a8f34cd..c33f9fb 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,8 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "skeleton")\r
 public class Skeleton {\r
 \r
-       @XmlElement(required = true)\r
-       protected Bones bones;\r
-       @XmlElement(required = true)\r
-       protected Bonehierarchy bonehierarchy;\r
+       @XmlElement(required = true) protected Bones bones;\r
+       @XmlElement(required = true) protected Bonehierarchy bonehierarchy;\r
        protected Animations animations;\r
        protected Animationlinks animationlinks;\r
 \r
@@ -92,4 +91,4 @@ public class Skeleton {
                this.animationlinks = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index b40c29f..3f374ad 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -32,11 +33,8 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 @XmlRootElement(name = "track")\r
 public class Track {\r
 \r
-       @XmlAttribute(required = true)\r
-       @XmlJavaTypeAdapter(NormalizedStringAdapter.class)\r
-       protected String bone;\r
-       @XmlElement(required = true)\r
-       protected Keyframes keyframes;\r
+       @XmlAttribute(required = true) @XmlJavaTypeAdapter(NormalizedStringAdapter.class) protected String bone;\r
+       @XmlElement(required = true) protected Keyframes keyframes;\r
 \r
        /** Gets the value of the bone property.\r
         * \r
@@ -66,4 +64,4 @@ public class Track {
                this.keyframes = value;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index ee39780..5d7df36 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import java.util.ArrayList;\r
@@ -32,8 +33,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "tracks")\r
 public class Tracks {\r
 \r
-       @XmlElement(required = true)\r
-       protected List<Track> track;\r
+       @XmlElement(required = true) protected List<Track> track;\r
 \r
        /** Gets the value of the track property.\r
         * \r
@@ -59,4 +59,4 @@ public class Tracks {
                return this.track;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 1ded7ff..1f698d3 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.loaders.ogre.skeleton;\r
 \r
 import javax.xml.bind.annotation.XmlAccessType;\r
@@ -29,10 +30,7 @@ import javax.xml.bind.annotation.XmlType;
 @XmlRootElement(name = "translate")\r
 public class Translate {\r
 \r
-       @XmlAttribute(required = true)\r
-       public float x;\r
-       @XmlAttribute(required = true)\r
-       public float y;\r
-       @XmlAttribute(required = true)\r
-       public float z;\r
-}
\ No newline at end of file
+       @XmlAttribute(required = true) public float x;\r
+       @XmlAttribute(required = true) public float y;\r
+       @XmlAttribute(required = true) public float z;\r
+}\r
index fffef2e..c0291cb 100644 (file)
@@ -177,13 +177,13 @@ public class ObjLoader implements StillModelLoader {
                                        finalVerts[vi++] = uvs.get(uvIndex);\r
                                }\r
                        }\r
-                       \r
+\r
                        final int numIndices = numFaces * 3 >= Short.MAX_VALUE ? 0 : numFaces * 3;\r
                        final short[] finalIndices = new short[numIndices];\r
                        // if there are too many vertices in a mesh, we can't use indices\r
                        if (numIndices > 0) {\r
-                               for (int i=0; i<numIndices; i++){\r
-                                       finalIndices[i] = (short) i;\r
+                               for (int i = 0; i < numIndices; i++) {\r
+                                       finalIndices[i] = (short)i;\r
                                }\r
                        }\r
                        final Mesh mesh;\r
index ca2ba48..99c2a59 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.materials;\r
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.GL11;\r
-import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.utils.Pool;\r
 \r
@@ -86,4 +85,4 @@ public class BlendingAttribute extends MaterialAttribute {
        public void free () {\r
                if (isPooled) pool.free(this);\r
        }\r
-}
\ No newline at end of file
+}\r
index 0270085..702c649 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.badlogic.gdx.graphics.g3d.materials;\r
 \r
-import java.util.Arrays;\r
-\r
 import com.badlogic.gdx.graphics.g3d.experimental.MaterialShaderHandler;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.utils.Array;\r
index d57d412..ef64bce 100644 (file)
 package com.badlogic.gdx.graphics.g3d.materials;\r
 \r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
-import com.badlogic.gdx.utils.Pool;\r
 \r
 public abstract class MaterialAttribute {\r
        private static final String FLAG = "Flag";\r
        public String name;\r
        protected final boolean isPooled;\r
 \r
-       protected MaterialAttribute() {\r
+       protected MaterialAttribute () {\r
                isPooled = true;\r
        }\r
-       \r
+\r
        public MaterialAttribute (String name) {\r
                this.name = name;\r
                isPooled = false;\r
@@ -38,13 +37,13 @@ public abstract class MaterialAttribute {
        public abstract void bind (ShaderProgram program);\r
 \r
        public abstract MaterialAttribute copy ();\r
-       \r
-       public abstract MaterialAttribute pooledCopy();\r
-       \r
-       public abstract void free();\r
-       \r
-       public abstract void set(MaterialAttribute attr);\r
-       \r
+\r
+       public abstract MaterialAttribute pooledCopy ();\r
+\r
+       public abstract void free ();\r
+\r
+       public abstract void set (MaterialAttribute attr);\r
+\r
        public String getShaderFlag () {\r
                return name + FLAG;\r
        }\r
index 27a5fa4..de1a14a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model;\r
 \r
 public interface AnimatedModel extends Model {\r
@@ -21,4 +22,4 @@ public interface AnimatedModel extends Model {
        public Animation getAnimation (String name);\r
 \r
        public Animation[] getAnimations ();\r
-}
\ No newline at end of file
+}\r
index 44a05fc..b8b4afb 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model;\r
 \r
 public class Animation {\r
@@ -23,4 +24,4 @@ public class Animation {
                this.name = name;\r
                this.totalDuration = totalDuration;\r
        }\r
-}
\ No newline at end of file
+}\r
index ee46ba9..7067f6d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model;\r
 \r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
@@ -37,4 +38,4 @@ public interface Model {
        public void setMaterial (Material material);\r
 \r
        public void dispose ();\r
-}
\ No newline at end of file
+}\r
index 63bd2cf..662b186 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model;\r
 \r
 import com.badlogic.gdx.graphics.Mesh;\r
@@ -25,6 +26,6 @@ public abstract class SubMesh {
        public int primitiveType;\r
 \r
        public abstract void getBoundingBox (BoundingBox bbox);\r
-       \r
-       public abstract Mesh getMesh(); \r
-}
\ No newline at end of file
+\r
+       public abstract Mesh getMesh ();\r
+}\r
index 10a44ec..2fd03dc 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.keyframe;\r
 \r
 public class Keyframe {\r
@@ -23,4 +24,4 @@ public class Keyframe {
                this.timeStamp = timeStamp;\r
                this.vertices = vertices;\r
        }\r
-}
\ No newline at end of file
+}\r
index 95dc434..21ec81a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.keyframe;\r
 \r
 import com.badlogic.gdx.graphics.g3d.model.Animation;\r
@@ -26,4 +27,4 @@ public class KeyframedAnimation extends Animation {
                this.frameDuration = frameDuration;\r
                this.keyframes = keyframes;\r
        }\r
-}
\ No newline at end of file
+}\r
index 399c8e5..f56b742 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.keyframe;\r
 \r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
@@ -200,4 +201,4 @@ public class KeyframedModel implements AnimatedModel, Disposable {
                        subMeshes[i].mesh.dispose();\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 5ad5c73..18dbbe8 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.skeleton;\r
 \r
 import java.util.HashMap;\r
@@ -152,4 +153,4 @@ public class Skeleton {
        public void setBindPose () {\r
                calculateMatrices(bindPoseJoints);\r
        }\r
-}
\ No newline at end of file
+}\r
index 9a808f9..8b7dcd9 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.skeleton;\r
 \r
 import com.badlogic.gdx.graphics.g3d.model.Animation;\r
@@ -24,4 +25,4 @@ public class SkeletonAnimation extends Animation {
                super(name, totalDuration);\r
                this.perJointkeyFrames = perJointKeyFrames;\r
        }\r
-}
\ No newline at end of file
+}\r
index ebf6603..2ce441e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.skeleton;\r
 \r
 import com.badlogic.gdx.math.Quaternion;\r
@@ -30,4 +31,4 @@ public class SkeletonJoint {
        public final Vector3 position = new Vector3();\r
        public final Quaternion rotation = new Quaternion(new Vector3(0, 1, 0), 0);\r
        public final Vector3 scale = new Vector3(1, 1, 1);\r
-}
\ No newline at end of file
+}\r
index 5c1ac11..4b6fcb5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.skeleton;\r
 \r
 import com.badlogic.gdx.math.Quaternion;\r
@@ -29,4 +30,4 @@ public class SkeletonKeyframe {
                return "time: " + timeStamp + ", " + "parent: " + parentIndex + ", " + "position: " + position + ", " + "scale: " + scale\r
                        + ", " + "rotation: " + rotation;\r
        }\r
-}
\ No newline at end of file
+}\r
index 334f9f1..4f9e79f 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.skeleton;\r
 \r
 import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
@@ -20,7 +21,6 @@ import com.badlogic.gdx.graphics.g3d.materials.Material;
 import com.badlogic.gdx.graphics.g3d.model.AnimatedModel;\r
 import com.badlogic.gdx.graphics.g3d.model.Model;\r
 import com.badlogic.gdx.graphics.g3d.model.SubMesh;\r
-import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedSubMesh;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
@@ -215,4 +215,4 @@ public class SkeletonModel implements AnimatedModel {
                        subMeshes[i].mesh.dispose();\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 01d6af9..4ed31a7 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.model.still;\r
 \r
 import java.util.ArrayList;\r
@@ -20,7 +21,6 @@ import java.util.ArrayList;
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
 import com.badlogic.gdx.graphics.g3d.model.Model;\r
 import com.badlogic.gdx.graphics.g3d.model.SubMesh;\r
-import com.badlogic.gdx.graphics.g3d.model.keyframe.KeyframedSubMesh;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.collision.BoundingBox;\r
 \r
@@ -117,4 +117,4 @@ public class StillModel implements Model {
                        subMeshes[i].mesh.dispose();\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 7399d0b..38e88e4 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.test;\r
 \r
 import java.io.ByteArrayInputStream;\r
@@ -66,4 +67,4 @@ public class ChunkTest {
                Chunk version = root.getChild(VERSION_INFO);\r
                Chunk stillModel = root.getChild(STILL_MODEL);\r
        }\r
-}
\ No newline at end of file
+}\r
index 164cf44..a2abadb 100644 (file)
@@ -1,7 +1,6 @@
 \r
 package com.badlogic.gdx.graphics.g3d.test;\r
 \r
-import java.util.Arrays;\r
 import java.util.Comparator;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -12,7 +11,6 @@ import com.badlogic.gdx.graphics.g3d.ModelRenderer;
 import com.badlogic.gdx.graphics.g3d.StillModelInstance;\r
 import com.badlogic.gdx.graphics.g3d.experimental.MaterialShaderHandler;\r
 import com.badlogic.gdx.graphics.g3d.lights.LightManager;\r
-import com.badlogic.gdx.graphics.g3d.lights.PointLight;\r
 import com.badlogic.gdx.graphics.g3d.materials.BlendingAttribute;\r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
 import com.badlogic.gdx.graphics.g3d.materials.MaterialAttribute;\r
@@ -20,16 +18,13 @@ import com.badlogic.gdx.graphics.g3d.materials.TextureAttribute;
 import com.badlogic.gdx.graphics.g3d.model.AnimatedModel;\r
 import com.badlogic.gdx.graphics.g3d.model.Model;\r
 import com.badlogic.gdx.graphics.g3d.model.SubMesh;\r
-import com.badlogic.gdx.graphics.g3d.model.skeleton.SkeletonSubMesh;\r
 import com.badlogic.gdx.graphics.g3d.model.still.StillModel;\r
 import com.badlogic.gdx.graphics.g3d.test.PrototypeRendererGL20.DrawableManager.Drawable;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.Matrix3;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
-import com.badlogic.gdx.math.collision.BoundingBox;\r
 import com.badlogic.gdx.utils.Array;\r
-import com.badlogic.gdx.utils.ObjectMap;\r
 import com.badlogic.gdx.utils.Pool;\r
 \r
 //stuff that happens\r
@@ -406,14 +401,14 @@ public class PrototypeRendererGL20 implements ModelRenderer {
                        }\r
                }\r
        }\r
-       \r
+\r
        public static final Comparator<Drawable> opaqueSorter = new Comparator<Drawable>() {\r
 \r
-               public int compare(Drawable a, Drawable b) {\r
+               public int compare (Drawable a, Drawable b) {\r
                        if (a.firstShaderHash != b.firstShaderHash) return b.firstShaderHash - a.firstShaderHash;\r
-                       \r
+\r
                        if (a.modelHash != b.modelHash) return b.modelHash - a.modelHash;\r
-       \r
+\r
                        return b.distance - a.distance;\r
                }\r
 \r
index 1c54b10..77a628a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.test;\r
 \r
 import com.badlogic.gdx.ApplicationListener;\r
@@ -185,4 +186,4 @@ public class SkeletonModelViewer implements ApplicationListener {
                new JoglApplication(new SkeletonModelViewer("data/robot-mesh.xml", "data/robot.jpg"), "SkeletonModel Viewer", 800, 480,\r
                        false);\r
        }\r
-}
\ No newline at end of file
+}\r
index 339bbbb..954685d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.test;\r
 \r
 import com.badlogic.gdx.ApplicationListener;\r
@@ -218,8 +219,9 @@ public class StillModelViewer implements ApplicationListener {
 // new JoglApplication(new StillModelViewer(argv[0], argv.length==2?argv[1]:null), "StillModel Viewer", 800, 480, false);\r
 // new JoglApplication(new StillModelViewer("data/qbob/world_blobbie_brushes.g3dt", "data/qbob/world_blobbie_blocks.png"),\r
 // "StillModel Viewer", 800, 480, false);\r
-               new JoglApplication(new StillModelViewer("data/models/multipleuvs.g3d", "data/multipleuvs_1.png", "data/multipleuvs_2.png"),\r
+               new JoglApplication(\r
+                       new StillModelViewer("data/models/multipleuvs.g3d", "data/multipleuvs_1.png", "data/multipleuvs_2.png"),\r
                        "StillModel Viewer", 800, 480, false);\r
 // new JoglApplication(new StillModelViewer("data/head.obj"), "StillModel Viewer", 800, 480, false);\r
        }\r
-}
\ No newline at end of file
+}\r
index 659ecdc..ed6bd0d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.test;\r
 \r
 /*******************************************************************************\r
@@ -34,40 +35,26 @@ package com.badlogic.gdx.graphics.g3d.test;
 import com.badlogic.gdx.ApplicationListener;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.backends.jogl.JoglApplication;\r
-import com.badlogic.gdx.graphics.FPSLogger;\r
-\r
 import com.badlogic.gdx.graphics.Color;\r
+import com.badlogic.gdx.graphics.FPSLogger;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.GL11;\r
 import com.badlogic.gdx.graphics.PerspectiveCamera;\r
 import com.badlogic.gdx.graphics.Texture;\r
-import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
-import com.badlogic.gdx.graphics.g3d.StillModelInstance;\r
 import com.badlogic.gdx.graphics.g3d.StillModelNode;\r
-import com.badlogic.gdx.graphics.g3d.experimental.ShaderFactory;\r
-import com.badlogic.gdx.graphics.g3d.experimental.ShaderLoader;\r
 import com.badlogic.gdx.graphics.g3d.lights.DirectionalLight;\r
 import com.badlogic.gdx.graphics.g3d.lights.LightManager;\r
 import com.badlogic.gdx.graphics.g3d.lights.LightManager.LightQuality;\r
 import com.badlogic.gdx.graphics.g3d.lights.PointLight;\r
 import com.badlogic.gdx.graphics.g3d.loaders.ModelLoaderRegistry;\r
-import com.badlogic.gdx.graphics.g3d.loaders.g3d.G3dLoader;\r
-import com.badlogic.gdx.graphics.g3d.loaders.g3d.chunks.G3dExporter;\r
-import com.badlogic.gdx.graphics.g3d.materials.BlendingAttribute;\r
 import com.badlogic.gdx.graphics.g3d.materials.ColorAttribute;\r
 import com.badlogic.gdx.graphics.g3d.materials.Material;\r
 import com.badlogic.gdx.graphics.g3d.materials.MaterialAttribute;\r
 import com.badlogic.gdx.graphics.g3d.materials.TextureAttribute;\r
 import com.badlogic.gdx.graphics.g3d.model.still.StillModel;\r
-import com.badlogic.gdx.graphics.g3d.model.still.StillSubMesh;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.MathUtils;\r
-import com.badlogic.gdx.math.Matrix4;\r
-import com.badlogic.gdx.math.Vector3;\r
 import com.badlogic.gdx.math.collision.BoundingBox;\r
 \r
 public class StillModelViewerGL20 implements ApplicationListener {\r
@@ -131,7 +118,7 @@ public class StillModelViewerGL20 implements ApplicationListener {
                for (int i = 0; i < 4; i++) {\r
                        PointLight l = new PointLight();\r
                        l.position.set(-MathUtils.random(8) + 4, MathUtils.random(3), -MathUtils.random(6) + 3);\r
-                       \r
+\r
                        l.color.r = MathUtils.random();\r
                        l.color.b = MathUtils.random();\r
                        l.color.g = MathUtils.random();\r
@@ -145,7 +132,7 @@ public class StillModelViewerGL20 implements ApplicationListener {
 \r
                MaterialAttribute c1 = new ColorAttribute(new Color(0.5f, 0.51f, 0.51f, 1.0f), ColorAttribute.specular);\r
                MaterialAttribute c2 = new ColorAttribute(new Color(0.95f, 0.95f, 0.95f, 1.0f), ColorAttribute.diffuse);\r
-               MaterialAttribute t0 = new TextureAttribute(textures[0], 0, TextureAttribute.diffuseTexture);           \r
+               MaterialAttribute t0 = new TextureAttribute(textures[0], 0, TextureAttribute.diffuseTexture);\r
                Material material = new Material("basic", c1, c2, t0);\r
 \r
                model.setMaterial(material);\r
@@ -219,4 +206,4 @@ public class StillModelViewerGL20 implements ApplicationListener {
                // new JoglApplication(new StillModelViewer("data/head.obj"),\r
                // "StillModel Viewer", 800, 480, false);\r
        }\r
-}
\ No newline at end of file
+}\r
index a37878d..e0722e1 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.test;\r
 \r
 import java.util.ArrayList;\r
@@ -59,8 +60,10 @@ public class Viewer implements ApplicationListener {
        public void create () {\r
 \r
                Texture texture = new Texture(Gdx.files.internal("data/models/ninja.jpg"));\r
-               Material mat = new Material("mat", new TextureAttribute(texture, 0, "s_tex"), new ColorAttribute(Color.CYAN, ColorAttribute.diffuse));\r
-               model = new OgreXmlLoader().load(Gdx.files.internal("data/models/ninja.mesh.xml"), Gdx.files.internal("data/models/ninja.skeleton.xml"));\r
+               Material mat = new Material("mat", new TextureAttribute(texture, 0, "s_tex"), new ColorAttribute(Color.CYAN,\r
+                       ColorAttribute.diffuse));\r
+               model = new OgreXmlLoader().load(Gdx.files.internal("data/models/ninja.mesh.xml"),\r
+                       Gdx.files.internal("data/models/ninja.skeleton.xml"));\r
                model.setMaterial(mat);\r
 \r
                cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\r
@@ -176,4 +179,4 @@ public class Viewer implements ApplicationListener {
                // TODO Auto-generated method stub\r
 \r
        }\r
-}
\ No newline at end of file
+}\r
index 79c0ef5..66f78ae 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g3d.test.utils;\r
 \r
 import com.badlogic.gdx.InputAdapter;\r
@@ -53,4 +54,4 @@ public class PerspectiveCamController extends InputAdapter {
                last.set(-1, -1, -1);\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index c0c2d6b..e004b9c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx;\r
 \r
 /** Convenience implementation of {@link ApplicationListener}. Derrive from this and only override what you need.\r
@@ -41,4 +42,4 @@ public abstract class ApplicationAdapter implements ApplicationListener {
        @Override\r
        public void dispose () {\r
        }\r
-}
\ No newline at end of file
+}\r
index 5b05af6..ffea7fa 100644 (file)
@@ -43,7 +43,7 @@ public interface Files {
                /** Path that is a fully qualified, absolute filesystem path. To ensure portability across platforms use absolute files only\r
                 * when absolutely (heh) necessary. */\r
                Absolute,\r
-               \r
+\r
                /** Path relative to the private files directory on Android and to the application's root directory on the desktop. */\r
                Local;\r
        }\r
@@ -68,7 +68,7 @@ public interface Files {
 \r
        /** Convenience method that returns a {@link FileType#Local} file handle. */\r
        public FileHandle local (String path);\r
-       \r
+\r
        /** Returns the external storage path directory. This is the SD card on Android and the home directory of the current user on\r
         * the desktop. */\r
        public String getExternalStoragePath ();\r
@@ -76,11 +76,11 @@ public interface Files {
        /** Returns true if the external storage is ready for file IO. Eg, on Android, the SD card is not available when mounted for use\r
         * with a PC. */\r
        public boolean isExternalStorageAvailable ();\r
-       \r
-       /** Returns the local storage path directory. This is the private files directory on Android and the directory of the jar on\r
-        * the desktop. */      \r
+\r
+       /** Returns the local storage path directory. This is the private files directory on Android and the directory of the jar on the\r
+        * desktop. */\r
        public String getLocalStoragePath ();\r
-       \r
-       /** Returns true if the local storage is ready for file IO. */  \r
-       public boolean isLocalStorageAvailable();\r
+\r
+       /** Returns true if the local storage is ready for file IO. */\r
+       public boolean isLocalStorageAvailable ();\r
 }\r
index 3519d1c..72ba1eb 100644 (file)
@@ -21,7 +21,6 @@ import com.badlogic.gdx.graphics.GL11;
 import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.GLCommon;\r
 import com.badlogic.gdx.graphics.GLU;\r
-import com.badlogic.gdx.utils.Timer;\r
 \r
 /** Environment class holding references to the {@link Application}, {@link Graphics}, {@link Audio}, {@link Files} and\r
  * {@link Input} instances. The references are held in public static fields. Do not mess with this! This essentially allows you\r
index b5bc84b..9deeb2a 100644 (file)
@@ -23,7 +23,6 @@ import com.badlogic.gdx.graphics.GLCommon;
 import com.badlogic.gdx.graphics.GLU;\r
 import com.badlogic.gdx.graphics.Mesh;\r
 import com.badlogic.gdx.graphics.Pixmap;\r
-import com.badlogic.gdx.graphics.Pixmap.Format;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
@@ -152,8 +151,8 @@ public interface Graphics {
        public float getDeltaTime ();\r
 \r
        /** @return the time span between the current frame and the last frame in seconds, without smoothing **/\r
-       public float getRawDeltaTime();\r
-       \r
+       public float getRawDeltaTime ();\r
+\r
        /** @return the average number of frames per second */\r
        public int getFramesPerSecond ();\r
 \r
@@ -222,10 +221,9 @@ public interface Graphics {
        /** @param extension the extension name\r
         * @return whether the extension is supported */\r
        public boolean supportsExtension (String extension);\r
-       \r
-       /**\r
-        * Sets whether to render continuously. In case rendering is performed non-continuously, the\r
-        * following events will trigger a redraw:\r
+\r
+       /** Sets whether to render continuously. In case rendering is performed non-continuously, the following events will trigger a\r
+        * redraw:\r
         * \r
         * <ul>\r
         * <li>A call to {@link #requestRendering()}</li>\r
@@ -233,29 +231,21 @@ public interface Graphics {
         * <li>A {@link Runnable} is posted to the rendering thread via {@link Application#postRunnable(Runnable)}</li>\r
         * </ul>\r
         * \r
-        * Life-cycle events will also be reported as usual, see {@link ApplicationListener}. \r
-        * This method can be called from any thread.\r
+        * Life-cycle events will also be reported as usual, see {@link ApplicationListener}. This method can be called from any\r
+        * thread.\r
         * \r
-        * @param isContinuous whether the rendering should be continuous or not.\r
-        */\r
-       public void setContinuousRendering(boolean isContinuous);\r
-       \r
-       /**\r
-        * @return wheter rendering is continuous.\r
-        */\r
-       public boolean isContinuousRendering();\r
-       \r
-       /**\r
-        * Requests a new frame to be rendered if the rendering mode is non-continuous. This method\r
-        * can be called from any thread.\r
-        */\r
-       public void requestRendering();\r
-       \r
-       /**\r
-        * Whether the app is fullscreen or not \r
-        */\r
-       public boolean isFullscreen();\r
-       \r
+        * @param isContinuous whether the rendering should be continuous or not. */\r
+       public void setContinuousRendering (boolean isContinuous);\r
+\r
+       /** @return wheter rendering is continuous. */\r
+       public boolean isContinuousRendering ();\r
+\r
+       /** Requests a new frame to be rendered if the rendering mode is non-continuous. This method can be called from any thread. */\r
+       public void requestRendering ();\r
+\r
+       /** Whether the app is fullscreen or not */\r
+       public boolean isFullscreen ();\r
+\r
        // /**\r
        // * Opens the first back facing video camera. Only one camera\r
        // * can be opened at any given time.\r
index 7c9e3ac..08f1343 100644 (file)
@@ -297,7 +297,6 @@ public interface Input {
         * @return whether the button is down or not. */\r
        public boolean isButtonPressed (int button);\r
 \r
-\r
        /** Returns whether the key is pressed.\r
         * \r
         * @param key The key code as found in {@link Input.Keys}.\r
index 47462ff..07dda4f 100644 (file)
@@ -32,14 +32,14 @@ public class InputMultiplexer implements InputProcessor {
                        this.processors.add(processors[i]);\r
        }\r
 \r
-       public void addProcessor(int index, InputProcessor processor) {\r
+       public void addProcessor (int index, InputProcessor processor) {\r
                processors.insert(index, processor);\r
        }\r
-       \r
-       public void removeProcessor(int index) {\r
+\r
+       public void removeProcessor (int index) {\r
                processors.removeIndex(index);\r
        }\r
-       \r
+\r
        public void addProcessor (InputProcessor processor) {\r
                processors.add(processor);\r
        }\r
@@ -48,13 +48,11 @@ public class InputMultiplexer implements InputProcessor {
                processors.removeValue(processor, true);\r
        }\r
 \r
-       /**\r
-        * @return the number of processors in this multiplexer\r
-        */\r
-       public int size() {\r
+       /** @return the number of processors in this multiplexer */\r
+       public int size () {\r
                return processors.size;\r
        }\r
-       \r
+\r
        public void clear () {\r
                processors.clear();\r
        }\r
index 5690f5b..e2eeb7a 100644 (file)
@@ -67,8 +67,8 @@ public interface Preferences {
        public boolean contains (String key);\r
 \r
        public void clear ();\r
-       \r
-       public void remove(String key);\r
+\r
+       public void remove (String key);\r
 \r
        /** Makes sure the preferences are persisted. */\r
        public void flush ();\r
index 32fda69..ebdf9ab 100644 (file)
@@ -126,7 +126,7 @@ class AssetLoadingTask implements Callable<Void> {
                                                throw new GdxRuntimeException("Couldn't load dependencies of asset '" + assetDesc.fileName + "'", e);\r
                                        }\r
                                        dependenciesLoaded = true;\r
-                                       if(asyncDone) {\r
+                                       if (asyncDone) {\r
                                                asset = asyncLoader.loadSync(manager, assetDesc.fileName, assetDesc.params);\r
                                        }\r
                                }\r
@@ -135,7 +135,7 @@ class AssetLoadingTask implements Callable<Void> {
                        if (loadFuture == null && !asyncDone) {\r
                                loadFuture = threadPool.submit(this);\r
                        } else {\r
-                               if(asyncDone) {\r
+                               if (asyncDone) {\r
                                        asset = asyncLoader.loadSync(manager, assetDesc.fileName, assetDesc.params);\r
                                } else if (loadFuture.isDone()) {\r
                                        try {\r
index dd2a59b..629866c 100644 (file)
@@ -52,11 +52,8 @@ import com.badlogic.gdx.utils.ObjectIntMap;
 import com.badlogic.gdx.utils.ObjectMap;\r
 import com.badlogic.gdx.utils.TimeUtils;\r
 \r
-/**\r
- * Loads and stores assets like textures, bitmapfonts, tile maps, sounds, music and so on.\r
- * @author mzechner\r
- *\r
- */\r
+/** Loads and stores assets like textures, bitmapfonts, tile maps, sounds, music and so on.\r
+ * @author mzechner */\r
 public class AssetManager implements Disposable {\r
        final ObjectMap<Class, ObjectMap<String, RefCountedContainer>> assets = new ObjectMap<Class, ObjectMap<String, RefCountedContainer>>();\r
        final ObjectMap<String, Class> assetTypes = new ObjectMap<String, Class>();\r
@@ -178,7 +175,7 @@ public class AssetManager implements Disposable {
         * @return whether the asset is contained in this manager */\r
        public synchronized <T> boolean containsAsset (T asset) {\r
                ObjectMap<String, RefCountedContainer> typedAssets = assets.get(asset.getClass());\r
-               if(typedAssets == null) return false;\r
+               if (typedAssets == null) return false;\r
                for (String fileName : typedAssets.keys()) {\r
                        T otherAsset = (T)typedAssets.get(fileName).getObject(Object.class);\r
                        if (otherAsset == asset || asset.equals(otherAsset)) return true;\r
@@ -308,9 +305,7 @@ public class AssetManager implements Disposable {
                }\r
        }\r
 \r
-       /**\r
-        * blocks until all assets are loaded.\r
-        */\r
+       /** blocks until all assets are loaded. */\r
        public void finishLoading () {\r
                log.debug("Waiting for loading to complete...");\r
                while (!update())\r
index 23fe70e..8acdd86 100644 (file)
@@ -21,38 +21,29 @@ import com.badlogic.gdx.assets.AssetLoaderParameters;
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * Abstract base class for asset loaders. \r
+/** Abstract base class for asset loaders.\r
  * @author mzechner\r
- *\r
+ * \r
  * @param <T> the class of the asset the loader supports\r
- * @param <P> the class of the loading parameters the loader supports.\r
- */\r
+ * @param <P> the class of the loading parameters the loader supports. */\r
 public abstract class AssetLoader<T, P extends AssetLoaderParameters<T>> {\r
        /** {@link FileHandleResolver} used to map from plain asset names to {@link FileHandle} instances **/\r
        private FileHandleResolver resolver;\r
 \r
-       /**\r
-        * Constructor, sets the {@link FileHandleResolver} to use to resolve the file \r
-        * associated with the asset name.\r
-        * @param resolver\r
-        */\r
+       /** Constructor, sets the {@link FileHandleResolver} to use to resolve the file associated with the asset name.\r
+        * @param resolver */\r
        public AssetLoader (FileHandleResolver resolver) {\r
                this.resolver = resolver;\r
        }\r
 \r
-       /**\r
-        * @param fileName file name to resolve\r
-        * @return handle to the file, as resolved by the {@link FileHandleResolver} set on the loader\r
-        */\r
+       /** @param fileName file name to resolve\r
+        * @return handle to the file, as resolved by the {@link FileHandleResolver} set on the loader */\r
        public FileHandle resolve (String fileName) {\r
                return resolver.resolve(fileName);\r
        }\r
 \r
-       /**\r
-        * @param fileName name of the asset to load\r
+       /** @param fileName name of the asset to load\r
         * @param parameter parameters for loading the asset\r
-        * @return other assets that the asset depends on and need to be loaded first or null if there are no dependencies.\r
-        */\r
+        * @return other assets that the asset depends on and need to be loaded first or null if there are no dependencies. */\r
        public abstract Array<AssetDescriptor> getDependencies (String fileName, P parameter);\r
 }\r
index a276525..e91695c 100644 (file)
@@ -19,36 +19,27 @@ package com.badlogic.gdx.assets.loaders;
 import com.badlogic.gdx.assets.AssetLoaderParameters;\r
 import com.badlogic.gdx.assets.AssetManager;\r
 \r
-/**\r
- * Base class for asynchronous {@link AssetLoader} instances. Such loaders\r
- * try to load parts of an OpenGL resource, like the Pixmap, on a separate\r
- * thread to then load the actual resource on the thread the OpenGL context\r
- * is active on.\r
+/** Base class for asynchronous {@link AssetLoader} instances. Such loaders try to load parts of an OpenGL resource, like the\r
+ * Pixmap, on a separate thread to then load the actual resource on the thread the OpenGL context is active on.\r
  * @author mzechner\r
- *\r
+ * \r
  * @param <T>\r
- * @param <P>\r
- */\r
+ * @param <P> */\r
 public abstract class AsynchronousAssetLoader<T, P extends AssetLoaderParameters<T>> extends AssetLoader<T, P> {\r
 \r
        public AsynchronousAssetLoader (FileHandleResolver resolver) {\r
                super(resolver);\r
        }\r
 \r
-       /**\r
-        * Loads the non-OpenGL part of the asset and injects any dependencies of the asset\r
-        * into the AssetManager.\r
+       /** Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.\r
         * @param manager\r
         * @param fileName the name of the asset to load\r
-        * @param parameter the parameters to use for loading the asset\r
-        */\r
+        * @param parameter the parameters to use for loading the asset */\r
        public abstract void loadAsync (AssetManager manager, String fileName, P parameter);\r
 \r
-       /**\r
-        * Loads th\r
+       /** Loads th\r
         * @param manager\r
         * @param fileName\r
-        * @param parameter\r
-        */\r
+        * @param parameter */\r
        public abstract T loadSync (AssetManager manager, String fileName, P parameter);\r
 }\r
index 9eaa8c8..501483d 100644 (file)
@@ -27,13 +27,10 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont.BitmapFontData;
 import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * {@link AssetLoader} for {@link BitmapFont} instances. Loads the font description file (.fnt) \r
- * asynchronously, loads the {@link Texture} containing the glyphs as a dependency. The {@link BitmapFontParameter}\r
- * allows you to set things like texture filters or whether to flip the glyphs on the y-axis..\r
- * @author mzechner\r
- *\r
- */\r
+/** {@link AssetLoader} for {@link BitmapFont} instances. Loads the font description file (.fnt) asynchronously, loads the\r
+ * {@link Texture} containing the glyphs as a dependency. The {@link BitmapFontParameter} allows you to set things like texture\r
+ * filters or whether to flip the glyphs on the y-axis..\r
+ * @author mzechner */\r
 public class BitmapFontLoader extends AsynchronousAssetLoader<BitmapFont, BitmapFontLoader.BitmapFontParameter> {\r
        public BitmapFontLoader (FileHandleResolver resolver) {\r
                super(resolver);\r
@@ -44,7 +41,7 @@ public class BitmapFontLoader extends AsynchronousAssetLoader<BitmapFont, Bitmap
        @Override\r
        public Array<AssetDescriptor> getDependencies (String fileName, BitmapFontParameter parameter) {\r
                Array<AssetDescriptor> deps = new Array<AssetDescriptor>();\r
-               if(parameter != null && parameter.bitmapFontData != null) {\r
+               if (parameter != null && parameter.bitmapFontData != null) {\r
                        data = parameter.bitmapFontData;\r
                        return deps;\r
                }\r
@@ -66,12 +63,9 @@ public class BitmapFontLoader extends AsynchronousAssetLoader<BitmapFont, Bitmap
                return new BitmapFont(data, region, true);\r
        }\r
 \r
-       /**\r
-        * Parameter to be passed to {@link AssetManager#load(String, Class, AssetLoaderParameters)} if\r
-        * additional configuration is necessary for the {@link BitmapFont}.\r
-        * @author mzechner\r
-        *\r
-        */\r
+       /** Parameter to be passed to {@link AssetManager#load(String, Class, AssetLoaderParameters)} if additional configuration is\r
+        * necessary for the {@link BitmapFont}.\r
+        * @author mzechner */\r
        static public class BitmapFontParameter extends AssetLoaderParameters<BitmapFont> {\r
                /** whether to flipY the font or not **/\r
                public boolean flip = false;\r
index 471dbc2..e10195a 100644 (file)
@@ -19,12 +19,9 @@ package com.badlogic.gdx.assets.loaders;
 import com.badlogic.gdx.assets.AssetManager;\r
 import com.badlogic.gdx.files.FileHandle;\r
 \r
-/**\r
- * Interface for classes the can map a file name to a {@link FileHandle}. Used to allow\r
- * the {@link AssetManager} to load resources from anywhere or implement caching strategies.\r
- * @author mzechner\r
- *\r
- */\r
+/** Interface for classes the can map a file name to a {@link FileHandle}. Used to allow the {@link AssetManager} to load resources\r
+ * from anywhere or implement caching strategies.\r
+ * @author mzechner */\r
 public interface FileHandleResolver {\r
        public FileHandle resolve (String fileName);\r
 }\r
index 8d47253..77d6516 100644 (file)
@@ -23,11 +23,8 @@ import com.badlogic.gdx.assets.AssetManager;
 import com.badlogic.gdx.audio.Music;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * {@link AssetLoader} for {@link Music} instances. The Music instance is loaded synchronously.\r
- * @author mzechner\r
- *\r
- */\r
+/** {@link AssetLoader} for {@link Music} instances. The Music instance is loaded synchronously.\r
+ * @author mzechner */\r
 public class MusicLoader extends SynchronousAssetLoader<Music, MusicLoader.MusicParameter> {\r
        public MusicLoader (FileHandleResolver resolver) {\r
                super(resolver);\r
index be5e66b..8353600 100644 (file)
@@ -22,11 +22,8 @@ import com.badlogic.gdx.assets.AssetManager;
 import com.badlogic.gdx.graphics.Pixmap;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * {@link AssetLoader} for {@link Pixmap} instances. The Pixmap is loaded asynchronously.\r
- * @author mzechner\r
- *\r
- */\r
+/** {@link AssetLoader} for {@link Pixmap} instances. The Pixmap is loaded asynchronously.\r
+ * @author mzechner */\r
 public class PixmapLoader extends AsynchronousAssetLoader<Pixmap, PixmapLoader.PixmapParameter> {\r
        public PixmapLoader (FileHandleResolver resolver) {\r
                super(resolver);\r
index b2dee9a..fea8182 100644 (file)
@@ -23,11 +23,8 @@ import com.badlogic.gdx.assets.AssetManager;
 import com.badlogic.gdx.audio.Sound;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * {@link AssetLoader} to load {@link Sound} instances.\r
- * @author mzechner\r
- *\r
- */\r
+/** {@link AssetLoader} to load {@link Sound} instances.\r
+ * @author mzechner */\r
 public class SoundLoader extends SynchronousAssetLoader<Sound, SoundLoader.SoundParameter> {\r
        public SoundLoader (FileHandleResolver resolver) {\r
                super(resolver);\r
index afdba91..ae90e11 100644 (file)
@@ -27,13 +27,10 @@ import com.badlogic.gdx.graphics.g2d.TextureAtlas.TextureAtlasData;
 import com.badlogic.gdx.graphics.g2d.TextureAtlas.TextureAtlasData.Page;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * {@link AssetLoader} to load {@link TextureAtlas} instances. Passing a {@link TextureAtlasParameter} to\r
- * {@link AssetManager#load(String, Class, AssetLoaderParameters)} allows to specify whether the atlas\r
- * regions should be flipped on the y-axis or not.\r
- * @author mzechner\r
- *\r
- */\r
+/** {@link AssetLoader} to load {@link TextureAtlas} instances. Passing a {@link TextureAtlasParameter} to\r
+ * {@link AssetManager#load(String, Class, AssetLoaderParameters)} allows to specify whether the atlas regions should be flipped\r
+ * on the y-axis or not.\r
+ * @author mzechner */\r
 public class TextureAtlasLoader extends SynchronousAssetLoader<TextureAtlas, TextureAtlasLoader.TextureAtlasParameter> {\r
        public TextureAtlasLoader (FileHandleResolver resolver) {\r
                super(resolver);\r
index 9cbc8bd..2964a48 100644 (file)
@@ -31,14 +31,11 @@ import com.badlogic.gdx.graphics.glutils.ETC1TextureData;
 import com.badlogic.gdx.graphics.glutils.FileTextureData;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * {@link AssetLoader} for {@link Texture} instances. The pixel data is loaded asynchronously. The texture\r
- * is then created on the rendering thread, synchronously. Passing a {@link TextureParameter} to {@link AssetManager#load(String, Class, AssetLoaderParameters)}\r
- * allows one to specify parameters as can be passed to the various Texture constructors, e.g. filtering,\r
- * whether to generate mipmaps and so on.\r
- * @author mzechner\r
- *\r
- */\r
+/** {@link AssetLoader} for {@link Texture} instances. The pixel data is loaded asynchronously. The texture is then created on the\r
+ * rendering thread, synchronously. Passing a {@link TextureParameter} to\r
+ * {@link AssetManager#load(String, Class, AssetLoaderParameters)} allows one to specify parameters as can be passed to the\r
+ * various Texture constructors, e.g. filtering, whether to generate mipmaps and so on.\r
+ * @author mzechner */\r
 public class TextureLoader extends AsynchronousAssetLoader<Texture, TextureLoader.TextureParameter> {\r
        TextureData data;\r
        Texture texture;\r
@@ -63,15 +60,17 @@ public class TextureLoader extends AsynchronousAssetLoader<Texture, TextureLoade
 \r
                        FileHandle handle = resolve(fileName);\r
                        if (!fileName.contains(".etc1")) {\r
-                               if(fileName.contains(".cim")) pixmap = PixmapIO.readCIM(handle);\r
-                               else pixmap = new Pixmap(handle);\r
+                               if (fileName.contains(".cim"))\r
+                                       pixmap = PixmapIO.readCIM(handle);\r
+                               else\r
+                                       pixmap = new Pixmap(handle);\r
                                data = new FileTextureData(handle, pixmap, format, genMipMaps);\r
                        } else {\r
                                data = new ETC1TextureData(handle, genMipMaps);\r
                        }\r
                } else {\r
                        data = parameter.textureData;\r
-                       if(!data.isPrepared()) data.prepare();\r
+                       if (!data.isPrepared()) data.prepare();\r
                        texture = parameter.texture;\r
                }\r
        }\r
index 8e94fd8..ba2a10b 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.assets.loaders;\r
 \r
 import com.badlogic.gdx.assets.AssetDescriptor;\r
@@ -60,4 +61,4 @@ public class TileAtlasLoader extends AsynchronousAssetLoader<TileAtlas, TileAtla
                deps.add(new AssetDescriptor(parameter.tileMapFile, TiledMap.class));\r
                return deps;\r
        }\r
-}
\ No newline at end of file
+}\r
index 2174b7f..720ea1e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.assets.loaders;\r
 \r
 import com.badlogic.gdx.assets.AssetDescriptor;\r
@@ -75,4 +76,4 @@ public class TileMapRendererLoader extends SynchronousAssetLoader<TileMapRendere
                        return new TileMapRenderer(map, atlas, parameter.tilesPerBlockX, parameter.tilesPerBlockY, parameter.unitsPerTileX,\r
                                parameter.unitsPerTileY);\r
        }\r
-}
\ No newline at end of file
+}\r
index b495265..0441f1f 100644 (file)
@@ -47,7 +47,7 @@ public interface AudioDevice extends Disposable {
 \r
        /** Frees all resources associated with this AudioDevice. Needs to be called when the device is no longer needed. */\r
        public void dispose ();\r
-       \r
+\r
        /** Sets the volume in the range [0,1]. */\r
-       public void setVolume(float volume);\r
+       public void setVolume (float volume);\r
 }\r
index 56435f0..7be12c7 100644 (file)
@@ -44,7 +44,7 @@ public interface Sound extends Disposable {
         * @param volume the volume in the range [0,1]\r
         * @return the id of the sound instance */\r
        public long play (float volume);\r
-       \r
+\r
        /** Plays the sound. If the sound is already playing, it will be played again, concurrently.\r
         * @param volume the volume in the range [0,1]\r
         * @param pitch the pitch multiplier, 1 == default, >1 == faster, <1 == slower, the value has to be between 0.5 and 2.0\r
@@ -56,14 +56,14 @@ public interface Sound extends Disposable {
         * @return the id of the sound instance */\r
        public long loop ();\r
 \r
-       /** Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need\r
-        *  to stop the sound via a call to {@link #stop(long)} using the returned id.\r
+       /** Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need to stop the sound\r
+        * via a call to {@link #stop(long)} using the returned id.\r
         * @param volume the volume in the range [0, 1]\r
         * @return the id of the sound instance */\r
        public long loop (float volume);\r
-       \r
-       /** Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need\r
-        *  to stop the sound via a call to {@link #stop(long)} using the returned id.\r
+\r
+       /** Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need to stop the sound\r
+        * via a call to {@link #stop(long)} using the returned id.\r
         * @param volume the volume in the range [0,1]\r
         * @param pitch the pitch multiplier, 1 == default, >1 == faster, <1 == slower, the value has to be between 0.5 and 2.0\r
         * @param pan panning in the range -1 (full right) to 1 (full left). 0 is center position.\r
index 8712cc4..ab42c90 100644 (file)
@@ -20,7 +20,6 @@ import java.io.BufferedInputStream;
 import java.io.BufferedReader;\r
 import java.io.File;\r
 import java.io.FileInputStream;\r
-import java.io.FileNotFoundException;\r
 import java.io.FileOutputStream;\r
 import java.io.IOException;\r
 import java.io.InputStream;\r
index 1e0b944..42f664d 100644 (file)
@@ -45,7 +45,7 @@ public abstract class FileHandleStream extends FileHandle {
        public FileHandle child (String name) {\r
                throw new UnsupportedOperationException();\r
        }\r
-       \r
+\r
        public FileHandle sibling (String name) {\r
                throw new UnsupportedOperationException();\r
        }\r
index e72488a..128c840 100644 (file)
@@ -107,7 +107,7 @@ public abstract class Camera {
        public void rotate (float angle, float axisX, float axisY, float axisZ) {\r
                rotate(tmpVec.set(axisX, axisY, axisZ), angle);\r
        }\r
-       \r
+\r
        /** Rotates the direction and up vector of this camera by the given angle around the given axis. The direction and up vector\r
         * will not be orthogonalized.\r
         * \r
@@ -126,7 +126,7 @@ public abstract class Camera {
        public void translate (float x, float y, float z) {\r
                position.add(x, y, z);\r
        }\r
-       \r
+\r
        /** Moves the camera by the given vector.\r
         * @param vec the displacement vector */\r
        public void translate (Vector3 vec) {\r
index 00b0e8a..ef3d30c 100644 (file)
@@ -40,7 +40,7 @@ public class Color {
 \r
        /** the red, green, blue and alpha components **/\r
        public float r, g, b, a;\r
-       \r
+\r
        public static Color tmp = new Color();\r
 \r
        /** Constructs a new Color with all components set to 0. */\r
@@ -321,14 +321,14 @@ public class Color {
                color.b = ((value & 0x0000ff00) >>> 8) / 255f;\r
                color.a = ((value & 0x000000ff)) / 255f;\r
        }\r
-       \r
+\r
        /** Returns a temporary copy of this color. This is not thread safe, do not save a reference to this instance.\r
         * \r
         * @return a temporary copy of this color */\r
        public Color tmp () {\r
                return tmp.set(this);\r
        }\r
-       \r
+\r
        /** @return a copy of this color */\r
        public Color cpy () {\r
                return new Color(this);\r
index 674c84b..74464f2 100644 (file)
@@ -131,7 +131,7 @@ public class Mesh implements Disposable {
         * @param attributes the {@link VertexAttribute}s. Each vertex attribute defines one property of a vertex such as position,\r
         *           normal or texture coordinate */\r
        public Mesh (VertexDataType type, boolean isStatic, int maxVertices, int maxIndices, VertexAttribute... attributes) {\r
-//             if (type == VertexDataType.VertexArray && Gdx.graphics.isGL20Available()) type = VertexDataType.VertexBufferObject;\r
+// if (type == VertexDataType.VertexArray && Gdx.graphics.isGL20Available()) type = VertexDataType.VertexBufferObject;\r
 \r
                if (type == VertexDataType.VertexBufferObject) {\r
                        vertices = new VertexBufferObject(isStatic, maxVertices, attributes);\r
@@ -382,8 +382,8 @@ public class Mesh implements Disposable {
         * @param count number of vertices or indices to use */\r
        public void render (ShaderProgram shader, int primitiveType, int offset, int count) {\r
                if (!Gdx.graphics.isGL20Available()) throw new IllegalStateException("can't use this render method with OpenGL ES 1.x");\r
-               if(count == 0) return;\r
-               \r
+               if (count == 0) return;\r
+\r
                if (autoBind) bind(shader);\r
 \r
                if (isVertexArray) {\r
index 385998a..7bb72c0 100644 (file)
@@ -156,25 +156,23 @@ public class OrthographicCamera extends Camera {
                this.viewportHeight = viewportHeight;\r
                update();\r
        }\r
-       \r
-       /** Rotates the camera by the given angle around the direction vector. The direction and up vector\r
-        * will not be orthogonalized.\r
+\r
+       /** Rotates the camera by the given angle around the direction vector. The direction and up vector will not be orthogonalized.\r
         * @param angle */\r
-       public void rotate (float angle)\r
-       {\r
-               rotate(direction, angle);       \r
+       public void rotate (float angle) {\r
+               rotate(direction, angle);\r
        }\r
-       \r
+\r
        /** Moves the camera by the given amount on each axis.\r
         * @param x the displacement on the x-axis\r
         * @param y the displacement on the y-axis */\r
-       public void translate(float x, float y) {\r
+       public void translate (float x, float y) {\r
                translate(x, y, 0);\r
        }\r
-       \r
+\r
        /** Moves the camera by the given vector.\r
         * @param vec the displacement vector */\r
-       public void translate(Vector2 vec) {\r
+       public void translate (Vector2 vec) {\r
                translate(vec.x, vec.y, 0);\r
        }\r
 }\r
index 82a9c69..75d0385 100644 (file)
@@ -201,14 +201,13 @@ public class Pixmap implements Disposable {
        public void drawRectangle (int x, int y, int width, int height) {\r
                pixmap.drawRect(x, y, width, height, color);\r
        }\r
-       \r
+\r
        /** Draws an area form another Pixmap to this Pixmap.\r
         * \r
         * @param pixmap The other Pixmap\r
         * @param x The target x-coordinate (top left corner)\r
-        * @param y The target y-coordinate (top left corner)\r
-        */\r
-       public void drawPixmap(Pixmap pixmap, int x, int y) {\r
+        * @param y The target y-coordinate (top left corner) */\r
+       public void drawPixmap (Pixmap pixmap, int x, int y) {\r
                drawPixmap(pixmap, x, y, 0, 0, pixmap.getWidth(), pixmap.getHeight());\r
        }\r
 \r
@@ -293,7 +292,7 @@ public class Pixmap implements Disposable {
 \r
        /** Releases all resources associated with this Pixmap. */\r
        public void dispose () {\r
-               if(disposed) throw new GdxRuntimeException("Pixmap already disposed!");\r
+               if (disposed) throw new GdxRuntimeException("Pixmap already disposed!");\r
                pixmap.dispose();\r
                disposed = true;\r
        }\r
@@ -342,7 +341,7 @@ public class Pixmap implements Disposable {
         * and RGBA4444 the pixel colors are stored in shorts in machine dependent order.\r
         * @return the direct {@link ByteBuffer} holding the pixel data. */\r
        public ByteBuffer getPixels () {\r
-               if(disposed) throw new GdxRuntimeException("Pixmap already disposed"); \r
+               if (disposed) throw new GdxRuntimeException("Pixmap already disposed");\r
                return pixmap.getPixels();\r
        }\r
 \r
index 22a383b..ee43bb8 100644 (file)
@@ -222,7 +222,8 @@ public class Texture implements Disposable {
                }\r
        }\r
 \r
-       /** Used internally to reload after context loss. Creates a new GL handle then calls {@link #load(TextureData)}. Use this only if you know what you do! */\r
+       /** Used internally to reload after context loss. Creates a new GL handle then calls {@link #load(TextureData)}. Use this only\r
+        * if you know what you do! */\r
        private void reload () {\r
                if (!data.isManaged()) throw new GdxRuntimeException("Tried to reload unmanaged Texture");\r
                glHandle = createGLHandle();\r
@@ -388,7 +389,7 @@ public class Texture implements Disposable {
                                        params.magFilter = texture.getMagFilter();\r
                                        params.wrapU = texture.getUWrap();\r
                                        params.wrapV = texture.getVWrap();\r
-                                       params.genMipMaps = texture.data.useMipMaps(); //not sure about this?\r
+                                       params.genMipMaps = texture.data.useMipMaps(); // not sure about this?\r
                                        params.texture = texture; // special parameter which will ensure that the references stay the same.\r
                                        params.loadedCallback = new LoadedCallback() {\r
                                                @Override\r
@@ -426,11 +427,9 @@ public class Texture implements Disposable {
                builder.append("}");\r
                return builder.toString();\r
        }\r
-       \r
-       /**\r
-        * @return the number of managed textures currently loaded\r
-        */\r
-       public static int getNumManagedTextures() {\r
+\r
+       /** @return the number of managed textures currently loaded */\r
+       public static int getNumManagedTextures () {\r
                return managedTextures.get(Gdx.app).size();\r
        }\r
 }\r
index a4028c4..bedea20 100644 (file)
@@ -28,7 +28,7 @@ import com.badlogic.gdx.utils.ObjectMap;
  * stores {@link TextureRef}s by their path. If you need to load the same texture in different parts of your application it will\r
  * only be loaded into memory once by the dictionary.\r
  * </p>\r
- * @deprecated \r
+ * @deprecated\r
  * @author Dave Clayton <contact@redskyforge.com> */\r
 public class TextureDict {\r
 \r
index 0a6d82c..a18ae35 100644 (file)
@@ -128,9 +128,9 @@ public final class VertexAttributes {
        public boolean equals (final Object obj) {\r
                if (!(obj instanceof VertexAttributes)) return false;\r
                VertexAttributes other = (VertexAttributes)obj;\r
-               if(this.attributes.length != other.size()) return false;\r
-               for(int i = 0; i < attributes.length; i++) {\r
-                       if(!attributes[i].equals(other.attributes[i])) return false;\r
+               if (this.attributes.length != other.size()) return false;\r
+               for (int i = 0; i < attributes.length; i++) {\r
+                       if (!attributes[i].equals(other.attributes[i])) return false;\r
                }\r
                return true;\r
        }\r
index 3ede42e..c1d5077 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
-import java.util.List;\r
-\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
index 2e754d6..e252f26 100644 (file)
@@ -20,7 +20,6 @@ import com.badlogic.gdx.graphics.Color;
 import com.badlogic.gdx.graphics.g2d.BitmapFont.Glyph;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;\r
-import com.badlogic.gdx.utils.Disposable;\r
 import com.badlogic.gdx.utils.NumberUtils;\r
 \r
 /** Caches glyph geometry for a BitmapFont, providing a fast way to render static text. This saves needing to compute the location\r
index 2f4dd53..0496d6b 100644 (file)
@@ -90,8 +90,8 @@ public class Gdx2DPixmap implements Disposable {
                this.height = (int)nativeData[2];\r
                this.format = (int)nativeData[3];\r
        }\r
-       \r
-       public Gdx2DPixmap(ByteBuffer pixelPtr, long[] nativeData) {\r
+\r
+       public Gdx2DPixmap (ByteBuffer pixelPtr, long[] nativeData) {\r
                this.pixelPtr = pixelPtr;\r
                this.basePtr = nativeData[0];\r
                this.width = (int)nativeData[1];\r
@@ -231,7 +231,8 @@ public class Gdx2DPixmap implements Disposable {
                        return "unknown";\r
                }\r
        }\r
-       \r
+\r
+       // @off\r
        /*JNI\r
        #include <gdx2d/gdx2d.h>\r
        #include <stdlib.h>\r
index e18d9b8..e92e584 100644 (file)
@@ -30,11 +30,8 @@ import com.badlogic.gdx.utils.Array;
 import com.badlogic.gdx.utils.Disposable;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
-/**\r
- * See <a href="http://www.badlogicgames.com/wordpress/?p=1255">http://www.badlogicgames.com/wordpress/?p=1255</a>\r
- * @author mzechner\r
- *\r
- */\r
+/** See <a href="http://www.badlogicgames.com/wordpress/?p=1255">http://www.badlogicgames.com/wordpress/?p=1255</a>\r
+ * @author mzechner */\r
 public class ParticleEffect implements Disposable {\r
        private final Array<ParticleEmitter> emitters;\r
 \r
index d8213c4..15650b9 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
 import com.badlogic.gdx.graphics.g2d.ParticleEffectPool.PooledEffect;\r
@@ -45,4 +46,4 @@ public class ParticleEffectPool extends Pool<PooledEffect> {
                        ParticleEffectPool.this.free(this);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 14cb026..28825e1 100644 (file)
@@ -19,12 +19,10 @@ package com.badlogic.gdx.graphics.g2d;
 import java.io.BufferedReader;\r
 import java.io.IOException;\r
 import java.io.Writer;\r
-import java.util.BitSet;\r
 \r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.math.MathUtils;\r
-import com.badlogic.gdx.utils.BooleanArray;\r
 \r
 // BOZO - Javadoc.\r
 // BOZO - Add a duplicate emitter button.\r
index 73db65a..2647798 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
 import java.io.BufferedReader;\r
@@ -24,17 +25,13 @@ import com.badlogic.gdx.physics.box2d.Fixture;
 import com.badlogic.gdx.physics.box2d.RayCastCallback;\r
 import com.badlogic.gdx.physics.box2d.World;\r
 \r
-/**\r
- * @author kalle_h\r
+/** @author kalle_h\r
  * \r
- *         ParticleEmitterBox2D use box2d rayCast:ing to achieve continuous\r
- *         collision detection against box2d fixtures. If particle detect\r
- *         collision it change it's direction before actual collision would\r
- *         occur. Velocity is 100% reflected.\r
+ *         ParticleEmitterBox2D use box2d rayCast:ing to achieve continuous collision detection against box2d fixtures. If\r
+ *         particle detect collision it change it's direction before actual collision would occur. Velocity is 100% reflected.\r
  * \r
- *         These particles does not have any other physical attributes or\r
- *         functionality. Particles can't collide to other particles.\r
- */\r
+ *         These particles does not have any other physical attributes or functionality. Particles can't collide to other\r
+ *         particles. */\r
 public class ParticleEmitterBox2D extends ParticleEmitter {\r
        final World world;\r
        final Vector2 startPoint = new Vector2();\r
@@ -42,94 +39,68 @@ public class ParticleEmitterBox2D extends ParticleEmitter {
        /** collision flag */\r
        boolean particleCollided;\r
        float normalAngle;\r
-       /**\r
-        * If velocities squared is shorter than this it could lead 0 length rayCast\r
-        * that cause c++ assertion at box2d\r
-        */\r
+       /** If velocities squared is shorter than this it could lead 0 length rayCast that cause c++ assertion at box2d */\r
        private final static float EPSILON = 0.001f;\r
 \r
-       /** default visibility to prevent synthetic accesor creation*/\r
+       /** default visibility to prevent synthetic accesor creation */\r
        final RayCastCallback rayCallBack = new RayCastCallback() {\r
-               public float reportRayFixture(Fixture fixture, Vector2 point,\r
-                               Vector2 normal, float fraction) {\r
+               public float reportRayFixture (Fixture fixture, Vector2 point, Vector2 normal, float fraction) {\r
                        ParticleEmitterBox2D.this.particleCollided = true;\r
-                       ParticleEmitterBox2D.this.normalAngle = MathUtils.atan2(normal.y,\r
-                                       normal.x) * MathUtils.radiansToDegrees;\r
+                       ParticleEmitterBox2D.this.normalAngle = MathUtils.atan2(normal.y, normal.x) * MathUtils.radiansToDegrees;\r
                        return fraction;\r
                }\r
        };\r
 \r
-       /**\r
-        * Constructs default ParticleEmitterBox2D. Box2d World is used for\r
-        * rayCasting. Assumes that particles use same unit system that box2d world\r
-        * does.\r
+       /** Constructs default ParticleEmitterBox2D. Box2d World is used for rayCasting. Assumes that particles use same unit system\r
+        * that box2d world does.\r
         * \r
-        * @param world\r
-        */\r
-       public ParticleEmitterBox2D(World world) {\r
+        * @param world */\r
+       public ParticleEmitterBox2D (World world) {\r
                super();\r
                this.world = world;\r
        }\r
 \r
-       /**\r
-        * /**Constructs ParticleEmitterBox2D using bufferedReader. Box2d World is\r
-        * used for rayCasting. Assumes that particles use same unit system that\r
-        * box2d world does.\r
+       /** /**Constructs ParticleEmitterBox2D using bufferedReader. Box2d World is used for rayCasting. Assumes that particles use same\r
+        * unit system that box2d world does.\r
         * \r
         * @param world\r
         * @param reader\r
-        * @throws IOException\r
-        */\r
-       public ParticleEmitterBox2D(World world, BufferedReader reader)\r
-                       throws IOException {\r
+        * @throws IOException */\r
+       public ParticleEmitterBox2D (World world, BufferedReader reader) throws IOException {\r
                super(reader);\r
                this.world = world;\r
        }\r
 \r
-       /**\r
-        * Constructs ParticleEmitterBox2D fully copying given emitter attributes.\r
-        * Box2d World is used for rayCasting. Assumes that particles use same unit\r
-        * system that box2d world does.\r
+       /** Constructs ParticleEmitterBox2D fully copying given emitter attributes. Box2d World is used for rayCasting. Assumes that\r
+        * particles use same unit system that box2d world does.\r
         * \r
         * @param world\r
-        * @param emitter\r
-        */\r
-       public ParticleEmitterBox2D(World world, ParticleEmitter emitter) {\r
+        * @param emitter */\r
+       public ParticleEmitterBox2D (World world, ParticleEmitter emitter) {\r
                super(emitter);\r
                this.world = world;\r
        }\r
 \r
        @Override\r
-       protected Particle newParticle(Sprite sprite) {\r
+       protected Particle newParticle (Sprite sprite) {\r
                return new ParticleBox2D(sprite);\r
        }\r
 \r
-       /**\r
-        * Particle that can collide to box2d fixtures\r
-        * \r
-        */\r
+       /** Particle that can collide to box2d fixtures */\r
        private class ParticleBox2D extends Particle {\r
-               public ParticleBox2D(Sprite sprite) {\r
+               public ParticleBox2D (Sprite sprite) {\r
                        super(sprite);\r
                }\r
 \r
-               /**\r
-                * translate particle given amount. Continuous collision detection\r
-                * achieved by using RayCast from oldPos to newPos.\r
+               /** translate particle given amount. Continuous collision detection achieved by using RayCast from oldPos to newPos.\r
                 * \r
                 * @param velocityX\r
-                * @param velocityY\r
-                */\r
+                * @param velocityY */\r
                @Override\r
-               public void translate(float velocityX, float velocityY) {\r
-                       /**\r
-                        * If velocities squares summed is shorter than Epsilon it could\r
-                        * lead ~0 length rayCast that cause nasty c++ assertion inside\r
-                        * box2d. This is so short distance that moving particle has no\r
-                        * effect so this return early.\r
-                        */\r
-                       if ((velocityX * velocityX + velocityY * velocityY) < EPSILON)\r
-                               return;\r
+               public void translate (float velocityX, float velocityY) {\r
+                       /** If velocities squares summed is shorter than Epsilon it could lead ~0 length rayCast that cause nasty c++ assertion\r
+                        * inside box2d. This is so short distance that moving particle has no effect so this return early. */\r
+                       if ((velocityX * velocityX + velocityY * velocityY) < EPSILON) return;\r
 \r
                        /** Position offset is half of sprite texture size. */\r
                        final float x = getX() + getWidth() / 2f;\r
@@ -139,8 +110,7 @@ public class ParticleEmitterBox2D extends ParticleEmitter {
                        particleCollided = false;\r
                        startPoint.set(x, y);\r
                        endPoint.set(x + velocityX, y + velocityY);\r
-                       if (world != null)\r
-                               world.rayCast(rayCallBack, startPoint, endPoint);\r
+                       if (world != null) world.rayCast(rayCallBack, startPoint, endPoint);\r
 \r
                        /** If ray collided boolean has set to true at rayCallBack */\r
                        if (!particleCollided) {\r
@@ -155,4 +125,4 @@ public class ParticleEmitterBox2D extends ParticleEmitter {
                        super.translate(velocityX, velocityY);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 1cbe0b5..a3eed43 100644 (file)
@@ -21,8 +21,6 @@ import com.badlogic.gdx.graphics.Pixmap.Blending;
 import com.badlogic.gdx.graphics.Pixmap.Format;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.Texture.TextureFilter;\r
-import com.badlogic.gdx.graphics.g2d.TextureAtlas;\r
-import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
 import com.badlogic.gdx.graphics.glutils.PixmapTextureData;\r
 import com.badlogic.gdx.math.Rectangle;\r
 import com.badlogic.gdx.utils.Array;\r
@@ -31,36 +29,37 @@ import com.badlogic.gdx.utils.GdxRuntimeException;
 import com.badlogic.gdx.utils.ObjectMap.Keys;\r
 import com.badlogic.gdx.utils.OrderedMap;\r
 \r
-/**\r
- * Packs {@link Pixmap} instances into one more more {@link Page} instances to generate\r
- * an atlas of Pixmap instances. Provides means to directly convert the pixmap atlas to a {@link TextureAtlas}. The\r
- * packer supports padding and border pixel duplication, specified during construction. The packer supports incremental inserts\r
- * and updates of TextureAtlases generated with this class.</p>\r
+/** Packs {@link Pixmap} instances into one more more {@link Page} instances to generate an atlas of Pixmap instances. Provides\r
+ * means to directly convert the pixmap atlas to a {@link TextureAtlas}. The packer supports padding and border pixel duplication,\r
+ * specified during construction. The packer supports incremental inserts and updates of TextureAtlases generated with this\r
+ * class.</p>\r
  * \r
- * All methods except {@link #getPage(String)} and {@link #getPages()} are thread safe. The methods {@link #generateTextureAtlas(TextureFilter, TextureFilter, boolean)}\r
- * and {@link #updateTextureAtlas(TextureAtlas, TextureFilter, TextureFilter, boolean)} need to be called on the rendering thread, all\r
+ * All methods except {@link #getPage(String)} and {@link #getPages()} are thread safe. The methods\r
+ * {@link #generateTextureAtlas(TextureFilter, TextureFilter, boolean)} and\r
+ * {@link #updateTextureAtlas(TextureAtlas, TextureFilter, TextureFilter, boolean)} need to be called on the rendering thread, all\r
  * other methods can be called from any thread.</p>\r
  * \r
  * One-off usage:\r
+ * \r
  * <pre>\r
  * // 512x512 pixel pages, RGB565 format, 2 pixels of padding, border duplication\r
  * PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, true);\r
- * packer.pack("First Pixmap", pixmap1);\r
- * packer.pack("Second Pixmap", pixmap2);\r
+ * packer.pack(&quot;First Pixmap&quot;, pixmap1);\r
+ * packer.pack(&quot;Second Pixmap&quot;, pixmap2);\r
  * TextureAtlas altas = packer.generateTextureAtlas(TextureFilter.Nearest, TextureFilter.Nearest);\r
  * </pre>\r
  * \r
- * Note that you should not dispose the packer in this usage pattern. Instead, dispose the TextureAtlas\r
- * if no longer needed.\r
+ * Note that you should not dispose the packer in this usage pattern. Instead, dispose the TextureAtlas if no longer needed.\r
  * \r
  * Incremental usage:\r
+ * \r
  * <pre>\r
  * // 512x512 pixel pages, RGB565 format, 2 pixels of padding, no border duplication\r
  * PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, false);\r
  * TextureAtlas incrementalAtlas = new TextureAtlas();\r
  * \r
  * // potentially on a separate thread, e.g. downloading thumbnails\r
- * packer.pack("thumbnail", thumbnail);\r
+ * packer.pack(&quot;thumbnail&quot;, thumbnail);\r
  * \r
  * // on the rendering thread, every frame\r
  * packer.updateTextureAtlas(incrementalAtlas, TextureFilter.Linear, TextureFilter.Linear);\r
@@ -72,19 +71,19 @@ import com.badlogic.gdx.utils.OrderedMap;
  * </pre>\r
  * \r
  * Pixmap-only usage:\r
+ * \r
  * <pre>\r
  * PixmapPacker packer = new PixmapPacker(512, 512, Format.RGB565, 2, true);\r
- * packer.pack("First Pixmap", pixmap1);\r
- * packer.pack("Second Pixmap", pixmap2);\r
+ * packer.pack(&quot;First Pixmap&quot;, pixmap1);\r
+ * packer.pack(&quot;Second Pixmap&quot;, pixmap2);\r
  * \r
- *  // do something interesting with the resulting pages\r
- *  for(Page page: packer.getPages()) {\r
- *  }\r
- *  \r
- *  // dispose of the packer in this case\r
- *  packer.dispose();\r
- * </pre>\r
- */\r
+ * // do something interesting with the resulting pages\r
+ * for (Page page : packer.getPages()) {\r
+ * }\r
+ * \r
+ * // dispose of the packer in this case\r
+ * packer.dispose();\r
+ * </pre> */\r
 public class PixmapPacker implements Disposable {\r
        static final class Node {\r
                public Node leftChild;\r
@@ -103,15 +102,15 @@ public class PixmapPacker implements Disposable {
                        rect = new Rectangle();\r
                }\r
        }\r
-       \r
+\r
        public class Page {\r
                Node root;\r
                OrderedMap<String, Rectangle> rects;\r
                Pixmap image;\r
                Texture texture;\r
                Array<String> addedRects = new Array<String>();\r
-               \r
-               public Pixmap getPixmap() {\r
+\r
+               public Pixmap getPixmap () {\r
                        return image;\r
                }\r
        }\r
@@ -145,8 +144,8 @@ public class PixmapPacker implements Disposable {
        }\r
 \r
        /** <p>\r
-        * Inserts the given {@link Pixmap}. You can later on retrieve the images position in the output image via the supplied name and the\r
-        * method {@link #getRect(String)}.\r
+        * Inserts the given {@link Pixmap}. You can later on retrieve the images position in the output image via the supplied name\r
+        * and the method {@link #getRect(String)}.\r
         * </p>\r
         * \r
         * @param name the name of the image\r
@@ -154,12 +153,13 @@ public class PixmapPacker implements Disposable {
         * @return Rectangle describing the area the pixmap was rendered to or null.\r
         * @throws RuntimeException in case the image did not fit due to the page size being to small or providing a duplicate name */\r
        public synchronized Rectangle pack (String name, Pixmap image) {\r
-               if(disposed) return null;\r
+               if (disposed) return null;\r
                if (getRect(name) != null) throw new RuntimeException("Key with name '" + name + "' is already in map");\r
                int borderPixels = padding + (duplicateBorder ? 1 : 0);\r
                borderPixels <<= 1;\r
 \r
-               if(image.getWidth() >= pageWidth + borderPixels|| image.getHeight() >= pageHeight + borderPixels) throw new GdxRuntimeException("page size for '" + name + "' to small");\r
+               if (image.getWidth() >= pageWidth + borderPixels || image.getHeight() >= pageHeight + borderPixels)\r
+                       throw new GdxRuntimeException("page size for '" + name + "' to small");\r
 \r
                Rectangle rect = new Rectangle(0, 0, image.getWidth() + borderPixels, image.getHeight() + borderPixels);\r
                Node node = insert(currPage.root, rect);\r
@@ -185,31 +185,34 @@ public class PixmapPacker implements Disposable {
 \r
                // not terribly efficient (as the rest of the code) but will do :p\r
                if (duplicateBorder) {\r
-                       this.currPage.image.drawPixmap(image, (int)rect.x, (int)rect.y - 1, (int)rect.x + (int)rect.width, (int)rect.y, 0, 0, image.getWidth(), 1);\r
-                       this.currPage.image.drawPixmap(image, (int)rect.x, (int)rect.y + (int)rect.height, (int)rect.x + (int)rect.width, (int)rect.y + (int)rect.height + 1, 0,\r
-                               image.getHeight() - 1, image.getWidth(), image.getHeight());\r
+                       this.currPage.image.drawPixmap(image, (int)rect.x, (int)rect.y - 1, (int)rect.x + (int)rect.width, (int)rect.y, 0, 0,\r
+                               image.getWidth(), 1);\r
+                       this.currPage.image.drawPixmap(image, (int)rect.x, (int)rect.y + (int)rect.height, (int)rect.x + (int)rect.width,\r
+                               (int)rect.y + (int)rect.height + 1, 0, image.getHeight() - 1, image.getWidth(), image.getHeight());\r
 \r
-                       this.currPage.image.drawPixmap(image, (int)rect.x - 1, (int)rect.y, (int)rect.x, (int)rect.y + (int)rect.height, 0, 0, 1, image.getHeight());\r
-                       this.currPage.image.drawPixmap(image, (int)rect.x + (int)rect.width, (int)rect.y, (int)rect.x + (int)rect.width + 1, (int)rect.y + (int)rect.height, image.getWidth() - 1, 0,\r
-                               image.getWidth(), image.getHeight());\r
+                       this.currPage.image.drawPixmap(image, (int)rect.x - 1, (int)rect.y, (int)rect.x, (int)rect.y + (int)rect.height, 0, 0,\r
+                               1, image.getHeight());\r
+                       this.currPage.image.drawPixmap(image, (int)rect.x + (int)rect.width, (int)rect.y, (int)rect.x + (int)rect.width + 1,\r
+                               (int)rect.y + (int)rect.height, image.getWidth() - 1, 0, image.getWidth(), image.getHeight());\r
 \r
                        this.currPage.image.drawPixmap(image, (int)rect.x - 1, (int)rect.y - 1, (int)rect.x, (int)rect.y, 0, 0, 1, 1);\r
-                       this.currPage.image.drawPixmap(image, (int)rect.x + (int)rect.width, (int)rect.y - 1, (int)rect.x + (int)rect.width + 1, (int)rect.y, image.getWidth() - 1, 0,\r
-                               image.getWidth(), 1);\r
+                       this.currPage.image.drawPixmap(image, (int)rect.x + (int)rect.width, (int)rect.y - 1, (int)rect.x + (int)rect.width + 1,\r
+                               (int)rect.y, image.getWidth() - 1, 0, image.getWidth(), 1);\r
 \r
-                       this.currPage.image.drawPixmap(image, (int)rect.x - 1, (int)rect.y + (int)rect.height, (int)rect.x, (int)rect.y + (int)rect.height + 1, 0, image.getHeight() - 1, 1,\r
-                               image.getHeight());\r
-                       this.currPage.image.drawPixmap(image, (int)rect.x + (int)rect.width, (int)rect.y + (int)rect.height, (int)rect.x + (int)rect.width + 1, (int)rect.y + (int)rect.height + 1,\r
-                               image.getWidth() - 1, image.getHeight() - 1, image.getWidth(), image.getHeight());\r
+                       this.currPage.image.drawPixmap(image, (int)rect.x - 1, (int)rect.y + (int)rect.height, (int)rect.x, (int)rect.y\r
+                               + (int)rect.height + 1, 0, image.getHeight() - 1, 1, image.getHeight());\r
+                       this.currPage.image.drawPixmap(image, (int)rect.x + (int)rect.width, (int)rect.y + (int)rect.height, (int)rect.x\r
+                               + (int)rect.width + 1, (int)rect.y + (int)rect.height + 1, image.getWidth() - 1, image.getHeight() - 1,\r
+                               image.getWidth(), image.getHeight());\r
                }\r
                currPage.addedRects.add(name);\r
                return rect;\r
        }\r
-       \r
-       private void newPage() {\r
+\r
+       private void newPage () {\r
                Page page = new Page();\r
                page.image = new Pixmap(pageWidth, pageHeight, pageFormat);\r
-               page.root =  new Node(0, 0, pageWidth, pageHeight, null, null, null);\r
+               page.root = new Node(0, 0, pageWidth, pageHeight, null, null, null);\r
                page.rects = new OrderedMap<String, Rectangle>();\r
                pages.add(page);\r
                currPage = page;\r
@@ -266,56 +269,46 @@ public class PixmapPacker implements Disposable {
        public Array<Page> getPages () {\r
                return pages;\r
        }\r
-       \r
-       /**\r
-        * @param name the name of the image\r
-        * @return the rectangle for the image in the page it's stored in or null\r
-        */\r
-       public synchronized Rectangle getRect(String name) {\r
-               for(Page page: pages) {\r
+\r
+       /** @param name the name of the image\r
+        * @return the rectangle for the image in the page it's stored in or null */\r
+       public synchronized Rectangle getRect (String name) {\r
+               for (Page page : pages) {\r
                        Rectangle rect = page.rects.get(name);\r
-                       if(rect != null) return rect;\r
+                       if (rect != null) return rect;\r
                }\r
                return null;\r
        }\r
-       \r
-       /**\r
-        * @param name the name of the image\r
-        * @return the page the image is stored in or null\r
-        */\r
-       public synchronized Page getPage(String name) {\r
-               for(Page page: pages) {\r
+\r
+       /** @param name the name of the image\r
+        * @return the page the image is stored in or null */\r
+       public synchronized Page getPage (String name) {\r
+               for (Page page : pages) {\r
                        Rectangle rect = page.rects.get(name);\r
-                       if(rect != null) return page;\r
+                       if (rect != null) return page;\r
                }\r
                return null;\r
        }\r
-       \r
-       /**\r
-        * Disposes all resources, including Pixmap instances for the pages\r
-        * created so far. These page Pixmap instances are shared with\r
+\r
+       /** Disposes all resources, including Pixmap instances for the pages created so far. These page Pixmap instances are shared with\r
         * any {@link TextureAtlas} generated or updated by either {@link #generateTextureAtlas(TextureFilter, TextureFilter, boolean)}\r
-        * or {@link #updateTextureAtlas(TextureAtlas, TextureFilter, TextureFilter, boolean)}. Do\r
-        * not call this method if you generated or updated a TextureAtlas, instead\r
-        * dispose the TextureAtlas.\r
-        */\r
-       public synchronized void dispose() {\r
-               for(Page page: pages) {\r
+        * or {@link #updateTextureAtlas(TextureAtlas, TextureFilter, TextureFilter, boolean)}. Do not call this method if you\r
+        * generated or updated a TextureAtlas, instead dispose the TextureAtlas. */\r
+       public synchronized void dispose () {\r
+               for (Page page : pages) {\r
                        page.image.dispose();\r
                }\r
                disposed = true;\r
        }\r
 \r
-       /**\r
-        * Generates a new {@link TextureAtlas} from the {@link Pixmap} instances inserted so far.\r
+       /** Generates a new {@link TextureAtlas} from the {@link Pixmap} instances inserted so far.\r
         * @param minFilter\r
         * @param magFilter\r
-        * @return the TextureAtlas\r
-        */\r
+        * @return the TextureAtlas */\r
        public synchronized TextureAtlas generateTextureAtlas (TextureFilter minFilter, TextureFilter magFilter, boolean useMipMaps) {\r
                TextureAtlas atlas = new TextureAtlas();\r
-               for(Page page: pages) {\r
-                       if(page.rects.size != 0) {\r
+               for (Page page : pages) {\r
+                       if (page.rects.size != 0) {\r
                                Texture texture = new Texture(new ManagedPixmapTextureData(page.image, page.image.getFormat(), useMipMaps)) {\r
                                        @Override\r
                                        public void dispose () {\r
@@ -324,9 +317,9 @@ public class PixmapPacker implements Disposable {
                                        }\r
                                };\r
                                texture.setFilter(minFilter, magFilter);\r
-                               \r
+\r
                                Keys<String> names = page.rects.keys();\r
-                               for(String name: names) {\r
+                               for (String name : names) {\r
                                        Rectangle rect = page.rects.get(name);\r
                                        TextureRegion region = new TextureRegion(texture, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);\r
                                        atlas.addRegion(name, region);\r
@@ -336,16 +329,15 @@ public class PixmapPacker implements Disposable {
                return atlas;\r
        }\r
 \r
-       /**\r
-        * Updates the given {@link TextureAtlas}, adding any new {@link Pixmap} instances packed since the last\r
-        * call to this method. This can be used to insert Pixmap instances on a separate thread via {@link #pack(String, Pixmap)}\r
-        * and update the TextureAtlas on the rendering thread. This method must be called on the rendering thread.\r
-        */\r
-       public synchronized void updateTextureAtlas(TextureAtlas atlas, TextureFilter minFilter, TextureFilter magFilter, boolean useMipMaps) {\r
-               for(Page page: pages) {\r
-                       if(page.texture == null) {\r
-                               if(page.rects.size != 0 && page.addedRects.size > 0) {\r
-                                        page.texture = new Texture(new ManagedPixmapTextureData(page.image, page.image.getFormat(), useMipMaps)) {\r
+       /** Updates the given {@link TextureAtlas}, adding any new {@link Pixmap} instances packed since the last call to this method.\r
+        * This can be used to insert Pixmap instances on a separate thread via {@link #pack(String, Pixmap)} and update the\r
+        * TextureAtlas on the rendering thread. This method must be called on the rendering thread. */\r
+       public synchronized void updateTextureAtlas (TextureAtlas atlas, TextureFilter minFilter, TextureFilter magFilter,\r
+               boolean useMipMaps) {\r
+               for (Page page : pages) {\r
+                       if (page.texture == null) {\r
+                               if (page.rects.size != 0 && page.addedRects.size > 0) {\r
+                                       page.texture = new Texture(new ManagedPixmapTextureData(page.image, page.image.getFormat(), useMipMaps)) {\r
                                                @Override\r
                                                public void dispose () {\r
                                                        super.dispose();\r
@@ -353,20 +345,22 @@ public class PixmapPacker implements Disposable {
                                                }\r
                                        };\r
                                        page.texture.setFilter(minFilter, magFilter);\r
-                                       \r
-                                       for(String name: page.addedRects) {\r
+\r
+                                       for (String name : page.addedRects) {\r
                                                Rectangle rect = page.rects.get(name);\r
-                                               TextureRegion region = new TextureRegion(page.texture, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);\r
+                                               TextureRegion region = new TextureRegion(page.texture, (int)rect.x, (int)rect.y, (int)rect.width,\r
+                                                       (int)rect.height);\r
                                                atlas.addRegion(name, region);\r
                                        }\r
                                        page.addedRects.clear();\r
                                }\r
                        } else {\r
-                               if(page.addedRects.size > 0) {\r
+                               if (page.addedRects.size > 0) {\r
                                        page.texture.load(page.texture.getTextureData());\r
-                                       for(String name: page.addedRects) {\r
+                                       for (String name : page.addedRects) {\r
                                                Rectangle rect = page.rects.get(name);\r
-                                               TextureRegion region = new TextureRegion(page.texture, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height);\r
+                                               TextureRegion region = new TextureRegion(page.texture, (int)rect.x, (int)rect.y, (int)rect.width,\r
+                                                       (int)rect.height);\r
                                                atlas.addRegion(name, region);\r
                                        }\r
                                        page.addedRects.clear();\r
@@ -375,7 +369,7 @@ public class PixmapPacker implements Disposable {
                        }\r
                }\r
        }\r
-       \r
+\r
        public int getPageWidth () {\r
                return pageWidth;\r
        }\r
@@ -383,15 +377,15 @@ public class PixmapPacker implements Disposable {
        public int getPageHeight () {\r
                return pageHeight;\r
        }\r
-       \r
-       public int getPadding() {\r
+\r
+       public int getPadding () {\r
                return padding;\r
        }\r
-       \r
-       public boolean duplicateBoarder() {\r
+\r
+       public boolean duplicateBoarder () {\r
                return duplicateBorder;\r
        }\r
-       \r
+\r
        public class ManagedPixmapTextureData extends PixmapTextureData {\r
                public ManagedPixmapTextureData (Pixmap pixmap, Format format, boolean useMipMaps) {\r
                        super(pixmap, format, useMipMaps, false);\r
index 42eebfe..031286d 100644 (file)
@@ -1,3 +1,4 @@
+\r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
 import java.io.BufferedReader;\r
@@ -7,95 +8,78 @@ import java.io.InputStreamReader;
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
-/** \r
- * Defines a polygon shape on top of a #TextureRegion for minimising pixel drawing. Can either be \r
- * constructed through a .psh file from an external editor or programmatically through a list of vertices\r
- * defining a polygon.\r
+/** Defines a polygon shape on top of a #TextureRegion for minimising pixel drawing. Can either be constructed through a .psh file\r
+ * from an external editor or programmatically through a list of vertices defining a polygon.\r
  * \r
  * THIS STUFF IS WIP\r
  * \r
- * @author Stefan Bachmann\r
- */\r
+ * @author Stefan Bachmann */\r
 public class PolygonRegion {\r
        // texture coordinates in atlas coordinates\r
        private float[] texCoords;\r
-   // pixel coordinates relative to source image.\r
+       // pixel coordinates relative to source image.\r
        private float[] localVertices;\r
        // the underlying TextureRegion\r
        private TextureRegion region;\r
-       \r
-       /**\r
-        * Creates a PolygonRegion by reading in the vertices and texture coordinates from the external file. \r
-        * TextureRegion can come from an atlas.\r
+\r
+       /** Creates a PolygonRegion by reading in the vertices and texture coordinates from the external file. TextureRegion can come\r
+        * from an atlas.\r
         * @param region the region used for drawing\r
-        * @param file polygon shape definition file\r
-        */\r
-       public PolygonRegion(TextureRegion region, FileHandle file) {\r
+        * @param file polygon shape definition file */\r
+       public PolygonRegion (TextureRegion region, FileHandle file) {\r
                this.region = region;\r
-               \r
-               if(file == null)\r
-                       throw new IllegalArgumentException("region cannot be null.");\r
-               \r
+\r
+               if (file == null) throw new IllegalArgumentException("region cannot be null.");\r
+\r
                loadPolygonDefinition(file);\r
        }\r
 \r
-       /**\r
-        * Creates a PolygonRegin by triangulating the polygon coordinates in vertices and calculates uvs \r
-        * based on that. TextureRegion can come from an atlas.\r
+       /** Creates a PolygonRegin by triangulating the polygon coordinates in vertices and calculates uvs based on that. TextureRegion\r
+        * can come from an atlas.\r
         * @param region the region used for drawing\r
-        * @param vertices contains 2D polygon coordinates in pixels relative to source region\r
-        */\r
-       public PolygonRegion(TextureRegion region, float[] vertices) {\r
-               \r
+        * @param vertices contains 2D polygon coordinates in pixels relative to source region */\r
+       public PolygonRegion (TextureRegion region, float[] vertices) {\r
+\r
        }\r
 \r
-       \r
-   /**\r
-    * Loads the vertices and texture data from an external file. The file should look something like this:\r
-    * \r
-    * ------------\r
-    * // Triangulated vertices data (x, y) in pixel coordinates with origin bottom-left, y-up\r
-    * v 230.0, 230.0, ...\r
-    * // UVs with origin top-left \r
-    * u 0.23, 0.123, ...  \r
-    * -------------\r
-    * \r
-    * Anything not prefixed with "u" or "v" will be ignored.\r
-    * @param file file handle to the shape definition file\r
-    */\r
-   private void loadPolygonDefinition (FileHandle file) {\r
-       String line;\r
-       BufferedReader reader = new BufferedReader(new InputStreamReader(file.read()), 64);\r
-       \r
-       try{\r
-               while(true){\r
-                       line = reader.readLine();\r
-                       \r
-                       if(line == null)\r
-                               break;\r
-                       else if(line.startsWith("v")){\r
-                               // read in vertices\r
-                               String[] vertices = line.substring(1).trim().split(",");\r
-                               localVertices = new float[vertices.length];\r
-                               for(int i=0; i<vertices.length; i+=2){\r
-                                       localVertices[i] = Float.parseFloat(vertices[i]);\r
-                                       localVertices[i+1] = Float.parseFloat(vertices[i+1]);\r
-                               }\r
-                       }\r
-                       else if(line.startsWith("u")){\r
-                               // read in uvs\r
-                               String[] texCoords = line.substring(1).trim().split(",");\r
-                               float localTexCoords[] = new float[texCoords.length];\r
-                               for(int i=0; i<texCoords.length; i+=2){\r
-                                       localTexCoords[i] = Float.parseFloat(texCoords[i]);\r
-                                       localTexCoords[i+1] = Float.parseFloat(texCoords[i+1]);\r
-                               }\r
-                               \r
-                               this.texCoords = calculateAtlasTexCoords(localTexCoords);\r
-                       }\r
-               }\r
-       }\r
-       catch (IOException ex) {\r
+       /** Loads the vertices and texture data from an external file. The file should look something like this:\r
+        * \r
+        * ------------ // Triangulated vertices data (x, y) in pixel coordinates with origin bottom-left, y-up v 230.0, 230.0, ... //\r
+        * UVs with origin top-left u 0.23, 0.123, ... -------------\r
+        * \r
+        * Anything not prefixed with "u" or "v" will be ignored.\r
+        * @param file file handle to the shape definition file */\r
+       private void loadPolygonDefinition (FileHandle file) {\r
+               String line;\r
+               BufferedReader reader = new BufferedReader(new InputStreamReader(file.read()), 64);\r
+\r
+               try {\r
+                       while (true) {\r
+                               line = reader.readLine();\r
+\r
+                               if (line == null)\r
+                                       break;\r
+                               else if (line.startsWith("v")) {\r
+                                       // read in vertices\r
+                                       String[] vertices = line.substring(1).trim().split(",");\r
+                                       localVertices = new float[vertices.length];\r
+                                       for (int i = 0; i < vertices.length; i += 2) {\r
+                                               localVertices[i] = Float.parseFloat(vertices[i]);\r
+                                               localVertices[i + 1] = Float.parseFloat(vertices[i + 1]);\r
+                                       }\r
+                               } else if (line.startsWith("u")) {\r
+                                       // read in uvs\r
+                                       String[] texCoords = line.substring(1).trim().split(",");\r
+                                       float localTexCoords[] = new float[texCoords.length];\r
+                                       for (int i = 0; i < texCoords.length; i += 2) {\r
+                                               localTexCoords[i] = Float.parseFloat(texCoords[i]);\r
+                                               localTexCoords[i + 1] = Float.parseFloat(texCoords[i + 1]);\r
+                                       }\r
+\r
+                                       this.texCoords = calculateAtlasTexCoords(localTexCoords);\r
+                               }\r
+                       }\r
+               } catch (IOException ex) {\r
                        throw new GdxRuntimeException("Error reading polygon shape file: " + file);\r
                } finally {\r
                        try {\r
@@ -105,35 +89,33 @@ public class PolygonRegion {
                }\r
        }\r
 \r
-       /**\r
-        * @param localTexCoords texture coordinates relative to the image\r
-        * @return the texture coordinates relative to the Texture (atlas) the region is from\r
-        */\r
+       /** @param localTexCoords texture coordinates relative to the image\r
+        * @return the texture coordinates relative to the Texture (atlas) the region is from */\r
        private float[] calculateAtlasTexCoords (float[] localTexCoords) {\r
-               \r
+\r
                float uvWidth = this.region.u2 - this.region.u;\r
                float uvHeight = this.region.v2 - this.region.v;\r
-               \r
-               for(int i=0; i<localTexCoords.length; i+=2){\r
+\r
+               for (int i = 0; i < localTexCoords.length; i += 2) {\r
                        localTexCoords[i] = this.region.u + (localTexCoords[i] * uvWidth);\r
-                       localTexCoords[i+1] = this.region.v + (localTexCoords[i+1] * uvHeight);\r
+                       localTexCoords[i + 1] = this.region.v + (localTexCoords[i + 1] * uvHeight);\r
                }\r
-               \r
+\r
                return localTexCoords;\r
        }\r
-       \r
+\r
        // Returns the vertices in local space\r
-       public float[] getLocalVertices(){\r
+       public float[] getLocalVertices () {\r
                return localVertices;\r
        }\r
-       \r
+\r
        // Returns the texture coordinates\r
-       public float[] getTextureCoords(){\r
+       public float[] getTextureCoords () {\r
                return texCoords;\r
        }\r
-       \r
+\r
        // Returns the underlying TextureRegion\r
-       public TextureRegion getRegion(){\r
+       public TextureRegion getRegion () {\r
                return region;\r
        }\r
 }\r
index 3ee88d5..12c5d94 100644 (file)
@@ -1,13 +1,13 @@
+\r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
 import com.badlogic.gdx.graphics.Color;\r
-import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.math.Rectangle;\r
 import com.badlogic.gdx.utils.NumberUtils;\r
 \r
 public class PolygonSprite {\r
-       \r
+\r
        PolygonRegion region;\r
        private float x, y;\r
        private float width, height;\r
@@ -17,7 +17,7 @@ public class PolygonSprite {
        private float[] vertices;\r
        private boolean dirty;\r
        private Rectangle bounds = new Rectangle();\r
-       \r
+\r
        private final Color color = new Color(1f, 1f, 1f, 1f);\r
 \r
        // Note the region is copied.\r
@@ -35,7 +35,7 @@ public class PolygonSprite {
 \r
        public void set (PolygonSprite sprite) {\r
                if (sprite == null) throw new IllegalArgumentException("sprite cannot be null.");\r
-               \r
+\r
                setRegion(sprite.region);\r
 \r
                x = sprite.x;\r
@@ -101,7 +101,7 @@ public class PolygonSprite {
                if (dirty) return;\r
 \r
                final float[] vertices = this.vertices;\r
-               for(int i=0; i<vertices.length; i+=Sprite.VERTEX_SIZE){\r
+               for (int i = 0; i < vertices.length; i += Sprite.VERTEX_SIZE) {\r
                        vertices[i] += xAmount;\r
                }\r
        }\r
@@ -114,8 +114,8 @@ public class PolygonSprite {
                if (dirty) return;\r
 \r
                final float[] vertices = this.vertices;\r
-               for(int i=0; i<vertices.length; i+=Sprite.VERTEX_SIZE){\r
-                       vertices[i+1] += yAmount;\r
+               for (int i = 0; i < vertices.length; i += Sprite.VERTEX_SIZE) {\r
+                       vertices[i + 1] += yAmount;\r
                }\r
        }\r
 \r
@@ -128,18 +128,18 @@ public class PolygonSprite {
                if (dirty) return;\r
 \r
                final float[] vertices = this.vertices;\r
-               for(int i=0; i<vertices.length; i+=Sprite.VERTEX_SIZE){\r
+               for (int i = 0; i < vertices.length; i += Sprite.VERTEX_SIZE) {\r
                        vertices[i] += xAmount;\r
-                       vertices[i+1] += yAmount;\r
+                       vertices[i + 1] += yAmount;\r
                }\r
        }\r
 \r
        public void setColor (Color tint) {\r
                float color = tint.toFloatBits();\r
-               \r
+\r
                final float[] vertices = this.vertices;\r
-               for(int i=0; i<vertices.length; i+=Sprite.VERTEX_SIZE){\r
-                       vertices[i+2] = color;\r
+               for (int i = 0; i < vertices.length; i += Sprite.VERTEX_SIZE) {\r
+                       vertices[i + 2] = color;\r
                }\r
        }\r
 \r
@@ -147,8 +147,8 @@ public class PolygonSprite {
                int intBits = ((int)(255 * a) << 24) | ((int)(255 * b) << 16) | ((int)(255 * g) << 8) | ((int)(255 * r));\r
                float color = NumberUtils.intToFloatColor(intBits);\r
                final float[] vertices = this.vertices;\r
-               for(int i=0; i<vertices.length; i+=Sprite.VERTEX_SIZE){\r
-                       vertices[i+2] = color;\r
+               for (int i = 0; i < vertices.length; i += Sprite.VERTEX_SIZE) {\r
+                       vertices[i + 2] = color;\r
                }\r
        }\r
 \r
@@ -200,40 +200,41 @@ public class PolygonSprite {
                        float sY = height / region.getRegion().getRegionHeight();\r
                        float fx, rx;\r
                        float fy, ry;\r
-                       \r
+\r
                        float[] localVertices = region.getLocalVertices();\r
-                       \r
+\r
                        final float cos = MathUtils.cosDeg(rotation);\r
                        final float sin = MathUtils.sinDeg(rotation);\r
 \r
-                       for(int i=0; i<localVertices.length; i+=2){\r
+                       for (int i = 0; i < localVertices.length; i += 2) {\r
                                fx = localVertices[i] * sX;\r
-                               fy = localVertices[i+1] * sY;\r
-                               \r
+                               fy = localVertices[i + 1] * sY;\r
+\r
                                fx -= originX;\r
                                fy -= originY;\r
-                               \r
-                               if(scaleX != 1.0f || scaleY != 1.0){\r
+\r
+                               if (scaleX != 1.0f || scaleY != 1.0) {\r
                                        fx *= scaleX;\r
                                        fy *= scaleY;\r
                                }\r
-                               \r
+\r
                                rx = cos * fx - sin * fy;\r
                                ry = sin * fx + cos * fy;\r
-                               \r
+\r
                                rx += worldOriginX;\r
                                ry += worldOriginY;\r
-                               \r
-                               vertices[(i/2)*5] = rx;\r
-                               vertices[((i/2)*5)+1] = ry;\r
-                       } \r
+\r
+                               vertices[(i / 2) * 5] = rx;\r
+                               vertices[((i / 2) * 5) + 1] = ry;\r
+                       }\r
                }\r
-               \r
+\r
                return vertices;\r
        }\r
 \r
        /** Returns the bounding axis aligned {@link Rectangle} that bounds this sprite. The rectangles x and y coordinates describe its\r
-        * bottom left corner. If you change the position or size of the sprite, you have to fetch the triangle again for it to be recomputed.\r
+        * bottom left corner. If you change the position or size of the sprite, you have to fetch the triangle again for it to be\r
+        * recomputed.\r
         * \r
         * @return the bounding Rectangle */\r
        public Rectangle getBoundingRectangle () {\r
@@ -243,14 +244,14 @@ public class PolygonSprite {
                float miny = vertices[1];\r
                float maxx = vertices[0];\r
                float maxy = vertices[1];\r
-               \r
-               for(int i=0; i<vertices.length; i+=5){\r
+\r
+               for (int i = 0; i < vertices.length; i += 5) {\r
                        minx = minx > vertices[i] ? vertices[i] : minx;\r
                        maxx = maxx < vertices[i] ? vertices[i] : maxx;\r
-                       miny = miny > vertices[i+1] ? vertices[i+1] : miny;\r
-                       maxy = maxy < vertices[i+1] ? vertices[i+1] : maxy;\r
+                       miny = miny > vertices[i + 1] ? vertices[i + 1] : miny;\r
+                       maxy = maxy < vertices[i + 1] ? vertices[i + 1] : maxy;\r
                }\r
-               \r
+\r
                bounds.x = minx;\r
                bounds.y = miny;\r
                bounds.width = maxx - minx;\r
@@ -323,20 +324,19 @@ public class PolygonSprite {
 \r
        public void setRegion (PolygonRegion region) {\r
                this.region = region;\r
-               \r
+\r
                float[] localVertices = region.getLocalVertices();\r
                float[] localTextureCoords = region.getTextureCoords();\r
-               \r
-               if(vertices == null || localVertices.length != vertices.length)\r
-                       vertices = new float[(localVertices.length/2)*5];\r
-               \r
+\r
+               if (vertices == null || localVertices.length != vertices.length) vertices = new float[(localVertices.length / 2) * 5];\r
+\r
                // Pack the region info into this sprite's vertices\r
-               for(int i=0; i<localVertices.length/2; i++){\r
-                       vertices[(i*5)] = localVertices[(i*2)];\r
-                       vertices[(i*5)+1] = localVertices[(i*2)+1];\r
-                       vertices[(i*5)+2] = color.toFloatBits();\r
-                       vertices[(i*5)+3] = localTextureCoords[(i*2)];\r
-                       vertices[(i*5)+4] = localTextureCoords[(i*2)+1];\r
+               for (int i = 0; i < localVertices.length / 2; i++) {\r
+                       vertices[(i * 5)] = localVertices[(i * 2)];\r
+                       vertices[(i * 5) + 1] = localVertices[(i * 2) + 1];\r
+                       vertices[(i * 5) + 2] = color.toFloatBits();\r
+                       vertices[(i * 5) + 3] = localTextureCoords[(i * 2)];\r
+                       vertices[(i * 5) + 4] = localTextureCoords[(i * 2) + 1];\r
                }\r
        }\r
 }\r
index bb0ee4c..b25c586 100644 (file)
@@ -1,3 +1,4 @@
+\r
 package com.badlogic.gdx.graphics.g2d;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -7,39 +8,37 @@ import com.badlogic.gdx.graphics.GL11;
 import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.GLCommon;\r
 import com.badlogic.gdx.graphics.Mesh;\r
+import com.badlogic.gdx.graphics.Mesh.VertexDataType;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.VertexAttribute;\r
-import com.badlogic.gdx.graphics.Mesh.VertexDataType;\r
 import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
-import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
-import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.utils.NumberUtils;\r
 \r
 /** <p>\r
- * A PolyongSpriteBatch is used to draw 2D polygons that reference a texture (region). The class will batch the drawing commands and\r
- * optimize them for processing by the GPU.\r
+ * A PolyongSpriteBatch is used to draw 2D polygons that reference a texture (region). The class will batch the drawing commands\r
+ * and optimize them for processing by the GPU.\r
  * </p>\r
  * \r
  * THIS STUFF IS WIP\r
  * \r
  * <p>\r
- * To draw something with a PolyongSpriteBatch one has to first call the {@link PolygonSpriteBatch#begin()} method which will setup appropriate\r
- * render states. When you are done with drawing you have to call {@link PolygonSpriteBatch#end()} which will actually draw the things\r
- * you specified.\r
+ * To draw something with a PolyongSpriteBatch one has to first call the {@link PolygonSpriteBatch#begin()} method which will\r
+ * setup appropriate render states. When you are done with drawing you have to call {@link PolygonSpriteBatch#end()} which will\r
+ * actually draw the things you specified.\r
  * </p>\r
  * \r
  * <p>\r
- * All drawing commands of the PolyongSpriteBatch operate in screen coordinates. The screen coordinate system has an x-axis pointing to\r
- * the right, an y-axis pointing upwards and the origin is in the lower left corner of the screen. You can also provide your own\r
- * transformation and projection matrices if you so wish.\r
+ * All drawing commands of the PolyongSpriteBatch operate in screen coordinates. The screen coordinate system has an x-axis\r
+ * pointing to the right, an y-axis pointing upwards and the origin is in the lower left corner of the screen. You can also\r
+ * provide your own transformation and projection matrices if you so wish.\r
  * </p>\r
  * \r
  * <p>\r
- * A PolyongSpriteBatch is managed. In case the OpenGL context is lost all OpenGL resources a PolyongSpriteBatch uses internally get\r
- * invalidated. A context is lost when a user switches to another application or receives an incoming call on Android. A\r
+ * A PolyongSpriteBatch is managed. In case the OpenGL context is lost all OpenGL resources a PolyongSpriteBatch uses internally\r
+ * get invalidated. A context is lost when a user switches to another application or receives an incoming call on Android. A\r
  * SpritPolyongSpriteBatcheBatch will be automatically reloaded after the OpenGL context is restored.\r
  * </p>\r
  * \r
@@ -48,8 +47,8 @@ import com.badlogic.gdx.utils.NumberUtils;
  * </p>\r
  * \r
  * <p>\r
- * A PolyongSpriteBatch works with OpenGL ES 1.x and 2.0. In the case of a 2.0 context it will use its own custom shader to draw all\r
- * provided sprites. You can set your own custom shader via {@link #setShader(ShaderProgram)}.\r
+ * A PolyongSpriteBatch works with OpenGL ES 1.x and 2.0. In the case of a 2.0 context it will use its own custom shader to draw\r
+ * all provided sprites. You can set your own custom shader via {@link #setShader(ShaderProgram)}.\r
  * </p>\r
  * \r
  * <p>\r
@@ -74,7 +73,7 @@ public class PolygonSpriteBatch {
        private final Matrix4 combinedMatrix = new Matrix4();\r
 \r
        private boolean drawing = false;\r
-       \r
+\r
        private boolean blendingDisabled = false;\r
        private int blendSrcFunc = GL11.GL_SRC_ALPHA;\r
        private int blendDstFunc = GL11.GL_ONE_MINUS_SRC_ALPHA;\r
@@ -87,17 +86,17 @@ public class PolygonSpriteBatch {
 \r
        /** number of render calls since last {@link #begin()} **/\r
        public int renderCalls = 0;\r
-       \r
+\r
        /** number of rendering calls ever, will not be reset, unless it's done manually **/\r
        public int totalRenderCalls = 0;\r
 \r
        /** the maximum number of sprites rendered in one batch so far **/\r
        public int maxVerticesInBatch = 0;\r
        private ShaderProgram customShader = null;\r
-       \r
-       /** Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards, x-axis\r
-        * point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect with\r
-        * respect to the screen resolution. */\r
+\r
+       /** Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards,\r
+        * x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect\r
+        * with respect to the screen resolution. */\r
        public PolygonSpriteBatch () {\r
                this(4000);\r
        }\r
@@ -109,9 +108,9 @@ public class PolygonSpriteBatch {
        }\r
 \r
        /** <p>\r
-        * Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards, x-axis\r
-        * point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect with\r
-        * respect to the screen resolution.\r
+        * Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards,\r
+        * x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect\r
+        * with respect to the screen resolution.\r
         * </p>\r
         * \r
         * <p>\r
@@ -119,9 +118,8 @@ public class PolygonSpriteBatch {
         * </p>\r
         * \r
         * <p>\r
-        * The defaultShader specifies the shader to use. Note that the names for uniforms for this default\r
-        * shader are different than the ones expect for shaders set with {@link #setShader(ShaderProgram)}.\r
-        * See the {@link #createDefaultShader()} method.\r
+        * The defaultShader specifies the shader to use. Note that the names for uniforms for this default shader are different than\r
+        * the ones expect for shaders set with {@link #setShader(ShaderProgram)}. See the {@link #createDefaultShader()} method.\r
         * </p>\r
         * \r
         * @param size the batch size in number of vertices(!)\r
@@ -137,9 +135,9 @@ public class PolygonSpriteBatch {
        }\r
 \r
        /** <p>\r
-        * Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards, x-axis\r
-        * point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect with\r
-        * respect to the screen resolution.\r
+        * Constructs a new PolygonSpriteBatch. Sets the projection matrix to an orthographic projection with y-axis point upwards,\r
+        * x-axis point to the right and the origin being in the bottom left corner of the screen. The projection will be pixel perfect\r
+        * with respect to the screen resolution.\r
         * </p>\r
         * \r
         * <p>\r
@@ -147,9 +145,8 @@ public class PolygonSpriteBatch {
         * </p>\r
         * \r
         * <p>\r
-        * The defaultShader specifies the shader to use. Note that the names for uniforms for this default\r
-        * shader are different than the ones expect for shaders set with {@link #setShader(ShaderProgram)}.\r
-        * See the {@link #createDefaultShader()} method.\r
+        * The defaultShader specifies the shader to use. Note that the names for uniforms for this default shader are different than\r
+        * the ones expect for shaders set with {@link #setShader(ShaderProgram)}. See the {@link #createDefaultShader()} method.\r
         * </p>\r
         * \r
         * @param size the batch size in number of vertices(!)\r
@@ -302,26 +299,25 @@ public class PolygonSpriteBatch {
 \r
                float[] localVertices = region.getLocalVertices();\r
                float[] texCoords = region.getTextureCoords();\r
-               \r
-               if(idx + localVertices.length > vertices.length)\r
-                       renderMesh();\r
-               \r
+\r
+               if (idx + localVertices.length > vertices.length) renderMesh();\r
+\r
                float sX = width / region.getRegion().getRegionWidth();\r
                float sY = height / region.getRegion().getRegionHeight();\r
-               \r
-               for(int i=0; i<localVertices.length; i+=2){\r
+\r
+               for (int i = 0; i < localVertices.length; i += 2) {\r
                        vertices[idx++] = ((localVertices[i]) * sX) + x;\r
-                       vertices[idx++] = ((localVertices[i+1]) * sY) + y;\r
+                       vertices[idx++] = ((localVertices[i + 1]) * sY) + y;\r
                        vertices[idx++] = color;\r
                        vertices[idx++] = texCoords[i];\r
-                       vertices[idx++] = texCoords[i+1];\r
+                       vertices[idx++] = texCoords[i + 1];\r
                }\r
        }\r
 \r
-       /** Draws the polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height. The\r
-        * polygon region is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the polygon region\r
-        * should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the rectangle around\r
-        * originX, originY. */\r
+       /** Draws the polygon region with the bottom left corner at x,y and stretching the region to cover the given width and height.\r
+        * The polygon region is offset by originX, originY relative to the origin. Scale specifies the scaling factor by which the\r
+        * polygon region should be scaled around originX, originY. Rotation specifies the angle of counter clockwise rotation of the\r
+        * rectangle around originX, originY. */\r
        public void draw (PolygonRegion region, float x, float y, float originX, float originY, float width, float height,\r
                float scaleX, float scaleY, float rotation) {\r
                if (!drawing) throw new IllegalStateException("PolygonSpriteBatch.begin must be called before draw.");\r
@@ -330,12 +326,11 @@ public class PolygonSpriteBatch {
                if (texture != lastTexture) {\r
                        switchTexture(texture);\r
                }\r
-               \r
+\r
                float[] localVertices = region.getLocalVertices();\r
                float[] texCoords = region.getTextureCoords();\r
-               \r
-               if(idx + localVertices.length > vertices.length)\r
-                       renderMesh();\r
+\r
+               if (idx + localVertices.length > vertices.length) renderMesh();\r
 \r
                final float worldOriginX = x + originX;\r
                final float worldOriginY = y + originY;\r
@@ -343,54 +338,52 @@ public class PolygonSpriteBatch {
                float sY = height / region.getRegion().getRegionHeight();\r
                float fx, rx;\r
                float fy, ry;\r
-               \r
+\r
                final float cos = MathUtils.cosDeg(rotation);\r
                final float sin = MathUtils.sinDeg(rotation);\r
 \r
-               for(int i=0; i<localVertices.length; i+=2){\r
+               for (int i = 0; i < localVertices.length; i += 2) {\r
                        fx = localVertices[i] * sX;\r
-                       fy = localVertices[i+1] * sY;\r
-                       \r
+                       fy = localVertices[i + 1] * sY;\r
+\r
                        fx -= originX;\r
                        fy -= originY;\r
-                       \r
-                       if(scaleX != 1 || scaleY != 1){\r
+\r
+                       if (scaleX != 1 || scaleY != 1) {\r
                                fx *= scaleX;\r
                                fy *= scaleY;\r
                        }\r
-                       \r
+\r
                        rx = cos * fx - sin * fy;\r
                        ry = sin * fx + cos * fy;\r
-                       \r
+\r
                        rx += worldOriginX;\r
                        ry += worldOriginY;\r
-                       \r
+\r
                        vertices[idx++] = rx;\r
                        vertices[idx++] = ry;\r
                        vertices[idx++] = color;\r
                        vertices[idx++] = texCoords[i];\r
-                       vertices[idx++] = texCoords[i+1];\r
+                       vertices[idx++] = texCoords[i + 1];\r
                }\r
        }\r
-       \r
+\r
        /** Draws the polygon region using the given vertices. Each vertices must be made up of 5 elements in this order: x, y, color,\r
         * u, v. */\r
-       public void draw(PolygonRegion region, float[] spriteVertices, int offset, int length){\r
+       public void draw (PolygonRegion region, float[] spriteVertices, int offset, int length) {\r
                if (!drawing) throw new IllegalStateException("PolygonSpriteBatch.begin must be called before draw.");\r
 \r
                Texture texture = region.getRegion().texture;\r
                if (texture != lastTexture) {\r
                        switchTexture(texture);\r
                }\r
-               \r
-               if(idx + length > vertices.length)\r
-                       renderMesh();\r
 \r
-               if(length <= vertices.length){\r
+               if (idx + length > vertices.length) renderMesh();\r
+\r
+               if (length <= vertices.length) {\r
                        System.arraycopy(spriteVertices, offset, vertices, idx, length);\r
                        idx += length;\r
-               }\r
-               else{\r
+               } else {\r
                        // ay captain, need to split it across multiple batches. Who sends humangous streams like this?!\r
                }\r
        }\r
@@ -417,7 +410,7 @@ public class PolygonSpriteBatch {
                        Gdx.gl.glEnable(GL20.GL_BLEND);\r
                        Gdx.gl.glBlendFunc(blendSrcFunc, blendDstFunc);\r
                }\r
-               \r
+\r
                if (Gdx.graphics.isGL20Available()) {\r
                        if (customShader != null)\r
                                mesh.render(customShader, GL10.GL_TRIANGLES, 0, verticesInBatch);\r
@@ -516,8 +509,8 @@ public class PolygonSpriteBatch {
                        }\r
                }\r
        }\r
-       \r
-       private void switchTexture(Texture texture) {\r
+\r
+       private void switchTexture (Texture texture) {\r
                renderMesh();\r
                lastTexture = texture;\r
        }\r
@@ -532,8 +525,8 @@ public class PolygonSpriteBatch {
         * \r
         * Call this method with a null argument to use the default shader.</p>\r
         * \r
-        * This method will flush the batch before setting the new shader, you can call it in between\r
-        * {@link #begin()} and {@link #end()}.\r
+        * This method will flush the batch before setting the new shader, you can call it in between {@link #begin()} and\r
+        * {@link #end()}.\r
         * \r
         * @param shader the {@link ShaderProgram} or null to use the default shader. */\r
        public void setShader (ShaderProgram shader) {\r
index 71b7753..3bfc82f 100644 (file)
@@ -19,7 +19,6 @@ package com.badlogic.gdx.graphics.g2d;
 import java.io.BufferedReader;\r
 import java.io.IOException;\r
 import java.io.InputStreamReader;\r
-import java.util.ArrayList;\r
 import java.util.Comparator;\r
 import java.util.HashSet;\r
 import java.util.Set;\r
index f21b1cb..e71c0ce 100644 (file)
@@ -69,15 +69,15 @@ public class TiledLoader {
                                        String name;
                                        String points;
 
-                                       public Polyline( String name ) {
+                                       public Polyline (String name) {
                                                this.name = name;
                                        }
 
-                                       public Polyline() {
+                                       public Polyline () {
                                        }
                                }
 
-                               Polyline polyline,polygon;
+                               Polyline polyline, polygon;
 
                                class Property {
                                        String parentType, name, value;
@@ -126,12 +126,12 @@ public class TiledLoader {
                                                return;
                                        }
 
-                                       if( "polyline".equals( name ) ) {
+                                       if ("polyline".equals(name)) {
                                                polyline = new Polyline("polyline");
                                                return;
                                        }
 
-                                       if( "polygon".equals( name ) ) {
+                                       if ("polygon".equals(name)) {
                                                polygon = new Polyline("polygon");
                                                return;
                                        }
@@ -309,16 +309,16 @@ public class TiledLoader {
                                                return;
                                        }
 
-                                       if( "polyline".equals( element ) ) {
-                                               if( "points".equals( name ) ) {
+                                       if ("polyline".equals(element)) {
+                                               if ("points".equals(name)) {
                                                        polyline.points = value;
                                                        return;
                                                }
                                                return;
                                        }
 
-                                       if( "polygon".equals( element ) ) {
-                                               if( "points".equals( name ) ) {
+                                       if ("polygon".equals(element)) {
+                                               if ("points".equals(name)) {
                                                        polygon.points = value;
                                                        return;
                                                }
@@ -367,14 +367,14 @@ public class TiledLoader {
                                                return;
                                        }
 
-                                       if( "polyline".equals( element ) ) {
-                                               putPolyLine( polyline );
+                                       if ("polyline".equals(element)) {
+                                               putPolyLine(polyline);
                                                polyline = null;
                                                return;
                                        }
 
-                                       if( "polygon".equals( element ) ) {
-                                               putPolyLine( polygon );
+                                       if ("polygon".equals(element)) {
+                                               putPolyLine(polygon);
                                                polygon = null;
                                                return;
                                        }
@@ -415,17 +415,17 @@ public class TiledLoader {
                                        }
                                }
 
-                               private void putPolyLine( Polyline polyLine ) {
-                                       if( polyLine == null ) {
+                               private void putPolyLine (Polyline polyLine) {
+                                       if (polyLine == null) {
                                                return;
                                        }
 
-                                       if( "polyline".equals( polyLine.name ) ) {
+                                       if ("polyline".equals(polyLine.name)) {
                                                currObject.polyline = polyLine.points;
                                                return;
                                        }
 
-                                       if( "polygon".equals( polyLine.name ) ) {
+                                       if ("polygon".equals(polyLine.name)) {
                                                currObject.polygon = polyLine.points;
                                                return;
                                        }
index fb86f2f..f83581b 100644 (file)
@@ -219,6 +219,6 @@ public class CameraGroupStrategy implements GroupStrategy, Disposable {
 \r
        @Override\r
        public void dispose () {\r
-               if(shader != null) shader.dispose();\r
+               if (shader != null) shader.dispose();\r
        }\r
 }\r
index eb34538..fe022b3 100644 (file)
 \r
 package com.badlogic.gdx.graphics.g3d.loaders.md5;\r
 \r
-import com.badlogic.gdx.math.Vector3;\r
-\r
 public class MD5Jni {\r
        public static native void calculateVertices (float[] joints, float[] weights, float[] verticesIn, float[] verticesOut,\r
                int numVertices, int vstride, int wstride)/*-{ }-*/; /*\r
-               for (int vertexOffset = 2, k = 0; vertexOffset < numVertices; vertexOffset += vstride) {\r
-                       float finalX = 0;\r
-                       float finalY = 0;\r
-                       float finalZ = 0;\r
-\r
-                       int weightOffset = (int)verticesIn[vertexOffset];\r
-                       int weightCount = (int)verticesIn[vertexOffset + 1];\r
-                       weightOffset = (weightOffset << 2) + weightOffset;\r
-\r
-                       for (int j = 0; j < weightCount; j++) {\r
-                               int jointOffset = (int)weights[weightOffset++] << 3;\r
-                               float bias = weights[weightOffset++];\r
-                               float vx = weights[weightOffset++];\r
-                               float vy = weights[weightOffset++];\r
-                               float vz = weights[weightOffset++];\r
-\r
-                               float qx = joints[jointOffset + 4];\r
-                               float qy = joints[jointOffset + 5];\r
-                               float qz = joints[jointOffset + 6];\r
-                               float qw = joints[jointOffset + 7];\r
-\r
-                               float ix = -qx, iy = -qy, iz = -qz, iw = qw;\r
-\r
-                               float tw = -qx * vx - qy * vy - qz * vz;\r
-                               float tx = qw * vx + qy * vz - qz * vy;\r
-                               float ty = qw * vy + qz * vx - qx * vz;\r
-                               float tz = qw * vz + qx * vy - qy * vx;\r
-\r
-                               vx = tx * iw + tw * ix + ty * iz - tz * iy;\r
-                               vy = ty * iw + tw * iy + tz * ix - tx * iz;\r
-                               vz = tz * iw + tw * iz + tx * iy - ty * ix;\r
-\r
-                               finalX += (joints[jointOffset + 1] + vx) * bias;\r
-                               finalY += (joints[jointOffset + 2] + vy) * bias;\r
-                               finalZ += (joints[jointOffset + 3] + vz) * bias;\r
-                       }\r
-\r
-                       verticesOut[k++] = finalX;\r
-                       verticesOut[k++] = finalY;\r
-                       verticesOut[k++] = finalZ;\r
-                       k += 2;\r
-               }\r
-       */\r
+                                                                                                                                                                        * for (int vertexOffset = 2, k = 0; vertexOffset < numVertices;\r
+                                                                                                                                                                        * vertexOffset += vstride) { float finalX = 0; float finalY = 0;\r
+                                                                                                                                                                        * float finalZ = 0;\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * int weightOffset = (int)verticesIn[vertexOffset]; int\r
+                                                                                                                                                                        * weightCount = (int)verticesIn[vertexOffset + 1]; weightOffset =\r
+                                                                                                                                                                        * (weightOffset << 2) + weightOffset;\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * for (int j = 0; j < weightCount; j++) { int jointOffset =\r
+                                                                                                                                                                        * (int)weights[weightOffset++] << 3; float bias =\r
+                                                                                                                                                                        * weights[weightOffset++]; float vx = weights[weightOffset++];\r
+                                                                                                                                                                        * float vy = weights[weightOffset++]; float vz =\r
+                                                                                                                                                                        * weights[weightOffset++];\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * float qx = joints[jointOffset + 4]; float qy =\r
+                                                                                                                                                                        * joints[jointOffset + 5]; float qz = joints[jointOffset + 6];\r
+                                                                                                                                                                        * float qw = joints[jointOffset + 7];\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * float ix = -qx, iy = -qy, iz = -qz, iw = qw;\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * float tw = -qx * vx - qy * vy - qz * vz; float tx = qw * vx + qy\r
+                                                                                                                                                                        * * vz - qz * vy; float ty = qw * vy + qz * vx - qx * vz; float tz\r
+                                                                                                                                                                        * = qw * vz + qx * vy - qy * vx;\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * vx = tx * iw + tw * ix + ty * iz - tz * iy; vy = ty * iw + tw *\r
+                                                                                                                                                                        * iy + tz * ix - tx * iz; vz = tz * iw + tw * iz + tx * iy - ty *\r
+                                                                                                                                                                        * ix;\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * finalX += (joints[jointOffset + 1] + vx) * bias; finalY +=\r
+                                                                                                                                                                        * (joints[jointOffset + 2] + vy) * bias; finalZ +=\r
+                                                                                                                                                                        * (joints[jointOffset + 3] + vz) * bias; }\r
+                                                                                                                                                                        * \r
+                                                                                                                                                                        * verticesOut[k++] = finalX; verticesOut[k++] = finalY;\r
+                                                                                                                                                                        * verticesOut[k++] = finalZ; k += 2; }\r
+                                                                                                                                                                        */\r
 }\r
index 3a54053..e431b6e 100644 (file)
@@ -206,7 +206,7 @@ public class MD5Mesh {
        public void calculateVerticesJni (MD5Joints skeleton, float[] verts) {\r
                MD5Jni.calculateVertices(skeleton.joints, weights, vertices, verts, vertices.length, floatsPerVertex, floatsPerWeight);\r
        }\r
-       \r
+\r
        public void calculateNormalsBind (MD5Joints bindPoseSkeleton, float[] verts) {\r
                calculateNormalsBind(bindPoseSkeleton, weights, vertices, indices, verts, floatsPerVertex, floatsPerWeight);\r
        }\r
index 5e1e3b2..e99532e 100644 (file)
@@ -99,7 +99,7 @@ public class MD5Renderer implements Disposable {
                        MD5Mesh mesh = model.meshes[i];\r
 \r
                        if (useJni) {\r
-                               if(useNormals) throw new GdxRuntimeException("Can't skin vertices & normals using native code yet");\r
+                               if (useNormals) throw new GdxRuntimeException("Can't skin vertices & normals using native code yet");\r
                                mesh.calculateVerticesJni(skeleton, vertices[i]);\r
                        } else {\r
                                if (useNormals) {\r
index 75c216c..763d067 100644 (file)
@@ -60,7 +60,7 @@ public class ObjLoader {
                }\r
                return loadObjFromString(line, flipV);\r
        }\r
-       \r
+\r
        /** Loads a Wavefront OBJ file from the given input stream.\r
         * \r
         * @param in the InputStream\r
@@ -222,7 +222,7 @@ public class ObjLoader {
 \r
                        short[] indices = new short[numFaces * 3];\r
                        for (int i = 0; i < indices.length; i++)\r
-                               indices[i] = (short) facesVerts[i];\r
+                               indices[i] = (short)facesVerts[i];\r
 \r
                        mesh = new Mesh(true, verts.length, indices.length, attributes.toArray(new VertexAttribute[attributes.size()]));\r
                        mesh.setVertices(verts);\r
index bcf85e1..3ae9945 100644 (file)
@@ -184,7 +184,8 @@ public class ETC1 {
                decodeImage(etc1Data.compressedData, dataOffset, pixmap.getPixels(), 0, width, height, pixelSize);\r
                return pixmap;\r
        }\r
-       \r
+\r
+       // @off\r
        /*JNI\r
        #include <etc1/etc1_utils.h>\r
        #include <stdlib.h>\r
index 2318983..6c23e99 100644 (file)
@@ -16,7 +16,6 @@
 \r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
-import com.badlogic.gdx.Application.ApplicationType;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.graphics.GL10;\r
index f4e7d8d..2229ddf 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
-import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.IntBuffer;\r
 import java.util.ArrayList;\r
 import java.util.HashMap;\r
index 492f7f4..15b1887 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
-import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.FloatBuffer;\r
 \r
 import com.badlogic.gdx.Gdx;\r
index 0a04168..571765d 100644 (file)
@@ -22,7 +22,6 @@ import com.badlogic.gdx.graphics.VertexAttribute;
 import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.utils.Array;\r
-import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
 /** Immediate mode rendering class for GLES 2.0. The renderer will allow you to specify vertices on the fly and provides a default\r
  * shader for (unlit) rendering.</p> *\r
@@ -128,7 +127,7 @@ public class ImmediateModeRenderer20 implements ImmediateModeRenderer {
        }\r
 \r
        public void end () {\r
-               if(numVertices == 0) return;\r
+               if (numVertices == 0) return;\r
                shader.begin();\r
                shader.setUniformMatrix("u_projModelView", projModelView);\r
                for (int i = 0; i < numTexCoords; i++)\r
index c90009b..79e048a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.graphics.glutils;\r
 \r
 import java.nio.ByteBuffer;\r
 import java.nio.IntBuffer;\r
 import java.nio.ShortBuffer;\r
 \r
-import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.graphics.GL11;\r
-import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.utils.BufferUtils;\r
-import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
 public class IndexArray implements IndexData {\r
        final static IntBuffer tmpHandle = BufferUtils.newIntBuffer(1);\r
@@ -52,8 +49,8 @@ public class IndexArray implements IndexData {
        }\r
 \r
        /** <p>\r
-        * Sets the indices of this IndexArray, discarding the old indices. The count must equal the number of indices to be\r
-        * copied to this IndexArray.\r
+        * Sets the indices of this IndexArray, discarding the old indices. The count must equal the number of indices to be copied to\r
+        * this IndexArray.\r
         * </p>\r
         * \r
         * <p>\r
@@ -97,4 +94,4 @@ public class IndexArray implements IndexData {
        public void dispose () {\r
                BufferUtils.disposeUnsafeByteBuffer(byteBuffer);\r
        }\r
-}
\ No newline at end of file
+}\r
index 23cf092..ae5d84f 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.graphics.glutils;\r
 \r
 import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.IntBuffer;\r
 import java.nio.ShortBuffer;\r
 \r
index eef1781..dd76f7d 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.graphics.glutils;\r
 \r
 import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.IntBuffer;\r
 import java.nio.ShortBuffer;\r
 \r
index fd27fc6..67c0568 100644 (file)
@@ -200,12 +200,12 @@ public class ShaderProgram implements Disposable {
 \r
                int compiled = intbuf.get(0);\r
                if (compiled == 0) {\r
-//                     gl.glGetShaderiv(shader, GL20.GL_INFO_LOG_LENGTH, intbuf);\r
-//                     int infoLogLength = intbuf.get(0);\r
-//                     if (infoLogLength > 1) {\r
-                               String infoLog = gl.glGetShaderInfoLog(shader);\r
-                               log += infoLog;\r
-//                     }\r
+// gl.glGetShaderiv(shader, GL20.GL_INFO_LOG_LENGTH, intbuf);\r
+// int infoLogLength = intbuf.get(0);\r
+// if (infoLogLength > 1) {\r
+                       String infoLog = gl.glGetShaderInfoLog(shader);\r
+                       log += infoLog;\r
+// }\r
                        return -1;\r
                }\r
 \r
@@ -228,11 +228,11 @@ public class ShaderProgram implements Disposable {
                gl.glGetProgramiv(program, GL20.GL_LINK_STATUS, intbuf);\r
                int linked = intbuf.get(0);\r
                if (linked == 0) {\r
-//                     Gdx.gl20.glGetProgramiv(program, GL20.GL_INFO_LOG_LENGTH, intbuf);\r
-//                     int infoLogLength = intbuf.get(0);\r
-//                     if (infoLogLength > 1) {\r
-                               log = Gdx.gl20.glGetProgramInfoLog(program);\r
-//                     }\r
+// Gdx.gl20.glGetProgramiv(program, GL20.GL_INFO_LOG_LENGTH, intbuf);\r
+// int infoLogLength = intbuf.get(0);\r
+// if (infoLogLength > 1) {\r
+                       log = Gdx.gl20.glGetProgramInfoLog(program);\r
+// }\r
                        return -1;\r
                }\r
 \r
@@ -245,11 +245,11 @@ public class ShaderProgram implements Disposable {
         *         have an effect. */\r
        public String getLog () {\r
                if (isCompiled) {\r
-//                     Gdx.gl20.glGetProgramiv(program, GL20.GL_INFO_LOG_LENGTH, intbuf);\r
-//                     int infoLogLength = intbuf.get(0);\r
-//                     if (infoLogLength > 1) {\r
-                               log = Gdx.gl20.glGetProgramInfoLog(program);\r
-//                     }\r
+// Gdx.gl20.glGetProgramiv(program, GL20.GL_INFO_LOG_LENGTH, intbuf);\r
+// int infoLogLength = intbuf.get(0);\r
+// if (infoLogLength > 1) {\r
+                       log = Gdx.gl20.glGetProgramInfoLog(program);\r
+// }\r
                        return log;\r
                } else {\r
                        return log;\r
@@ -482,34 +482,33 @@ public class ShaderProgram implements Disposable {
                BufferUtils.copy(vals, this.matrix, vals.length, 0);\r
                gl.glUniformMatrix3fv(location, 1, transpose, this.matrix);\r
        }\r
-       \r
-\r
-   /** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a\r
-    * {@link #begin()}/{@link #end()} block.\r
-    *\r
-    * @param name the name of the uniform\r
-    * @param values x and y as the first and second values respectively */\r
-   public void setUniformf (String name, Vector2 values) {\r
-       setUniformf(name, values.x, values.y);\r
-   }\r
-\r
-   /** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a\r
-    * {@link #begin()}/{@link #end()} block.\r
-    *\r
-    * @param name the name of the uniform\r
-    * @param values x, y and z as the first, second and third values respectively */\r
-   public void setUniformf (String name, Vector3 values) {\r
-       setUniformf(name, values.x, values.y, values.z);\r
-   }\r
-\r
-   /** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a\r
-    * {@link #begin()}/{@link #end()} block.\r
-    *\r
-    * @param name the name of the uniform\r
-    * @param values r, g, b and a as the first through fourth values respectively */\r
-   public void setUniformf (String name, Color values) {\r
-       setUniformf(name, values.r, values.g, values.b, values.a);\r
-   }\r
+\r
+       /** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a\r
+        * {@link #begin()}/{@link #end()} block.\r
+        * \r
+        * @param name the name of the uniform\r
+        * @param values x and y as the first and second values respectively */\r
+       public void setUniformf (String name, Vector2 values) {\r
+               setUniformf(name, values.x, values.y);\r
+       }\r
+\r
+       /** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a\r
+        * {@link #begin()}/{@link #end()} block.\r
+        * \r
+        * @param name the name of the uniform\r
+        * @param values x, y and z as the first, second and third values respectively */\r
+       public void setUniformf (String name, Vector3 values) {\r
+               setUniformf(name, values.x, values.y, values.z);\r
+       }\r
+\r
+       /** Sets the uniform with the given name. Throws an IllegalArgumentException in case it is not called in between a\r
+        * {@link #begin()}/{@link #end()} block.\r
+        * \r
+        * @param name the name of the uniform\r
+        * @param values r, g, b and a as the first through fourth values respectively */\r
+       public void setUniformf (String name, Color values) {\r
+               setUniformf(name, values.r, values.g, values.b, values.a);\r
+       }\r
 \r
        /** Sets the vertex attribute with the given name. Throws an IllegalArgumentException in case it is not called in between a\r
         * {@link #begin()}/{@link #end()} block.\r
@@ -525,7 +524,7 @@ public class ShaderProgram implements Disposable {
                GL20 gl = Gdx.graphics.getGL20();\r
                checkManaged();\r
                int location = fetchAttributeLocation(name);\r
-               if(location == -1) return;\r
+               if (location == -1) return;\r
                gl.glVertexAttribPointer(location, size, type, normalize, stride, buffer);\r
        }\r
 \r
@@ -546,7 +545,7 @@ public class ShaderProgram implements Disposable {
                if (location == -1) return;\r
                gl.glVertexAttribPointer(location, size, type, normalize, stride, offset);\r
        }\r
-       \r
+\r
        /** Makes OpenGL ES 2.0 use this vertex and fragment shader pair. When you are done with this shader you have to call\r
         * {@link ShaderProgram#end()}. */\r
        public void begin () {\r
index 4292967..ffd9bf6 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.graphics.glutils;\r
 \r
 import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.FloatBuffer;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -176,7 +175,7 @@ public class VertexArray implements VertexData {
                byteBuffer.position(0);\r
                isBound = false;\r
        }\r
-       \r
+\r
        public void bind (ShaderProgram shader) {\r
                GL20 gl = Gdx.gl20;\r
                int numAttributes = attributes.size();\r
@@ -191,11 +190,12 @@ public class VertexArray implements VertexData {
                                normalize = true;\r
                        }\r
                        byteBuffer.position(attribute.offset);\r
-                       shader.setVertexAttribute(attribute.alias, attribute.numComponents, colorType, normalize, attributes.vertexSize, byteBuffer);\r
+                       shader.setVertexAttribute(attribute.alias, attribute.numComponents, colorType, normalize, attributes.vertexSize,\r
+                               byteBuffer);\r
                }\r
                isBound = true;\r
        }\r
-       \r
+\r
        /** Unbinds this VertexBufferObject.\r
         * \r
         * @param shader the shader */\r
index bf2b0c3..1619914 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.graphics.glutils;\r
 \r
 import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.FloatBuffer;\r
 import java.nio.IntBuffer;\r
 \r
index 6579729..5348bce 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.graphics.glutils;\r
 \r
 import java.nio.ByteBuffer;\r
-import java.nio.ByteOrder;\r
 import java.nio.FloatBuffer;\r
 import java.nio.IntBuffer;\r
 \r
index 6c5ae8b..4ba3ef7 100644 (file)
@@ -63,7 +63,7 @@ public interface VertexData extends Disposable {
 \r
        /** Unbinds this VertexData. */\r
        public void unbind ();\r
-       \r
+\r
        /** Binds this VertexData for rendering via glDrawArrays or glDrawElements. */\r
        public void bind (ShaderProgram shader);\r
 \r
index 17b09af..45a3e38 100644 (file)
@@ -320,7 +320,7 @@ public class RemoteInput implements Runnable, Input {
        public void getTextInput (TextInputListener listener, String title, String text) {\r
                Gdx.app.getInput().getTextInput(listener, title, text);\r
        }\r
-       \r
+\r
        @Override\r
        public void getPlaceholderTextInput (TextInputListener listener, String title, String placeholder) {\r
                Gdx.app.getInput().getPlaceholderTextInput(listener, title, placeholder);\r
@@ -448,6 +448,6 @@ public class RemoteInput implements Runnable, Input {
        @Override\r
        public void getRotationMatrix (float[] matrix) {\r
                // TODO Auto-generated method stub\r
-               \r
+\r
        }\r
 }\r
index 8e00334..f260abd 100644 (file)
@@ -83,37 +83,26 @@ public class Frustum {
                return true;\r
        }\r
 \r
-       /**\r
-        * Returns wheter the given sphere is in the frustum.\r
+       /** Returns wheter the given sphere is in the frustum.\r
         * \r
-        * @param center\r
-        *            The center of the sphere\r
-        * @param radius\r
-        *            The radius of the sphere\r
-        * @return Wheter the sphere is in the frustum\r
-        */\r
-       public boolean sphereInFrustum(Vector3 center, float radius) {\r
+        * @param center The center of the sphere\r
+        * @param radius The radius of the sphere\r
+        * @return Wheter the sphere is in the frustum */\r
+       public boolean sphereInFrustum (Vector3 center, float radius) {\r
                for (int i = 0; i < 6; i++)\r
-                       if ((planes[i].normal.x * center.x + planes[i].normal.y * center.y + planes[i].normal.z\r
-                                       * center.z) < (-radius - planes[i].d))\r
+                       if ((planes[i].normal.x * center.x + planes[i].normal.y * center.y + planes[i].normal.z * center.z) < (-radius - planes[i].d))\r
                                return false;\r
                return true;\r
        }\r
 \r
-       /**\r
-        * Returns wheter the given sphere is in the frustum not checking wheter it\r
-        * is behind the near and far clipping plane.\r
+       /** Returns wheter the given sphere is in the frustum not checking wheter it is behind the near and far clipping plane.\r
         * \r
-        * @param center\r
-        *            The center of the sphere\r
-        * @param radius\r
-        *            The radius of the sphere\r
-        * @return Wheter the sphere is in the frustum\r
-        */\r
-       public boolean sphereInFrustumWithoutNearFar(Vector3 center, float radius) {\r
+        * @param center The center of the sphere\r
+        * @param radius The radius of the sphere\r
+        * @return Wheter the sphere is in the frustum */\r
+       public boolean sphereInFrustumWithoutNearFar (Vector3 center, float radius) {\r
                for (int i = 2; i < 6; i++)\r
-                       if ((planes[i].normal.x * center.x + planes[i].normal.y * center.y + planes[i].normal.z\r
-                                       * center.z) < (-radius - planes[i].d))\r
+                       if ((planes[i].normal.x * center.x + planes[i].normal.y * center.y + planes[i].normal.z * center.z) < (-radius - planes[i].d))\r
                                return false;\r
                return true;\r
        }\r
index a21784d..34b81c3 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.math;\r
 \r
 /** Takes a linear value in the range of 0-1 and outputs a (usually) non-linear, interpolated value.\r
@@ -380,4 +381,4 @@ public abstract class Interpolation {
                        return a * a * ((scale + 1) * a - scale);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 85930d2..cb89080 100644 (file)
@@ -237,20 +237,18 @@ public final class Intersector {
                        return false;
        }
 
-       /**
-        * Intersects a line and a plane. The intersection is returned as the distance from the first point
-        * to the plane. In case an intersection happened, the return value is in the range [0,1]. The
-        * intersection point can be recovered by point1 + t * (point2 - point1) where t is the return
-        * value of this method.
+       /** Intersects a line and a plane. The intersection is returned as the distance from the first point to the plane. In case an
+        * intersection happened, the return value is in the range [0,1]. The intersection point can be recovered by point1 + t *
+        * (point2 - point1) where t is the return value of this method.
         * @param x
         * @param y
         * @param z
         * @param x2
         * @param y2
         * @param z2
-        * @param plane
-        */
-       public static float intersectLinePlane(float x, float y, float z, float x2, float y2, float z2, Plane plane, Vector3 intersection) {
+        * @param plane */
+       public static float intersectLinePlane (float x, float y, float z, float x2, float y2, float z2, Plane plane,
+               Vector3 intersection) {
                Vector3 direction = tmp.set(x2, y2, z2).sub(x, y, z);
                Vector3 origin = tmp2.set(x, y, z);
                float denom = direction.dot(plane.getNormal());
@@ -262,7 +260,7 @@ public final class Intersector {
                        if (intersection != null) intersection.set(origin);
                        return 0;
                }
-               
+
                return -1;
        }
 
@@ -627,57 +625,55 @@ public final class Intersector {
 
                return closestX + closestY < c.radius * c.radius;
        }
-       
+
        /** Check whether specified convex polygons overlap.
         * 
         * @param p1 The first polygon.
         * @param p2 The second polygon.
-        * @return Whether polygons overlap. */ 
-       public static boolean overlapConvexPolygons(Polygon p1, Polygon p2) {
+        * @return Whether polygons overlap. */
+       public static boolean overlapConvexPolygons (Polygon p1, Polygon p2) {
                return overlapConvexPolygons(p1, p2, null);
        }
-       
-       /** Check whether specified convex polygons overlap. If they do, optionally obtain a
-        * Minimum Translation Vector indicating the minimum magnitude vector required
-        * to push the polygons out of the collision.
+
+       /** Check whether specified convex polygons overlap. If they do, optionally obtain a Minimum Translation Vector indicating the
+        * minimum magnitude vector required to push the polygons out of the collision.
         * 
         * @param p1 The first polygon.
         * @param p2 The second polygon.
         * @param mtv A Minimum Translation Vector to fill in the case of a collision (optional).
-        * @return Whether polygons overlap. */ 
-       public static boolean overlapConvexPolygons(Polygon p1, Polygon p2, MinimumTranslationVector mtv) {
+        * @return Whether polygons overlap. */
+       public static boolean overlapConvexPolygons (Polygon p1, Polygon p2, MinimumTranslationVector mtv) {
                return overlapConvexPolygons(p1.getTransformedVertices(), p2.getTransformedVertices(), mtv);
        }
-       
-       /** Check whether polygons defined by the given vertex arrays overlap. If they do, optionally obtain a
-        * Minimum Translation Vector indicating the minimum magnitude vector required
-        * to push the polygons out of the collision.
+
+       /** Check whether polygons defined by the given vertex arrays overlap. If they do, optionally obtain a Minimum Translation
+        * Vector indicating the minimum magnitude vector required to push the polygons out of the collision.
         * 
         * @param verts1 Vertices of the first polygon.
         * @param verts2 Vertices of the second polygon.
         * @param mtv A Minimum Translation Vector to fill in the case of a collision (optional).
         * @return Whether polygons overlap. */
-       public static boolean overlapConvexPolygons(float[] verts1, float[] verts2, MinimumTranslationVector mtv) {
+       public static boolean overlapConvexPolygons (float[] verts1, float[] verts2, MinimumTranslationVector mtv) {
                float overlap = Float.MAX_VALUE;
                float smallestAxisX = 0;
                float smallestAxisY = 0;
-               
+
                // Get polygon1 axes
                final int numAxes1 = verts1.length;
                for (int i = 0; i < numAxes1; i += 2) {
                        float x1 = verts1[i];
-                       float y1 = verts1[i + 1];                       
+                       float y1 = verts1[i + 1];
                        float x2 = verts1[(i + 2) % numAxes1];
                        float y2 = verts1[(i + 3) % numAxes1];
-                       
-                       float axisX =  y1 - y2;
+
+                       float axisX = y1 - y2;
                        float axisY = -(x1 - x2);
-                       
-                       final float length = (float) Math.sqrt(axisX * axisX + axisY * axisY);
+
+                       final float length = (float)Math.sqrt(axisX * axisX + axisY * axisY);
                        axisX /= length;
                        axisY /= length;
-                       
-                       //-- Begin check for separation on this axis --//                       
+
+                       // -- Begin check for separation on this axis --//
 
                        // Project polygon1 onto this axis
                        float min1 = (axisX * verts1[0]) + (axisY * verts1[1]);
@@ -690,10 +686,10 @@ public final class Intersector {
                                        max1 = p;
                                }
                        }
-                       
+
                        // Project polygon2 onto this axis
                        float min2 = (axisX * verts2[0]) + (axisY * verts2[1]);
-                       float max2 = min2;                      
+                       float max2 = min2;
                        for (int j = 2; j < verts2.length; j += 2) {
                                float p = (axisX * verts2[j]) + (axisY * verts2[j + 1]);
                                if (p < min2) {
@@ -702,7 +698,7 @@ public final class Intersector {
                                        max2 = p;
                                }
                        }
-                       
+
                        if (!((min1 < min2 && max1 > min2) || (min2 < min1 && max2 > min1))) {
                                return false;
                        } else {
@@ -712,7 +708,7 @@ public final class Intersector {
                                        float maxs = Math.abs(max1 - max2);
                                        if (mins < maxs) {
                                                axisX = -axisX;
-                                               axisY = -axisY;                                         
+                                               axisY = -axisY;
                                                o += mins;
                                        } else {
                                                o += maxs;
@@ -724,25 +720,25 @@ public final class Intersector {
                                        smallestAxisY = axisY;
                                }
                        }
-                       //-- End check for separation on this axis --//
-               }                       
-               
+                       // -- End check for separation on this axis --//
+               }
+
                // Get polygon2 axes
                final int numAxes2 = verts2.length;
                for (int i = 0; i < numAxes2; i += 2) {
                        float x1 = verts2[i];
-                       float y1 = verts2[i + 1];                       
+                       float y1 = verts2[i + 1];
                        float x2 = verts2[(i + 2) % numAxes2];
                        float y2 = verts2[(i + 3) % numAxes2];
-                       
-                       float axisX =  y1 - y2;
+
+                       float axisX = y1 - y2;
                        float axisY = -(x1 - x2);
-                       
-                       final float length = (float) Math.sqrt(axisX * axisX + axisY * axisY);
+
+                       final float length = (float)Math.sqrt(axisX * axisX + axisY * axisY);
                        axisX /= length;
                        axisY /= length;
-                       
-                       //-- Begin check for separation on this axis --//
+
+                       // -- Begin check for separation on this axis --//
 
                        // Project polygon1 onto this axis
                        float min1 = (axisX * verts1[0]) + (axisY * verts1[1]);
@@ -755,10 +751,10 @@ public final class Intersector {
                                        max1 = p;
                                }
                        }
-                       
+
                        // Project polygon2 onto this axis
                        float min2 = (axisX * verts2[0]) + (axisY * verts2[1]);
-                       float max2 = min2;                      
+                       float max2 = min2;
                        for (int j = 2; j < verts2.length; j += 2) {
                                float p = (axisX * verts2[j]) + (axisY * verts2[j + 1]);
                                if (p < min2) {
@@ -767,7 +763,7 @@ public final class Intersector {
                                        max2 = p;
                                }
                        }
-                       
+
                        if (!((min1 < min2 && max1 > min2) || (min2 < min1 && max2 > min1))) {
                                return false;
                        } else {
@@ -784,14 +780,14 @@ public final class Intersector {
                                                o += maxs;
                                        }
                                }
-                               
+
                                if (o < overlap) {
                                        overlap = o;
                                        smallestAxisX = axisX;
                                        smallestAxisY = axisY;
                                }
-                       }                       
-                       //-- End check for separation on this axis --//
+                       }
+                       // -- End check for separation on this axis --//
                }
                if (mtv != null) {
                        mtv.normal.set(smallestAxisX, smallestAxisY);
@@ -799,42 +795,38 @@ public final class Intersector {
                }
                return true;
        }
-       
-       /**
-        * Splits the triangle by the plane. The result is stored in the SplitTriangle
-        * instance. Depending on where the triangle is relative to the plane, the result can
-        * be:
+
+       /** Splits the triangle by the plane. The result is stored in the SplitTriangle instance. Depending on where the triangle is
+        * relative to the plane, the result can be:
         * 
         * <ul>
-        * <li>Triangle is fully in front/behind: {@link SplitTriangle#front} or {@link SplitTriangle#back} will
-        * contain the original triangle, {@link SplitTriangle#total} will be one.</li>
+        * <li>Triangle is fully in front/behind: {@link SplitTriangle#front} or {@link SplitTriangle#back} will contain the original
+        * triangle, {@link SplitTriangle#total} will be one.</li>
         * <li>Triangle has two vertices in front, one behind: {@link SplitTriangle#front} contains 2 triangles,
         * {@link SplitTriangle#back} contains 1 triangles, {@link SplitTriangle#total} will be 3.</li>
         * <li>Triangle has one vertex in front, two behind: {@link SplitTriangle#front} contains 1 triangle,
         * {@link SplitTriangle#back} contains 2 triangles, {@link SplitTriangle#total} will be 3.</li>
         * </ul>
         * 
-        * The input triangle should have the form: x, y, z, x2, y2, z2, x3, y3, y3. One can
-        * add additional attributes per vertex which will be interpolated if split, such as
-        * texture coordinates or normals. Note that these additional attributes won't be
+        * The input triangle should have the form: x, y, z, x2, y2, z2, x3, y3, y3. One can add additional attributes per vertex which
+        * will be interpolated if split, such as texture coordinates or normals. Note that these additional attributes won't be
         * normalized, as might be necessary in case of normals.
         * 
         * @param triangle
         * @param plane
-        * @param split output SplitTriangle
-        */
-       public static void splitTriangle(float[] triangle, Plane plane, SplitTriangle split) {
+        * @param split output SplitTriangle */
+       public static void splitTriangle (float[] triangle, Plane plane, SplitTriangle split) {
                int stride = triangle.length / 3;
                boolean r1 = plane.testPoint(triangle[0], triangle[1], triangle[2]) == PlaneSide.Back;
                boolean r2 = plane.testPoint(triangle[0 + stride], triangle[1 + stride], triangle[2 + stride]) == PlaneSide.Back;
                boolean r3 = plane.testPoint(triangle[0 + stride * 2], triangle[1 + stride * 2], triangle[2 + stride * 2]) == PlaneSide.Back;
-               
+
                split.reset();
-               
+
                // easy case, triangle is on one side (point on plane means front).
-               if((r1 == r2) && (r2 == r3)) {
+               if ((r1 == r2) && (r2 == r3)) {
                        split.total = 1;
-                       if(r1) {
+                       if (r1) {
                                split.numBack = 1;
                                System.arraycopy(triangle, 0, split.back, 0, triangle.length);
                        } else {
@@ -843,12 +835,12 @@ public final class Intersector {
                        }
                        return;
                }
-               
+
                // set number of triangles
                split.total = 3;
-               split.numFront = (r1?1:0) + (r2?1:0) + (r3?1:0);
+               split.numFront = (r1 ? 1 : 0) + (r2 ? 1 : 0) + (r3 ? 1 : 0);
                split.numBack = split.total - split.numFront;
-               
+
                // hard case, split the three edges on the plane
                // determine which array to fill first, front or back, flip if we
                // cross the plane
@@ -857,14 +849,14 @@ public final class Intersector {
                // split first edge
                int first = 0;
                int second = stride;
-               if(r1 != r2) {
+               if (r1 != r2) {
                        // split the edge
                        splitEdge(triangle, first, second, stride, plane, split.edgeSplit, 0);
-                       
+
                        // add first edge vertex and new vertex to current side
                        split.add(triangle, first, stride);
                        split.add(split.edgeSplit, 0, stride);
-                       
+
                        // flip side and add new vertex and second edge vertex to current side
                        split.setSide(!split.getSide());
                        split.add(split.edgeSplit, 0, stride);
@@ -876,14 +868,14 @@ public final class Intersector {
                // split second edge
                first = stride;
                second = stride + stride;
-               if(r2 != r3) {
+               if (r2 != r3) {
                        // split the edge
                        splitEdge(triangle, first, second, stride, plane, split.edgeSplit, 0);
-                       
+
                        // add first edge vertex and new vertex to current side
                        split.add(triangle, first, stride);
                        split.add(split.edgeSplit, 0, stride);
-                       
+
                        // flip side and add new vertex and second edge vertex to current side
                        split.setSide(!split.getSide());
                        split.add(split.edgeSplit, 0, stride);
@@ -891,18 +883,18 @@ public final class Intersector {
                        // add both vertices
                        split.add(triangle, first, stride);
                }
-               
+
                // split third edge
                first = stride + stride;
                second = 0;
-               if(r3 != r1) {
+               if (r3 != r1) {
                        // split the edge
                        splitEdge(triangle, first, second, stride, plane, split.edgeSplit, 0);
-                       
+
                        // add first edge vertex and new vertex to current side
                        split.add(triangle, first, stride);
                        split.add(split.edgeSplit, 0, stride);
-                       
+
                        // flip side and add new vertex and second edge vertex to current side
                        split.setSide(!split.getSide());
                        split.add(split.edgeSplit, 0, stride);
@@ -910,9 +902,9 @@ public final class Intersector {
                        // add both vertices
                        split.add(triangle, first, stride);
                }
-               
+
                // triangulate the side with 2 triangles
-               if(split.numFront == 2) {
+               if (split.numFront == 2) {
                        System.arraycopy(split.front, stride * 2, split.front, stride * 3, stride * 2);
                        System.arraycopy(split.front, 0, split.front, stride * 5, stride);
                } else {
@@ -920,34 +912,34 @@ public final class Intersector {
                        System.arraycopy(split.back, 0, split.back, stride * 5, stride);
                }
        }
-       
+
        static Vector3 intersection = new Vector3();
-       private static void splitEdge(float[] vertices, int s, int e, int stride, Plane plane, float[] split, int offset) {
-               float t = Intersector.intersectLinePlane(vertices[s], vertices[s + 1], vertices[s+2],
-                                                                                                                         vertices[e], vertices[e + 1], vertices[e+2],
-                                                                                                                         plane, intersection);
+
+       private static void splitEdge (float[] vertices, int s, int e, int stride, Plane plane, float[] split, int offset) {
+               float t = Intersector.intersectLinePlane(vertices[s], vertices[s + 1], vertices[s + 2], vertices[e], vertices[e + 1],
+                       vertices[e + 2], plane, intersection);
                split[offset + 0] = intersection.x;
                split[offset + 1] = intersection.y;
                split[offset + 2] = intersection.z;
-               for(int i = 3; i < stride; i++) {
+               for (int i = 3; i < stride; i++) {
                        float a = vertices[s + i];
                        float b = vertices[e + i];
-                       split[offset + i] = a + t * (b-a);
+                       split[offset + i] = a + t * (b - a);
                }
        }
-       
+
        public static void main (String[] args) {
                Plane plane = new Plane(new Vector3(1, 0, 0), 0);
                SplitTriangle split = new SplitTriangle(3);
-               float[] fTriangle = { -10, 0, 10, -1, 0, 0, -10, 0, 10 };
+               float[] fTriangle = {-10, 0, 10, -1, 0, 0, -10, 0, 10};
                Intersector.splitTriangle(fTriangle, plane, split);
                System.out.println(split);
 
-               float[] triangle = { -10, 0, 10, 10, 0, 0, -10, 0, -10 };
+               float[] triangle = {-10, 0, 10, 10, 0, 0, -10, 0, -10};
                Intersector.splitTriangle(triangle, plane, split);
                System.out.println(split);
        }
-       
+
        public static class SplitTriangle {
                public float[] front;
                public float[] back;
@@ -958,13 +950,10 @@ public final class Intersector {
                boolean frontCurrent = false;
                int frontOffset = 0;
                int backOffset = 0;
-               
-               /**
-                * Creates a new instance, assuming numAttributes attributes per 
-                * triangle vertex.
-                * @param numAttributes must be >= 3
-                */
-               public SplitTriangle(int numAttributes) {
+
+               /** Creates a new instance, assuming numAttributes attributes per triangle vertex.
+                * @param numAttributes must be >= 3 */
+               public SplitTriangle (int numAttributes) {
                        front = new float[numAttributes * 3 * 2];
                        back = new float[numAttributes * 3 * 2];
                        edgeSplit = new float[numAttributes];
@@ -975,17 +964,17 @@ public final class Intersector {
                        return "SplitTriangle [front=" + Arrays.toString(front) + ", back=" + Arrays.toString(back) + ", numFront=" + numFront
                                + ", numBack=" + numBack + ", total=" + total + "]";
                }
-               
-               void setSide(boolean front) {
+
+               void setSide (boolean front) {
                        frontCurrent = front;
                }
-               
-               boolean getSide() {
+
+               boolean getSide () {
                        return frontCurrent;
                }
-               
-               void add(float[] vertex, int offset, int stride) {
-                       if(frontCurrent) {
+
+               void add (float[] vertex, int offset, int stride) {
+                       if (frontCurrent) {
                                System.arraycopy(vertex, offset, front, frontOffset, stride);
                                frontOffset += stride;
                        } else {
@@ -994,7 +983,7 @@ public final class Intersector {
                        }
                }
 
-               void reset() {
+               void reset () {
                        frontCurrent = false;
                        frontOffset = 0;
                        backOffset = 0;
@@ -1003,7 +992,7 @@ public final class Intersector {
                        total = 0;
                }
        }
-       
+
        public static class MinimumTranslationVector {
                public Vector2 normal = new Vector2();
                public float depth = 0;
index 04be970..25cb897 100644 (file)
@@ -19,7 +19,6 @@ package com.badlogic.gdx.math;
 import java.io.Serializable;\r
 \r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
-import com.badlogic.gdx.utils.StringBuilder;\r
 \r
 /** A 3x3 column major matrix for 2D transforms.\r
  * \r
index 9678afe..c92a9bc 100644 (file)
@@ -183,8 +183,7 @@ public class Matrix4 implements Serializable {
                return val;\r
        }\r
 \r
-       /** (Pre-)Multiplies this matrix with the given matrix, storing the result in this matrix. E.g.\r
-        * A.mul(B) results in A := BA.\r
+       /** (Pre-)Multiplies this matrix with the given matrix, storing the result in this matrix. E.g. A.mul(B) results in A := BA.\r
         * \r
         * @param matrix The other matrix\r
         * @return This matrix for chaining. */\r
@@ -684,7 +683,7 @@ public class Matrix4 implements Serializable {
                val[M22] *= scale.z;\r
                return this;\r
        }\r
-       \r
+\r
        public Matrix4 scl (float scale) {\r
                val[M00] *= scale;\r
                val[M11] *= scale;\r
@@ -710,7 +709,8 @@ public class Matrix4 implements Serializable {
                inv();\r
                return tra();\r
        }\r
-       \r
+\r
+       // @off\r
        /*JNI\r
        #include <memory.h>\r
        #include <stdio.h>\r
index 8ef1138..d48ec0c 100644 (file)
@@ -111,11 +111,11 @@ public class Plane implements Serializable {
                else\r
                        return PlaneSide.Front;\r
        }\r
-       \r
+\r
        /** Returns on which side the given point lies relative to the plane and its normal. PlaneSide.Front refers to the side the\r
         * plane normal points to.\r
         * \r
-        * @param x \r
+        * @param x\r
         * @param y\r
         * @param z\r
         * @return The side the point lies relative to the plane */\r
@@ -158,10 +158,10 @@ public class Plane implements Serializable {
                this.normal.set(normal);\r
                d = -point.dot(normal);\r
        }\r
-       \r
-       public void set(float pointX, float pointY, float pointZ, float norX, float norY, float norZ) {\r
+\r
+       public void set (float pointX, float pointY, float pointZ, float norX, float norY, float norZ) {\r
                this.normal.set(norX, norY, norZ);\r
-               d = -(pointX * norX +  pointY * norY + pointZ * norZ);\r
+               d = -(pointX * norX + pointY * norY + pointZ * norZ);\r
        }\r
 \r
        /** Sets this plane from the given plane\r
index 42d4a31..90e3772 100644 (file)
@@ -270,9 +270,9 @@ public class Vector2 implements Serializable {
                r.add(target.tmp().mul(alpha));\r
                return r;\r
        }\r
-       \r
+\r
        @Override\r
-       public int hashCode() {\r
+       public int hashCode () {\r
                final int prime = 31;\r
                int result = 1;\r
                result = prime * result + NumberUtils.floatToIntBits(x);\r
@@ -281,32 +281,24 @@ public class Vector2 implements Serializable {
        }\r
 \r
        @Override\r
-       public boolean equals(Object obj) {\r
-               if (this == obj)\r
-                       return true;\r
-               if (obj == null)\r
-                       return false;\r
-               if (getClass() != obj.getClass())\r
-                       return false;\r
-               Vector2 other = (Vector2) obj;\r
-               if (NumberUtils.floatToIntBits(x) != NumberUtils.floatToIntBits(other.x))\r
-                       return false;\r
-               if (NumberUtils.floatToIntBits(y) != NumberUtils.floatToIntBits(other.y))\r
-                       return false;\r
+       public boolean equals (Object obj) {\r
+               if (this == obj) return true;\r
+               if (obj == null) return false;\r
+               if (getClass() != obj.getClass()) return false;\r
+               Vector2 other = (Vector2)obj;\r
+               if (NumberUtils.floatToIntBits(x) != NumberUtils.floatToIntBits(other.x)) return false;\r
+               if (NumberUtils.floatToIntBits(y) != NumberUtils.floatToIntBits(other.y)) return false;\r
                return true;\r
        }\r
 \r
-       /**\r
-        * Compares this vector with the other vector, using the supplied\r
-        * epsilon for fuzzy equality testing.\r
+       /** Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.\r
         * @param obj\r
         * @param epsilon\r
-        * @return whether the vectors are the same.\r
-        */\r
-       public boolean epsilonEquals(Vector2 obj, float epsilon) {\r
-               if(obj == null) return false;\r
-               if(Math.abs(obj.x - x) > epsilon) return false;\r
-               if(Math.abs(obj.y - y) > epsilon) return false;\r
+        * @return whether the vectors are the same. */\r
+       public boolean epsilonEquals (Vector2 obj, float epsilon) {\r
+               if (obj == null) return false;\r
+               if (Math.abs(obj.x - x) > epsilon) return false;\r
+               if (Math.abs(obj.y - y) > epsilon) return false;\r
                return true;\r
        }\r
 }\r
index 8770675..4ee6597 100644 (file)
@@ -418,33 +418,27 @@ public class Vector3 implements Serializable {
                return true;\r
        }\r
 \r
-       /**\r
-        * Compares this vector with the other vector, using the supplied\r
-        * epsilon for fuzzy equality testing.\r
+       /** Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.\r
         * @param obj\r
         * @param epsilon\r
-        * @return whether the vectors are the same.\r
-        */\r
-       public boolean epsilonEquals(Vector3 obj, float epsilon) {\r
-               if(obj == null) return false;\r
-               if(Math.abs(obj.x - x) > epsilon) return false;\r
-               if(Math.abs(obj.y - y) > epsilon) return false;\r
-               if(Math.abs(obj.z - z) > epsilon) return false;\r
+        * @return whether the vectors are the same. */\r
+       public boolean epsilonEquals (Vector3 obj, float epsilon) {\r
+               if (obj == null) return false;\r
+               if (Math.abs(obj.x - x) > epsilon) return false;\r
+               if (Math.abs(obj.y - y) > epsilon) return false;\r
+               if (Math.abs(obj.z - z) > epsilon) return false;\r
                return true;\r
        }\r
-       \r
-       /**\r
-        * Compares this vector with the other vector, using the supplied\r
-        * epsilon for fuzzy equality testing.\r
-        * @return whether the vectors are the same.\r
-        */\r
-       public boolean epsilonEquals(float x, float y, float z, float epsilon) {\r
-               if(Math.abs(x - this.x) > epsilon) return false;\r
-               if(Math.abs(y - this.y) > epsilon) return false;\r
-               if(Math.abs(z - this.z) > epsilon) return false;\r
+\r
+       /** Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.\r
+        * @return whether the vectors are the same. */\r
+       public boolean epsilonEquals (float x, float y, float z, float epsilon) {\r
+               if (Math.abs(x - this.x) > epsilon) return false;\r
+               if (Math.abs(y - this.y) > epsilon) return false;\r
+               if (Math.abs(z - this.z) > epsilon) return false;\r
                return true;\r
        }\r
-       \r
+\r
        /** Scales the vector components by the given scalars.\r
         * \r
         * @param scalarX\r
index 722f026..32d6d8b 100644 (file)
@@ -24,6 +24,7 @@ import com.badlogic.gdx.physics.box2d.BodyDef.BodyType;
 /** A rigid body. These are created via World.CreateBody.\r
  * @author mzechner */\r
 public class Body {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
@@ -608,6 +609,7 @@ public class Body {
                jniSetType(addr, type.getValue());\r
        }\r
        \r
+       // @off\r
        /*JNI\r
 inline b2BodyType getBodyType( int type )\r
 {\r
index c7582af..bd69ca2 100644 (file)
@@ -21,7 +21,6 @@ import java.util.List;
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.Color;\r
-import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.Matrix4;\r
@@ -88,10 +87,9 @@ public class Box2DDebugRenderer {
                if (drawBodies || drawAABBs) {\r
                        for (Iterator<Body> iter = world.getBodies(); iter.hasNext();) {\r
                                Body body = iter.next();\r
-                               \r
-                               if (body.isActive() == false && !drawInactiveBodies)\r
-                                       continue;\r
-                               \r
+\r
+                               if (body.isActive() == false && !drawInactiveBodies) continue;\r
+\r
                                Transform transform = body.getTransform();\r
                                int len = body.getFixtureList().size();\r
                                List<Fixture> fixtures = body.getFixtureList();\r
@@ -296,7 +294,7 @@ public class Box2DDebugRenderer {
                Vector2 point = worldManifold.getPoints()[0];\r
                renderer.point(point.x, point.y, 0);\r
        }\r
-       \r
+\r
        public boolean isDrawBodies () {\r
                return drawBodies;\r
        }\r
index d90b502..f1706a4 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d;\r
 \r
 import com.badlogic.gdx.math.Vector2;\r
 \r
 public class ChainShape extends Shape {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 24ff33c..357e52d 100644 (file)
@@ -21,6 +21,7 @@ import com.badlogic.gdx.math.Vector2;
 /** A circle shape.\r
  * @author mzechner */\r
 public class CircleShape extends Shape {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index e6b5031..c77db86 100644 (file)
@@ -22,6 +22,7 @@ import com.badlogic.gdx.math.Vector2;
  * filtered). Therefore a contact object may exist that has no contact points.\r
  * @author mzechner */\r
 public class Contact {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 729f5dc..b118bb5 100644 (file)
@@ -20,6 +20,7 @@ package com.badlogic.gdx.physics.box2d;
  * body collisions. These match up one-to-one with the contact points in b2Manifold.\r
  * @author mzechner */\r
 public class ContactImpulse {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 5433a84..85bd618 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d;\r
 \r
 import com.badlogic.gdx.math.Vector2;\r
@@ -20,6 +21,7 @@ import com.badlogic.gdx.math.Vector2;
 /** A line segment (edge) shape. These can be connected in chains or loops to other edge shapes. The connectivity information is\r
  * used to ensure correct contact normals. */\r
 public class EdgeShape extends Shape {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 9b1fca2..a131bb0 100644 (file)
@@ -21,6 +21,7 @@ import com.badlogic.gdx.physics.box2d.Shape.Type;
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
 \r
 public class Fixture {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index a3e79e0..db2f21c 100644 (file)
@@ -20,6 +20,7 @@ import com.badlogic.gdx.math.Vector2;
 import com.badlogic.gdx.physics.box2d.JointDef.JointType;\r
 \r
 public abstract class Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h> \r
         */\r
index 467f1c4..2829433 100644 (file)
@@ -19,6 +19,7 @@ package com.badlogic.gdx.physics.box2d;
 import com.badlogic.gdx.math.Vector2;\r
 \r
 public class Manifold {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index c603e00..2ea4032 100644 (file)
@@ -19,6 +19,7 @@ package com.badlogic.gdx.physics.box2d;
 import com.badlogic.gdx.math.Vector2;\r
 \r
 public class PolygonShape extends Shape {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 6978b9e..4e806a6 100644 (file)
@@ -22,6 +22,7 @@ package com.badlogic.gdx.physics.box2d;
  * NOTE: YOU NEED TO DISPOSE SHAPES YOU CREATED YOURSELF AFTER YOU NO LONGER USE THEM! E.g. after calling body.createFixture();\r
  * @author mzechner */\r
 public abstract class Shape {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 3ceed3e..e796ff6 100644 (file)
@@ -50,6 +50,7 @@ import com.badlogic.gdx.utils.Pool;
  * memory management facilities.\r
  * @author mzechner */\r
 public final class World implements Disposable {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
 \r
index fa704d2..0555310 100644 (file)
@@ -22,6 +22,7 @@ import com.badlogic.gdx.physics.box2d.World;
 /** A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a\r
  * massless, rigid rod. */\r
 public class DistanceJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index a6a86ef..450048f 100644 (file)
@@ -21,6 +21,7 @@ import com.badlogic.gdx.physics.box2d.World;
 \r
 /** Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction. */\r
 public class FrictionJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h> \r
         */\r
index a98e525..c727c4e 100644 (file)
@@ -25,6 +25,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * 1/length.\r
  * @warning The revolute and prismatic joints must be attached to fixed bodies (which must be body1 on those joints). */\r
 public class GearJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h> \r
         */\r
index e2dc615..c88e1aa 100644 (file)
@@ -24,6 +24,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual\r
  * because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed. */\r
 public class MouseJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index beed26e..b610722 100644 (file)
@@ -23,6 +23,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint\r
  * friction. */\r
 public class PrismaticJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 6679326..9c97098 100644 (file)
@@ -24,6 +24,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * * length2 <= constant Yes, the force transmitted is scaled by the ratio. The pulley also enforces a maximum length limit on\r
  * both sides. This is useful to prevent one side of the pulley hitting the top. */\r
 public class PulleyJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h> \r
         */\r
index 7f523d0..18fd64d 100644 (file)
@@ -24,6 +24,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is\r
  * provided so that infinite forces are not generated. */\r
 public class RevoluteJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h> \r
         */\r
index cd655f8..9ed3dab 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.physics.box2d.Joint;\r
@@ -23,6 +24,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * dynamically modify the length would have some sponginess, so I chose not to implement it that way. See b2DistanceJoint if you\r
  * want to dynamically control length. */\r
 public class RopeJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h>\r
         */\r
index 19a97d0..23938a5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.math.Vector2;\r
@@ -34,4 +35,4 @@ public class RopeJointDef extends JointDef {
 \r
        /** The maximum length of the rope. Warning: this must be larger than b2_linearSlop or the joint will have no effect. */\r
        public float maxLength = 0;\r
-}
\ No newline at end of file
+}\r
index eda55ae..8b808b5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.physics.box2d.Joint;\r
@@ -22,6 +23,7 @@ import com.badlogic.gdx.physics.box2d.World;
  * You can use a joint limit to restrict the range of motion and a joint motor to drive the rotation or to model rotational\r
  * friction. This joint is designed for vehicle suspensions. */\r
 public class WheelJoint extends Joint {\r
+       // @off\r
        /*JNI\r
 #include <Box2D/Box2D.h> \r
         */\r
index 5198134..eb919c0 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.physics.box2d.joints;\r
 \r
 import com.badlogic.gdx.math.Vector2;\r
@@ -59,4 +60,4 @@ public class WheelJointDef extends JointDef {
 \r
        /** Suspension damping ratio, one indicates critical damping */\r
        public float dampingRatio = 0.7f;\r
-}
\ No newline at end of file
+}\r
index 3022473..95a66f8 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d;\r
 \r
 import com.badlogic.gdx.utils.Pool.Poolable;\r
@@ -123,4 +124,4 @@ public class Event implements Poolable {
        public Stage getStage () {\r
                return stage;\r
        }\r
-}
\ No newline at end of file
+}\r
index f987d5b..843a852 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d;\r
 \r
 /** Low level interface for receiving events. Typically there is a listener class for each specific event class.\r
@@ -20,4 +21,4 @@ package com.badlogic.gdx.scenes.scene2d;
  * @see InputEvent */\r
 public interface EventListener {\r
        public boolean handle (Event event);\r
-}
\ No newline at end of file
+}\r
index cfd34b7..f76c634 100644 (file)
@@ -23,7 +23,6 @@ import com.badlogic.gdx.math.Rectangle;
 import com.badlogic.gdx.math.Vector2;
 import com.badlogic.gdx.scenes.scene2d.utils.Cullable;
 import com.badlogic.gdx.utils.Array;
-import com.badlogic.gdx.utils.DelayedRemovalArray;
 import com.badlogic.gdx.utils.SnapshotArray;
 
 /** 2D scene graph node that may contain other actors.
index dd8e299..5002b57 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d;\r
 \r
 import com.badlogic.gdx.Input.Buttons;\r
@@ -122,4 +123,4 @@ public class InputEvent extends Event {
        static public enum Type {\r
                touchDown, touchUp, touchDragged, mouseMoved, enter, exit, scrolled, keyDown, keyUp, keyTyped\r
        }\r
-}
\ No newline at end of file
+}\r
index c1d706c..3ad2cc1 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 import com.badlogic.gdx.graphics.Color;\r
@@ -55,4 +56,4 @@ public class AlphaAction extends TemporalAction {
        public void setAlpha (float alpha) {\r
                this.end = alpha;\r
        }\r
-}
\ No newline at end of file
+}\r
index 34094ba..9e57a9a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.scenes.scene2d.actions;\r
+ ******************************************************************************/\r
 \r
-import com.badlogic.gdx.scenes.scene2d.Actor;\r
+package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** Delays execution of an action or inserts a pause in a {@link SequenceAction}. \r
+/** Delays execution of an action or inserts a pause in a {@link SequenceAction}.\r
  * @author Nathan Sweet */\r
 public class DelayAction extends DelegateAction {\r
        private float duration, time;\r
@@ -60,4 +59,4 @@ public class DelayAction extends DelegateAction {
        public void setDuration (float duration) {\r
                this.duration = duration;\r
        }\r
-}
\ No newline at end of file
+}\r
index fa0fb00..cac4db7 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** An action that has a float, whose value is transitioned over time. \r
+/** An action that has a float, whose value is transitioned over time.\r
  * @author Nathan Sweet */\r
 public class FloatAction extends TemporalAction {\r
        private float start, end;\r
@@ -68,4 +69,4 @@ public class FloatAction extends TemporalAction {
        public void setEnd (float end) {\r
                this.end = end;\r
        }\r
-}
\ No newline at end of file
+}\r
index 6e50763..7844ad0 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** An action that has an int, whose value is transitioned over time. \r
+/** An action that has an int, whose value is transitioned over time.\r
  * @author Nathan Sweet */\r
 public class IntAction extends TemporalAction {\r
        private int start, end;\r
@@ -68,4 +69,4 @@ public class IntAction extends TemporalAction {
        public void setEnd (int end) {\r
                this.end = end;\r
        }\r
-}
\ No newline at end of file
+}\r
index 0a77f41..05c329d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 /** Moves an actor to a relative position.\r
@@ -44,4 +45,4 @@ public class MoveByAction extends RelativeTemporalAction {
        public void setAmountY (float y) {\r
                amountY = y;\r
        }\r
-}
\ No newline at end of file
+}\r
index 947a8b0..c8fbd02 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** Moves an actor from its current position to a specific position. \r
+/** Moves an actor from its current position to a specific position.\r
  * @author Nathan Sweet */\r
 public class MoveToAction extends TemporalAction {\r
        private float startX, startY;\r
@@ -50,4 +51,4 @@ public class MoveToAction extends TemporalAction {
        public void setY (float y) {\r
                endY = y;\r
        }\r
-}
\ No newline at end of file
+}\r
index 2bb4dbf..2ea2d74 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 /** Base class for actions that transition over time using the percent complete since the last frame.\r
@@ -30,4 +31,4 @@ abstract public class RelativeTemporalAction extends TemporalAction {
        }\r
 \r
        abstract protected void updateRelative (float percentDelta);\r
-}
\ No newline at end of file
+}\r
index ea9d5da..0a83d5f 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 import com.badlogic.gdx.scenes.scene2d.Action;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
 \r
-/** Removes the actor the action is attached to or another actor. \r
+/** Removes the actor the action is attached to or another actor.\r
  * @author Nathan Sweet */\r
 public class RemoveActorAction extends Action {\r
        private Actor removeActor;\r
@@ -49,4 +50,4 @@ public class RemoveActorAction extends Action {
        public void setRemoveActor (Actor removeActor) {\r
                this.removeActor = removeActor;\r
        }\r
-}
\ No newline at end of file
+}\r
index 21b307d..0a7d131 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 /** Sets the actor's rotation from its current value to a relative value.\r
@@ -31,4 +32,4 @@ public class RotateByAction extends RelativeTemporalAction {
        public void setAmount (float rotationAmount) {\r
                amount = rotationAmount;\r
        }\r
-}
\ No newline at end of file
+}\r
index 8d2ca3c..df37bea 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** Sets the actor's rotation from its current value to a specific value. \r
+/** Sets the actor's rotation from its current value to a specific value.\r
  * @author Nathan Sweet */\r
 public class RotateToAction extends TemporalAction {\r
        private float start, end;\r
@@ -35,4 +36,4 @@ public class RotateToAction extends TemporalAction {
        public void setRotation (float rotation) {\r
                this.end = rotation;\r
        }\r
-}
\ No newline at end of file
+}\r
index 6732dce..7f71eb8 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 /** Scales an actor's scale to a relative size.\r
@@ -50,4 +51,4 @@ public class ScaleByAction extends RelativeTemporalAction {
                this.amountY = y;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index e8500bd..d5c1d66 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** Sets the actor's scale from its current value to a specific value. \r
+/** Sets the actor's scale from its current value to a specific value.\r
  * @author Nathan Sweet */\r
 public class ScaleToAction extends TemporalAction {\r
        private float startX, startY;\r
@@ -55,4 +56,4 @@ public class ScaleToAction extends TemporalAction {
        public void setY (float y) {\r
                this.endY = y;\r
        }\r
-}
\ No newline at end of file
+}\r
index 0bc3ba6..d185961 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** Executes a number of actions one at a time. \r
+/** Executes a number of actions one at a time.\r
  * @author Nathan Sweet */\r
 public class SequenceAction extends ParallelAction {\r
        private int index;\r
@@ -33,4 +34,4 @@ public class SequenceAction extends ParallelAction {
                super.restart();\r
                index = 0;\r
        }\r
-}
\ No newline at end of file
+}\r
index 357cb1c..87475e1 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 /** Moves an actor from its current size to a relative size.\r
@@ -44,4 +45,4 @@ public class SizeByAction extends RelativeTemporalAction {
        public void setAmountHeight (float height) {\r
                amountHeight = height;\r
        }\r
-}
\ No newline at end of file
+}\r
index 9f8855d..07184f2 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
-/** Moves an actor from its current size to a specific size. \r
+/** Moves an actor from its current size to a specific size.\r
  * @author Nathan Sweet */\r
 public class SizeToAction extends TemporalAction {\r
        private float startWidth, startHeight;\r
@@ -50,4 +51,4 @@ public class SizeToAction extends TemporalAction {
        public void setHeight (float height) {\r
                endHeight = height;\r
        }\r
-}
\ No newline at end of file
+}\r
index 2ca69cd..8f2272f 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 import com.badlogic.gdx.math.Interpolation;\r
@@ -102,4 +103,4 @@ abstract public class TemporalAction extends Action {
        public void setReverse (boolean reverse) {\r
                this.reverse = reverse;\r
        }\r
-}
\ No newline at end of file
+}\r
index 43ef9de..82c8d2c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.actions;\r
 \r
 import com.badlogic.gdx.scenes.scene2d.Action;\r
@@ -35,4 +36,4 @@ public class VisibleAction extends Action {
        public void setVisible (boolean visible) {\r
                this.visible = visible;\r
        }\r
-}
\ No newline at end of file
+}\r
index 2456b82..9c6bdf7 100644 (file)
@@ -16,7 +16,6 @@
 \r
 package com.badlogic.gdx.scenes.scene2d.ui;\r
 \r
-import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
 /** Manages a group of buttons to enforce a minimum and maximum number of checked buttons. This enables "radio button"\r
index 48bc333..cc3f932 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.ui;\r
 \r
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
-import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Align;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Drawable;\r
 \r
@@ -31,7 +31,7 @@ public class CheckBox extends TextButton {
        public CheckBox (String text, Skin skin) {\r
                this(text, skin.get(CheckBoxStyle.class));\r
        }\r
-       \r
+\r
        public CheckBox (String text, Skin skin, String styleName) {\r
                this(text, skin.get(styleName, CheckBoxStyle.class));\r
        }\r
@@ -90,4 +90,4 @@ public class CheckBox extends TextButton {
                        this.fontColor = new Color(style.fontColor);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 8c890b1..db27a04 100644 (file)
@@ -19,7 +19,6 @@ package com.badlogic.gdx.scenes.scene2d.ui;
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;\r
-import com.badlogic.gdx.graphics.g2d.NinePatch;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.math.Rectangle;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
index 1a4767e..e68d5da 100644 (file)
 \r
 package com.badlogic.gdx.scenes.scene2d.ui;\r
 \r
-import java.awt.event.ActionEvent;\r
-import java.awt.event.ActionListener;\r
-\r
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;\r
-import com.badlogic.gdx.graphics.g2d.NinePatch;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.math.Interpolation;\r
 import com.badlogic.gdx.math.Vector2;\r
@@ -30,12 +26,12 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.InputListener;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
-import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Drawable;\r
-import com.badlogic.gdx.scenes.scene2d.utils.ScissorStack;\r
 import com.badlogic.gdx.utils.Pools;\r
 \r
+import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;\r
+\r
 /** A select box (aka a drop-down list) allows a user to choose one of a number of values from a list. When inactive, the selected\r
  * value is displayed. When activated, it shows the list of values that may be selected.\r
  * <p>\r
index e6b6c01..024695f 100644 (file)
@@ -23,12 +23,11 @@ import com.badlogic.gdx.graphics.Color;
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
-import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
 import com.badlogic.gdx.math.Rectangle;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
+import com.badlogic.gdx.scenes.scene2d.Group;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.InputListener;\r
-import com.badlogic.gdx.scenes.scene2d.Group;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Clipboard;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Drawable;\r
index 76c9449..d2a5556 100644 (file)
@@ -6,7 +6,6 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.Group;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Touchpad.TouchpadStyle;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Drawable;\r
index e491ac6..d07de4a 100644 (file)
@@ -20,14 +20,11 @@ import com.badlogic.gdx.graphics.Color;
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFontCache;\r
-import com.badlogic.gdx.graphics.g2d.NinePatch;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.math.Vector2;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.InputListener;\r
-import com.badlogic.gdx.scenes.scene2d.Group;\r
-import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.Touchable;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Drawable;\r
 \r
index d79c328..48d5bc2 100644 (file)
@@ -20,9 +20,9 @@ import com.badlogic.gdx.input.GestureDetector;
 import com.badlogic.gdx.input.GestureDetector.GestureAdapter;\r
 import com.badlogic.gdx.math.Vector2;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
-import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.Event;\r
 import com.badlogic.gdx.scenes.scene2d.EventListener;\r
+import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 \r
 /** Detects tap, longPress, fling, pan, zoom, and pinch gestures on an actor.\r
  * @see GestureDetector\r
index e9d30d6..32a0695 100644 (file)
@@ -16,7 +16,6 @@
 \r
 package com.badlogic.gdx.scenes.scene2d.utils;\r
 \r
-import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 \r
 /** Detects a click on an actor. The touch must go down over the actor and go up over the actor or within the\r
index 2d84c46..5e5e09e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.scenes.scene2d.utils;\r
 \r
 import com.badlogic.gdx.math.Rectangle;\r
@@ -27,4 +28,4 @@ import com.badlogic.gdx.scenes.scene2d.Group;
 public interface Cullable {\r
        /** @param cullingArea The culling area in the child actor's coordinates. */\r
        public void setCullingArea (Rectangle cullingArea);\r
-}
\ No newline at end of file
+}\r
index bbdbd00..8f8bc05 100644 (file)
@@ -20,10 +20,7 @@ import java.util.Iterator;
 import java.util.NoSuchElementException;\r
 \r
 import com.badlogic.gdx.math.MathUtils;\r
-import com.badlogic.gdx.utils.ObjectMap.Entries;\r
 import com.badlogic.gdx.utils.ObjectMap.Entry;\r
-import com.badlogic.gdx.utils.ObjectMap.Keys;\r
-import com.badlogic.gdx.utils.ObjectMap.Values;\r
 \r
 /** An ordered or unordered map of objects. This implementation uses arrays to store the keys and values, which means\r
  * {@link #getKey(Object, boolean) gets} do a comparison for each key in the map. This may be acceptable for small maps and has the\r
index 985db1e..673f559 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 /** @author Nathan Sweet */\r
@@ -149,4 +150,4 @@ public class BinaryHeap<T> {
                        this.value = value;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index d506645..e9ab3db 100644 (file)
@@ -32,7 +32,7 @@ import java.nio.ShortBuffer;
 public class BufferUtils {\r
        static Array<ByteBuffer> unsafeBuffers = new Array<ByteBuffer>();\r
        static int allocatedUnsafe = 0;\r
-       \r
+\r
        /** Copies numFloats floats from src starting at offset to dst. Dst is assumed to be a direct {@link Buffer}. The method will\r
         * crash if that is not the case. The position and limit of the buffer are ignored, the copy is placed at position 0 in the\r
         * buffer. After the copying process the position of the buffer is set to 0 and its limit is set to numFloats * 4 if it is a\r
@@ -221,7 +221,7 @@ public class BufferUtils {
                else\r
                        throw new GdxRuntimeException("Can't copy to a " + dst.getClass().getName() + " instance");\r
        }\r
-       \r
+\r
        public static FloatBuffer newFloatBuffer (int numFloats) {\r
                ByteBuffer buffer = ByteBuffer.allocateDirect(numFloats * 4);\r
                buffer.order(ByteOrder.nativeOrder());\r
@@ -263,7 +263,8 @@ public class BufferUtils {
                buffer.order(ByteOrder.nativeOrder());\r
                return buffer.asLongBuffer();\r
        }\r
-       \r
+\r
+       // @off\r
        /*JNI \r
        #include <stdio.h>\r
        #include <stdlib.h>\r
index 74c4cf1..d52aedf 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import java.util.Comparator;\r
@@ -146,4 +147,4 @@ public class DelayedRemovalArray<T> extends Array<T> {
                if (iterating) throw new IllegalStateException("Invalid between begin/end.");\r
                super.truncate(newSize);\r
        }\r
-}
\ No newline at end of file
+}\r
index bef8894..07c424c 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import com.badlogic.gdx.jnigen.AntScriptGenerator;\r
 import com.badlogic.gdx.jnigen.BuildConfig;\r
-import com.badlogic.gdx.jnigen.BuildExecutor;\r
 import com.badlogic.gdx.jnigen.BuildTarget;\r
-import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
-import com.badlogic.gdx.jnigen.JniGenSharedLibraryLoader;\r
 import com.badlogic.gdx.jnigen.BuildTarget.TargetOs;\r
+import com.badlogic.gdx.jnigen.NativeCodeGenerator;\r
 \r
-/**\r
- * Builds the JNI wrappers via gdx-jnigen.\r
- * @author mzechner\r
- *\r
- */\r
+/** Builds the JNI wrappers via gdx-jnigen.\r
+ * @author mzechner */\r
 public class GdxBuild {\r
-       public static void main(String[] args) throws Exception {\r
+       public static void main (String[] args) throws Exception {\r
                String JNI_DIR = "jni";\r
                String LIBS_DIR = "libs";\r
-               \r
-//             // MD5Jni\r
-//             String[] includes = { "**/MD5Jni.java" };\r
-//             new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/", includes, null);\r
-//             \r
-//             // Matrix4\r
-//             includes = new String[] { "**/Matrix4.java" };\r
-//             new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/", includes, null);\r
-//             \r
-//             // ETC1\r
-//             includes = new String[] { "**/ETC1.java" };\r
-//             new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/etc1/", includes, null);\r
-//             \r
-//             // GDX2D\r
-//             includes = new String[] { "**/Gdx2DPixmap.java" };\r
-//             new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/gdx2d/", includes, null);\r
-//             \r
-//             // Box2D\r
-//             includes = new String[] { "**/box2d/**"};\r
-//             new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/Box2D/", includes, null);\r
-//             \r
-//             new NativeCodeGenerator().generate("src", "bin", JNI_DIR, new String[] { "**/*" }, null);\r
+\r
+// // MD5Jni\r
+// String[] includes = { "**/MD5Jni.java" };\r
+// new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/", includes, null);\r
+//\r
+// // Matrix4\r
+// includes = new String[] { "**/Matrix4.java" };\r
+// new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/", includes, null);\r
+//\r
+// // ETC1\r
+// includes = new String[] { "**/ETC1.java" };\r
+// new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/etc1/", includes, null);\r
+//\r
+// // GDX2D\r
+// includes = new String[] { "**/Gdx2DPixmap.java" };\r
+// new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/gdx2d/", includes, null);\r
 //\r
-//             // build\r
-//             String[] headerDirs = { "./", "etc1/", "gdx2d/", "Box2D/" };\r
-//             BuildConfig config = new BuildConfig("gdx", "../target/native", LIBS_DIR, JNI_DIR);\r
-//             BuildTarget target = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
-//             target.compilerPrefix = "";\r
-//             target.excludeFromMasterBuildFile = true;\r
-//             target.headerDirs = headerDirs;\r
-//             \r
-//             new AntScriptGenerator().generate(config, target);\r
-//             BuildExecutor.executeAnt(JNI_DIR + "/build-windows32.xml", "");\r
-               \r
+// // Box2D\r
+// includes = new String[] { "**/box2d/**"};\r
+// new NativeCodeGenerator().generate("src", "bin", JNI_DIR + "/Box2D/", includes, null);\r
+//\r
+// new NativeCodeGenerator().generate("src", "bin", JNI_DIR, new String[] { "**/*" }, null);\r
+//\r
+// // build\r
+// String[] headerDirs = { "./", "etc1/", "gdx2d/", "Box2D/" };\r
+// BuildConfig config = new BuildConfig("gdx", "../target/native", LIBS_DIR, JNI_DIR);\r
+// BuildTarget target = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
+// target.compilerPrefix = "";\r
+// target.excludeFromMasterBuildFile = true;\r
+// target.headerDirs = headerDirs;\r
+//\r
+// new AntScriptGenerator().generate(config, target);\r
+// BuildExecutor.executeAnt(JNI_DIR + "/build-windows32.xml", "");\r
+\r
                // generate C/C++ code\r
-               new NativeCodeGenerator().generate("src", "bin", JNI_DIR, new String[] { "**/*" }, null);\r
-               \r
+               new NativeCodeGenerator().generate("src", "bin", JNI_DIR, new String[] {"**/*"}, null);\r
+\r
                // generate build scripts, for win32 only\r
                // custom target for testing purposes\r
                BuildTarget win32home = BuildTarget.newDefaultTarget(TargetOs.Windows, false);\r
@@ -81,10 +77,11 @@ public class GdxBuild {
                BuildTarget lin64 = BuildTarget.newDefaultTarget(TargetOs.Linux, true);\r
                BuildTarget android = BuildTarget.newDefaultTarget(TargetOs.Android, false);\r
                BuildTarget mac = BuildTarget.newDefaultTarget(TargetOs.MacOsX, false);\r
-               new AntScriptGenerator().generate(new BuildConfig("gdx", "../target/native", LIBS_DIR, JNI_DIR), mac, win32home, win32, win64, lin32, lin64, android);\r
-               \r
+               new AntScriptGenerator().generate(new BuildConfig("gdx", "../target/native", LIBS_DIR, JNI_DIR), mac, win32home, win32,\r
+                       win64, lin32, lin64, android);\r
+\r
                // build natives\r
-//             BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
-//             BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");\r
+// BuildExecutor.executeAnt("jni/build-windows32home.xml", "-v");\r
+// BuildExecutor.executeAnt("jni/build.xml", "pack-natives -v");\r
        }\r
-}
\ No newline at end of file
+}\r
index cc804e0..f8ae0d5 100644 (file)
@@ -32,7 +32,8 @@ public class GdxNativesLoader {
        static public boolean isLinux = System.getProperty("os.name").contains("Linux");\r
        static public boolean isMac = System.getProperty("os.name").contains("Mac");\r
        static public boolean is64Bit = System.getProperty("os.arch").equals("amd64");\r
-       static public File nativesDir = new File(System.getProperty("java.io.tmpdir") + "/libgdx" + System.getProperty("user.name") + "/" + crc("gdx.dll"));\r
+       static public File nativesDir = new File(System.getProperty("java.io.tmpdir") + "/libgdx" + System.getProperty("user.name")\r
+               + "/" + crc("gdx.dll"));\r
        static public String path;\r
 \r
        static private String crc (String nativeFile) {\r
index 026486a..9c53dad 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import java.io.IOException;\r
@@ -29,8 +30,7 @@ import com.badlogic.gdx.files.FileHandle;
  * directory.\r
  * @author mzechner */\r
 public class GwtModuleGenerator {\r
-       private static void gatherJavaFiles (FileHandle dir, Set<String> names, Map<String, FileHandle> fileHandles,\r
-               boolean recursive) {\r
+       private static void gatherJavaFiles (FileHandle dir, Set<String> names, Map<String, FileHandle> fileHandles, boolean recursive) {\r
                if (dir.name().equals(".svn")) return;\r
                FileHandle[] files = dir.list();\r
                for (FileHandle file : files) {\r
@@ -39,7 +39,7 @@ public class GwtModuleGenerator {
                        } else {\r
                                if (file.extension().equals("java")) {\r
                                        System.out.println(file.name());\r
-                                       if(names.contains(file.name())) System.out.println(file.name() + " duplicate!");\r
+                                       if (names.contains(file.name())) System.out.println(file.name() + " duplicate!");\r
                                        names.add(file.name());\r
                                        fileHandles.put(file.name(), file);\r
                                }\r
@@ -51,7 +51,8 @@ public class GwtModuleGenerator {
                Set<String> excludes = new HashSet<String>();\r
                Map<String, FileHandle> excludesHandles = new HashMap<String, FileHandle>();\r
                System.out.println("Excludes -------------------------------------------------");\r
-               gatherJavaFiles(new FileHandle("../backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx"), excludes, excludesHandles, true);\r
+               gatherJavaFiles(new FileHandle("../backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/emu/com/badlogic/gdx"),\r
+                       excludes, excludesHandles, true);\r
                System.out.println("#" + excludes.size());\r
 \r
                // build and shared library loading utils\r
@@ -59,7 +60,7 @@ public class GwtModuleGenerator {
                excludes.add("GdxNativesLoader.java");\r
                excludes.add("GwtModuleGenerator.java");\r
                excludes.add("SharedLibraryLoader.java");\r
-               \r
+\r
                // native pixmap routines\r
                excludes.add("Gdx2DPixmap.java");\r
                excludes.add("PixmapIO.java");\r
@@ -70,20 +71,20 @@ public class GwtModuleGenerator {
                // remote input\r
                excludes.add("RemoteInput.java");\r
                excludes.add("RemoteSender.java");\r
-               \r
+\r
                // tiled support\r
                excludes.add("TiledLoader.java"); // FIXME?\r
                excludes.add("TileMapRendererLoader.java"); // FIXME?\r
-               \r
+\r
                // various utils\r
                excludes.add("AtomicQueue.java");\r
                excludes.add("LittleEndianInputStream.java");\r
                excludes.add("PauseableThread.java");\r
                excludes.add("DesktopClipboard.java");\r
                excludes.add("AndroidClipboard.java");\r
-               \r
+\r
                // scene2d ui package\r
-//             gatherJavaFiles(new FileHandle("src/com/badlogic/gdx/scenes/scene2d/ui"), excludes, excludesHandles, true);\r
+// gatherJavaFiles(new FileHandle("src/com/badlogic/gdx/scenes/scene2d/ui"), excludes, excludesHandles, true);\r
 \r
                Set<String> includes = new HashSet<String>();\r
                Map<String, FileHandle> includesHandles = new TreeMap<String, FileHandle>();\r
@@ -98,7 +99,7 @@ public class GwtModuleGenerator {
                        includesHandles.remove(include);\r
                        System.out.println("excluded '" + include + "'");\r
                }\r
-               \r
+\r
                System.out.println("diff: " + includesHandles.size());\r
 \r
                StringWriter writer = new StringWriter();\r
@@ -107,7 +108,7 @@ public class GwtModuleGenerator {
                builder.element("module").attribute("rename-to", "com.badlogic.gdx");\r
                builder.element("inherits").attribute("name", "com.esotericsoftware.tablelayout").pop();\r
                builder.element("source").attribute("path", "gdx");\r
-               for(String include: includesHandles.keySet()) {\r
+               for (String include : includesHandles.keySet()) {\r
                        String name = includesHandles.get(include).path().replace("\\", "/").replace("src/com/badlogic/gdx/", "");\r
                        builder.element("include").attribute("name", name).pop();\r
                }\r
@@ -118,7 +119,7 @@ public class GwtModuleGenerator {
                builder.pop();\r
                builder.close();\r
                System.out.println(writer);\r
-               \r
+\r
                new FileHandle("src/com/badlogic/gdx.gwt.xml").writeString(writer.toString(), false);\r
        }\r
-}
\ No newline at end of file
+}\r
index 16e5d0a..4306e12 100644 (file)
@@ -29,7 +29,6 @@ import java.util.ArrayList;
 import java.util.Collection;\r
 import java.util.Collections;\r
 import java.util.HashMap;\r
-import java.util.List;\r
 import java.util.Map;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
index 777129b..57607f7 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.utils;\r
 \r
 import java.io.IOException;\r
-import java.io.StringWriter;\r
 import java.io.Writer;\r
 import java.util.regex.Pattern;\r
 \r
index 44d6863..7d41983 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import java.lang.reflect.Constructor;\r
@@ -59,4 +60,4 @@ public class ReflectionPool<T> extends Pool<T> {
                        }\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index c38a8c2..b2151b2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import com.badlogic.gdx.math.Vector2;\r
@@ -100,4 +101,4 @@ public enum Scaling {
                }\r
                return temp;\r
        }\r
-}
\ No newline at end of file
+}\r
index 42aaac5..cac8e9a 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import java.io.File;\r
@@ -25,31 +26,23 @@ import java.util.zip.CRC32;
 import java.util.zip.ZipEntry;\r
 import java.util.zip.ZipFile;\r
 \r
-\r
-/**\r
- * Loads shared libraries from a natives jar file (desktop) or arm folders (Android). For desktop projects,\r
- * have the natives jar in the classpath, for Android projects put the shared libraries in the libs/armeabi\r
- * and libs/armeabi-v7a folders.\r
- *\r
- * @author mzechner\r
- *\r
- */\r
+/** Loads shared libraries from a natives jar file (desktop) or arm folders (Android). For desktop projects, have the natives jar\r
+ * in the classpath, for Android projects put the shared libraries in the libs/armeabi and libs/armeabi-v7a folders.\r
+ * \r
+ * @author mzechner */\r
 public class SharedLibraryLoader {\r
        private static Set<String> loadedLibraries = new HashSet<String>();\r
        private String nativesJar;\r
-       \r
-       public SharedLibraryLoader() {\r
+\r
+       public SharedLibraryLoader () {\r
        }\r
-       \r
-       /**\r
-        * Fetches the natives from the given natives jar file. Used\r
-        * for testing a shared lib on the fly.\r
-        * @param nativesJar\r
-        */\r
-       public SharedLibraryLoader(String nativesJar) {\r
+\r
+       /** Fetches the natives from the given natives jar file. Used for testing a shared lib on the fly.\r
+        * @param nativesJar */\r
+       public SharedLibraryLoader (String nativesJar) {\r
                this.nativesJar = nativesJar;\r
        }\r
-       \r
+\r
        private String crc (String nativeFile) {\r
                InputStream input = SharedLibraryLoader.class.getResourceAsStream("/" + nativeFile);\r
                if (input == null) return "" + System.nanoTime(); // fallback\r
@@ -69,7 +62,7 @@ public class SharedLibraryLoader {
                }\r
                return Long.toString(crc.getValue());\r
        }\r
-       \r
+\r
        private boolean loadLibrary (String sharedLibName) {\r
                String path = extractLibrary(sharedLibName);\r
                if (path != null) System.load(path);\r
@@ -82,8 +75,10 @@ public class SharedLibraryLoader {
                try {\r
                        // Extract native from classpath to temp dir.\r
                        InputStream input = null;\r
-                       if(nativesJar == null) input = SharedLibraryLoader.class.getResourceAsStream("/" + sharedLibName);\r
-                       else input = getFromJar(nativesJar, sharedLibName);\r
+                       if (nativesJar == null)\r
+                               input = SharedLibraryLoader.class.getResourceAsStream("/" + sharedLibName);\r
+                       else\r
+                               input = getFromJar(nativesJar, sharedLibName);\r
                        if (input == null) return null;\r
                        nativesDir.mkdirs();\r
                        FileOutputStream output = new FileOutputStream(nativeFile);\r
@@ -100,55 +95,58 @@ public class SharedLibraryLoader {
                return nativeFile.exists() ? nativeFile.getAbsolutePath() : null;\r
        }\r
 \r
-       private InputStream getFromJar(String jarFile, String sharedLibrary) throws IOException {\r
+       private InputStream getFromJar (String jarFile, String sharedLibrary) throws IOException {\r
                ZipFile file = new ZipFile(nativesJar);\r
                ZipEntry entry = file.getEntry(sharedLibrary);\r
-               if(entry == null) throw new GdxRuntimeException("Couldn't find " + sharedLibrary + " in jar " + jarFile);\r
+               if (entry == null) throw new GdxRuntimeException("Couldn't find " + sharedLibrary + " in jar " + jarFile);\r
                return file.getInputStream(entry);\r
        }\r
 \r
-       /**\r
-        * Loads a shared library with the given name for the platform the application\r
-        * is running on. The name should not contain a prefix (e.g. 'lib') or suffix (e.g. '.dll).\r
-        * @param sharedLibName\r
-        */\r
+       /** Loads a shared library with the given name for the platform the application is running on. The name should not contain a\r
+        * prefix (e.g. 'lib') or suffix (e.g. '.dll).\r
+        * @param sharedLibName */\r
        public synchronized void load (String sharedLibName) {\r
                if (loadedLibraries.contains(sharedLibName)) return;\r
-               \r
+\r
                boolean isWindows = System.getProperty("os.name").contains("Windows");\r
                boolean isLinux = System.getProperty("os.name").contains("Linux");\r
                boolean isMac = System.getProperty("os.name").contains("Mac");\r
                boolean isAndroid = false;\r
                boolean is64Bit = System.getProperty("os.arch").equals("amd64");\r
                String vm = System.getProperty("java.vm.name");\r
-               if(vm != null && vm.contains("Dalvik")) {\r
+               if (vm != null && vm.contains("Dalvik")) {\r
                        isAndroid = true;\r
                        isWindows = false;\r
                        isLinux = false;\r
                        isMac = false;\r
                        is64Bit = false;\r
                }\r
-               \r
+\r
                boolean loaded = false;\r
-               if(isWindows) {\r
-                       if(!is64Bit) loaded = loadLibrary(sharedLibName + ".dll");\r
-                       else loaded = loadLibrary(sharedLibName + "64.dll");\r
+               if (isWindows) {\r
+                       if (!is64Bit)\r
+                               loaded = loadLibrary(sharedLibName + ".dll");\r
+                       else\r
+                               loaded = loadLibrary(sharedLibName + "64.dll");\r
                }\r
-               if(isLinux) {\r
-                       if(!is64Bit) loaded = loadLibrary("lib" + sharedLibName + ".so");\r
-                       else loaded = loadLibrary("lib" + sharedLibName + "64.so");\r
+               if (isLinux) {\r
+                       if (!is64Bit)\r
+                               loaded = loadLibrary("lib" + sharedLibName + ".so");\r
+                       else\r
+                               loaded = loadLibrary("lib" + sharedLibName + "64.so");\r
                }\r
-               if(isMac) {\r
+               if (isMac) {\r
                        loaded = loadLibrary("lib" + sharedLibName + ".dylib");\r
                }\r
-               if(isAndroid) {\r
+               if (isAndroid) {\r
                        System.loadLibrary(sharedLibName);\r
                        loaded = true;\r
                }\r
-               if(loaded) {\r
+               if (loaded) {\r
                        loadedLibraries.add(sharedLibName);\r
                } else {\r
-                       throw new RuntimeException("Couldn't load shared library: '" + sharedLibName + "' for target " + System.getProperty("os.name") + ", " + (is64Bit?"64-bit":"32-bit"));\r
+                       throw new RuntimeException("Couldn't load shared library: '" + sharedLibName + "' for target "\r
+                               + System.getProperty("os.name") + ", " + (is64Bit ? "64-bit" : "32-bit"));\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 9a499cf..0a59e33 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
-/**\r
- * Wrapper around System.nanoTime() and System.currentTimeMillis(). Use this\r
- * if you want to be compatible across all platforms!\r
- * @author mzechner\r
- *\r
- */\r
+/** Wrapper around System.nanoTime() and System.currentTimeMillis(). Use this if you want to be compatible across all platforms!\r
+ * @author mzechner */\r
 public class TimeUtils {\r
-       /**\r
-        * @return The current value of the system timer, in nanoseconds.\r
-        */\r
-       public static long nanoTime() {\r
+       /** @return The current value of the system timer, in nanoseconds. */\r
+       public static long nanoTime () {\r
                return System.nanoTime();\r
        }\r
-       \r
-       /**\r
-        * @return the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC.\r
-        */\r
-       public static long millis() {\r
+\r
+       /** @return the difference, measured in milliseconds, between the current time and midnight, January 1, 1970 UTC. */\r
+       public static long millis () {\r
                return System.currentTimeMillis();\r
        }\r
-}
\ No newline at end of file
+}\r
index b82de8b..0a00292 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -172,4 +173,4 @@ public class Timer {
                        return repeatCount != CANCELLED;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 867f549..c59b1d4 100644 (file)
@@ -2,14 +2,11 @@
 \r
 package com.badlogic.gdx.utils.compression;\r
 \r
-public class CRC\r
-{\r
+public class CRC {\r
        static public int[] Table = new int[256];\r
-       \r
-       static\r
-       {\r
-               for (int i = 0; i < 256; i++)\r
-               {\r
+\r
+       static {\r
+               for (int i = 0; i < 256; i++) {\r
                        int r = i;\r
                        for (int j = 0; j < 8; j++)\r
                                if ((r & 1) != 0)\r
@@ -19,34 +16,29 @@ public class CRC
                        Table[i] = r;\r
                }\r
        }\r
-       \r
+\r
        int _value = -1;\r
-       \r
-       public void Init()\r
-       {\r
+\r
+       public void Init () {\r
                _value = -1;\r
        }\r
-       \r
-       public void Update(byte[] data, int offset, int size)\r
-       {\r
+\r
+       public void Update (byte[] data, int offset, int size) {\r
                for (int i = 0; i < size; i++)\r
                        _value = Table[(_value ^ data[offset + i]) & 0xFF] ^ (_value >>> 8);\r
        }\r
-       \r
-       public void Update(byte[] data)\r
-       {\r
+\r
+       public void Update (byte[] data) {\r
                int size = data.length;\r
                for (int i = 0; i < size; i++)\r
                        _value = Table[(_value ^ data[i]) & 0xFF] ^ (_value >>> 8);\r
        }\r
-       \r
-       public void UpdateByte(int b)\r
-       {\r
+\r
+       public void UpdateByte (int b) {\r
                _value = Table[(_value ^ b) & 0xFF] ^ (_value >>> 8);\r
        }\r
-       \r
-       public int GetDigest()\r
-       {\r
+\r
+       public int GetDigest () {\r
                return _value ^ (-1);\r
        }\r
 }\r
index 5d81408..862005d 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression;\r
 \r
-public interface ICodeProgress\r
-{\r
-       public void SetProgress(long inSize, long outSize);\r
-}
\ No newline at end of file
+public interface ICodeProgress {\r
+       public void SetProgress (long inSize, long outSize);\r
+}\r
index e929caf..99d3b9d 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression;\r
 \r
 import java.io.IOException;\r
 import java.io.InputStream;\r
 import java.io.OutputStream;\r
 \r
-/**\r
- * Adapted from LZMA SDK version 9.22.\r
+/** Adapted from LZMA SDK version 9.22.\r
  * \r
- * This was modified to be used directly on streams,\r
- * rather than via the command line as in the LZMA SDK.\r
+ * This was modified to be used directly on streams, rather than via the command line as in the LZMA SDK.\r
  * \r
- * We only currently allow the default LZMA options to be used,\r
- * as we know it works on for our target usage.\r
- */\r
+ * We only currently allow the default LZMA options to be used, as we know it works on for our target usage. */\r
 public class Lzma {\r
        static class CommandLine {\r
                public static final int kEncode = 0;\r
                public static final int kDecode = 1;\r
                public static final int kBenchmak = 2;\r
-               \r
+\r
                public int Command = -1;\r
                public int NumBenchmarkPasses = 10;\r
-               \r
+\r
                public int DictionarySize = 1 << 23;\r
                public boolean DictionarySizeIsDefined = false;\r
-               \r
+\r
                public int Lc = 3;\r
                public int Lp = 0;\r
                public int Pb = 2;\r
-               \r
+\r
                public int Fb = 128;\r
                public boolean FbIsDefined = false;\r
-               \r
+\r
                public boolean Eos = false;\r
-               \r
+\r
                public int Algorithm = 2;\r
                public int MatchFinder = 1;\r
-               \r
+\r
                public String InFile;\r
                public String OutFile;\r
        }\r
-       \r
-       \r
-       /**\r
-        * Compresses the given {@link InputStream} into the given {@link OutputStream}.\r
+\r
+       /** Compresses the given {@link InputStream} into the given {@link OutputStream}.\r
         * \r
         * @param in the {@link InputStream} to compress\r
         * @param out the {@link OutputStream} to compress to\r
-        * @throws IOException\r
-        */\r
-       static public void compress(InputStream in, OutputStream out) throws IOException {\r
+        * @throws IOException */\r
+       static public void compress (InputStream in, OutputStream out) throws IOException {\r
                CommandLine params = new CommandLine();\r
                boolean eos = false;\r
-               if (params.Eos)\r
-                       eos = true;             \r
+               if (params.Eos) eos = true;\r
                com.badlogic.gdx.utils.compression.lzma.Encoder encoder = new com.badlogic.gdx.utils.compression.lzma.Encoder();\r
-               if (!encoder.SetAlgorithm(params.Algorithm))\r
-                       throw new RuntimeException("Incorrect compression mode");\r
-               if (!encoder.SetDictionarySize(params.DictionarySize))\r
-                       throw new RuntimeException("Incorrect dictionary size");\r
-               if (!encoder.SetNumFastBytes(params.Fb))\r
-                       throw new RuntimeException("Incorrect -fb value");\r
-               if (!encoder.SetMatchFinder(params.MatchFinder))\r
-                       throw new RuntimeException("Incorrect -mf value");\r
-               if (!encoder.SetLcLpPb(params.Lc, params.Lp, params.Pb))\r
-                       throw new RuntimeException("Incorrect -lc or -lp or -pb value");\r
+               if (!encoder.SetAlgorithm(params.Algorithm)) throw new RuntimeException("Incorrect compression mode");\r
+               if (!encoder.SetDictionarySize(params.DictionarySize)) throw new RuntimeException("Incorrect dictionary size");\r
+               if (!encoder.SetNumFastBytes(params.Fb)) throw new RuntimeException("Incorrect -fb value");\r
+               if (!encoder.SetMatchFinder(params.MatchFinder)) throw new RuntimeException("Incorrect -mf value");\r
+               if (!encoder.SetLcLpPb(params.Lc, params.Lp, params.Pb)) throw new RuntimeException("Incorrect -lc or -lp or -pb value");\r
                encoder.SetEndMarkerMode(eos);\r
                encoder.WriteCoderProperties(out);\r
                long fileSize;\r
                if (eos) {\r
                        fileSize = -1;\r
-               }\r
-               else {\r
+               } else {\r
                        if ((fileSize = in.available()) == 0) {\r
                                fileSize = -1;\r
                        }\r
                }\r
-               for (int i = 0; i < 8; i++){\r
+               for (int i = 0; i < 8; i++) {\r
                        out.write((int)(fileSize >>> (8 * i)) & 0xFF);\r
                }\r
                encoder.Code(in, out, -1, -1, null);\r
        }\r
-       \r
-       /**\r
-        * Decompresses the given {@link InputStream} into the given {@link OutputStream}.\r
+\r
+       /** Decompresses the given {@link InputStream} into the given {@link OutputStream}.\r
         * \r
         * @param in the {@link InputStream} to decompress\r
         * @param out the {@link OutputStream} to decompress to\r
-        * @throws IOException\r
-        */     \r
-       static public void decompress(InputStream in, OutputStream out) throws IOException {\r
+        * @throws IOException */\r
+       static public void decompress (InputStream in, OutputStream out) throws IOException {\r
                int propertiesSize = 5;\r
                byte[] properties = new byte[propertiesSize];\r
-               if (in.read(properties, 0, propertiesSize) != propertiesSize)\r
-                       throw new RuntimeException("input .lzma file is too short");\r
+               if (in.read(properties, 0, propertiesSize) != propertiesSize) throw new RuntimeException("input .lzma file is too short");\r
                com.badlogic.gdx.utils.compression.lzma.Decoder decoder = new com.badlogic.gdx.utils.compression.lzma.Decoder();\r
-               if (!decoder.SetDecoderProperties(properties))\r
-                       throw new RuntimeException("Incorrect stream properties");\r
+               if (!decoder.SetDecoderProperties(properties)) throw new RuntimeException("Incorrect stream properties");\r
                long outSize = 0;\r
-               for (int i = 0; i < 8; i++)\r
-               {\r
+               for (int i = 0; i < 8; i++) {\r
                        int v = in.read();\r
                        if (v < 0) {\r
                                throw new RuntimeException("Can't read stream size");\r
                        }\r
                        outSize |= ((long)v) << (8 * i);\r
                }\r
-               if (!decoder.Code(in, out, outSize)){\r
-                       throw new RuntimeException("Error in data stream");             \r
+               if (!decoder.Code(in, out, outSize)) {\r
+                       throw new RuntimeException("Error in data stream");\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index f4b3e91..f09affd 100644 (file)
@@ -1,22 +1,21 @@
 // LZ.BinTree\r
 \r
 package com.badlogic.gdx.utils.compression.lz;\r
-import java.io.IOException;\r
 \r
+import java.io.IOException;\r
 \r
-public class BinTree extends InWindow\r
-{\r
+public class BinTree extends InWindow {\r
        int _cyclicBufferPos;\r
        int _cyclicBufferSize = 0;\r
        int _matchMaxLen;\r
-       \r
+\r
        int[] _son;\r
        int[] _hash;\r
-       \r
+\r
        int _cutValue = 0xFF;\r
        int _hashMask;\r
        int _hashSizeSum = 0;\r
-       \r
+\r
        boolean HASH_ARRAY = true;\r
 \r
        static final int kHash2Size = 1 << 10;\r
@@ -26,78 +25,54 @@ public class BinTree extends InWindow
        static final int kHash3Offset = kHash2Size;\r
        static final int kEmptyHashValue = 0;\r
        static final int kMaxValForNormalize = (1 << 30) - 1;\r
-       \r
+\r
        int kNumHashDirectBytes = 0;\r
        int kMinMatchCheck = 4;\r
        int kFixHashSize = kHash2Size + kHash3Size;\r
 \r
-       public void SetType(int numHashBytes)\r
-       {\r
+       public void SetType (int numHashBytes) {\r
                HASH_ARRAY = (numHashBytes > 2);\r
-               if (HASH_ARRAY)\r
-               {\r
+               if (HASH_ARRAY) {\r
                        kNumHashDirectBytes = 0;\r
                        kMinMatchCheck = 4;\r
                        kFixHashSize = kHash2Size + kHash3Size;\r
-               }\r
-               else\r
-               {\r
+               } else {\r
                        kNumHashDirectBytes = 2;\r
                        kMinMatchCheck = 2 + 1;\r
                        kFixHashSize = 0;\r
                }\r
        }\r
-       \r
 \r
-       \r
-\r
-       public void Init() throws IOException\r
-       {\r
+       public void Init () throws IOException {\r
                super.Init();\r
                for (int i = 0; i < _hashSizeSum; i++)\r
                        _hash[i] = kEmptyHashValue;\r
                _cyclicBufferPos = 0;\r
                ReduceOffsets(-1);\r
        }\r
-       \r
-       public void MovePos() throws IOException\r
-       {\r
-               if (++_cyclicBufferPos >= _cyclicBufferSize)\r
-                       _cyclicBufferPos = 0;\r
+\r
+       public void MovePos () throws IOException {\r
+               if (++_cyclicBufferPos >= _cyclicBufferSize) _cyclicBufferPos = 0;\r
                super.MovePos();\r
-               if (_pos == kMaxValForNormalize)\r
-                       Normalize();\r
+               if (_pos == kMaxValForNormalize) Normalize();\r
        }\r
-       \r
-\r
-       \r
-       \r
-       \r
-       \r
-       \r
-       \r
-       public boolean Create(int historySize, int keepAddBufferBefore,\r
-                       int matchMaxLen, int keepAddBufferAfter)\r
-       {\r
-               if (historySize > kMaxValForNormalize - 256)\r
-                       return false;\r
+\r
+       public boolean Create (int historySize, int keepAddBufferBefore, int matchMaxLen, int keepAddBufferAfter) {\r
+               if (historySize > kMaxValForNormalize - 256) return false;\r
                _cutValue = 16 + (matchMaxLen >> 1);\r
 \r
-               int windowReservSize = (historySize + keepAddBufferBefore +\r
-                               matchMaxLen + keepAddBufferAfter) / 2 + 256;\r
-               \r
+               int windowReservSize = (historySize + keepAddBufferBefore + matchMaxLen + keepAddBufferAfter) / 2 + 256;\r
+\r
                super.Create(historySize + keepAddBufferBefore, matchMaxLen + keepAddBufferAfter, windowReservSize);\r
-               \r
+\r
                _matchMaxLen = matchMaxLen;\r
 \r
                int cyclicBufferSize = historySize + 1;\r
-               if (_cyclicBufferSize != cyclicBufferSize)\r
-                       _son = new int[(_cyclicBufferSize = cyclicBufferSize) * 2];\r
+               if (_cyclicBufferSize != cyclicBufferSize) _son = new int[(_cyclicBufferSize = cyclicBufferSize) * 2];\r
 \r
                int hs = kBT2HashSize;\r
 \r
-               if (HASH_ARRAY)\r
-               {\r
+               if (HASH_ARRAY) {\r
                        hs = historySize - 1;\r
                        hs |= (hs >> 1);\r
                        hs |= (hs >> 2);\r
@@ -105,26 +80,22 @@ public class BinTree extends InWindow
                        hs |= (hs >> 8);\r
                        hs >>= 1;\r
                        hs |= 0xFFFF;\r
-                       if (hs > (1 << 24))\r
-                               hs >>= 1;\r
+                       if (hs > (1 << 24)) hs >>= 1;\r
                        _hashMask = hs;\r
                        hs++;\r
                        hs += kFixHashSize;\r
                }\r
-               if (hs != _hashSizeSum)\r
-                       _hash = new int [_hashSizeSum = hs];\r
+               if (hs != _hashSizeSum) _hash = new int[_hashSizeSum = hs];\r
                return true;\r
        }\r
-       public int GetMatches(int[] distances) throws IOException\r
-       {\r
+\r
+       public int GetMatches (int[] distances) throws IOException {\r
                int lenLimit;\r
                if (_pos + _matchMaxLen <= _streamPos)\r
                        lenLimit = _matchMaxLen;\r
-               else\r
-               {\r
+               else {\r
                        lenLimit = _streamPos - _pos;\r
-                       if (lenLimit < kMinMatchCheck)\r
-                       {\r
+                       if (lenLimit < kMinMatchCheck) {\r
                                MovePos();\r
                                return 0;\r
                        }\r
@@ -135,42 +106,33 @@ public class BinTree extends InWindow
                int cur = _bufferOffset + _pos;\r
                int maxLen = kStartMaxLen; // to avoid items for len < hashSize;\r
                int hashValue, hash2Value = 0, hash3Value = 0;\r
-               \r
-               if (HASH_ARRAY)\r
-               {\r
+\r
+               if (HASH_ARRAY) {\r
                        int temp = CrcTable[_bufferBase[cur] & 0xFF] ^ (_bufferBase[cur + 1] & 0xFF);\r
                        hash2Value = temp & (kHash2Size - 1);\r
                        temp ^= ((int)(_bufferBase[cur + 2] & 0xFF) << 8);\r
                        hash3Value = temp & (kHash3Size - 1);\r
                        hashValue = (temp ^ (CrcTable[_bufferBase[cur + 3] & 0xFF] << 5)) & _hashMask;\r
-               }\r
-               else\r
+               } else\r
                        hashValue = ((_bufferBase[cur] & 0xFF) ^ ((int)(_bufferBase[cur + 1] & 0xFF) << 8));\r
 \r
                int curMatch = _hash[kFixHashSize + hashValue];\r
-               if (HASH_ARRAY)\r
-               {\r
+               if (HASH_ARRAY) {\r
                        int curMatch2 = _hash[hash2Value];\r
                        int curMatch3 = _hash[kHash3Offset + hash3Value];\r
                        _hash[hash2Value] = _pos;\r
                        _hash[kHash3Offset + hash3Value] = _pos;\r
-                       if (curMatch2 > matchMinPos)\r
-                               if (_bufferBase[_bufferOffset + curMatch2] == _bufferBase[cur])\r
-                               {\r
-                                       distances[offset++] = maxLen = 2;\r
-                                       distances[offset++] = _pos - curMatch2 - 1;\r
-                               }\r
-                       if (curMatch3 > matchMinPos)\r
-                               if (_bufferBase[_bufferOffset + curMatch3] == _bufferBase[cur])\r
-                               {\r
-                                       if (curMatch3 == curMatch2)\r
-                                               offset -= 2;\r
-                                       distances[offset++] = maxLen = 3;\r
-                                       distances[offset++] = _pos - curMatch3 - 1;\r
-                                       curMatch2 = curMatch3;\r
-                               }\r
-                       if (offset != 0 && curMatch2 == curMatch)\r
-                       {\r
+                       if (curMatch2 > matchMinPos) if (_bufferBase[_bufferOffset + curMatch2] == _bufferBase[cur]) {\r
+                               distances[offset++] = maxLen = 2;\r
+                               distances[offset++] = _pos - curMatch2 - 1;\r
+                       }\r
+                       if (curMatch3 > matchMinPos) if (_bufferBase[_bufferOffset + curMatch3] == _bufferBase[cur]) {\r
+                               if (curMatch3 == curMatch2) offset -= 2;\r
+                               distances[offset++] = maxLen = 3;\r
+                               distances[offset++] = _pos - curMatch3 - 1;\r
+                               curMatch2 = curMatch3;\r
+                       }\r
+                       if (offset != 0 && curMatch2 == curMatch) {\r
                                offset -= 2;\r
                                maxLen = kStartMaxLen;\r
                        }\r
@@ -184,13 +146,9 @@ public class BinTree extends InWindow
                int len0, len1;\r
                len0 = len1 = kNumHashDirectBytes;\r
 \r
-               if (kNumHashDirectBytes != 0)\r
-               {\r
-                       if (curMatch > matchMinPos)\r
-                       {\r
-                               if (_bufferBase[_bufferOffset + curMatch + kNumHashDirectBytes] !=\r
-                                               _bufferBase[cur + kNumHashDirectBytes])\r
-                               {\r
+               if (kNumHashDirectBytes != 0) {\r
+                       if (curMatch > matchMinPos) {\r
+                               if (_bufferBase[_bufferOffset + curMatch + kNumHashDirectBytes] != _bufferBase[cur + kNumHashDirectBytes]) {\r
                                        distances[offset++] = maxLen = kNumHashDirectBytes;\r
                                        distances[offset++] = _pos - curMatch - 1;\r
                                }\r
@@ -199,46 +157,36 @@ public class BinTree extends InWindow
 \r
                int count = _cutValue;\r
 \r
-               while (true)\r
-               {\r
-                       if (curMatch <= matchMinPos || count-- == 0)\r
-                       {\r
+               while (true) {\r
+                       if (curMatch <= matchMinPos || count-- == 0) {\r
                                _son[ptr0] = _son[ptr1] = kEmptyHashValue;\r
                                break;\r
                        }\r
                        int delta = _pos - curMatch;\r
-                       int cyclicPos = ((delta <= _cyclicBufferPos) ?\r
-                               (_cyclicBufferPos - delta) :\r
-                               (_cyclicBufferPos - delta + _cyclicBufferSize)) << 1;\r
+                       int cyclicPos = ((delta <= _cyclicBufferPos) ? (_cyclicBufferPos - delta)\r
+                               : (_cyclicBufferPos - delta + _cyclicBufferSize)) << 1;\r
 \r
                        int pby1 = _bufferOffset + curMatch;\r
                        int len = Math.min(len0, len1);\r
-                       if (_bufferBase[pby1 + len] == _bufferBase[cur + len])\r
-                       {\r
-                               while(++len != lenLimit)\r
-                                       if (_bufferBase[pby1 + len] != _bufferBase[cur + len])\r
-                                               break;\r
-                               if (maxLen < len)\r
-                               {\r
+                       if (_bufferBase[pby1 + len] == _bufferBase[cur + len]) {\r
+                               while (++len != lenLimit)\r
+                                       if (_bufferBase[pby1 + len] != _bufferBase[cur + len]) break;\r
+                               if (maxLen < len) {\r
                                        distances[offset++] = maxLen = len;\r
                                        distances[offset++] = delta - 1;\r
-                                       if (len == lenLimit)\r
-                                       {\r
+                                       if (len == lenLimit) {\r
                                                _son[ptr1] = _son[cyclicPos];\r
                                                _son[ptr0] = _son[cyclicPos + 1];\r
                                                break;\r
                                        }\r
                                }\r
                        }\r
-                       if ((_bufferBase[pby1 + len] & 0xFF) < (_bufferBase[cur + len] & 0xFF))\r
-                       {\r
+                       if ((_bufferBase[pby1 + len] & 0xFF) < (_bufferBase[cur + len] & 0xFF)) {\r
                                _son[ptr1] = curMatch;\r
                                ptr1 = cyclicPos + 1;\r
                                curMatch = _son[ptr1];\r
                                len1 = len;\r
-                       }\r
-                       else\r
-                       {\r
+                       } else {\r
                                _son[ptr0] = curMatch;\r
                                ptr0 = cyclicPos;\r
                                curMatch = _son[ptr0];\r
@@ -249,18 +197,14 @@ public class BinTree extends InWindow
                return offset;\r
        }\r
 \r
-       public void Skip(int num) throws IOException\r
-       {\r
-               do\r
-               {\r
+       public void Skip (int num) throws IOException {\r
+               do {\r
                        int lenLimit;\r
                        if (_pos + _matchMaxLen <= _streamPos)\r
-                       lenLimit = _matchMaxLen;\r
-                       else\r
-                       {\r
+                               lenLimit = _matchMaxLen;\r
+                       else {\r
                                lenLimit = _streamPos - _pos;\r
-                               if (lenLimit < kMinMatchCheck)\r
-                               {\r
+                               if (lenLimit < kMinMatchCheck) {\r
                                        MovePos();\r
                                        continue;\r
                                }\r
@@ -268,11 +212,10 @@ public class BinTree extends InWindow
 \r
                        int matchMinPos = (_pos > _cyclicBufferSize) ? (_pos - _cyclicBufferSize) : 0;\r
                        int cur = _bufferOffset + _pos;\r
-                       \r
+\r
                        int hashValue;\r
 \r
-                       if (HASH_ARRAY)\r
-                       {\r
+                       if (HASH_ARRAY) {\r
                                int temp = CrcTable[_bufferBase[cur] & 0xFF] ^ (_bufferBase[cur + 1] & 0xFF);\r
                                int hash2Value = temp & (kHash2Size - 1);\r
                                _hash[hash2Value] = _pos;\r
@@ -280,8 +223,7 @@ public class BinTree extends InWindow
                                int hash3Value = temp & (kHash3Size - 1);\r
                                _hash[kHash3Offset + hash3Value] = _pos;\r
                                hashValue = (temp ^ (CrcTable[_bufferBase[cur + 3] & 0xFF] << 5)) & _hashMask;\r
-                       }\r
-                       else\r
+                       } else\r
                                hashValue = ((_bufferBase[cur] & 0xFF) ^ ((int)(_bufferBase[cur + 1] & 0xFF) << 8));\r
 \r
                        int curMatch = _hash[kFixHashSize + hashValue];\r
@@ -294,42 +236,33 @@ public class BinTree extends InWindow
                        len0 = len1 = kNumHashDirectBytes;\r
 \r
                        int count = _cutValue;\r
-                       while (true)\r
-                       {\r
-                               if (curMatch <= matchMinPos || count-- == 0)\r
-                               {\r
+                       while (true) {\r
+                               if (curMatch <= matchMinPos || count-- == 0) {\r
                                        _son[ptr0] = _son[ptr1] = kEmptyHashValue;\r
                                        break;\r
                                }\r
 \r
                                int delta = _pos - curMatch;\r
-                               int cyclicPos = ((delta <= _cyclicBufferPos) ?\r
-                                       (_cyclicBufferPos - delta) :\r
-                                       (_cyclicBufferPos - delta + _cyclicBufferSize)) << 1;\r
+                               int cyclicPos = ((delta <= _cyclicBufferPos) ? (_cyclicBufferPos - delta)\r
+                                       : (_cyclicBufferPos - delta + _cyclicBufferSize)) << 1;\r
 \r
                                int pby1 = _bufferOffset + curMatch;\r
                                int len = Math.min(len0, len1);\r
-                               if (_bufferBase[pby1 + len] == _bufferBase[cur + len])\r
-                               {\r
+                               if (_bufferBase[pby1 + len] == _bufferBase[cur + len]) {\r
                                        while (++len != lenLimit)\r
-                                               if (_bufferBase[pby1 + len] != _bufferBase[cur + len])\r
-                                                       break;\r
-                                       if (len == lenLimit)\r
-                                       {\r
+                                               if (_bufferBase[pby1 + len] != _bufferBase[cur + len]) break;\r
+                                       if (len == lenLimit) {\r
                                                _son[ptr1] = _son[cyclicPos];\r
                                                _son[ptr0] = _son[cyclicPos + 1];\r
                                                break;\r
                                        }\r
                                }\r
-                               if ((_bufferBase[pby1 + len] & 0xFF) < (_bufferBase[cur + len] & 0xFF))\r
-                               {\r
+                               if ((_bufferBase[pby1 + len] & 0xFF) < (_bufferBase[cur + len] & 0xFF)) {\r
                                        _son[ptr1] = curMatch;\r
                                        ptr1 = cyclicPos + 1;\r
                                        curMatch = _son[ptr1];\r
                                        len1 = len;\r
-                               }\r
-                               else\r
-                               {\r
+                               } else {\r
                                        _son[ptr0] = curMatch;\r
                                        ptr0 = cyclicPos;\r
                                        curMatch = _son[ptr0];\r
@@ -337,14 +270,11 @@ public class BinTree extends InWindow
                                }\r
                        }\r
                        MovePos();\r
-               }\r
-               while (--num != 0);\r
+               } while (--num != 0);\r
        }\r
-       \r
-       void NormalizeLinks(int[] items, int numItems, int subValue)\r
-       {\r
-               for (int i = 0; i < numItems; i++)\r
-               {\r
+\r
+       void NormalizeLinks (int[] items, int numItems, int subValue) {\r
+               for (int i = 0; i < numItems; i++) {\r
                        int value = items[i];\r
                        if (value <= subValue)\r
                                value = kEmptyHashValue;\r
@@ -353,23 +283,22 @@ public class BinTree extends InWindow
                        items[i] = value;\r
                }\r
        }\r
-       \r
-       void Normalize()\r
-       {\r
+\r
+       void Normalize () {\r
                int subValue = _pos - _cyclicBufferSize;\r
                NormalizeLinks(_son, _cyclicBufferSize * 2, subValue);\r
                NormalizeLinks(_hash, _hashSizeSum, subValue);\r
                ReduceOffsets(subValue);\r
        }\r
-       \r
-       public void SetCutValue(int cutValue) { _cutValue = cutValue; }\r
+\r
+       public void SetCutValue (int cutValue) {\r
+               _cutValue = cutValue;\r
+       }\r
 \r
        private static final int[] CrcTable = new int[256];\r
 \r
-       static\r
-       {\r
-               for (int i = 0; i < 256; i++)\r
-               {\r
+       static {\r
+               for (int i = 0; i < 256; i++) {\r
                        int r = i;\r
                        for (int j = 0; j < 8; j++)\r
                                if ((r & 1) != 0)\r
index d441da2..77d86d1 100644 (file)
@@ -4,125 +4,117 @@ package com.badlogic.gdx.utils.compression.lz;
 \r
 import java.io.IOException;\r
 \r
-public class InWindow\r
-{\r
+public class InWindow {\r
        public byte[] _bufferBase; // pointer to buffer with data\r
        java.io.InputStream _stream;\r
-       int _posLimit;  // offset (from _buffer) of first byte when new block reading must be done\r
+       int _posLimit; // offset (from _buffer) of first byte when new block reading must be done\r
        boolean _streamEndWasReached; // if (true) then _streamPos shows real end of stream\r
-       \r
+\r
        int _pointerToLastSafePosition;\r
-       \r
+\r
        public int _bufferOffset;\r
-       \r
-       public int _blockSize;  // Size of Allocated memory block\r
-       public int _pos;             // offset (from _buffer) of curent byte\r
-       int _keepSizeBefore;  // how many BYTEs must be kept in buffer before _pos\r
-       int _keepSizeAfter;   // how many BYTEs must be kept buffer after _pos\r
-       public int _streamPos;   // offset (from _buffer) of first not read byte from Stream\r
-       \r
-       public void MoveBlock()\r
-       {\r
+\r
+       public int _blockSize; // Size of Allocated memory block\r
+       public int _pos; // offset (from _buffer) of curent byte\r
+       int _keepSizeBefore; // how many BYTEs must be kept in buffer before _pos\r
+       int _keepSizeAfter; // how many BYTEs must be kept buffer after _pos\r
+       public int _streamPos; // offset (from _buffer) of first not read byte from Stream\r
+\r
+       public void MoveBlock () {\r
                int offset = _bufferOffset + _pos - _keepSizeBefore;\r
                // we need one additional byte, since MovePos moves on 1 byte.\r
-               if (offset > 0)\r
-                       offset--;\r
+               if (offset > 0) offset--;\r
 \r
                int numBytes = _bufferOffset + _streamPos - offset;\r
-               \r
+\r
                // check negative offset ????\r
                for (int i = 0; i < numBytes; i++)\r
                        _bufferBase[i] = _bufferBase[offset + i];\r
                _bufferOffset -= offset;\r
        }\r
-       \r
-       public void ReadBlock() throws IOException\r
-       {\r
-               if (_streamEndWasReached)\r
-                       return;\r
-               while (true)\r
-               {\r
+\r
+       public void ReadBlock () throws IOException {\r
+               if (_streamEndWasReached) return;\r
+               while (true) {\r
                        int size = (0 - _bufferOffset) + _blockSize - _streamPos;\r
-                       if (size == 0)\r
-                               return;\r
+                       if (size == 0) return;\r
                        int numReadBytes = _stream.read(_bufferBase, _bufferOffset + _streamPos, size);\r
-                       if (numReadBytes == -1)\r
-                       {\r
+                       if (numReadBytes == -1) {\r
                                _posLimit = _streamPos;\r
                                int pointerToPostion = _bufferOffset + _posLimit;\r
-                               if (pointerToPostion > _pointerToLastSafePosition)\r
-                                       _posLimit = _pointerToLastSafePosition - _bufferOffset;\r
-                               \r
+                               if (pointerToPostion > _pointerToLastSafePosition) _posLimit = _pointerToLastSafePosition - _bufferOffset;\r
+\r
                                _streamEndWasReached = true;\r
                                return;\r
                        }\r
                        _streamPos += numReadBytes;\r
-                       if (_streamPos >= _pos + _keepSizeAfter)\r
-                               _posLimit = _streamPos - _keepSizeAfter;\r
+                       if (_streamPos >= _pos + _keepSizeAfter) _posLimit = _streamPos - _keepSizeAfter;\r
                }\r
        }\r
-       \r
-       void Free() { _bufferBase = null; }\r
-       \r
-       public void Create(int keepSizeBefore, int keepSizeAfter, int keepSizeReserv)\r
-       {\r
+\r
+       void Free () {\r
+               _bufferBase = null;\r
+       }\r
+\r
+       public void Create (int keepSizeBefore, int keepSizeAfter, int keepSizeReserv) {\r
                _keepSizeBefore = keepSizeBefore;\r
                _keepSizeAfter = keepSizeAfter;\r
                int blockSize = keepSizeBefore + keepSizeAfter + keepSizeReserv;\r
-               if (_bufferBase == null || _blockSize != blockSize)\r
-               {\r
+               if (_bufferBase == null || _blockSize != blockSize) {\r
                        Free();\r
                        _blockSize = blockSize;\r
                        _bufferBase = new byte[_blockSize];\r
                }\r
                _pointerToLastSafePosition = _blockSize - keepSizeAfter;\r
        }\r
-       \r
-       public void SetStream(java.io.InputStream stream) { _stream = stream;   }\r
-       public void ReleaseStream() { _stream = null; }\r
 \r
-       public void Init() throws IOException\r
-       {\r
+       public void SetStream (java.io.InputStream stream) {\r
+               _stream = stream;\r
+       }\r
+\r
+       public void ReleaseStream () {\r
+               _stream = null;\r
+       }\r
+\r
+       public void Init () throws IOException {\r
                _bufferOffset = 0;\r
                _pos = 0;\r
                _streamPos = 0;\r
                _streamEndWasReached = false;\r
                ReadBlock();\r
        }\r
-       \r
-       public void MovePos() throws IOException\r
-       {\r
+\r
+       public void MovePos () throws IOException {\r
                _pos++;\r
-               if (_pos > _posLimit)\r
-               {\r
+               if (_pos > _posLimit) {\r
                        int pointerToPostion = _bufferOffset + _pos;\r
-                       if (pointerToPostion > _pointerToLastSafePosition)\r
-                               MoveBlock();\r
+                       if (pointerToPostion > _pointerToLastSafePosition) MoveBlock();\r
                        ReadBlock();\r
                }\r
        }\r
-       \r
-       public byte GetIndexByte(int index)     { return _bufferBase[_bufferOffset + _pos + index]; }\r
-       \r
+\r
+       public byte GetIndexByte (int index) {\r
+               return _bufferBase[_bufferOffset + _pos + index];\r
+       }\r
+\r
        // index + limit have not to exceed _keepSizeAfter;\r
-       public int GetMatchLen(int index, int distance, int limit)\r
-       {\r
-               if (_streamEndWasReached)\r
-                       if ((_pos + index) + limit > _streamPos)\r
-                               limit = _streamPos - (_pos + index);\r
+       public int GetMatchLen (int index, int distance, int limit) {\r
+               if (_streamEndWasReached) if ((_pos + index) + limit > _streamPos) limit = _streamPos - (_pos + index);\r
                distance++;\r
                // Byte *pby = _buffer + (size_t)_pos + index;\r
                int pby = _bufferOffset + _pos + index;\r
-               \r
+\r
                int i;\r
-               for (i = 0; i < limit && _bufferBase[pby + i] == _bufferBase[pby + i - distance]; i++);\r
+               for (i = 0; i < limit && _bufferBase[pby + i] == _bufferBase[pby + i - distance]; i++)\r
+                       ;\r
                return i;\r
        }\r
-       \r
-       public int GetNumAvailableBytes()       { return _streamPos - _pos; }\r
-       \r
-       public void ReduceOffsets(int subValue)\r
-       {\r
+\r
+       public int GetNumAvailableBytes () {\r
+               return _streamPos - _pos;\r
+       }\r
+\r
+       public void ReduceOffsets (int subValue) {\r
                _bufferOffset += subValue;\r
                _posLimit -= subValue;\r
                _pos -= subValue;\r
index f3e9c5e..7bebf9b 100644 (file)
@@ -4,82 +4,63 @@ package com.badlogic.gdx.utils.compression.lz;
 \r
 import java.io.IOException;\r
 \r
-public class OutWindow\r
-{\r
+public class OutWindow {\r
        byte[] _buffer;\r
        int _pos;\r
        int _windowSize = 0;\r
        int _streamPos;\r
        java.io.OutputStream _stream;\r
-       \r
-       public void Create(int windowSize)\r
-       {\r
-               if (_buffer == null || _windowSize != windowSize)\r
-                       _buffer = new byte[windowSize];\r
+\r
+       public void Create (int windowSize) {\r
+               if (_buffer == null || _windowSize != windowSize) _buffer = new byte[windowSize];\r
                _windowSize = windowSize;\r
                _pos = 0;\r
                _streamPos = 0;\r
        }\r
-       \r
-       public void SetStream(java.io.OutputStream stream) throws IOException\r
-       {\r
+\r
+       public void SetStream (java.io.OutputStream stream) throws IOException {\r
                ReleaseStream();\r
                _stream = stream;\r
        }\r
-       \r
-       public void ReleaseStream() throws IOException\r
-       {\r
+\r
+       public void ReleaseStream () throws IOException {\r
                Flush();\r
                _stream = null;\r
        }\r
-       \r
-       public void Init(boolean solid)\r
-       {\r
-               if (!solid)\r
-               {\r
+\r
+       public void Init (boolean solid) {\r
+               if (!solid) {\r
                        _streamPos = 0;\r
                        _pos = 0;\r
                }\r
        }\r
-       \r
-       public void Flush() throws IOException\r
-       {\r
+\r
+       public void Flush () throws IOException {\r
                int size = _pos - _streamPos;\r
-               if (size == 0)\r
-                       return;\r
+               if (size == 0) return;\r
                _stream.write(_buffer, _streamPos, size);\r
-               if (_pos >= _windowSize)\r
-                       _pos = 0;\r
+               if (_pos >= _windowSize) _pos = 0;\r
                _streamPos = _pos;\r
        }\r
-       \r
-       public void CopyBlock(int distance, int len) throws IOException\r
-       {\r
+\r
+       public void CopyBlock (int distance, int len) throws IOException {\r
                int pos = _pos - distance - 1;\r
-               if (pos < 0)\r
-                       pos += _windowSize;\r
-               for (; len != 0; len--)\r
-               {\r
-                       if (pos >= _windowSize)\r
-                               pos = 0;\r
+               if (pos < 0) pos += _windowSize;\r
+               for (; len != 0; len--) {\r
+                       if (pos >= _windowSize) pos = 0;\r
                        _buffer[_pos++] = _buffer[pos++];\r
-                       if (_pos >= _windowSize)\r
-                               Flush();\r
+                       if (_pos >= _windowSize) Flush();\r
                }\r
        }\r
-       \r
-       public void PutByte(byte b) throws IOException\r
-       {\r
+\r
+       public void PutByte (byte b) throws IOException {\r
                _buffer[_pos++] = b;\r
-               if (_pos >= _windowSize)\r
-                       Flush();\r
+               if (_pos >= _windowSize) Flush();\r
        }\r
-       \r
-       public byte GetByte(int distance)\r
-       {\r
+\r
+       public byte GetByte (int distance) {\r
                int pos = _pos - distance - 1;\r
-               if (pos < 0)\r
-                       pos += _windowSize;\r
+               if (pos < 0) pos += _windowSize;\r
                return _buffer[pos];\r
        }\r
 }\r
index 715bdcd..5a3171c 100644 (file)
@@ -2,87 +2,75 @@
 \r
 package com.badlogic.gdx.utils.compression.lzma;\r
 \r
-public class Base\r
-{\r
+public class Base {\r
        public static final int kNumRepDistances = 4;\r
        public static final int kNumStates = 12;\r
-       \r
-       public static final int StateInit()\r
-       {\r
+\r
+       public static final int StateInit () {\r
                return 0;\r
        }\r
-       \r
-       public static final int StateUpdateChar(int index)\r
-       {\r
-               if (index < 4) \r
-                       return 0;\r
-               if (index < 10) \r
-                       return index - 3;\r
+\r
+       public static final int StateUpdateChar (int index) {\r
+               if (index < 4) return 0;\r
+               if (index < 10) return index - 3;\r
                return index - 6;\r
        }\r
-       \r
-       public static final int StateUpdateMatch(int index)\r
-       {\r
-               return (index < 7 ? 7 : 10); \r
+\r
+       public static final int StateUpdateMatch (int index) {\r
+               return (index < 7 ? 7 : 10);\r
        }\r
 \r
-       public static final int StateUpdateRep(int index)\r
-       { \r
-               return (index < 7 ? 8 : 11); \r
+       public static final int StateUpdateRep (int index) {\r
+               return (index < 7 ? 8 : 11);\r
        }\r
-       \r
-       public static final int StateUpdateShortRep(int index)\r
-       { \r
-               return (index < 7 ? 9 : 11); \r
+\r
+       public static final int StateUpdateShortRep (int index) {\r
+               return (index < 7 ? 9 : 11);\r
        }\r
 \r
-       public static final boolean StateIsCharState(int index)\r
-       { \r
-               return index < 7; \r
+       public static final boolean StateIsCharState (int index) {\r
+               return index < 7;\r
        }\r
-       \r
+\r
        public static final int kNumPosSlotBits = 6;\r
        public static final int kDicLogSizeMin = 0;\r
        // public static final int kDicLogSizeMax = 28;\r
        // public static final int kDistTableSizeMax = kDicLogSizeMax * 2;\r
-       \r
+\r
        public static final int kNumLenToPosStatesBits = 2; // it's for speed optimization\r
        public static final int kNumLenToPosStates = 1 << kNumLenToPosStatesBits;\r
-       \r
+\r
        public static final int kMatchMinLen = 2;\r
-       \r
-       public static final int GetLenToPosState(int len)\r
-       {\r
+\r
+       public static final int GetLenToPosState (int len) {\r
                len -= kMatchMinLen;\r
-               if (len < kNumLenToPosStates)\r
-                       return len;\r
+               if (len < kNumLenToPosStates) return len;\r
                return (int)(kNumLenToPosStates - 1);\r
        }\r
-       \r
+\r
        public static final int kNumAlignBits = 4;\r
        public static final int kAlignTableSize = 1 << kNumAlignBits;\r
        public static final int kAlignMask = (kAlignTableSize - 1);\r
-       \r
+\r
        public static final int kStartPosModelIndex = 4;\r
        public static final int kEndPosModelIndex = 14;\r
        public static final int kNumPosModels = kEndPosModelIndex - kStartPosModelIndex;\r
-       \r
-       public static final  int kNumFullDistances = 1 << (kEndPosModelIndex / 2);\r
-       \r
-       public static final  int kNumLitPosStatesBitsEncodingMax = 4;\r
-       public static final  int kNumLitContextBitsMax = 8;\r
-       \r
-       public static final  int kNumPosStatesBitsMax = 4;\r
-       public static final  int kNumPosStatesMax = (1 << kNumPosStatesBitsMax);\r
-       public static final  int kNumPosStatesBitsEncodingMax = 4;\r
-       public static final  int kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax);\r
-       \r
-       public static final  int kNumLowLenBits = 3;\r
-       public static final  int kNumMidLenBits = 3;\r
-       public static final  int kNumHighLenBits = 8;\r
-       public static final  int kNumLowLenSymbols = 1 << kNumLowLenBits;\r
-       public static final  int kNumMidLenSymbols = 1 << kNumMidLenBits;\r
-       public static final  int kNumLenSymbols = kNumLowLenSymbols + kNumMidLenSymbols +\r
-                       (1 << kNumHighLenBits);\r
-       public static final  int kMatchMaxLen = kMatchMinLen + kNumLenSymbols - 1;\r
+\r
+       public static final int kNumFullDistances = 1 << (kEndPosModelIndex / 2);\r
+\r
+       public static final int kNumLitPosStatesBitsEncodingMax = 4;\r
+       public static final int kNumLitContextBitsMax = 8;\r
+\r
+       public static final int kNumPosStatesBitsMax = 4;\r
+       public static final int kNumPosStatesMax = (1 << kNumPosStatesBitsMax);\r
+       public static final int kNumPosStatesBitsEncodingMax = 4;\r
+       public static final int kNumPosStatesEncodingMax = (1 << kNumPosStatesBitsEncodingMax);\r
+\r
+       public static final int kNumLowLenBits = 3;\r
+       public static final int kNumMidLenBits = 3;\r
+       public static final int kNumHighLenBits = 8;\r
+       public static final int kNumLowLenSymbols = 1 << kNumLowLenBits;\r
+       public static final int kNumMidLenSymbols = 1 << kNumMidLenBits;\r
+       public static final int kNumLenSymbols = kNumLowLenSymbols + kNumMidLenSymbols + (1 << kNumHighLenBits);\r
+       public static final int kMatchMaxLen = kMatchMinLen + kNumLenSymbols - 1;\r
 }\r
index 641c5d7..22db4eb 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression.lzma;\r
 \r
 import java.io.IOException;\r
 \r
 import com.badlogic.gdx.utils.compression.lz.OutWindow;\r
-import com.badlogic.gdx.utils.compression.lzma.Base;\r
 import com.badlogic.gdx.utils.compression.rangecoder.BitTreeDecoder;\r
 \r
-public class Decoder\r
-{\r
-       class LenDecoder\r
-       {\r
+public class Decoder {\r
+       class LenDecoder {\r
                short[] m_Choice = new short[2];\r
                BitTreeDecoder[] m_LowCoder = new BitTreeDecoder[Base.kNumPosStatesMax];\r
                BitTreeDecoder[] m_MidCoder = new BitTreeDecoder[Base.kNumPosStatesMax];\r
                BitTreeDecoder m_HighCoder = new BitTreeDecoder(Base.kNumHighLenBits);\r
                int m_NumPosStates = 0;\r
-               \r
-               public void Create(int numPosStates)\r
-               {\r
-                       for (; m_NumPosStates < numPosStates; m_NumPosStates++)\r
-                       {\r
+\r
+               public void Create (int numPosStates) {\r
+                       for (; m_NumPosStates < numPosStates; m_NumPosStates++) {\r
                                m_LowCoder[m_NumPosStates] = new BitTreeDecoder(Base.kNumLowLenBits);\r
                                m_MidCoder[m_NumPosStates] = new BitTreeDecoder(Base.kNumMidLenBits);\r
                        }\r
                }\r
-               \r
-               public void Init()\r
-               {\r
+\r
+               public void Init () {\r
                        com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_Choice);\r
-                       for (int posState = 0; posState < m_NumPosStates; posState++)\r
-                       {\r
+                       for (int posState = 0; posState < m_NumPosStates; posState++) {\r
                                m_LowCoder[posState].Init();\r
                                m_MidCoder[posState].Init();\r
                        }\r
                        m_HighCoder.Init();\r
                }\r
-               \r
-               public int Decode(com.badlogic.gdx.utils.compression.rangecoder.Decoder rangeDecoder, int posState) throws IOException\r
-               {\r
-                       if (rangeDecoder.DecodeBit(m_Choice, 0) == 0)\r
-                               return m_LowCoder[posState].Decode(rangeDecoder);\r
+\r
+               public int Decode (com.badlogic.gdx.utils.compression.rangecoder.Decoder rangeDecoder, int posState) throws IOException {\r
+                       if (rangeDecoder.DecodeBit(m_Choice, 0) == 0) return m_LowCoder[posState].Decode(rangeDecoder);\r
                        int symbol = Base.kNumLowLenSymbols;\r
                        if (rangeDecoder.DecodeBit(m_Choice, 1) == 0)\r
                                symbol += m_MidCoder[posState].Decode(rangeDecoder);\r
@@ -63,57 +55,48 @@ public class Decoder
                        return symbol;\r
                }\r
        }\r
-       \r
-       class LiteralDecoder\r
-       {\r
-               class Decoder2\r
-               {\r
+\r
+       class LiteralDecoder {\r
+               class Decoder2 {\r
                        short[] m_Decoders = new short[0x300];\r
-                       \r
-                       public void Init()\r
-                       {\r
+\r
+                       public void Init () {\r
                                com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_Decoders);\r
                        }\r
-                       \r
-                       public byte DecodeNormal(com.badlogic.gdx.utils.compression.rangecoder.Decoder rangeDecoder) throws IOException\r
-                       {\r
+\r
+                       public byte DecodeNormal (com.badlogic.gdx.utils.compression.rangecoder.Decoder rangeDecoder) throws IOException {\r
                                int symbol = 1;\r
                                do\r
                                        symbol = (symbol << 1) | rangeDecoder.DecodeBit(m_Decoders, symbol);\r
                                while (symbol < 0x100);\r
                                return (byte)symbol;\r
                        }\r
-                       \r
-                       public byte DecodeWithMatchByte(com.badlogic.gdx.utils.compression.rangecoder.Decoder rangeDecoder, byte matchByte) throws IOException\r
-                       {\r
+\r
+                       public byte DecodeWithMatchByte (com.badlogic.gdx.utils.compression.rangecoder.Decoder rangeDecoder, byte matchByte)\r
+                               throws IOException {\r
                                int symbol = 1;\r
-                               do\r
-                               {\r
+                               do {\r
                                        int matchBit = (matchByte >> 7) & 1;\r
                                        matchByte <<= 1;\r
                                        int bit = rangeDecoder.DecodeBit(m_Decoders, ((1 + matchBit) << 8) + symbol);\r
                                        symbol = (symbol << 1) | bit;\r
-                                       if (matchBit != bit)\r
-                                       {\r
+                                       if (matchBit != bit) {\r
                                                while (symbol < 0x100)\r
                                                        symbol = (symbol << 1) | rangeDecoder.DecodeBit(m_Decoders, symbol);\r
                                                break;\r
                                        }\r
-                               }\r
-                               while (symbol < 0x100);\r
+                               } while (symbol < 0x100);\r
                                return (byte)symbol;\r
                        }\r
                }\r
-               \r
+\r
                Decoder2[] m_Coders;\r
                int m_NumPrevBits;\r
                int m_NumPosBits;\r
                int m_PosMask;\r
-               \r
-               public void Create(int numPosBits, int numPrevBits)\r
-               {\r
-                       if (m_Coders != null && m_NumPrevBits == numPrevBits && m_NumPosBits == numPosBits)\r
-                               return;\r
+\r
+               public void Create (int numPosBits, int numPrevBits) {\r
+                       if (m_Coders != null && m_NumPrevBits == numPrevBits && m_NumPosBits == numPosBits) return;\r
                        m_NumPosBits = numPosBits;\r
                        m_PosMask = (1 << numPosBits) - 1;\r
                        m_NumPrevBits = numPrevBits;\r
@@ -122,68 +105,60 @@ public class Decoder
                        for (int i = 0; i < numStates; i++)\r
                                m_Coders[i] = new Decoder2();\r
                }\r
-               \r
-               public void Init()\r
-               {\r
+\r
+               public void Init () {\r
                        int numStates = 1 << (m_NumPrevBits + m_NumPosBits);\r
                        for (int i = 0; i < numStates; i++)\r
                                m_Coders[i].Init();\r
                }\r
-               \r
-               Decoder2 GetDecoder(int pos, byte prevByte)\r
-               {\r
+\r
+               Decoder2 GetDecoder (int pos, byte prevByte) {\r
                        return m_Coders[((pos & m_PosMask) << m_NumPrevBits) + ((prevByte & 0xFF) >>> (8 - m_NumPrevBits))];\r
                }\r
        }\r
-       \r
+\r
        OutWindow m_OutWindow = new OutWindow();\r
        com.badlogic.gdx.utils.compression.rangecoder.Decoder m_RangeDecoder = new com.badlogic.gdx.utils.compression.rangecoder.Decoder();\r
-       \r
+\r
        short[] m_IsMatchDecoders = new short[Base.kNumStates << Base.kNumPosStatesBitsMax];\r
        short[] m_IsRepDecoders = new short[Base.kNumStates];\r
        short[] m_IsRepG0Decoders = new short[Base.kNumStates];\r
        short[] m_IsRepG1Decoders = new short[Base.kNumStates];\r
        short[] m_IsRepG2Decoders = new short[Base.kNumStates];\r
        short[] m_IsRep0LongDecoders = new short[Base.kNumStates << Base.kNumPosStatesBitsMax];\r
-       \r
+\r
        BitTreeDecoder[] m_PosSlotDecoder = new BitTreeDecoder[Base.kNumLenToPosStates];\r
        short[] m_PosDecoders = new short[Base.kNumFullDistances - Base.kEndPosModelIndex];\r
-       \r
+\r
        BitTreeDecoder m_PosAlignDecoder = new BitTreeDecoder(Base.kNumAlignBits);\r
-       \r
+\r
        LenDecoder m_LenDecoder = new LenDecoder();\r
        LenDecoder m_RepLenDecoder = new LenDecoder();\r
-       \r
+\r
        LiteralDecoder m_LiteralDecoder = new LiteralDecoder();\r
-       \r
+\r
        int m_DictionarySize = -1;\r
-       int m_DictionarySizeCheck =  -1;\r
-       \r
+       int m_DictionarySizeCheck = -1;\r
+\r
        int m_PosStateMask;\r
-       \r
-       public Decoder()\r
-       {\r
+\r
+       public Decoder () {\r
                for (int i = 0; i < Base.kNumLenToPosStates; i++)\r
                        m_PosSlotDecoder[i] = new BitTreeDecoder(Base.kNumPosSlotBits);\r
        }\r
-       \r
-       boolean SetDictionarySize(int dictionarySize)\r
-       {\r
-               if (dictionarySize < 0)\r
-                       return false;\r
-               if (m_DictionarySize != dictionarySize)\r
-               {\r
+\r
+       boolean SetDictionarySize (int dictionarySize) {\r
+               if (dictionarySize < 0) return false;\r
+               if (m_DictionarySize != dictionarySize) {\r
                        m_DictionarySize = dictionarySize;\r
                        m_DictionarySizeCheck = Math.max(m_DictionarySize, 1);\r
                        m_OutWindow.Create(Math.max(m_DictionarySizeCheck, (1 << 12)));\r
                }\r
                return true;\r
        }\r
-       \r
-       boolean SetLcLpPb(int lc, int lp, int pb)\r
-       {\r
-               if (lc > Base.kNumLitContextBitsMax || lp > 4 || pb > Base.kNumPosStatesBitsMax)\r
-                       return false;\r
+\r
+       boolean SetLcLpPb (int lc, int lp, int pb) {\r
+               if (lc > Base.kNumLitContextBitsMax || lp > 4 || pb > Base.kNumPosStatesBitsMax) return false;\r
                m_LiteralDecoder.Create(lp, lc);\r
                int numPosStates = 1 << pb;\r
                m_LenDecoder.Create(numPosStates);\r
@@ -191,11 +166,10 @@ public class Decoder
                m_PosStateMask = numPosStates - 1;\r
                return true;\r
        }\r
-       \r
-       void Init() throws IOException\r
-       {\r
+\r
+       void Init () throws IOException {\r
                m_OutWindow.Init(false);\r
-               \r
+\r
                com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_IsMatchDecoders);\r
                com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_IsRep0LongDecoders);\r
                com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_IsRepDecoders);\r
@@ -203,7 +177,7 @@ public class Decoder
                com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_IsRepG1Decoders);\r
                com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_IsRepG2Decoders);\r
                com.badlogic.gdx.utils.compression.rangecoder.Decoder.InitBitModels(m_PosDecoders);\r
-               \r
+\r
                m_LiteralDecoder.Init();\r
                int i;\r
                for (i = 0; i < Base.kNumLenToPosStates; i++)\r
@@ -213,24 +187,20 @@ public class Decoder
                m_PosAlignDecoder.Init();\r
                m_RangeDecoder.Init();\r
        }\r
-       \r
-       public boolean Code(java.io.InputStream inStream, java.io.OutputStream outStream,\r
-                       long outSize) throws IOException\r
-       {\r
+\r
+       public boolean Code (java.io.InputStream inStream, java.io.OutputStream outStream, long outSize) throws IOException {\r
                m_RangeDecoder.SetStream(inStream);\r
                m_OutWindow.SetStream(outStream);\r
                Init();\r
-               \r
+\r
                int state = Base.StateInit();\r
                int rep0 = 0, rep1 = 0, rep2 = 0, rep3 = 0;\r
-               \r
+\r
                long nowPos64 = 0;\r
                byte prevByte = 0;\r
-               while (outSize < 0 || nowPos64 < outSize)\r
-               {\r
+               while (outSize < 0 || nowPos64 < outSize) {\r
                        int posState = (int)nowPos64 & m_PosStateMask;\r
-                       if (m_RangeDecoder.DecodeBit(m_IsMatchDecoders, (state << Base.kNumPosStatesBitsMax) + posState) == 0)\r
-                       {\r
+                       if (m_RangeDecoder.DecodeBit(m_IsMatchDecoders, (state << Base.kNumPosStatesBitsMax) + posState) == 0) {\r
                                LiteralDecoder.Decoder2 decoder2 = m_LiteralDecoder.GetDecoder((int)nowPos64, prevByte);\r
                                if (!Base.StateIsCharState(state))\r
                                        prevByte = decoder2.DecodeWithMatchByte(m_RangeDecoder, m_OutWindow.GetByte(rep0));\r
@@ -239,32 +209,23 @@ public class Decoder
                                m_OutWindow.PutByte(prevByte);\r
                                state = Base.StateUpdateChar(state);\r
                                nowPos64++;\r
-                       }\r
-                       else\r
-                       {\r
+                       } else {\r
                                int len;\r
-                               if (m_RangeDecoder.DecodeBit(m_IsRepDecoders, state) == 1)\r
-                               {\r
+                               if (m_RangeDecoder.DecodeBit(m_IsRepDecoders, state) == 1) {\r
                                        len = 0;\r
-                                       if (m_RangeDecoder.DecodeBit(m_IsRepG0Decoders, state) == 0)\r
-                                       {\r
-                                               if (m_RangeDecoder.DecodeBit(m_IsRep0LongDecoders, (state << Base.kNumPosStatesBitsMax) + posState) == 0)\r
-                                               {\r
+                                       if (m_RangeDecoder.DecodeBit(m_IsRepG0Decoders, state) == 0) {\r
+                                               if (m_RangeDecoder.DecodeBit(m_IsRep0LongDecoders, (state << Base.kNumPosStatesBitsMax) + posState) == 0) {\r
                                                        state = Base.StateUpdateShortRep(state);\r
                                                        len = 1;\r
                                                }\r
-                                       }\r
-                                       else\r
-                                       {\r
+                                       } else {\r
                                                int distance;\r
                                                if (m_RangeDecoder.DecodeBit(m_IsRepG1Decoders, state) == 0)\r
                                                        distance = rep1;\r
-                                               else\r
-                                               {\r
+                                               else {\r
                                                        if (m_RangeDecoder.DecodeBit(m_IsRepG2Decoders, state) == 0)\r
                                                                distance = rep2;\r
-                                                       else\r
-                                                       {\r
+                                                       else {\r
                                                                distance = rep3;\r
                                                                rep3 = rep2;\r
                                                        }\r
@@ -273,45 +234,34 @@ public class Decoder
                                                rep1 = rep0;\r
                                                rep0 = distance;\r
                                        }\r
-                                       if (len == 0)\r
-                                       {\r
+                                       if (len == 0) {\r
                                                len = m_RepLenDecoder.Decode(m_RangeDecoder, posState) + Base.kMatchMinLen;\r
                                                state = Base.StateUpdateRep(state);\r
                                        }\r
-                               }\r
-                               else\r
-                               {\r
+                               } else {\r
                                        rep3 = rep2;\r
                                        rep2 = rep1;\r
                                        rep1 = rep0;\r
                                        len = Base.kMatchMinLen + m_LenDecoder.Decode(m_RangeDecoder, posState);\r
                                        state = Base.StateUpdateMatch(state);\r
                                        int posSlot = m_PosSlotDecoder[Base.GetLenToPosState(len)].Decode(m_RangeDecoder);\r
-                                       if (posSlot >= Base.kStartPosModelIndex)\r
-                                       {\r
+                                       if (posSlot >= Base.kStartPosModelIndex) {\r
                                                int numDirectBits = (posSlot >> 1) - 1;\r
                                                rep0 = ((2 | (posSlot & 1)) << numDirectBits);\r
                                                if (posSlot < Base.kEndPosModelIndex)\r
-                                                       rep0 += BitTreeDecoder.ReverseDecode(m_PosDecoders,\r
-                                                                       rep0 - posSlot - 1, m_RangeDecoder, numDirectBits);\r
-                                               else\r
-                                               {\r
-                                                       rep0 += (m_RangeDecoder.DecodeDirectBits(\r
-                                                                       numDirectBits - Base.kNumAlignBits) << Base.kNumAlignBits);\r
+                                                       rep0 += BitTreeDecoder.ReverseDecode(m_PosDecoders, rep0 - posSlot - 1, m_RangeDecoder, numDirectBits);\r
+                                               else {\r
+                                                       rep0 += (m_RangeDecoder.DecodeDirectBits(numDirectBits - Base.kNumAlignBits) << Base.kNumAlignBits);\r
                                                        rep0 += m_PosAlignDecoder.ReverseDecode(m_RangeDecoder);\r
-                                                       if (rep0 < 0)\r
-                                                       {\r
-                                                               if (rep0 == -1)\r
-                                                                       break;\r
+                                                       if (rep0 < 0) {\r
+                                                               if (rep0 == -1) break;\r
                                                                return false;\r
                                                        }\r
                                                }\r
-                                       }\r
-                                       else\r
+                                       } else\r
                                                rep0 = posSlot;\r
                                }\r
-                               if (rep0 >= nowPos64 || rep0 >= m_DictionarySizeCheck)\r
-                               {\r
+                               if (rep0 >= nowPos64 || rep0 >= m_DictionarySizeCheck) {\r
                                        // m_OutWindow.Flush();\r
                                        return false;\r
                                }\r
@@ -325,11 +275,9 @@ public class Decoder
                m_RangeDecoder.ReleaseStream();\r
                return true;\r
        }\r
-       \r
-       public boolean SetDecoderProperties(byte[] properties)\r
-       {\r
-               if (properties.length < 5)\r
-                       return false;\r
+\r
+       public boolean SetDecoderProperties (byte[] properties) {\r
+               if (properties.length < 5) return false;\r
                int val = properties[0] & 0xFF;\r
                int lc = val % 9;\r
                int remainder = val / 9;\r
@@ -338,8 +286,7 @@ public class Decoder
                int dictionarySize = 0;\r
                for (int i = 0; i < 4; i++)\r
                        dictionarySize += ((int)(properties[1 + i]) & 0xFF) << (i * 8);\r
-               if (!SetLcLpPb(lc, lp, pb))\r
-                       return false;\r
+               if (!SetLcLpPb(lc, lp, pb)) return false;\r
                return SetDictionarySize(dictionarySize);\r
        }\r
-}
\ No newline at end of file
+}\r
index a288794..d3274a2 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression.lzma;\r
 \r
 import java.io.IOException;\r
 \r
 import com.badlogic.gdx.utils.compression.ICodeProgress;\r
-import com.badlogic.gdx.utils.compression.lz.BinTree;\r
-import com.badlogic.gdx.utils.compression.lzma.Base;\r
 import com.badlogic.gdx.utils.compression.rangecoder.BitTreeEncoder;\r
 \r
-public class Encoder\r
-{\r
+public class Encoder {\r
        public static final int EMatchFinderTypeBT2 = 0;\r
        public static final int EMatchFinderTypeBT4 = 1;\r
 \r
-\r
-\r
-\r
        static final int kIfinityPrice = 0xFFFFFFF;\r
 \r
        static byte[] g_FastPos = new byte[1 << 11];\r
 \r
-       static\r
-       {\r
+       static {\r
                int kFastSlots = 22;\r
                int c = 2;\r
                g_FastPos[0] = 0;\r
                g_FastPos[1] = 1;\r
-               for (int slotFast = 2; slotFast < kFastSlots; slotFast++)\r
-               {\r
+               for (int slotFast = 2; slotFast < kFastSlots; slotFast++) {\r
                        int k = (1 << ((slotFast >> 1) - 1));\r
                        for (int j = 0; j < k; j++, c++)\r
                                g_FastPos[c] = (byte)slotFast;\r
                }\r
        }\r
 \r
-       static int GetPosSlot(int pos)\r
-       {\r
-               if (pos < (1 << 11))\r
-                       return g_FastPos[pos];\r
-               if (pos < (1 << 21))\r
-                       return (g_FastPos[pos >> 10] + 20);\r
+       static int GetPosSlot (int pos) {\r
+               if (pos < (1 << 11)) return g_FastPos[pos];\r
+               if (pos < (1 << 21)) return (g_FastPos[pos >> 10] + 20);\r
                return (g_FastPos[pos >> 20] + 40);\r
        }\r
 \r
-       static int GetPosSlot2(int pos)\r
-       {\r
-               if (pos < (1 << 17))\r
-                       return (g_FastPos[pos >> 6] + 12);\r
-               if (pos < (1 << 27))\r
-                       return (g_FastPos[pos >> 16] + 32);\r
+       static int GetPosSlot2 (int pos) {\r
+               if (pos < (1 << 17)) return (g_FastPos[pos >> 6] + 12);\r
+               if (pos < (1 << 27)) return (g_FastPos[pos >> 16] + 32);\r
                return (g_FastPos[pos >> 26] + 52);\r
        }\r
 \r
@@ -70,8 +57,7 @@ public class Encoder
        byte _previousByte;\r
        int[] _repDistances = new int[Base.kNumRepDistances];\r
 \r
-       void BaseInit()\r
-       {\r
+       void BaseInit () {\r
                _state = Base.StateInit();\r
                _previousByte = 0;\r
                for (int i = 0; i < Base.kNumRepDistances; i++)\r
@@ -81,37 +67,31 @@ public class Encoder
        static final int kDefaultDictionaryLogSize = 22;\r
        static final int kNumFastBytesDefault = 0x20;\r
 \r
-       class LiteralEncoder\r
-       {\r
-               class Encoder2\r
-               {\r
+       class LiteralEncoder {\r
+               class Encoder2 {\r
                        short[] m_Encoders = new short[0x300];\r
 \r
-                       public void Init() { com.badlogic.gdx.utils.compression.rangecoder.Encoder.InitBitModels(m_Encoders); }\r
-\r
-\r
+                       public void Init () {\r
+                               com.badlogic.gdx.utils.compression.rangecoder.Encoder.InitBitModels(m_Encoders);\r
+                       }\r
 \r
-                       public void Encode(com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, byte symbol) throws IOException\r
-                       {\r
+                       public void Encode (com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, byte symbol) throws IOException {\r
                                int context = 1;\r
-                               for (int i = 7; i >= 0; i--)\r
-                               {\r
+                               for (int i = 7; i >= 0; i--) {\r
                                        int bit = ((symbol >> i) & 1);\r
                                        rangeEncoder.Encode(m_Encoders, context, bit);\r
                                        context = (context << 1) | bit;\r
                                }\r
                        }\r
 \r
-                       public void EncodeMatched(com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, byte matchByte, byte symbol) throws IOException\r
-                       {\r
+                       public void EncodeMatched (com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, byte matchByte,\r
+                               byte symbol) throws IOException {\r
                                int context = 1;\r
                                boolean same = true;\r
-                               for (int i = 7; i >= 0; i--)\r
-                               {\r
+                               for (int i = 7; i >= 0; i--) {\r
                                        int bit = ((symbol >> i) & 1);\r
                                        int state = context;\r
-                                       if (same)\r
-                                       {\r
+                                       if (same) {\r
                                                int matchBit = ((matchByte >> i) & 1);\r
                                                state += ((1 + matchBit) << 8);\r
                                                same = (matchBit == bit);\r
@@ -121,28 +101,24 @@ public class Encoder
                                }\r
                        }\r
 \r
-                       public int GetPrice(boolean matchMode, byte matchByte, byte symbol)\r
-                       {\r
+                       public int GetPrice (boolean matchMode, byte matchByte, byte symbol) {\r
                                int price = 0;\r
                                int context = 1;\r
                                int i = 7;\r
-                               if (matchMode)\r
-                               {\r
-                                       for (; i >= 0; i--)\r
-                                       {\r
+                               if (matchMode) {\r
+                                       for (; i >= 0; i--) {\r
                                                int matchBit = (matchByte >> i) & 1;\r
                                                int bit = (symbol >> i) & 1;\r
-                                               price += com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice(m_Encoders[((1 + matchBit) << 8) + context], bit);\r
+                                               price += com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice(m_Encoders[((1 + matchBit) << 8)\r
+                                                       + context], bit);\r
                                                context = (context << 1) | bit;\r
-                                               if (matchBit != bit)\r
-                                               {\r
+                                               if (matchBit != bit) {\r
                                                        i--;\r
                                                        break;\r
                                                }\r
                                        }\r
                                }\r
-                               for (; i >= 0; i--)\r
-                               {\r
+                               for (; i >= 0; i--) {\r
                                        int bit = (symbol >> i) & 1;\r
                                        price += com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice(m_Encoders[context], bit);\r
                                        context = (context << 1) | bit;\r
@@ -156,10 +132,8 @@ public class Encoder
                int m_NumPosBits;\r
                int m_PosMask;\r
 \r
-               public void Create(int numPosBits, int numPrevBits)\r
-               {\r
-                       if (m_Coders != null && m_NumPrevBits == numPrevBits && m_NumPosBits == numPosBits)\r
-                               return;\r
+               public void Create (int numPosBits, int numPrevBits) {\r
+                       if (m_Coders != null && m_NumPrevBits == numPrevBits && m_NumPosBits == numPosBits) return;\r
                        m_NumPosBits = numPosBits;\r
                        m_PosMask = (1 << numPosBits) - 1;\r
                        m_NumPrevBits = numPrevBits;\r
@@ -169,87 +143,70 @@ public class Encoder
                                m_Coders[i] = new Encoder2();\r
                }\r
 \r
-               public void Init()\r
-               {\r
+               public void Init () {\r
                        int numStates = 1 << (m_NumPrevBits + m_NumPosBits);\r
                        for (int i = 0; i < numStates; i++)\r
                                m_Coders[i].Init();\r
                }\r
 \r
-               public Encoder2 GetSubCoder(int pos, byte prevByte)\r
-               { return m_Coders[((pos & m_PosMask) << m_NumPrevBits) + ((prevByte & 0xFF) >>> (8 - m_NumPrevBits))]; }\r
+               public Encoder2 GetSubCoder (int pos, byte prevByte) {\r
+                       return m_Coders[((pos & m_PosMask) << m_NumPrevBits) + ((prevByte & 0xFF) >>> (8 - m_NumPrevBits))];\r
+               }\r
        }\r
 \r
-       class LenEncoder\r
-       {\r
+       class LenEncoder {\r
                short[] _choice = new short[2];\r
                BitTreeEncoder[] _lowCoder = new BitTreeEncoder[Base.kNumPosStatesEncodingMax];\r
                BitTreeEncoder[] _midCoder = new BitTreeEncoder[Base.kNumPosStatesEncodingMax];\r
                BitTreeEncoder _highCoder = new BitTreeEncoder(Base.kNumHighLenBits);\r
 \r
-\r
-               public LenEncoder()\r
-               {\r
-                       for (int posState = 0; posState < Base.kNumPosStatesEncodingMax; posState++)\r
-                       {\r
+               public LenEncoder () {\r
+                       for (int posState = 0; posState < Base.kNumPosStatesEncodingMax; posState++) {\r
                                _lowCoder[posState] = new BitTreeEncoder(Base.kNumLowLenBits);\r
                                _midCoder[posState] = new BitTreeEncoder(Base.kNumMidLenBits);\r
                        }\r
                }\r
 \r
-               public void Init(int numPosStates)\r
-               {\r
+               public void Init (int numPosStates) {\r
                        com.badlogic.gdx.utils.compression.rangecoder.Encoder.InitBitModels(_choice);\r
 \r
-                       for (int posState = 0; posState < numPosStates; posState++)\r
-                       {\r
+                       for (int posState = 0; posState < numPosStates; posState++) {\r
                                _lowCoder[posState].Init();\r
                                _midCoder[posState].Init();\r
                        }\r
                        _highCoder.Init();\r
                }\r
 \r
-               public void Encode(com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, int symbol, int posState) throws IOException\r
-               {\r
-                       if (symbol < Base.kNumLowLenSymbols)\r
-                       {\r
+               public void Encode (com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, int symbol, int posState)\r
+                       throws IOException {\r
+                       if (symbol < Base.kNumLowLenSymbols) {\r
                                rangeEncoder.Encode(_choice, 0, 0);\r
                                _lowCoder[posState].Encode(rangeEncoder, symbol);\r
-                       }\r
-                       else\r
-                       {\r
+                       } else {\r
                                symbol -= Base.kNumLowLenSymbols;\r
                                rangeEncoder.Encode(_choice, 0, 1);\r
-                               if (symbol < Base.kNumMidLenSymbols)\r
-                               {\r
+                               if (symbol < Base.kNumMidLenSymbols) {\r
                                        rangeEncoder.Encode(_choice, 1, 0);\r
                                        _midCoder[posState].Encode(rangeEncoder, symbol);\r
-                               }\r
-                               else\r
-                               {\r
+                               } else {\r
                                        rangeEncoder.Encode(_choice, 1, 1);\r
                                        _highCoder.Encode(rangeEncoder, symbol - Base.kNumMidLenSymbols);\r
                                }\r
                        }\r
                }\r
 \r
-               public void SetPrices(int posState, int numSymbols, int[] prices, int st)\r
-               {\r
+               public void SetPrices (int posState, int numSymbols, int[] prices, int st) {\r
                        int a0 = com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_choice[0]);\r
                        int a1 = com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_choice[0]);\r
                        int b0 = a1 + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_choice[1]);\r
                        int b1 = a1 + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_choice[1]);\r
                        int i = 0;\r
-                       for (i = 0; i < Base.kNumLowLenSymbols; i++)\r
-                       {\r
-                               if (i >= numSymbols)\r
-                                       return;\r
+                       for (i = 0; i < Base.kNumLowLenSymbols; i++) {\r
+                               if (i >= numSymbols) return;\r
                                prices[st + i] = a0 + _lowCoder[posState].GetPrice(i);\r
                        }\r
-                       for (; i < Base.kNumLowLenSymbols + Base.kNumMidLenSymbols; i++)\r
-                       {\r
-                               if (i >= numSymbols)\r
-                                       return;\r
+                       for (; i < Base.kNumLowLenSymbols + Base.kNumMidLenSymbols; i++) {\r
+                               if (i >= numSymbols) return;\r
                                prices[st + i] = b0 + _midCoder[posState].GetPrice(i - Base.kNumLowLenSymbols);\r
                        }\r
                        for (; i < numSymbols; i++)\r
@@ -259,42 +216,39 @@ public class Encoder
 \r
        public static final int kNumLenSpecSymbols = Base.kNumLowLenSymbols + Base.kNumMidLenSymbols;\r
 \r
-       class LenPriceTableEncoder extends LenEncoder\r
-       {\r
-               int[] _prices = new int[Base.kNumLenSymbols<<Base.kNumPosStatesBitsEncodingMax];\r
+       class LenPriceTableEncoder extends LenEncoder {\r
+               int[] _prices = new int[Base.kNumLenSymbols << Base.kNumPosStatesBitsEncodingMax];\r
                int _tableSize;\r
                int[] _counters = new int[Base.kNumPosStatesEncodingMax];\r
 \r
-               public void SetTableSize(int tableSize) { _tableSize = tableSize; }\r
+               public void SetTableSize (int tableSize) {\r
+                       _tableSize = tableSize;\r
+               }\r
 \r
-               public int GetPrice(int symbol, int posState)\r
-               {\r
+               public int GetPrice (int symbol, int posState) {\r
                        return _prices[posState * Base.kNumLenSymbols + symbol];\r
                }\r
 \r
-               void UpdateTable(int posState)\r
-               {\r
+               void UpdateTable (int posState) {\r
                        SetPrices(posState, _tableSize, _prices, posState * Base.kNumLenSymbols);\r
                        _counters[posState] = _tableSize;\r
                }\r
 \r
-               public void UpdateTables(int numPosStates)\r
-               {\r
+               public void UpdateTables (int numPosStates) {\r
                        for (int posState = 0; posState < numPosStates; posState++)\r
                                UpdateTable(posState);\r
                }\r
 \r
-               public void Encode(com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, int symbol, int posState) throws IOException\r
-               {\r
+               public void Encode (com.badlogic.gdx.utils.compression.rangecoder.Encoder rangeEncoder, int symbol, int posState)\r
+                       throws IOException {\r
                        super.Encode(rangeEncoder, symbol, posState);\r
-                       if (--_counters[posState] == 0)\r
-                               UpdateTable(posState);\r
+                       if (--_counters[posState] == 0) UpdateTable(posState);\r
                }\r
        }\r
 \r
        static final int kNumOpts = 1 << 12;\r
-       class Optimal\r
-       {\r
+\r
+       class Optimal {\r
                public int State;\r
 \r
                public boolean Prev1IsChar;\r
@@ -312,24 +266,36 @@ public class Encoder
                public int Backs2;\r
                public int Backs3;\r
 \r
-               public void MakeAsChar() { BackPrev = -1; Prev1IsChar = false; }\r
-               public void MakeAsShortRep() { BackPrev = 0; ; Prev1IsChar = false; }\r
-               public boolean IsShortRep() { return (BackPrev == 0); }\r
+               public void MakeAsChar () {\r
+                       BackPrev = -1;\r
+                       Prev1IsChar = false;\r
+               }\r
+\r
+               public void MakeAsShortRep () {\r
+                       BackPrev = 0;\r
+                       ;\r
+                       Prev1IsChar = false;\r
+               }\r
+\r
+               public boolean IsShortRep () {\r
+                       return (BackPrev == 0);\r
+               }\r
        };\r
+\r
        Optimal[] _optimum = new Optimal[kNumOpts];\r
        com.badlogic.gdx.utils.compression.lz.BinTree _matchFinder = null;\r
        com.badlogic.gdx.utils.compression.rangecoder.Encoder _rangeEncoder = new com.badlogic.gdx.utils.compression.rangecoder.Encoder();\r
 \r
-       short[] _isMatch = new short[Base.kNumStates<<Base.kNumPosStatesBitsMax];\r
+       short[] _isMatch = new short[Base.kNumStates << Base.kNumPosStatesBitsMax];\r
        short[] _isRep = new short[Base.kNumStates];\r
        short[] _isRepG0 = new short[Base.kNumStates];\r
        short[] _isRepG1 = new short[Base.kNumStates];\r
        short[] _isRepG2 = new short[Base.kNumStates];\r
-       short[] _isRep0Long = new short[Base.kNumStates<<Base.kNumPosStatesBitsMax];\r
+       short[] _isRep0Long = new short[Base.kNumStates << Base.kNumPosStatesBitsMax];\r
 \r
        BitTreeEncoder[] _posSlotEncoder = new BitTreeEncoder[Base.kNumLenToPosStates]; // kNumPosSlotBits\r
 \r
-       short[] _posEncoders = new short[Base.kNumFullDistances-Base.kEndPosModelIndex];\r
+       short[] _posEncoders = new short[Base.kNumFullDistances - Base.kEndPosModelIndex];\r
        BitTreeEncoder _posAlignEncoder = new BitTreeEncoder(Base.kNumAlignBits);\r
 \r
        LenPriceTableEncoder _lenEncoder = new LenPriceTableEncoder();\r
@@ -337,7 +303,7 @@ public class Encoder
 \r
        LiteralEncoder _literalEncoder = new LiteralEncoder();\r
 \r
-       int[] _matchDistances = new int[Base.kMatchMaxLen*2+2];\r
+       int[] _matchDistances = new int[Base.kMatchMaxLen * 2 + 2];\r
 \r
        int _numFastBytes = kNumFastBytesDefault;\r
        int _longestMatchLength;\r
@@ -350,8 +316,8 @@ public class Encoder
 \r
        boolean _longestMatchWasFound;\r
 \r
-       int[] _posSlotPrices = new int[1<<(Base.kNumPosSlotBits+Base.kNumLenToPosStatesBits)];\r
-       int[] _distancesPrices = new int[Base.kNumFullDistances<<Base.kNumLenToPosStatesBits];\r
+       int[] _posSlotPrices = new int[1 << (Base.kNumPosSlotBits + Base.kNumLenToPosStatesBits)];\r
+       int[] _distancesPrices = new int[Base.kNumFullDistances << Base.kNumLenToPosStatesBits];\r
        int[] _alignPrices = new int[Base.kAlignTableSize];\r
        int _alignPriceCount;\r
 \r
@@ -375,41 +341,34 @@ public class Encoder
 \r
        boolean _needReleaseMFStream = false;\r
 \r
-       void Create()\r
-       {\r
-               if (_matchFinder == null)\r
-               {\r
+       void Create () {\r
+               if (_matchFinder == null) {\r
                        com.badlogic.gdx.utils.compression.lz.BinTree bt = new com.badlogic.gdx.utils.compression.lz.BinTree();\r
                        int numHashBytes = 4;\r
-                       if (_matchFinderType == EMatchFinderTypeBT2)\r
-                               numHashBytes = 2;\r
+                       if (_matchFinderType == EMatchFinderTypeBT2) numHashBytes = 2;\r
                        bt.SetType(numHashBytes);\r
                        _matchFinder = bt;\r
                }\r
                _literalEncoder.Create(_numLiteralPosStateBits, _numLiteralContextBits);\r
 \r
-               if (_dictionarySize == _dictionarySizePrev && _numFastBytesPrev == _numFastBytes)\r
-                       return;\r
+               if (_dictionarySize == _dictionarySizePrev && _numFastBytesPrev == _numFastBytes) return;\r
                _matchFinder.Create(_dictionarySize, kNumOpts, _numFastBytes, Base.kMatchMaxLen + 1);\r
                _dictionarySizePrev = _dictionarySize;\r
                _numFastBytesPrev = _numFastBytes;\r
        }\r
 \r
-       public Encoder()\r
-       {\r
+       public Encoder () {\r
                for (int i = 0; i < kNumOpts; i++)\r
                        _optimum[i] = new Optimal();\r
                for (int i = 0; i < Base.kNumLenToPosStates; i++)\r
                        _posSlotEncoder[i] = new BitTreeEncoder(Base.kNumPosSlotBits);\r
        }\r
 \r
-       void SetWriteEndMarkerMode(boolean writeEndMarker)\r
-       {\r
+       void SetWriteEndMarkerMode (boolean writeEndMarker) {\r
                _writeEndMark = writeEndMarker;\r
        }\r
 \r
-       void Init()\r
-       {\r
+       void Init () {\r
                BaseInit();\r
                _rangeEncoder.Init();\r
 \r
@@ -421,18 +380,10 @@ public class Encoder
                com.badlogic.gdx.utils.compression.rangecoder.Encoder.InitBitModels(_isRepG2);\r
                com.badlogic.gdx.utils.compression.rangecoder.Encoder.InitBitModels(_posEncoders);\r
 \r
-\r
-\r
-\r
-\r
-\r
-\r
                _literalEncoder.Init();\r
                for (int i = 0; i < Base.kNumLenToPosStates; i++)\r
                        _posSlotEncoder[i].Init();\r
 \r
-\r
-\r
                _lenEncoder.Init(1 << _posStateBits);\r
                _repMatchLenEncoder.Init(1 << _posStateBits);\r
 \r
@@ -444,51 +395,43 @@ public class Encoder
                _additionalOffset = 0;\r
        }\r
 \r
-       int ReadMatchDistances() throws java.io.IOException\r
-       {\r
+       int ReadMatchDistances () throws java.io.IOException {\r
                int lenRes = 0;\r
                _numDistancePairs = _matchFinder.GetMatches(_matchDistances);\r
-               if (_numDistancePairs > 0)\r
-               {\r
+               if (_numDistancePairs > 0) {\r
                        lenRes = _matchDistances[_numDistancePairs - 2];\r
                        if (lenRes == _numFastBytes)\r
-                               lenRes += _matchFinder.GetMatchLen((int)lenRes - 1, _matchDistances[_numDistancePairs - 1],\r
-                                       Base.kMatchMaxLen - lenRes);\r
+                               lenRes += _matchFinder.GetMatchLen((int)lenRes - 1, _matchDistances[_numDistancePairs - 1], Base.kMatchMaxLen\r
+                                       - lenRes);\r
                }\r
                _additionalOffset++;\r
                return lenRes;\r
        }\r
 \r
-       void MovePos(int num) throws java.io.IOException\r
-       {\r
-               if (num > 0)\r
-               {\r
+       void MovePos (int num) throws java.io.IOException {\r
+               if (num > 0) {\r
                        _matchFinder.Skip(num);\r
                        _additionalOffset += num;\r
                }\r
        }\r
 \r
-       int GetRepLen1Price(int state, int posState)\r
-       {\r
-               return com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRepG0[state]) +\r
-                               com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRep0Long[(state << Base.kNumPosStatesBitsMax) + posState]);\r
+       int GetRepLen1Price (int state, int posState) {\r
+               return com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRepG0[state])\r
+                       + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRep0Long[(state << Base.kNumPosStatesBitsMax)\r
+                               + posState]);\r
        }\r
 \r
-       int GetPureRepPrice(int repIndex, int state, int posState)\r
-       {\r
+       int GetPureRepPrice (int repIndex, int state, int posState) {\r
                int price;\r
-               if (repIndex == 0)\r
-               {\r
+               if (repIndex == 0) {\r
                        price = com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRepG0[state]);\r
-                       price += com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep0Long[(state << Base.kNumPosStatesBitsMax) + posState]);\r
-               }\r
-               else\r
-               {\r
+                       price += com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                               .GetPrice1(_isRep0Long[(state << Base.kNumPosStatesBitsMax) + posState]);\r
+               } else {\r
                        price = com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRepG0[state]);\r
                        if (repIndex == 1)\r
                                price += com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRepG1[state]);\r
-                       else\r
-                       {\r
+                       else {\r
                                price += com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRepG1[state]);\r
                                price += com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice(_isRepG2[state], repIndex - 2);\r
                        }\r
@@ -496,37 +439,30 @@ public class Encoder
                return price;\r
        }\r
 \r
-       int GetRepPrice(int repIndex, int len, int state, int posState)\r
-       {\r
+       int GetRepPrice (int repIndex, int len, int state, int posState) {\r
                int price = _repMatchLenEncoder.GetPrice(len - Base.kMatchMinLen, posState);\r
                return price + GetPureRepPrice(repIndex, state, posState);\r
        }\r
 \r
-       int GetPosLenPrice(int pos, int len, int posState)\r
-       {\r
+       int GetPosLenPrice (int pos, int len, int posState) {\r
                int price;\r
                int lenToPosState = Base.GetLenToPosState(len);\r
                if (pos < Base.kNumFullDistances)\r
                        price = _distancesPrices[(lenToPosState * Base.kNumFullDistances) + pos];\r
                else\r
-                       price = _posSlotPrices[(lenToPosState << Base.kNumPosSlotBits) + GetPosSlot2(pos)] +\r
-                               _alignPrices[pos & Base.kAlignMask];\r
+                       price = _posSlotPrices[(lenToPosState << Base.kNumPosSlotBits) + GetPosSlot2(pos)] + _alignPrices[pos & Base.kAlignMask];\r
                return price + _lenEncoder.GetPrice(len - Base.kMatchMinLen, posState);\r
        }\r
 \r
-       int Backward(int cur)\r
-       {\r
+       int Backward (int cur) {\r
                _optimumEndIndex = cur;\r
                int posMem = _optimum[cur].PosPrev;\r
                int backMem = _optimum[cur].BackPrev;\r
-               do\r
-               {\r
-                       if (_optimum[cur].Prev1IsChar)\r
-                       {\r
+               do {\r
+                       if (_optimum[cur].Prev1IsChar) {\r
                                _optimum[posMem].MakeAsChar();\r
                                _optimum[posMem].PosPrev = posMem - 1;\r
-                               if (_optimum[cur].Prev2)\r
-                               {\r
+                               if (_optimum[cur].Prev2) {\r
                                        _optimum[posMem - 1].Prev1IsChar = false;\r
                                        _optimum[posMem - 1].PosPrev = _optimum[cur].PosPrev2;\r
                                        _optimum[posMem - 1].BackPrev = _optimum[cur].BackPrev2;\r
@@ -541,8 +477,7 @@ public class Encoder
                        _optimum[posPrev].BackPrev = backCur;\r
                        _optimum[posPrev].PosPrev = cur;\r
                        cur = posPrev;\r
-               }\r
-               while (cur > 0);\r
+               } while (cur > 0);\r
                backRes = _optimum[0].BackPrev;\r
                _optimumCurrentIndex = _optimum[0].PosPrev;\r
                return _optimumCurrentIndex;\r
@@ -552,10 +487,8 @@ public class Encoder
        int[] repLens = new int[Base.kNumRepDistances];\r
        int backRes;\r
 \r
-       int GetOptimum(int position) throws IOException\r
-       {\r
-               if (_optimumEndIndex != _optimumCurrentIndex)\r
-               {\r
+       int GetOptimum (int position) throws IOException {\r
+               if (_optimumEndIndex != _optimumCurrentIndex) {\r
                        int lenRes = _optimum[_optimumCurrentIndex].PosPrev - _optimumCurrentIndex;\r
                        backRes = _optimum[_optimumCurrentIndex].BackPrev;\r
                        _optimumCurrentIndex = _optimum[_optimumCurrentIndex].PosPrev;\r
@@ -564,45 +497,36 @@ public class Encoder
                _optimumCurrentIndex = _optimumEndIndex = 0;\r
 \r
                int lenMain, numDistancePairs;\r
-               if (!_longestMatchWasFound)\r
-               {\r
+               if (!_longestMatchWasFound) {\r
                        lenMain = ReadMatchDistances();\r
-               }\r
-               else\r
-               {\r
+               } else {\r
                        lenMain = _longestMatchLength;\r
                        _longestMatchWasFound = false;\r
                }\r
                numDistancePairs = _numDistancePairs;\r
 \r
                int numAvailableBytes = _matchFinder.GetNumAvailableBytes() + 1;\r
-               if (numAvailableBytes < 2)\r
-               {\r
+               if (numAvailableBytes < 2) {\r
                        backRes = -1;\r
                        return 1;\r
                }\r
-               if (numAvailableBytes > Base.kMatchMaxLen)\r
-                       numAvailableBytes = Base.kMatchMaxLen;\r
+               if (numAvailableBytes > Base.kMatchMaxLen) numAvailableBytes = Base.kMatchMaxLen;\r
 \r
                int repMaxIndex = 0;\r
                int i;\r
-               for (i = 0; i < Base.kNumRepDistances; i++)\r
-               {\r
+               for (i = 0; i < Base.kNumRepDistances; i++) {\r
                        reps[i] = _repDistances[i];\r
                        repLens[i] = _matchFinder.GetMatchLen(0 - 1, reps[i], Base.kMatchMaxLen);\r
-                       if (repLens[i] > repLens[repMaxIndex])\r
-                               repMaxIndex = i;\r
+                       if (repLens[i] > repLens[repMaxIndex]) repMaxIndex = i;\r
                }\r
-               if (repLens[repMaxIndex] >= _numFastBytes)\r
-               {\r
+               if (repLens[repMaxIndex] >= _numFastBytes) {\r
                        backRes = repMaxIndex;\r
                        int lenRes = repLens[repMaxIndex];\r
                        MovePos(lenRes - 1);\r
                        return lenRes;\r
                }\r
 \r
-               if (lenMain >= _numFastBytes)\r
-               {\r
+               if (lenMain >= _numFastBytes) {\r
                        backRes = _matchDistances[numDistancePairs - 1] + Base.kNumRepDistances;\r
                        MovePos(lenMain - 1);\r
                        return lenMain;\r
@@ -611,8 +535,7 @@ public class Encoder
                byte currentByte = _matchFinder.GetIndexByte(0 - 1);\r
                byte matchByte = _matchFinder.GetIndexByte(0 - _repDistances[0] - 1 - 1);\r
 \r
-               if (lenMain < 2 && currentByte != matchByte && repLens[repMaxIndex] < 2)\r
-               {\r
+               if (lenMain < 2 && currentByte != matchByte && repLens[repMaxIndex] < 2) {\r
                        backRes = -1;\r
                        return 1;\r
                }\r
@@ -621,18 +544,18 @@ public class Encoder
 \r
                int posState = (position & _posStateMask);\r
 \r
-               _optimum[1].Price = com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isMatch[(_state << Base.kNumPosStatesBitsMax) + posState]) +\r
-                               _literalEncoder.GetSubCoder(position, _previousByte).GetPrice(!Base.StateIsCharState(_state), matchByte, currentByte);\r
+               _optimum[1].Price = com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                       .GetPrice0(_isMatch[(_state << Base.kNumPosStatesBitsMax) + posState])\r
+                       + _literalEncoder.GetSubCoder(position, _previousByte).GetPrice(!Base.StateIsCharState(_state), matchByte, currentByte);\r
                _optimum[1].MakeAsChar();\r
 \r
-               int matchPrice = com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isMatch[(_state << Base.kNumPosStatesBitsMax) + posState]);\r
+               int matchPrice = com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                       .GetPrice1(_isMatch[(_state << Base.kNumPosStatesBitsMax) + posState]);\r
                int repMatchPrice = matchPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[_state]);\r
 \r
-               if (matchByte == currentByte)\r
-               {\r
+               if (matchByte == currentByte) {\r
                        int shortRepPrice = repMatchPrice + GetRepLen1Price(_state, posState);\r
-                       if (shortRepPrice < _optimum[1].Price)\r
-                       {\r
+                       if (shortRepPrice < _optimum[1].Price) {\r
                                _optimum[1].Price = shortRepPrice;\r
                                _optimum[1].MakeAsShortRep();\r
                        }\r
@@ -640,8 +563,7 @@ public class Encoder
 \r
                int lenEnd = ((lenMain >= repLens[repMaxIndex]) ? lenMain : repLens[repMaxIndex]);\r
 \r
-               if (lenEnd < 2)\r
-               {\r
+               if (lenEnd < 2) {\r
                        backRes = _optimum[1].BackPrev;\r
                        return 1;\r
                }\r
@@ -658,67 +580,54 @@ public class Encoder
                        _optimum[len--].Price = kIfinityPrice;\r
                while (len >= 2);\r
 \r
-               for (i = 0; i < Base.kNumRepDistances; i++)\r
-               {\r
+               for (i = 0; i < Base.kNumRepDistances; i++) {\r
                        int repLen = repLens[i];\r
-                       if (repLen < 2)\r
-                               continue;\r
+                       if (repLen < 2) continue;\r
                        int price = repMatchPrice + GetPureRepPrice(i, _state, posState);\r
-                       do\r
-                       {\r
+                       do {\r
                                int curAndLenPrice = price + _repMatchLenEncoder.GetPrice(repLen - 2, posState);\r
                                Optimal optimum = _optimum[repLen];\r
-                               if (curAndLenPrice < optimum.Price)\r
-                               {\r
+                               if (curAndLenPrice < optimum.Price) {\r
                                        optimum.Price = curAndLenPrice;\r
                                        optimum.PosPrev = 0;\r
                                        optimum.BackPrev = i;\r
                                        optimum.Prev1IsChar = false;\r
                                }\r
-                       }\r
-                       while (--repLen >= 2);\r
+                       } while (--repLen >= 2);\r
                }\r
 \r
                int normalMatchPrice = matchPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRep[_state]);\r
 \r
                len = ((repLens[0] >= 2) ? repLens[0] + 1 : 2);\r
-               if (len <= lenMain)\r
-               {\r
+               if (len <= lenMain) {\r
                        int offs = 0;\r
                        while (len > _matchDistances[offs])\r
                                offs += 2;\r
-                       for (; ; len++)\r
-                       {\r
+                       for (;; len++) {\r
                                int distance = _matchDistances[offs + 1];\r
                                int curAndLenPrice = normalMatchPrice + GetPosLenPrice(distance, len, posState);\r
                                Optimal optimum = _optimum[len];\r
-                               if (curAndLenPrice < optimum.Price)\r
-                               {\r
+                               if (curAndLenPrice < optimum.Price) {\r
                                        optimum.Price = curAndLenPrice;\r
                                        optimum.PosPrev = 0;\r
                                        optimum.BackPrev = distance + Base.kNumRepDistances;\r
                                        optimum.Prev1IsChar = false;\r
                                }\r
-                               if (len == _matchDistances[offs])\r
-                               {\r
+                               if (len == _matchDistances[offs]) {\r
                                        offs += 2;\r
-                                       if (offs == numDistancePairs)\r
-                                               break;\r
+                                       if (offs == numDistancePairs) break;\r
                                }\r
                        }\r
                }\r
 \r
                int cur = 0;\r
 \r
-               while (true)\r
-               {\r
+               while (true) {\r
                        cur++;\r
-                       if (cur == lenEnd)\r
-                               return Backward(cur);\r
+                       if (cur == lenEnd) return Backward(cur);\r
                        int newLen = ReadMatchDistances();\r
                        numDistancePairs = _numDistancePairs;\r
-                       if (newLen >= _numFastBytes)\r
-                       {\r
+                       if (newLen >= _numFastBytes) {\r
 \r
                                _longestMatchLength = newLen;\r
                                _longestMatchWasFound = true;\r
@@ -727,41 +636,31 @@ public class Encoder
                        position++;\r
                        int posPrev = _optimum[cur].PosPrev;\r
                        int state;\r
-                       if (_optimum[cur].Prev1IsChar)\r
-                       {\r
+                       if (_optimum[cur].Prev1IsChar) {\r
                                posPrev--;\r
-                               if (_optimum[cur].Prev2)\r
-                               {\r
+                               if (_optimum[cur].Prev2) {\r
                                        state = _optimum[_optimum[cur].PosPrev2].State;\r
                                        if (_optimum[cur].BackPrev2 < Base.kNumRepDistances)\r
                                                state = Base.StateUpdateRep(state);\r
                                        else\r
                                                state = Base.StateUpdateMatch(state);\r
-                               }\r
-                               else\r
+                               } else\r
                                        state = _optimum[posPrev].State;\r
                                state = Base.StateUpdateChar(state);\r
-                       }\r
-                       else\r
+                       } else\r
                                state = _optimum[posPrev].State;\r
-                       if (posPrev == cur - 1)\r
-                       {\r
+                       if (posPrev == cur - 1) {\r
                                if (_optimum[cur].IsShortRep())\r
                                        state = Base.StateUpdateShortRep(state);\r
                                else\r
                                        state = Base.StateUpdateChar(state);\r
-                       }\r
-                       else\r
-                       {\r
+                       } else {\r
                                int pos;\r
-                               if (_optimum[cur].Prev1IsChar && _optimum[cur].Prev2)\r
-                               {\r
+                               if (_optimum[cur].Prev1IsChar && _optimum[cur].Prev2) {\r
                                        posPrev = _optimum[cur].PosPrev2;\r
                                        pos = _optimum[cur].BackPrev2;\r
                                        state = Base.StateUpdateRep(state);\r
-                               }\r
-                               else\r
-                               {\r
+                               } else {\r
                                        pos = _optimum[cur].BackPrev;\r
                                        if (pos < Base.kNumRepDistances)\r
                                                state = Base.StateUpdateRep(state);\r
@@ -769,39 +668,29 @@ public class Encoder
                                                state = Base.StateUpdateMatch(state);\r
                                }\r
                                Optimal opt = _optimum[posPrev];\r
-                               if (pos < Base.kNumRepDistances)\r
-                               {\r
-                                       if (pos == 0)\r
-                                       {\r
+                               if (pos < Base.kNumRepDistances) {\r
+                                       if (pos == 0) {\r
                                                reps[0] = opt.Backs0;\r
                                                reps[1] = opt.Backs1;\r
                                                reps[2] = opt.Backs2;\r
                                                reps[3] = opt.Backs3;\r
-                                       }\r
-                                       else if (pos == 1)\r
-                                       {\r
+                                       } else if (pos == 1) {\r
                                                reps[0] = opt.Backs1;\r
                                                reps[1] = opt.Backs0;\r
                                                reps[2] = opt.Backs2;\r
                                                reps[3] = opt.Backs3;\r
-                                       }\r
-                                       else if (pos == 2)\r
-                                       {\r
+                                       } else if (pos == 2) {\r
                                                reps[0] = opt.Backs2;\r
                                                reps[1] = opt.Backs0;\r
                                                reps[2] = opt.Backs1;\r
                                                reps[3] = opt.Backs3;\r
-                                       }\r
-                                       else\r
-                                       {\r
+                                       } else {\r
                                                reps[0] = opt.Backs3;\r
                                                reps[1] = opt.Backs0;\r
                                                reps[2] = opt.Backs1;\r
                                                reps[3] = opt.Backs2;\r
                                        }\r
-                               }\r
-                               else\r
-                               {\r
+                               } else {\r
                                        reps[0] = (pos - Base.kNumRepDistances);\r
                                        reps[1] = opt.Backs0;\r
                                        reps[2] = opt.Backs1;\r
@@ -820,31 +709,30 @@ public class Encoder
 \r
                        posState = (position & _posStateMask);\r
 \r
-                       int curAnd1Price = curPrice +\r
-                               com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isMatch[(state << Base.kNumPosStatesBitsMax) + posState]) +\r
-                               _literalEncoder.GetSubCoder(position, _matchFinder.GetIndexByte(0 - 2)).\r
-                               GetPrice(!Base.StateIsCharState(state), matchByte, currentByte);\r
+                       int curAnd1Price = curPrice\r
+                               + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isMatch[(state << Base.kNumPosStatesBitsMax)\r
+                                       + posState])\r
+                               + _literalEncoder.GetSubCoder(position, _matchFinder.GetIndexByte(0 - 2)).GetPrice(!Base.StateIsCharState(state),\r
+                                       matchByte, currentByte);\r
 \r
                        Optimal nextOptimum = _optimum[cur + 1];\r
 \r
                        boolean nextIsChar = false;\r
-                       if (curAnd1Price < nextOptimum.Price)\r
-                       {\r
+                       if (curAnd1Price < nextOptimum.Price) {\r
                                nextOptimum.Price = curAnd1Price;\r
                                nextOptimum.PosPrev = cur;\r
                                nextOptimum.MakeAsChar();\r
                                nextIsChar = true;\r
                        }\r
 \r
-                       matchPrice = curPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isMatch[(state << Base.kNumPosStatesBitsMax) + posState]);\r
+                       matchPrice = curPrice\r
+                               + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isMatch[(state << Base.kNumPosStatesBitsMax)\r
+                                       + posState]);\r
                        repMatchPrice = matchPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[state]);\r
 \r
-                       if (matchByte == currentByte &&\r
-                               !(nextOptimum.PosPrev < cur && nextOptimum.BackPrev == 0))\r
-                       {\r
+                       if (matchByte == currentByte && !(nextOptimum.PosPrev < cur && nextOptimum.BackPrev == 0)) {\r
                                int shortRepPrice = repMatchPrice + GetRepLen1Price(state, posState);\r
-                               if (shortRepPrice <= nextOptimum.Price)\r
-                               {\r
+                               if (shortRepPrice <= nextOptimum.Price) {\r
                                        nextOptimum.Price = shortRepPrice;\r
                                        nextOptimum.PosPrev = cur;\r
                                        nextOptimum.MakeAsShortRep();\r
@@ -856,32 +744,27 @@ public class Encoder
                        numAvailableBytesFull = Math.min(kNumOpts - 1 - cur, numAvailableBytesFull);\r
                        numAvailableBytes = numAvailableBytesFull;\r
 \r
-                       if (numAvailableBytes < 2)\r
-                               continue;\r
-                       if (numAvailableBytes > _numFastBytes)\r
-                               numAvailableBytes = _numFastBytes;\r
-                       if (!nextIsChar && matchByte != currentByte)\r
-                       {\r
+                       if (numAvailableBytes < 2) continue;\r
+                       if (numAvailableBytes > _numFastBytes) numAvailableBytes = _numFastBytes;\r
+                       if (!nextIsChar && matchByte != currentByte) {\r
                                // try Literal + rep0\r
                                int t = Math.min(numAvailableBytesFull - 1, _numFastBytes);\r
                                int lenTest2 = _matchFinder.GetMatchLen(0, reps[0], t);\r
-                               if (lenTest2 >= 2)\r
-                               {\r
+                               if (lenTest2 >= 2) {\r
                                        int state2 = Base.StateUpdateChar(state);\r
 \r
                                        int posStateNext = (position + 1) & _posStateMask;\r
-                                       int nextRepMatchPrice = curAnd1Price +\r
-                                               com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext]) +\r
-                                               com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[state2]);\r
+                                       int nextRepMatchPrice = curAnd1Price\r
+                                               + com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                                                       .GetPrice1(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext])\r
+                                               + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[state2]);\r
                                        {\r
                                                int offset = cur + 1 + lenTest2;\r
                                                while (lenEnd < offset)\r
                                                        _optimum[++lenEnd].Price = kIfinityPrice;\r
-                                               int curAndLenPrice = nextRepMatchPrice + GetRepPrice(\r
-                                                               0, lenTest2, state2, posStateNext);\r
+                                               int curAndLenPrice = nextRepMatchPrice + GetRepPrice(0, lenTest2, state2, posStateNext);\r
                                                Optimal optimum = _optimum[offset];\r
-                                               if (curAndLenPrice < optimum.Price)\r
-                                               {\r
+                                               if (curAndLenPrice < optimum.Price) {\r
                                                        optimum.Price = curAndLenPrice;\r
                                                        optimum.PosPrev = cur + 1;\r
                                                        optimum.BackPrev = 0;\r
@@ -892,55 +775,49 @@ public class Encoder
                                }\r
                        }\r
 \r
-                       int startLen = 2; // speed optimization \r
+                       int startLen = 2; // speed optimization\r
 \r
-                       for (int repIndex = 0; repIndex < Base.kNumRepDistances; repIndex++)\r
-                       {\r
+                       for (int repIndex = 0; repIndex < Base.kNumRepDistances; repIndex++) {\r
                                int lenTest = _matchFinder.GetMatchLen(0 - 1, reps[repIndex], numAvailableBytes);\r
-                               if (lenTest < 2)\r
-                                       continue;\r
+                               if (lenTest < 2) continue;\r
                                int lenTestTemp = lenTest;\r
-                               do\r
-                               {\r
+                               do {\r
                                        while (lenEnd < cur + lenTest)\r
                                                _optimum[++lenEnd].Price = kIfinityPrice;\r
                                        int curAndLenPrice = repMatchPrice + GetRepPrice(repIndex, lenTest, state, posState);\r
                                        Optimal optimum = _optimum[cur + lenTest];\r
-                                       if (curAndLenPrice < optimum.Price)\r
-                                       {\r
+                                       if (curAndLenPrice < optimum.Price) {\r
                                                optimum.Price = curAndLenPrice;\r
                                                optimum.PosPrev = cur;\r
                                                optimum.BackPrev = repIndex;\r
                                                optimum.Prev1IsChar = false;\r
                                        }\r
-                               }\r
-                               while (--lenTest >= 2);\r
+                               } while (--lenTest >= 2);\r
                                lenTest = lenTestTemp;\r
 \r
-                               if (repIndex == 0)\r
-                                       startLen = lenTest + 1;\r
+                               if (repIndex == 0) startLen = lenTest + 1;\r
 \r
                                // if (_maxMode)\r
-                               if (lenTest < numAvailableBytesFull)\r
-                               {\r
+                               if (lenTest < numAvailableBytesFull) {\r
                                        int t = Math.min(numAvailableBytesFull - 1 - lenTest, _numFastBytes);\r
                                        int lenTest2 = _matchFinder.GetMatchLen(lenTest, reps[repIndex], t);\r
-                                       if (lenTest2 >= 2)\r
-                                       {\r
+                                       if (lenTest2 >= 2) {\r
                                                int state2 = Base.StateUpdateRep(state);\r
 \r
                                                int posStateNext = (position + lenTest) & _posStateMask;\r
-                                               int curAndLenCharPrice =\r
-                                                               repMatchPrice + GetRepPrice(repIndex, lenTest, state, posState) +\r
-                                                               com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext]) +\r
-                                                               _literalEncoder.GetSubCoder(position + lenTest,\r
-                                                               _matchFinder.GetIndexByte(lenTest - 1 - 1)).GetPrice(true,\r
-                                                               _matchFinder.GetIndexByte(lenTest - 1 - (reps[repIndex] + 1)),\r
-                                                               _matchFinder.GetIndexByte(lenTest - 1));\r
+                                               int curAndLenCharPrice = repMatchPrice\r
+                                                       + GetRepPrice(repIndex, lenTest, state, posState)\r
+                                                       + com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                                                               .GetPrice0(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext])\r
+                                                       + _literalEncoder.GetSubCoder(position + lenTest, _matchFinder.GetIndexByte(lenTest - 1 - 1)).GetPrice(true,\r
+                                                               _matchFinder.GetIndexByte(lenTest - 1 - (reps[repIndex] + 1)), _matchFinder.GetIndexByte(lenTest - 1));\r
                                                state2 = Base.StateUpdateChar(state2);\r
                                                posStateNext = (position + lenTest + 1) & _posStateMask;\r
-                                               int nextMatchPrice = curAndLenCharPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext]);\r
-                                               int nextRepMatchPrice = nextMatchPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[state2]);\r
+                                               int nextMatchPrice = curAndLenCharPrice\r
+                                                       + com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                                                               .GetPrice1(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext]);\r
+                                               int nextRepMatchPrice = nextMatchPrice\r
+                                                       + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[state2]);\r
 \r
                                                // for(; lenTest2 >= 2; lenTest2--)\r
                                                {\r
@@ -949,8 +826,7 @@ public class Encoder
                                                                _optimum[++lenEnd].Price = kIfinityPrice;\r
                                                        int curAndLenPrice = nextRepMatchPrice + GetRepPrice(0, lenTest2, state2, posStateNext);\r
                                                        Optimal optimum = _optimum[cur + offset];\r
-                                                       if (curAndLenPrice < optimum.Price)\r
-                                                       {\r
+                                                       if (curAndLenPrice < optimum.Price) {\r
                                                                optimum.Price = curAndLenPrice;\r
                                                                optimum.PosPrev = cur + lenTest + 1;\r
                                                                optimum.BackPrev = 0;\r
@@ -964,15 +840,14 @@ public class Encoder
                                }\r
                        }\r
 \r
-                       if (newLen > numAvailableBytes)\r
-                       {\r
+                       if (newLen > numAvailableBytes) {\r
                                newLen = numAvailableBytes;\r
-                               for (numDistancePairs = 0; newLen > _matchDistances[numDistancePairs]; numDistancePairs += 2) ;\r
+                               for (numDistancePairs = 0; newLen > _matchDistances[numDistancePairs]; numDistancePairs += 2)\r
+                                       ;\r
                                _matchDistances[numDistancePairs] = newLen;\r
                                numDistancePairs += 2;\r
                        }\r
-                       if (newLen >= startLen)\r
-                       {\r
+                       if (newLen >= startLen) {\r
                                normalMatchPrice = matchPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isRep[state]);\r
                                while (lenEnd < cur + newLen)\r
                                        _optimum[++lenEnd].Price = kIfinityPrice;\r
@@ -981,49 +856,45 @@ public class Encoder
                                while (startLen > _matchDistances[offs])\r
                                        offs += 2;\r
 \r
-                               for (int lenTest = startLen; ; lenTest++)\r
-                               {\r
+                               for (int lenTest = startLen;; lenTest++) {\r
                                        int curBack = _matchDistances[offs + 1];\r
                                        int curAndLenPrice = normalMatchPrice + GetPosLenPrice(curBack, lenTest, posState);\r
                                        Optimal optimum = _optimum[cur + lenTest];\r
-                                       if (curAndLenPrice < optimum.Price)\r
-                                       {\r
+                                       if (curAndLenPrice < optimum.Price) {\r
                                                optimum.Price = curAndLenPrice;\r
                                                optimum.PosPrev = cur;\r
                                                optimum.BackPrev = curBack + Base.kNumRepDistances;\r
                                                optimum.Prev1IsChar = false;\r
                                        }\r
 \r
-                                       if (lenTest == _matchDistances[offs])\r
-                                       {\r
-                                               if (lenTest < numAvailableBytesFull)\r
-                                               {\r
+                                       if (lenTest == _matchDistances[offs]) {\r
+                                               if (lenTest < numAvailableBytesFull) {\r
                                                        int t = Math.min(numAvailableBytesFull - 1 - lenTest, _numFastBytes);\r
                                                        int lenTest2 = _matchFinder.GetMatchLen(lenTest, curBack, t);\r
-                                                       if (lenTest2 >= 2)\r
-                                                       {\r
+                                                       if (lenTest2 >= 2) {\r
                                                                int state2 = Base.StateUpdateMatch(state);\r
 \r
                                                                int posStateNext = (position + lenTest) & _posStateMask;\r
-                                                               int curAndLenCharPrice = curAndLenPrice +\r
-                                                                       com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice0(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext]) +\r
-                                                                       _literalEncoder.GetSubCoder(position + lenTest,\r
-                                                                       _matchFinder.GetIndexByte(lenTest - 1 - 1)).\r
-                                                                       GetPrice(true,\r
-                                                                       _matchFinder.GetIndexByte(lenTest - (curBack + 1) - 1),\r
-                                                                       _matchFinder.GetIndexByte(lenTest - 1));\r
+                                                               int curAndLenCharPrice = curAndLenPrice\r
+                                                                       + com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                                                                               .GetPrice0(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext])\r
+                                                                       + _literalEncoder.GetSubCoder(position + lenTest, _matchFinder.GetIndexByte(lenTest - 1 - 1))\r
+                                                                               .GetPrice(true, _matchFinder.GetIndexByte(lenTest - (curBack + 1) - 1),\r
+                                                                                       _matchFinder.GetIndexByte(lenTest - 1));\r
                                                                state2 = Base.StateUpdateChar(state2);\r
                                                                posStateNext = (position + lenTest + 1) & _posStateMask;\r
-                                                               int nextMatchPrice = curAndLenCharPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext]);\r
-                                                               int nextRepMatchPrice = nextMatchPrice + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[state2]);\r
+                                                               int nextMatchPrice = curAndLenCharPrice\r
+                                                                       + com.badlogic.gdx.utils.compression.rangecoder.Encoder\r
+                                                                               .GetPrice1(_isMatch[(state2 << Base.kNumPosStatesBitsMax) + posStateNext]);\r
+                                                               int nextRepMatchPrice = nextMatchPrice\r
+                                                                       + com.badlogic.gdx.utils.compression.rangecoder.Encoder.GetPrice1(_isRep[state2]);\r
 \r
                                                                int offset = lenTest + 1 + lenTest2;\r
                                                                while (lenEnd < cur + offset)\r
                                                                        _optimum[++lenEnd].Price = kIfinityPrice;\r
                                                                curAndLenPrice = nextRepMatchPrice + GetRepPrice(0, lenTest2, state2, posStateNext);\r
                                                                optimum = _optimum[cur + offset];\r
-                                                               if (curAndLenPrice < optimum.Price)\r
-                                                               {\r
+                                                               if (curAndLenPrice < optimum.Price) {\r
                                                                        optimum.Price = curAndLenPrice;\r
                                                                        optimum.PosPrev = cur + lenTest + 1;\r
                                                                        optimum.BackPrev = 0;\r
@@ -1035,24 +906,20 @@ public class Encoder
                                                        }\r
                                                }\r
                                                offs += 2;\r
-                                               if (offs == numDistancePairs)\r
-                                                       break;\r
+                                               if (offs == numDistancePairs) break;\r
                                        }\r
                                }\r
                        }\r
                }\r
        }\r
 \r
-       boolean ChangePair(int smallDist, int bigDist)\r
-       {\r
+       boolean ChangePair (int smallDist, int bigDist) {\r
                int kDif = 7;\r
                return (smallDist < (1 << (32 - kDif)) && bigDist >= (smallDist << kDif));\r
        }\r
 \r
-       void WriteEndMarker(int posState) throws IOException\r
-       {\r
-               if (!_writeEndMark)\r
-                       return;\r
+       void WriteEndMarker (int posState) throws IOException {\r
+               if (!_writeEndMark) return;\r
 \r
                _rangeEncoder.Encode(_isMatch, (_state << Base.kNumPosStatesBitsMax) + posState, 1);\r
                _rangeEncoder.Encode(_isRep, _state, 0);\r
@@ -1068,38 +935,31 @@ public class Encoder
                _posAlignEncoder.ReverseEncode(_rangeEncoder, posReduced & Base.kAlignMask);\r
        }\r
 \r
-       void Flush(int nowPos) throws IOException\r
-       {\r
+       void Flush (int nowPos) throws IOException {\r
                ReleaseMFStream();\r
                WriteEndMarker(nowPos & _posStateMask);\r
                _rangeEncoder.FlushData();\r
                _rangeEncoder.FlushStream();\r
        }\r
 \r
-       public void CodeOneBlock(long[] inSize, long[] outSize, boolean[] finished) throws IOException\r
-       {\r
+       public void CodeOneBlock (long[] inSize, long[] outSize, boolean[] finished) throws IOException {\r
                inSize[0] = 0;\r
                outSize[0] = 0;\r
                finished[0] = true;\r
 \r
-               if (_inStream != null)\r
-               {\r
+               if (_inStream != null) {\r
                        _matchFinder.SetStream(_inStream);\r
                        _matchFinder.Init();\r
                        _needReleaseMFStream = true;\r
                        _inStream = null;\r
                }\r
 \r
-               if (_finished)\r
-                       return;\r
+               if (_finished) return;\r
                _finished = true;\r
 \r
-\r
                long progressPosValuePrev = nowPos64;\r
-               if (nowPos64 == 0)\r
-               {\r
-                       if (_matchFinder.GetNumAvailableBytes() == 0)\r
-                       {\r
+               if (nowPos64 == 0) {\r
+                       if (_matchFinder.GetNumAvailableBytes() == 0) {\r
                                Flush((int)nowPos64);\r
                                return;\r
                        }\r
@@ -1114,75 +974,59 @@ public class Encoder
                        _additionalOffset--;\r
                        nowPos64++;\r
                }\r
-               if (_matchFinder.GetNumAvailableBytes() == 0)\r
-               {\r
+               if (_matchFinder.GetNumAvailableBytes() == 0) {\r
                        Flush((int)nowPos64);\r
                        return;\r
                }\r
-               while (true)\r
-               {\r
+               while (true) {\r
 \r
                        int len = GetOptimum((int)nowPos64);\r
                        int pos = backRes;\r
                        int posState = ((int)nowPos64) & _posStateMask;\r
                        int complexState = (_state << Base.kNumPosStatesBitsMax) + posState;\r
-                       if (len == 1 && pos == -1)\r
-                       {\r
+                       if (len == 1 && pos == -1) {\r
                                _rangeEncoder.Encode(_isMatch, complexState, 0);\r
                                byte curByte = _matchFinder.GetIndexByte((int)(0 - _additionalOffset));\r
                                LiteralEncoder.Encoder2 subCoder = _literalEncoder.GetSubCoder((int)nowPos64, _previousByte);\r
-                               if (!Base.StateIsCharState(_state))\r
-                               {\r
+                               if (!Base.StateIsCharState(_state)) {\r
                                        byte matchByte = _matchFinder.GetIndexByte((int)(0 - _repDistances[0] - 1 - _additionalOffset));\r
                                        subCoder.EncodeMatched(_rangeEncoder, matchByte, curByte);\r
-                               }\r
-                               else\r
+                               } else\r
                                        subCoder.Encode(_rangeEncoder, curByte);\r
                                _previousByte = curByte;\r
                                _state = Base.StateUpdateChar(_state);\r
-                       }\r
-                       else\r
-                       {\r
+                       } else {\r
                                _rangeEncoder.Encode(_isMatch, complexState, 1);\r
-                               if (pos < Base.kNumRepDistances)\r
-                               {\r
+                               if (pos < Base.kNumRepDistances) {\r
                                        _rangeEncoder.Encode(_isRep, _state, 1);\r
-                                       if (pos == 0)\r
-                                       {\r
+                                       if (pos == 0) {\r
                                                _rangeEncoder.Encode(_isRepG0, _state, 0);\r
                                                if (len == 1)\r
                                                        _rangeEncoder.Encode(_isRep0Long, complexState, 0);\r
                                                else\r
                                                        _rangeEncoder.Encode(_isRep0Long, complexState, 1);\r
-                                       }\r
-                                       else\r
-                                       {\r
+                                       } else {\r
                                                _rangeEncoder.Encode(_isRepG0, _state, 1);\r
                                                if (pos == 1)\r
                                                        _rangeEncoder.Encode(_isRepG1, _state, 0);\r
-                                               else\r
-                                               {\r
+                                               else {\r
                                                        _rangeEncoder.Encode(_isRepG1, _state, 1);\r
                                                        _rangeEncoder.Encode(_isRepG2, _state, pos - 2);\r
                                                }\r
                                        }\r
                                        if (len == 1)\r
                                                _state = Base.StateUpdateShortRep(_state);\r
-                                       else\r
-                                       {\r
+                                       else {\r
                                                _repMatchLenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);\r
                                                _state = Base.StateUpdateRep(_state);\r
                                        }\r
                                        int distance = _repDistances[pos];\r
-                                       if (pos != 0)\r
-                                       {\r
+                                       if (pos != 0) {\r
                                                for (int i = pos; i >= 1; i--)\r
                                                        _repDistances[i] = _repDistances[i - 1];\r
                                                _repDistances[0] = distance;\r
                                        }\r
-                               }\r
-                               else\r
-                               {\r
+                               } else {\r
                                        _rangeEncoder.Encode(_isRep, _state, 0);\r
                                        _state = Base.StateUpdateMatch(_state);\r
                                        _lenEncoder.Encode(_rangeEncoder, len - Base.kMatchMinLen, posState);\r
@@ -1191,17 +1035,14 @@ public class Encoder
                                        int lenToPosState = Base.GetLenToPosState(len);\r
                                        _posSlotEncoder[lenToPosState].Encode(_rangeEncoder, posSlot);\r
 \r
-                                       if (posSlot >= Base.kStartPosModelIndex)\r
-                                       {\r
+                                       if (posSlot >= Base.kStartPosModelIndex) {\r
                                                int footerBits = (int)((posSlot >> 1) - 1);\r
                                                int baseVal = ((2 | (posSlot & 1)) << footerBits);\r
                                                int posReduced = pos - baseVal;\r
 \r
                                                if (posSlot < Base.kEndPosModelIndex)\r
-                                                       BitTreeEncoder.ReverseEncode(_posEncoders,\r
-                                                                       baseVal - posSlot - 1, _rangeEncoder, footerBits, posReduced);\r
-                                               else\r
-                                               {\r
+                                                       BitTreeEncoder.ReverseEncode(_posEncoders, baseVal - posSlot - 1, _rangeEncoder, footerBits, posReduced);\r
+                                               else {\r
                                                        _rangeEncoder.EncodeDirectBits(posReduced >> Base.kNumAlignBits, footerBits - Base.kNumAlignBits);\r
                                                        _posAlignEncoder.ReverseEncode(_rangeEncoder, posReduced & Base.kAlignMask);\r
                                                        _alignPriceCount++;\r
@@ -1217,23 +1058,18 @@ public class Encoder
                        }\r
                        _additionalOffset -= len;\r
                        nowPos64 += len;\r
-                       if (_additionalOffset == 0)\r
-                       {\r
+                       if (_additionalOffset == 0) {\r
                                // if (!_fastMode)\r
-                               if (_matchPriceCount >= (1 << 7))\r
-                                       FillDistancesPrices();\r
-                               if (_alignPriceCount >= Base.kAlignTableSize)\r
-                                       FillAlignPrices();\r
+                               if (_matchPriceCount >= (1 << 7)) FillDistancesPrices();\r
+                               if (_alignPriceCount >= Base.kAlignTableSize) FillAlignPrices();\r
                                inSize[0] = nowPos64;\r
                                outSize[0] = _rangeEncoder.GetProcessedSizeAdd();\r
-                               if (_matchFinder.GetNumAvailableBytes() == 0)\r
-                               {\r
+                               if (_matchFinder.GetNumAvailableBytes() == 0) {\r
                                        Flush((int)nowPos64);\r
                                        return;\r
                                }\r
 \r
-                               if (nowPos64 - progressPosValuePrev >= (1 << 12))\r
-                               {\r
+                               if (nowPos64 - progressPosValuePrev >= (1 << 12)) {\r
                                        _finished = false;\r
                                        finished[0] = false;\r
                                        return;\r
@@ -1242,29 +1078,27 @@ public class Encoder
                }\r
        }\r
 \r
-       void ReleaseMFStream()\r
-       {\r
-               if (_matchFinder != null && _needReleaseMFStream)\r
-               {\r
+       void ReleaseMFStream () {\r
+               if (_matchFinder != null && _needReleaseMFStream) {\r
                        _matchFinder.ReleaseStream();\r
                        _needReleaseMFStream = false;\r
                }\r
        }\r
 \r
-       void SetOutStream(java.io.OutputStream outStream)\r
-       { _rangeEncoder.SetStream(outStream); }\r
-       void ReleaseOutStream()\r
-       { _rangeEncoder.ReleaseStream(); }\r
+       void SetOutStream (java.io.OutputStream outStream) {\r
+               _rangeEncoder.SetStream(outStream);\r
+       }\r
 \r
-       void ReleaseStreams()\r
-       {\r
+       void ReleaseOutStream () {\r
+               _rangeEncoder.ReleaseStream();\r
+       }\r
+\r
+       void ReleaseStreams () {\r
                ReleaseMFStream();\r
                ReleaseOutStream();\r
        }\r
 \r
-       void SetStreams(java.io.InputStream inStream, java.io.OutputStream outStream,\r
-                       long inSize, long outSize)\r
-       {\r
+       void SetStreams (java.io.InputStream inStream, java.io.OutputStream outStream, long inSize, long outSize) {\r
                _inStream = inStream;\r
                _finished = false;\r
                Create();\r
@@ -1285,30 +1119,24 @@ public class Encoder
                nowPos64 = 0;\r
        }\r
 \r
-       long[] processedInSize = new long[1]; long[] processedOutSize = new long[1]; boolean[] finished = new boolean[1];\r
-       public void Code(java.io.InputStream inStream, java.io.OutputStream outStream,\r
-                       long inSize, long outSize, ICodeProgress progress) throws IOException\r
-       {\r
+       long[] processedInSize = new long[1];\r
+       long[] processedOutSize = new long[1];\r
+       boolean[] finished = new boolean[1];\r
+\r
+       public void Code (java.io.InputStream inStream, java.io.OutputStream outStream, long inSize, long outSize,\r
+               ICodeProgress progress) throws IOException {\r
                _needReleaseMFStream = false;\r
-               try\r
-               {\r
+               try {\r
                        SetStreams(inStream, outStream, inSize, outSize);\r
-                       while (true)\r
-                       {\r
-\r
-\r
+                       while (true) {\r
 \r
                                CodeOneBlock(processedInSize, processedOutSize, finished);\r
-                               if (finished[0])\r
-                                       return;\r
-                               if (progress != null)\r
-                               {\r
+                               if (finished[0]) return;\r
+                               if (progress != null) {\r
                                        progress.SetProgress(processedInSize[0], processedOutSize[0]);\r
                                }\r
                        }\r
-               }\r
-               finally\r
-               {\r
+               } finally {\r
                        ReleaseStreams();\r
                }\r
        }\r
@@ -1316,8 +1144,7 @@ public class Encoder
        public static final int kPropSize = 5;\r
        byte[] properties = new byte[kPropSize];\r
 \r
-       public void WriteCoderProperties(java.io.OutputStream outStream) throws IOException\r
-       {\r
+       public void WriteCoderProperties (java.io.OutputStream outStream) throws IOException {\r
                properties[0] = (byte)((_posStateBits * 5 + _numLiteralPosStateBits) * 9 + _numLiteralContextBits);\r
                for (int i = 0; i < 4; i++)\r
                        properties[1 + i] = (byte)(_dictionarySize >> (8 * i));\r
@@ -1327,19 +1154,15 @@ public class Encoder
        int[] tempPrices = new int[Base.kNumFullDistances];\r
        int _matchPriceCount;\r
 \r
-       void FillDistancesPrices()\r
-       {\r
-               for (int i = Base.kStartPosModelIndex; i < Base.kNumFullDistances; i++)\r
-               {\r
+       void FillDistancesPrices () {\r
+               for (int i = Base.kStartPosModelIndex; i < Base.kNumFullDistances; i++) {\r
                        int posSlot = GetPosSlot(i);\r
                        int footerBits = (int)((posSlot >> 1) - 1);\r
                        int baseVal = ((2 | (posSlot & 1)) << footerBits);\r
-                       tempPrices[i] = BitTreeEncoder.ReverseGetPrice(_posEncoders,\r
-                               baseVal - posSlot - 1, footerBits, i - baseVal);\r
+                       tempPrices[i] = BitTreeEncoder.ReverseGetPrice(_posEncoders, baseVal - posSlot - 1, footerBits, i - baseVal);\r
                }\r
 \r
-               for (int lenToPosState = 0; lenToPosState < Base.kNumLenToPosStates; lenToPosState++)\r
-               {\r
+               for (int lenToPosState = 0; lenToPosState < Base.kNumLenToPosStates; lenToPosState++) {\r
                        int posSlot;\r
                        BitTreeEncoder encoder = _posSlotEncoder[lenToPosState];\r
 \r
@@ -1359,64 +1182,50 @@ public class Encoder
                _matchPriceCount = 0;\r
        }\r
 \r
-       void FillAlignPrices()\r
-       {\r
+       void FillAlignPrices () {\r
                for (int i = 0; i < Base.kAlignTableSize; i++)\r
                        _alignPrices[i] = _posAlignEncoder.ReverseGetPrice(i);\r
                _alignPriceCount = 0;\r
        }\r
 \r
-\r
-       public boolean SetAlgorithm(int algorithm)\r
-       {\r
+       public boolean SetAlgorithm (int algorithm) {\r
                /*\r
-               _fastMode = (algorithm == 0);\r
-               _maxMode = (algorithm >= 2);\r
-               */\r
+                * _fastMode = (algorithm == 0); _maxMode = (algorithm >= 2);\r
+                */\r
                return true;\r
        }\r
 \r
-       public boolean SetDictionarySize(int dictionarySize)\r
-       {\r
+       public boolean SetDictionarySize (int dictionarySize) {\r
                int kDicLogSizeMaxCompress = 29;\r
-               if (dictionarySize < (1 << Base.kDicLogSizeMin) || dictionarySize > (1 << kDicLogSizeMaxCompress))\r
-                       return false;\r
+               if (dictionarySize < (1 << Base.kDicLogSizeMin) || dictionarySize > (1 << kDicLogSizeMaxCompress)) return false;\r
                _dictionarySize = dictionarySize;\r
                int dicLogSize;\r
-               for (dicLogSize = 0; dictionarySize > (1 << dicLogSize); dicLogSize++) ;\r
+               for (dicLogSize = 0; dictionarySize > (1 << dicLogSize); dicLogSize++)\r
+                       ;\r
                _distTableSize = dicLogSize * 2;\r
                return true;\r
        }\r
 \r
-       public boolean SetNumFastBytes(int numFastBytes)\r
-       {\r
-               if (numFastBytes < 5 || numFastBytes > Base.kMatchMaxLen)\r
-                       return false;\r
+       public boolean SetNumFastBytes (int numFastBytes) {\r
+               if (numFastBytes < 5 || numFastBytes > Base.kMatchMaxLen) return false;\r
                _numFastBytes = numFastBytes;\r
                return true;\r
        }\r
 \r
-       public boolean SetMatchFinder(int matchFinderIndex)\r
-       {\r
-               if (matchFinderIndex < 0 || matchFinderIndex > 2)\r
-                       return false;\r
+       public boolean SetMatchFinder (int matchFinderIndex) {\r
+               if (matchFinderIndex < 0 || matchFinderIndex > 2) return false;\r
                int matchFinderIndexPrev = _matchFinderType;\r
                _matchFinderType = matchFinderIndex;\r
-               if (_matchFinder != null && matchFinderIndexPrev != _matchFinderType)\r
-               {\r
+               if (_matchFinder != null && matchFinderIndexPrev != _matchFinderType) {\r
                        _dictionarySizePrev = -1;\r
                        _matchFinder = null;\r
                }\r
                return true;\r
        }\r
 \r
-       public boolean SetLcLpPb(int lc, int lp, int pb)\r
-       {\r
-               if (\r
-                               lp < 0 || lp > Base.kNumLitPosStatesBitsEncodingMax ||\r
-                               lc < 0 || lc > Base.kNumLitContextBitsMax ||\r
-                               pb < 0 || pb > Base.kNumPosStatesBitsEncodingMax)\r
-                       return false;\r
+       public boolean SetLcLpPb (int lc, int lp, int pb) {\r
+               if (lp < 0 || lp > Base.kNumLitPosStatesBitsEncodingMax || lc < 0 || lc > Base.kNumLitContextBitsMax || pb < 0\r
+                       || pb > Base.kNumPosStatesBitsEncodingMax) return false;\r
                _numLiteralPosStateBits = lp;\r
                _numLiteralContextBits = lc;\r
                _posStateBits = pb;\r
@@ -1424,8 +1233,7 @@ public class Encoder
                return true;\r
        }\r
 \r
-       public void SetEndMarkerMode(boolean endMarkerMode)\r
-       {\r
+       public void SetEndMarkerMode (boolean endMarkerMode) {\r
                _writeEndMark = endMarkerMode;\r
        }\r
-}
\ No newline at end of file
+}\r
index b3a25d4..bf4e8d0 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression.rangecoder;\r
 \r
-public class BitTreeDecoder\r
-{\r
+public class BitTreeDecoder {\r
        short[] Models;\r
        int NumBitLevels;\r
-       \r
-       public BitTreeDecoder(int numBitLevels)\r
-       {\r
+\r
+       public BitTreeDecoder (int numBitLevels) {\r
                NumBitLevels = numBitLevels;\r
                Models = new short[1 << numBitLevels];\r
        }\r
-       \r
-       public void Init()\r
-       {\r
+\r
+       public void Init () {\r
                Decoder.InitBitModels(Models);\r
        }\r
-       \r
-       public int Decode(Decoder rangeDecoder) throws java.io.IOException\r
-       {\r
+\r
+       public int Decode (Decoder rangeDecoder) throws java.io.IOException {\r
                int m = 1;\r
                for (int bitIndex = NumBitLevels; bitIndex != 0; bitIndex--)\r
                        m = (m << 1) + rangeDecoder.DecodeBit(Models, m);\r
                return m - (1 << NumBitLevels);\r
        }\r
-       \r
-       public int ReverseDecode(Decoder rangeDecoder) throws java.io.IOException\r
-       {\r
+\r
+       public int ReverseDecode (Decoder rangeDecoder) throws java.io.IOException {\r
                int m = 1;\r
                int symbol = 0;\r
-               for (int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)\r
-               {\r
+               for (int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++) {\r
                        int bit = rangeDecoder.DecodeBit(Models, m);\r
                        m <<= 1;\r
                        m += bit;\r
@@ -52,14 +47,12 @@ public class BitTreeDecoder
                }\r
                return symbol;\r
        }\r
-       \r
-       public static int ReverseDecode(short[] Models, int startIndex,\r
-                       Decoder rangeDecoder, int NumBitLevels) throws java.io.IOException\r
-       {\r
+\r
+       public static int ReverseDecode (short[] Models, int startIndex, Decoder rangeDecoder, int NumBitLevels)\r
+               throws java.io.IOException {\r
                int m = 1;\r
                int symbol = 0;\r
-               for (int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++)\r
-               {\r
+               for (int bitIndex = 0; bitIndex < NumBitLevels; bitIndex++) {\r
                        int bit = rangeDecoder.DecodeBit(Models, startIndex + m);\r
                        m <<= 1;\r
                        m += bit;\r
@@ -67,4 +60,4 @@ public class BitTreeDecoder
                }\r
                return symbol;\r
        }\r
-}
\ No newline at end of file
+}\r
index e541643..32964b4 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression.rangecoder;\r
+\r
 import java.io.IOException;\r
 \r
-public class BitTreeEncoder\r
-{\r
+public class BitTreeEncoder {\r
        short[] Models;\r
        int NumBitLevels;\r
-       \r
-       public BitTreeEncoder(int numBitLevels)\r
-       {\r
+\r
+       public BitTreeEncoder (int numBitLevels) {\r
                NumBitLevels = numBitLevels;\r
                Models = new short[1 << numBitLevels];\r
        }\r
-       \r
-       public void Init()\r
-       {\r
+\r
+       public void Init () {\r
                Decoder.InitBitModels(Models);\r
        }\r
-       \r
-       public void Encode(Encoder rangeEncoder, int symbol) throws IOException\r
-       {\r
+\r
+       public void Encode (Encoder rangeEncoder, int symbol) throws IOException {\r
                int m = 1;\r
-               for (int bitIndex = NumBitLevels; bitIndex != 0; )\r
-               {\r
+               for (int bitIndex = NumBitLevels; bitIndex != 0;) {\r
                        bitIndex--;\r
                        int bit = (symbol >>> bitIndex) & 1;\r
                        rangeEncoder.Encode(Models, m, bit);\r
                        m = (m << 1) | bit;\r
                }\r
        }\r
-       \r
-       public void ReverseEncode(Encoder rangeEncoder, int symbol) throws IOException\r
-       {\r
+\r
+       public void ReverseEncode (Encoder rangeEncoder, int symbol) throws IOException {\r
                int m = 1;\r
-               for (int  i = 0; i < NumBitLevels; i++)\r
-               {\r
+               for (int i = 0; i < NumBitLevels; i++) {\r
                        int bit = symbol & 1;\r
                        rangeEncoder.Encode(Models, m, bit);\r
                        m = (m << 1) | bit;\r
                        symbol >>= 1;\r
                }\r
        }\r
-       \r
-       public int GetPrice(int symbol)\r
-       {\r
+\r
+       public int GetPrice (int symbol) {\r
                int price = 0;\r
                int m = 1;\r
-               for (int bitIndex = NumBitLevels; bitIndex != 0; )\r
-               {\r
+               for (int bitIndex = NumBitLevels; bitIndex != 0;) {\r
                        bitIndex--;\r
                        int bit = (symbol >>> bitIndex) & 1;\r
                        price += Encoder.GetPrice(Models[m], bit);\r
@@ -69,13 +62,11 @@ public class BitTreeEncoder
                }\r
                return price;\r
        }\r
-       \r
-       public int ReverseGetPrice(int symbol)\r
-       {\r
+\r
+       public int ReverseGetPrice (int symbol) {\r
                int price = 0;\r
                int m = 1;\r
-               for (int i = NumBitLevels; i != 0; i--)\r
-               {\r
+               for (int i = NumBitLevels; i != 0; i--) {\r
                        int bit = symbol & 1;\r
                        symbol >>>= 1;\r
                        price += Encoder.GetPrice(Models[m], bit);\r
@@ -83,14 +74,11 @@ public class BitTreeEncoder
                }\r
                return price;\r
        }\r
-       \r
-       public static int ReverseGetPrice(short[] Models, int startIndex,\r
-                       int NumBitLevels, int symbol)\r
-       {\r
+\r
+       public static int ReverseGetPrice (short[] Models, int startIndex, int NumBitLevels, int symbol) {\r
                int price = 0;\r
                int m = 1;\r
-               for (int i = NumBitLevels; i != 0; i--)\r
-               {\r
+               for (int i = NumBitLevels; i != 0; i--) {\r
                        int bit = symbol & 1;\r
                        symbol >>>= 1;\r
                        price += Encoder.GetPrice(Models[startIndex + m], bit);\r
@@ -98,17 +86,15 @@ public class BitTreeEncoder
                }\r
                return price;\r
        }\r
-       \r
-       public static void ReverseEncode(short[] Models, int startIndex,\r
-                       Encoder rangeEncoder, int NumBitLevels, int symbol) throws IOException\r
-       {\r
+\r
+       public static void ReverseEncode (short[] Models, int startIndex, Encoder rangeEncoder, int NumBitLevels, int symbol)\r
+               throws IOException {\r
                int m = 1;\r
-               for (int i = 0; i < NumBitLevels; i++)\r
-               {\r
+               for (int i = 0; i < NumBitLevels; i++) {\r
                        int bit = symbol & 1;\r
                        rangeEncoder.Encode(Models, startIndex + m, bit);\r
                        m = (m << 1) | bit;\r
                        symbol >>= 1;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index b152255..72e9624 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression.rangecoder;\r
+\r
 import java.io.IOException;\r
 \r
-public class Decoder\r
-{\r
+public class Decoder {\r
        static final int kTopMask = ~((1 << 24) - 1);\r
-       \r
+\r
        static final int kNumBitModelTotalBits = 11;\r
        static final int kBitModelTotal = (1 << kNumBitModelTotalBits);\r
        static final int kNumMoveBits = 5;\r
-       \r
+\r
        int Range;\r
        int Code;\r
 \r
        java.io.InputStream Stream;\r
-       \r
-       public final void SetStream(java.io.InputStream stream)\r
-       { \r
-               Stream = stream; \r
+\r
+       public final void SetStream (java.io.InputStream stream) {\r
+               Stream = stream;\r
        }\r
-       \r
-       public final void ReleaseStream()\r
-       { \r
-               Stream = null; \r
+\r
+       public final void ReleaseStream () {\r
+               Stream = null;\r
        }\r
-       \r
-       public final void Init() throws IOException\r
-       {\r
+\r
+       public final void Init () throws IOException {\r
                Code = 0;\r
                Range = -1;\r
                for (int i = 0; i < 5; i++)\r
                        Code = (Code << 8) | Stream.read();\r
        }\r
-       \r
-       public final int DecodeDirectBits(int numTotalBits) throws IOException\r
-       {\r
+\r
+       public final int DecodeDirectBits (int numTotalBits) throws IOException {\r
                int result = 0;\r
-               for (int i = numTotalBits; i != 0; i--)\r
-               {\r
+               for (int i = numTotalBits; i != 0; i--) {\r
                        Range >>>= 1;\r
                        int t = ((Code - Range) >>> 31);\r
                        Code -= Range & (t - 1);\r
                        result = (result << 1) | (1 - t);\r
-                       \r
-                       if ((Range & kTopMask) == 0)\r
-                       {\r
+\r
+                       if ((Range & kTopMask) == 0) {\r
                                Code = (Code << 8) | Stream.read();\r
                                Range <<= 8;\r
                        }\r
                }\r
                return result;\r
        }\r
-       \r
-       public int DecodeBit(short []probs, int index) throws IOException\r
-       {\r
+\r
+       public int DecodeBit (short[] probs, int index) throws IOException {\r
                int prob = probs[index];\r
                int newBound = (Range >>> kNumBitModelTotalBits) * prob;\r
-               if ((Code ^ 0x80000000) < (newBound ^ 0x80000000))\r
-               {\r
+               if ((Code ^ 0x80000000) < (newBound ^ 0x80000000)) {\r
                        Range = newBound;\r
                        probs[index] = (short)(prob + ((kBitModelTotal - prob) >>> kNumMoveBits));\r
-                       if ((Range & kTopMask) == 0)\r
-                       {\r
+                       if ((Range & kTopMask) == 0) {\r
                                Code = (Code << 8) | Stream.read();\r
                                Range <<= 8;\r
                        }\r
                        return 0;\r
-               }\r
-               else\r
-               {\r
+               } else {\r
                        Range -= newBound;\r
                        Code -= newBound;\r
                        probs[index] = (short)(prob - ((prob) >>> kNumMoveBits));\r
-                       if ((Range & kTopMask) == 0)\r
-                       {\r
+                       if ((Range & kTopMask) == 0) {\r
                                Code = (Code << 8) | Stream.read();\r
                                Range <<= 8;\r
                        }\r
                        return 1;\r
                }\r
        }\r
-       \r
-       public static void InitBitModels(short []probs)\r
-       {\r
+\r
+       public static void InitBitModels (short[] probs) {\r
                for (int i = 0; i < probs.length; i++)\r
                        probs[i] = (kBitModelTotal >>> 1);\r
        }\r
-}
\ No newline at end of file
+}\r
index c67e4e3..3471c48 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.utils.compression.rangecoder;\r
+\r
 import java.io.IOException;\r
 \r
-public class Encoder\r
-{\r
+public class Encoder {\r
        static final int kTopMask = ~((1 << 24) - 1);\r
-       \r
+\r
        static final int kNumBitModelTotalBits = 11;\r
        static final int kBitModelTotal = (1 << kNumBitModelTotalBits);\r
        static final int kNumMoveBits = 5;\r
-       \r
+\r
        java.io.OutputStream Stream;\r
 \r
        long Low;\r
        int Range;\r
        int _cacheSize;\r
        int _cache;\r
-       \r
+\r
        long _position;\r
-       \r
-       public void SetStream(java.io.OutputStream stream)\r
-       {\r
+\r
+       public void SetStream (java.io.OutputStream stream) {\r
                Stream = stream;\r
        }\r
-       \r
-       public void ReleaseStream()\r
-       {\r
+\r
+       public void ReleaseStream () {\r
                Stream = null;\r
        }\r
-       \r
-       public void Init()\r
-       {\r
+\r
+       public void Init () {\r
                _position = 0;\r
                Low = 0;\r
                Range = -1;\r
                _cacheSize = 1;\r
                _cache = 0;\r
        }\r
-       \r
-       public void FlushData() throws IOException\r
-       {\r
+\r
+       public void FlushData () throws IOException {\r
                for (int i = 0; i < 5; i++)\r
                        ShiftLow();\r
        }\r
-       \r
-       public void FlushStream() throws IOException\r
-       {\r
+\r
+       public void FlushStream () throws IOException {\r
                Stream.flush();\r
        }\r
-       \r
-       public void ShiftLow() throws IOException\r
-       {\r
+\r
+       public void ShiftLow () throws IOException {\r
                int LowHi = (int)(Low >>> 32);\r
-               if (LowHi != 0 || Low < 0xFF000000L)\r
-               {\r
+               if (LowHi != 0 || Low < 0xFF000000L) {\r
                        _position += _cacheSize;\r
                        int temp = _cache;\r
-                       do\r
-                       {\r
+                       do {\r
                                Stream.write(temp + LowHi);\r
                                temp = 0xFF;\r
-                       }\r
-                       while(--_cacheSize != 0);\r
+                       } while (--_cacheSize != 0);\r
                        _cache = (((int)Low) >>> 24);\r
                }\r
                _cacheSize++;\r
                Low = (Low & 0xFFFFFF) << 8;\r
        }\r
-       \r
-       public void EncodeDirectBits(int v, int numTotalBits) throws IOException\r
-       {\r
-               for (int i = numTotalBits - 1; i >= 0; i--)\r
-               {\r
+\r
+       public void EncodeDirectBits (int v, int numTotalBits) throws IOException {\r
+               for (int i = numTotalBits - 1; i >= 0; i--) {\r
                        Range >>>= 1;\r
-                       if (((v >>> i) & 1) == 1)\r
-                               Low += Range;\r
-                       if ((Range & Encoder.kTopMask) == 0)\r
-                       {\r
+                       if (((v >>> i) & 1) == 1) Low += Range;\r
+                       if ((Range & Encoder.kTopMask) == 0) {\r
                                Range <<= 8;\r
                                ShiftLow();\r
                        }\r
                }\r
        }\r
-       \r
-       \r
-       public long GetProcessedSizeAdd()\r
-       {\r
+\r
+       public long GetProcessedSizeAdd () {\r
                return _cacheSize + _position + 4;\r
        }\r
-       \r
-       \r
-       \r
+\r
        static final int kNumMoveReducingBits = 2;\r
        public static final int kNumBitPriceShiftBits = 6;\r
-       \r
-       public static void InitBitModels(short []probs)\r
-       {\r
+\r
+       public static void InitBitModels (short[] probs) {\r
                for (int i = 0; i < probs.length; i++)\r
                        probs[i] = (kBitModelTotal >>> 1);\r
        }\r
-       \r
-       public void Encode(short []probs, int index, int symbol) throws IOException\r
-       {\r
+\r
+       public void Encode (short[] probs, int index, int symbol) throws IOException {\r
                int prob = probs[index];\r
                int newBound = (Range >>> kNumBitModelTotalBits) * prob;\r
-               if (symbol == 0)\r
-               {\r
+               if (symbol == 0) {\r
                        Range = newBound;\r
                        probs[index] = (short)(prob + ((kBitModelTotal - prob) >>> kNumMoveBits));\r
-               }\r
-               else\r
-               {\r
+               } else {\r
                        Low += (newBound & 0xFFFFFFFFL);\r
                        Range -= newBound;\r
                        probs[index] = (short)(prob - ((prob) >>> kNumMoveBits));\r
                }\r
-               if ((Range & kTopMask) == 0)\r
-               {\r
+               if ((Range & kTopMask) == 0) {\r
                        Range <<= 8;\r
                        ShiftLow();\r
                }\r
        }\r
-       \r
+\r
        private static int[] ProbPrices = new int[kBitModelTotal >>> kNumMoveReducingBits];\r
-       \r
-       static\r
-       {\r
+\r
+       static {\r
                int kNumBits = (kNumBitModelTotalBits - kNumMoveReducingBits);\r
-               for (int i = kNumBits - 1; i >= 0; i--)\r
-               {\r
+               for (int i = kNumBits - 1; i >= 0; i--) {\r
                        int start = 1 << (kNumBits - i - 1);\r
                        int end = 1 << (kNumBits - i);\r
                        for (int j = start; j < end; j++)\r
-                               ProbPrices[j] = (i << kNumBitPriceShiftBits) +\r
-                                               (((end - j) << kNumBitPriceShiftBits) >>> (kNumBits - i - 1));\r
+                               ProbPrices[j] = (i << kNumBitPriceShiftBits) + (((end - j) << kNumBitPriceShiftBits) >>> (kNumBits - i - 1));\r
                }\r
        }\r
-       \r
-       static public int GetPrice(int Prob, int symbol)\r
-       {\r
+\r
+       static public int GetPrice (int Prob, int symbol) {\r
                return ProbPrices[(((Prob - symbol) ^ ((-symbol))) & (kBitModelTotal - 1)) >>> kNumMoveReducingBits];\r
        }\r
-       static public int GetPrice0(int Prob)\r
-       { \r
-               return ProbPrices[Prob >>> kNumMoveReducingBits]; \r
+\r
+       static public int GetPrice0 (int Prob) {\r
+               return ProbPrices[Prob >>> kNumMoveReducingBits];\r
        }\r
-       static public int GetPrice1(int Prob)\r
-       { \r
-               return ProbPrices[(kBitModelTotal - Prob) >>> kNumMoveReducingBits]; \r
+\r
+       static public int GetPrice1 (int Prob) {\r
+               return ProbPrices[(kBitModelTotal - Prob) >>> kNumMoveReducingBits];\r
        }\r
-}
\ No newline at end of file
+}\r
index f81ee79..40aace3 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.gwt.client;\r
 \r
 import com.badlogic.gdx.ApplicationListener;\r
 import com.badlogic.gdx.backends.gwt.GwtApplication;\r
 import com.badlogic.gdx.backends.gwt.GwtApplicationConfiguration;\r
-import com.badlogic.gdx.tests.TextButtonTest;\r
-import com.badlogic.gdx.tests.TextButtonTestGL2;\r
 import com.badlogic.gdx.tests.UITest;\r
-import com.badlogic.gdx.tests.gwt.GwtTestWrapper;\r
 \r
 public class GwtTestStarter extends GwtApplication {\r
        @Override\r
@@ -33,4 +31,4 @@ public class GwtTestStarter extends GwtApplication {
        public ApplicationListener getApplicationListener () {\r
                return new UITest();\r
        }\r
-}
\ No newline at end of file
+}\r
index c82dc7b..6e227ae 100644 (file)
@@ -27,7 +27,7 @@ public class JoglDebugStarter {
        public static void main (String[] argv) {\r
                // this is only here for me to debug native code faster\r
                new SharedLibraryLoader("../../gdx/libs/gdx-natives.jar").load("gdx");\r
-               \r
+\r
                GdxTest test = new DirtyRenderingTest();\r
                JoglApplicationConfiguration config = new JoglApplicationConfiguration();\r
                config.useGL20 = test.needsGL20();\r
index 0117d07..e36477c 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.lwjgl;\r
 \r
 import java.util.ArrayList;\r
 import java.util.List;\r
 \r
 import com.badlogic.gdx.ApplicationAdapter;\r
-import com.badlogic.gdx.ApplicationListener;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.Mesh;\r
 import com.badlogic.gdx.graphics.OrthographicCamera;\r
-import com.badlogic.gdx.graphics.VertexAttribute;\r
-import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.EarClippingTriangulator;\r
@@ -35,19 +32,19 @@ import com.badlogic.gdx.math.Vector2;
 public class LocalLwjglTest extends ApplicationAdapter {\r
        ShapeRenderer renderer;\r
        OrthographicCamera camera;\r
-       float[] coords = {-2.0f, 0.0f, -2.0f, 0.5f, 0.0f, 1.0f, 0.5f, 2.875f, 1.0f,0.5f, 1.5f,1.0f, 2.0f,1.0f, 2.0f,0.0f};\r
+       float[] coords = {-2.0f, 0.0f, -2.0f, 0.5f, 0.0f, 1.0f, 0.5f, 2.875f, 1.0f, 0.5f, 1.5f, 1.0f, 2.0f, 1.0f, 2.0f, 0.0f};\r
        private List<Vector2> triangles;\r
-       \r
+\r
        @Override\r
        public void create () {\r
                renderer = new ShapeRenderer();\r
                camera = new OrthographicCamera(10, 10);\r
                camera.position.set(0, 0, 0);\r
                camera.update();\r
-               \r
+\r
                List<Vector2> poly = new ArrayList<Vector2>();\r
-               for(int i = 0; i < coords.length; i+=2) {\r
-                       poly.add(new Vector2(coords[i], coords[i+1]));\r
+               for (int i = 0; i < coords.length; i += 2) {\r
+                       poly.add(new Vector2(coords[i], coords[i + 1]));\r
                }\r
                triangles = new EarClippingTriangulator().computeTriangles(poly);\r
        }\r
@@ -56,23 +53,23 @@ public class LocalLwjglTest extends ApplicationAdapter {
        public void render () {\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                Gdx.gl10.glColor4f(1, 1, 1, 1);\r
-               \r
+\r
                renderer.setProjectionMatrix(camera.combined);\r
                renderer.setColor(1, 1, 1, 1);\r
                renderer.begin(ShapeType.Line);\r
-               for(int j = 0; j < coords.length - 2; j+=2) {\r
-                       renderer.line(coords[j], coords[j+1], coords[j+2], coords[j+3]);                        \r
+               for (int j = 0; j < coords.length - 2; j += 2) {\r
+                       renderer.line(coords[j], coords[j + 1], coords[j + 2], coords[j + 3]);\r
                }\r
                renderer.line(coords[0], coords[1], coords[coords.length - 2], coords[coords.length - 1]);\r
                renderer.end();\r
-               \r
+\r
                renderer.setColor(1, 0, 0, 1);\r
                renderer.translate(0, -4, 0);\r
                renderer.begin(ShapeType.Triangle);\r
-               for(int i = 0; i < triangles.size(); i+=3) {\r
+               for (int i = 0; i < triangles.size(); i += 3) {\r
                        Vector2 v1 = triangles.get(i);\r
-                       Vector2 v2 = triangles.get(i+1);\r
-                       Vector2 v3 = triangles.get(i+2);\r
+                       Vector2 v2 = triangles.get(i + 1);\r
+                       Vector2 v3 = triangles.get(i + 2);\r
                        renderer.triangle(v1.x, v1.y, v2.x, v2.y, v3.x, v3.y);\r
                }\r
                renderer.end();\r
@@ -82,4 +79,4 @@ public class LocalLwjglTest extends ApplicationAdapter {
        public static void main (String[] argv) {\r
                new LwjglApplication(new LocalLwjglTest(), "test", 480, 320, false);\r
        }\r
-}
\ No newline at end of file
+}\r
index 90de223..2494a31 100644 (file)
@@ -18,43 +18,7 @@ package com.badlogic.gdx.tests.lwjgl;
 \r
 import com.badlogic.gdx.backends.lwjgl.LwjglApplication;\r
 import com.badlogic.gdx.backends.lwjgl.LwjglApplicationConfiguration;\r
-import com.badlogic.gdx.tests.ActionSequenceTest;\r
-import com.badlogic.gdx.tests.ActionTest;\r
-import com.badlogic.gdx.tests.AssetManagerTest;\r
-import com.badlogic.gdx.tests.AtlasIssueTest;\r
-import com.badlogic.gdx.tests.BitmapFontAlignmentTest;\r
-import com.badlogic.gdx.tests.BobTest;\r
-import com.badlogic.gdx.tests.Box2DCharacterControllerTest;\r
-import com.badlogic.gdx.tests.Box2DTest;\r
-import com.badlogic.gdx.tests.Box2DTestCollection;\r
-import com.badlogic.gdx.tests.ComplexActionTest;\r
-import com.badlogic.gdx.tests.CustomShaderSpriteBatchTest;\r
-import com.badlogic.gdx.tests.DecalTest;\r
-import com.badlogic.gdx.tests.FramebufferToTextureTest;\r
-import com.badlogic.gdx.tests.FreeTypeTest;\r
-import com.badlogic.gdx.tests.ImageScaleTest;\r
-import com.badlogic.gdx.tests.ImageTest;\r
 import com.badlogic.gdx.tests.InternationalFontsTest;\r
-import com.badlogic.gdx.tests.LabelTest;\r
-import com.badlogic.gdx.tests.LifeCycleTest;\r
-import com.badlogic.gdx.tests.MeshShaderTest;\r
-import com.badlogic.gdx.tests.Mpg123Test;\r
-import com.badlogic.gdx.tests.ParticleEmitterTest;\r
-import com.badlogic.gdx.tests.PixelsPerInchTest;\r
-import com.badlogic.gdx.tests.PixmapBlendingTest;\r
-import com.badlogic.gdx.tests.ScreenCaptureTest;\r
-import com.badlogic.gdx.tests.ShaderMultitextureTest;\r
-import com.badlogic.gdx.tests.ShapeRendererAlphaTest;\r
-import com.badlogic.gdx.tests.SoundTest;\r
-import com.badlogic.gdx.tests.SpriteBatchShaderTest;\r
-import com.badlogic.gdx.tests.SpriteCacheOffsetTest;\r
-import com.badlogic.gdx.tests.SpriteCacheTest;\r
-import com.badlogic.gdx.tests.TextureDownloadTest;\r
-import com.badlogic.gdx.tests.UITest;\r
-import com.badlogic.gdx.tests.VertexBufferObjectShaderTest;\r
-import com.badlogic.gdx.tests.YDownTest;\r
-import com.badlogic.gdx.tests.gwt.GwtBinaryTest;\r
-import com.badlogic.gdx.tests.gwt.GwtTestWrapper;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
 \r
@@ -66,7 +30,7 @@ public class LwjglDebugStarter {
                new SharedLibraryLoader("../../extensions/gdx-stb-truetype/libs/gdx-stb-truetype-natives.jar").load("gdx-stb-truetype");\r
                new SharedLibraryLoader("../../extensions/gdx-image/libs/gdx-image-natives.jar").load("gdx-image");\r
                new SharedLibraryLoader("../../extensions/gdx-freetype/libs/gdx-freetype-natives.jar").load("gdx-freetype");\r
-               \r
+\r
                GdxTest test = new InternationalFontsTest();\r
                LwjglApplicationConfiguration config = new LwjglApplicationConfiguration();\r
                config.width = 640;\r
index d58b306..61581bf 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.lwjgl;\r
 \r
 import java.awt.BorderLayout;\r
@@ -31,36 +32,32 @@ import com.badlogic.gdx.tests.MusicTest;
 import com.badlogic.gdx.tests.ObjTest;\r
 import com.badlogic.gdx.tests.UITest;\r
 \r
-/**\r
- * Demonstrates how to use LwjglAWTCanvas to have multiple GL widgets in a\r
- * Swing application.\r
- * @author mzechner\r
- *\r
- */\r
+/** Demonstrates how to use LwjglAWTCanvas to have multiple GL widgets in a Swing application.\r
+ * @author mzechner */\r
 public class SwingLwjglTest extends JFrame {\r
        LwjglAWTCanvas canvas1;\r
-       \r
-       public SwingLwjglTest() {\r
+\r
+       public SwingLwjglTest () {\r
                setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r
-               \r
+\r
                Container container = getContentPane();\r
                canvas1 = new LwjglAWTCanvas(new MusicTest(), false);\r
                LwjglAWTCanvas canvas2 = new LwjglAWTCanvas(new UITest(), false, canvas1);\r
                LwjglAWTCanvas canvas3 = new LwjglAWTCanvas(new WindowCreator(), false, canvas1);\r
-               \r
+\r
                canvas1.getCanvas().setSize(200, 480);\r
                canvas2.getCanvas().setSize(200, 480);\r
                canvas3.getCanvas().setSize(200, 480);\r
-               \r
+\r
                container.add(canvas1.getCanvas(), BorderLayout.LINE_START);\r
                container.add(canvas2.getCanvas(), BorderLayout.CENTER);\r
                container.add(canvas3.getCanvas(), BorderLayout.LINE_END);\r
-               \r
+\r
                pack();\r
                setVisible(true);\r
                setSize(800, 480);\r
        }\r
-       \r
+\r
        class WindowCreator extends ApplicationAdapter {\r
                SpriteBatch batch;\r
                BitmapFont font;\r
@@ -77,13 +74,13 @@ public class SwingLwjglTest extends JFrame {
                        batch.begin();\r
                        font.draw(batch, "Click to create a new window", 10, 100);\r
                        batch.end();\r
-                       \r
-                       if(Gdx.input.justTouched()) {\r
+\r
+                       if (Gdx.input.justTouched()) {\r
                                createWindow();\r
                        }\r
                }\r
-               \r
-               private void createWindow() {\r
+\r
+               private void createWindow () {\r
                        JFrame window = new JFrame();\r
                        LwjglAWTCanvas canvas = new LwjglAWTCanvas(new ObjTest(), false, canvas1);\r
                        window.getContentPane().add(canvas.getCanvas(), BorderLayout.CENTER);\r
@@ -92,7 +89,7 @@ public class SwingLwjglTest extends JFrame {
                        window.setSize(200, 200);\r
                }\r
        }\r
-       \r
+\r
        public static void main (String[] args) {\r
                SwingUtilities.invokeLater(new Runnable() {\r
                        @Override\r
@@ -101,4 +98,4 @@ public class SwingLwjglTest extends JFrame {
                        }\r
                });\r
        }\r
-}
\ No newline at end of file
+}\r
index dc040cb..50dcd0b 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -51,4 +52,4 @@ public class AccelerometerTest extends GdxTest {
                font.dispose();\r
                batch.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 8788262..ef5a5c3 100644 (file)
@@ -59,4 +59,4 @@ public class AlphaTest extends GdxTest {
                batch.dispose();\r
                texture.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 8da2137..916cdf9 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import java.nio.IntBuffer;\r
@@ -48,10 +49,9 @@ public class AssetManagerTest extends GdxTest implements AssetErrorListener {
 \r
        public void create () {\r
                Gdx.app.setLogLevel(Application.LOG_ERROR);\r
-               \r
-               Resolution[] resolutions = { new Resolution(320, 480, ".320480"),\r
-                                                                                         new Resolution(480, 800, ".480800"),\r
-                                                                                         new Resolution(480, 856, ".480854") };\r
+\r
+               Resolution[] resolutions = {new Resolution(320, 480, ".320480"), new Resolution(480, 800, ".480800"),\r
+                       new Resolution(480, 856, ".480854")};\r
                ResolutionFileResolver resolver = new ResolutionFileResolver(new InternalFileHandleResolver(), resolutions);\r
                manager = new AssetManager();\r
                manager.setLoader(Texture.class, new TextureLoader(resolver));\r
@@ -64,58 +64,59 @@ public class AssetManagerTest extends GdxTest implements AssetErrorListener {
 \r
        boolean diagnosed = false;\r
        private long start;\r
-//     private TileMapRenderer renderer;\r
-//     private TileAtlas atlas;\r
-//     private TiledMap map;\r
-//     private Texture tex3;\r
+// private TileMapRenderer renderer;\r
+// private TileAtlas atlas;\r
+// private TiledMap map;\r
+// private Texture tex3;\r
        private BitmapFont font2;\r
        private TextureAtlas tex2;\r
        private Texture tex1;\r
-       \r
-       private void load() {\r
+\r
+       private void load () {\r
                start = TimeUtils.nanoTime();\r
                tex1 = new Texture("data/animation.png");\r
                tex2 = new TextureAtlas(Gdx.files.internal("data/pack"));\r
                font2 = new BitmapFont(Gdx.files.internal("data/verdana39.fnt"), false);\r
-//             tex3 = new Texture("data/test.etc1");\r
-//             map = TiledLoader.createMap(Gdx.files.internal("data/tiledmap/tilemap csv.tmx"));\r
-//             atlas = new TileAtlas(map, Gdx.files.internal("data/tiledmap/"));\r
-//             renderer = new TileMapRenderer(map, atlas, 8, 8);\r
+// tex3 = new Texture("data/test.etc1");\r
+// map = TiledLoader.createMap(Gdx.files.internal("data/tiledmap/tilemap csv.tmx"));\r
+// atlas = new TileAtlas(map, Gdx.files.internal("data/tiledmap/"));\r
+// renderer = new TileMapRenderer(map, atlas, 8, 8);\r
                System.out.println("plain took: " + (TimeUtils.nanoTime() - start) / 1000000000.0f);\r
-               \r
+\r
                start = TimeUtils.nanoTime();\r
                manager.load("data/animation.png", Texture.class);\r
                manager.load("data/pack1.png", Texture.class);\r
                manager.load("data/pack", TextureAtlas.class);\r
                manager.load("data/verdana39.png", Texture.class);\r
                manager.load("data/verdana39.fnt", BitmapFont.class);\r
-//             manager.load("data/test.etc1", Texture.class);\r
-//             manager.load("data/tiledmap/tilemap csv.tmx", TileMapRenderer.class, new TileMapRendererLoader.TileMapParameter("data/tiledmap/", 8, 8));\r
+// manager.load("data/test.etc1", Texture.class);\r
+// manager.load("data/tiledmap/tilemap csv.tmx", TileMapRenderer.class, new\r
+// TileMapRendererLoader.TileMapParameter("data/tiledmap/", 8, 8));\r
        }\r
-       \r
-       private void unload() {\r
+\r
+       private void unload () {\r
                tex1.dispose();\r
                tex2.dispose();\r
                font2.dispose();\r
-//             tex3.dispose();\r
-//             atlas.dispose();\r
-//             renderer.dispose();\r
-               \r
+// tex3.dispose();\r
+// atlas.dispose();\r
+// renderer.dispose();\r
+\r
                manager.unload("data/animation.png");\r
                manager.unload("data/pack1.png");\r
                manager.unload("data/pack");\r
                manager.unload("data/verdana39.png");\r
                manager.unload("data/verdana39.fnt");\r
-//             manager.unload("data/test.etc1");\r
-//             manager.unload("data/tiledmap/tilemap csv.tmx");\r
+// manager.unload("data/test.etc1");\r
+// manager.unload("data/tiledmap/tilemap csv.tmx");\r
        }\r
-       \r
-       private void invalidateTexture(Texture texture) {\r
+\r
+       private void invalidateTexture (Texture texture) {\r
                IntBuffer buffer = BufferUtils.newIntBuffer(1);\r
                buffer.put(0, texture.getTextureObjectHandle());\r
                Gdx.gl.glDeleteTextures(1, buffer);\r
        }\r
-       \r
+\r
        public void render () {\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                boolean result = manager.update();\r
@@ -132,19 +133,22 @@ public class AssetManagerTest extends GdxTest implements AssetErrorListener {
                batch.begin();\r
                if (manager.isLoaded("data/animation.png")) batch.draw(manager.get("data/animation.png", Texture.class), 100, 100);\r
                if (manager.isLoaded("data/verdana39.png")) batch.draw(manager.get("data/verdana39.png", Texture.class), 300, 100);\r
-               if (manager.isLoaded("data/pack")) batch.draw(manager.get("data/pack", TextureAtlas.class).findRegion("particle-star"), 164, 100);\r
-               if (manager.isLoaded("data/verdana39.fnt")) manager.get("data/verdana39.fnt", BitmapFont.class).draw(batch, "This is a test", 100, 200);\r
-//             if (manager.isLoaded("data/test.etc1")) batch.draw(manager.get("data/test.etc1", Texture.class), 0, 0);\r
-//             if (manager.isLoaded("data/tiledmap/tilemap csv.tmx")) manager.get("data/tiledmap/tilemap csv.tmx", TileMapRenderer.class).render();\r
+               if (manager.isLoaded("data/pack"))\r
+                       batch.draw(manager.get("data/pack", TextureAtlas.class).findRegion("particle-star"), 164, 100);\r
+               if (manager.isLoaded("data/verdana39.fnt"))\r
+                       manager.get("data/verdana39.fnt", BitmapFont.class).draw(batch, "This is a test", 100, 200);\r
+// if (manager.isLoaded("data/test.etc1")) batch.draw(manager.get("data/test.etc1", Texture.class), 0, 0);\r
+// if (manager.isLoaded("data/tiledmap/tilemap csv.tmx")) manager.get("data/tiledmap/tilemap csv.tmx",\r
+// TileMapRenderer.class).render();\r
                font.draw(batch, "loaded: " + manager.getProgress() + ", reloads: " + reloads, 0, 30);\r
                batch.end();\r
-               \r
-//             if(Gdx.input.justTouched()) {\r
-//                     Texture.invalidateAllTextures(Gdx.app);\r
-//                     diagnosed = false;\r
-//                     unload();\r
-//                     load();\r
-//             }\r
+\r
+// if(Gdx.input.justTouched()) {\r
+// Texture.invalidateAllTextures(Gdx.app);\r
+// diagnosed = false;\r
+// unload();\r
+// load();\r
+// }\r
        }\r
 \r
        @Override\r
@@ -158,4 +162,4 @@ public class AssetManagerTest extends GdxTest implements AssetErrorListener {
                batch.dispose();\r
                font.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index bf78328..e15d594 100644 (file)
@@ -24,7 +24,6 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont.HAlignment;
 import com.badlogic.gdx.graphics.g2d.BitmapFont.TextBounds;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.graphics.g2d.TextureAtlas;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
@@ -34,7 +33,7 @@ public class BitmapFontTest extends GdxTest {
        private TextureAtlas atlas;\r
        private BitmapFont font;\r
        private ShapeRenderer renderer;\r
-       \r
+\r
        @Override\r
        public void create () {\r
                spriteBatch = new SpriteBatch();\r
index 71834f0..2a4d0c2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -26,25 +27,25 @@ public class BlitTest extends GdxTest {
        public boolean needsGL20 () {\r
                return true;\r
        }\r
-       \r
+\r
        Texture rgb888;\r
        Texture rgba8888;\r
        Texture psRgb888;\r
        Texture psRgba8888;\r
        SpriteBatch batch;\r
-       \r
-       public void create() {\r
+\r
+       public void create () {\r
                rgb888 = new Texture("data/bobrgb888-32x32.png");\r
                rgba8888 = new Texture("data/bobargb8888-32x32.png");\r
                psRgb888 = new Texture("data/alpha.png");\r
                psRgba8888 = new Texture("data/rgb.png");\r
                batch = new SpriteBatch();\r
        }\r
-       \r
-       public void render() {\r
+\r
+       public void render () {\r
                Gdx.gl.glClearColor(0.4f, 0.4f, 0.4f, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-               \r
+\r
                batch.begin();\r
                batch.draw(rgb888, 0, 0);\r
                batch.draw(rgba8888, 60, 0);\r
@@ -61,4 +62,4 @@ public class BlitTest extends GdxTest {
                psRgb888.dispose();\r
                psRgba8888.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 10cfa44..7ae7c28 100644 (file)
@@ -22,8 +22,8 @@ import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.Mesh;\r
 import com.badlogic.gdx.graphics.Texture;\r
-import com.badlogic.gdx.graphics.VertexAttribute;\r
 import com.badlogic.gdx.graphics.Texture.TextureFilter;\r
+import com.badlogic.gdx.graphics.VertexAttribute;\r
 import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
index 65454d1..166a35d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import java.util.List;\r
@@ -43,9 +44,9 @@ import com.badlogic.gdx.utils.Array;
 import com.badlogic.gdx.utils.TimeUtils;\r
 \r
 public class Box2DCharacterControllerTest extends GdxTest implements ApplicationListener {\r
-        \r
-       final static float MAX_VELOCITY = 14f;          \r
-       boolean jump = false;   \r
+\r
+       final static float MAX_VELOCITY = 14f;\r
+       boolean jump = false;\r
        World world;\r
        Body player;\r
        Fixture playerPhysicsFixture;\r
@@ -60,10 +61,10 @@ public class Box2DCharacterControllerTest extends GdxTest implements Application
        BitmapFont font;\r
        float accum = 0;\r
        float TICK = 1 / 60f;\r
\r
+\r
        @Override\r
-       public void create() {\r
-               world = new World(new Vector2(0, -40), true);           \r
+       public void create () {\r
+               world = new World(new Vector2(0, -40), true);\r
                renderer = new Box2DDebugRenderer();\r
                cam = new OrthographicCamera(28, 20);\r
                createWorld();\r
@@ -71,273 +72,274 @@ public class Box2DCharacterControllerTest extends GdxTest implements Application
                batch = new SpriteBatch();\r
                font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false);\r
        }\r
-       \r
+\r
        @Override\r
-       public void dispose() {\r
+       public void dispose () {\r
                world.dispose();\r
                renderer.dispose();\r
                batch.dispose();\r
                font.dispose();\r
        }\r
-       \r
-       private void createWorld() {\r
-               float y1 = 1; //(float)Math.random() * 0.1f + 1;\r
+\r
+       private void createWorld () {\r
+               float y1 = 1; // (float)Math.random() * 0.1f + 1;\r
                float y2 = y1;\r
-               for(int i = 0; i < 50; i++) {\r
-                       Body ground = createEdge(BodyType.StaticBody, -50 + i * 2, y1, -50 + i * 2 + 2, y2, 0);                 \r
+               for (int i = 0; i < 50; i++) {\r
+                       Body ground = createEdge(BodyType.StaticBody, -50 + i * 2, y1, -50 + i * 2 + 2, y2, 0);\r
                        y1 = y2;\r
-                       y2 = 1; //(float)Math.random() + 1;\r
-               }                       \r
\r
+                       y2 = 1; // (float)Math.random() + 1;\r
+               }\r
+\r
                Body box = createBox(BodyType.StaticBody, 1, 1, 0);\r
                box.setTransform(30, 3, 0);\r
                box = createBox(BodyType.StaticBody, 1.2f, 1.2f, 0);\r
                box.setTransform(5, 2.4f, 0);\r
                player = createPlayer();\r
                player.setTransform(-40.0f, 4.0f, 0);\r
-               player.setFixedRotation(true);                                          \r
\r
-               for(int i = 0; i < 20; i++) {\r
+               player.setFixedRotation(true);\r
+\r
+               for (int i = 0; i < 20; i++) {\r
                        box = createBox(BodyType.DynamicBody, (float)Math.random(), (float)Math.random(), 3);\r
-                       box.setTransform((float)Math.random() * 10f - (float)Math.random() * 10f, (float)Math.random() * 10 + 6, (float)(Math.random() * 2 * Math.PI));\r
+                       box.setTransform((float)Math.random() * 10f - (float)Math.random() * 10f, (float)Math.random() * 10 + 6,\r
+                               (float)(Math.random() * 2 * Math.PI));\r
                }\r
\r
-               for(int i = 0; i < 20; i++) {\r
+\r
+               for (int i = 0; i < 20; i++) {\r
                        Body circle = createCircle(BodyType.DynamicBody, (float)Math.random() * 0.5f, 3);\r
-                       circle.setTransform((float)Math.random() * 10f - (float)Math.random() * 10f, (float)Math.random() * 10 + 6, (float)(Math.random() * 2 * Math.PI));\r
+                       circle.setTransform((float)Math.random() * 10f - (float)Math.random() * 10f, (float)Math.random() * 10 + 6,\r
+                               (float)(Math.random() * 2 * Math.PI));\r
                }\r
\r
+\r
                platforms.add(new CirclePlatform(-24, -5, 10, (float)Math.PI / 4));\r
                platforms.add(new MovingPlatform(-2, 3, 2, 0.5f, 2, 0, (float)Math.PI / 10f, 4));\r
-               platforms.add(new MovingPlatform(17, 2, 5, 0.5f, 2, 0, 0, 5));          \r
-               platforms.add(new MovingPlatform(-7, 5, 2, 0.5f, -2, 2, 0, 8));         \r
-//             platforms.add(new MovingPlatform(40, 3, 20, 0.5f, 0, 2, 5));\r
+               platforms.add(new MovingPlatform(17, 2, 5, 0.5f, 2, 0, 0, 5));\r
+               platforms.add(new MovingPlatform(-7, 5, 2, 0.5f, -2, 2, 0, 8));\r
+// platforms.add(new MovingPlatform(40, 3, 20, 0.5f, 0, 2, 5));\r
        }\r
\r
-       Body createBox(BodyType type, float width, float height, float density) {\r
+\r
+       Body createBox (BodyType type, float width, float height, float density) {\r
                BodyDef def = new BodyDef();\r
                def.type = type;\r
                Body box = world.createBody(def);\r
\r
+\r
                PolygonShape poly = new PolygonShape();\r
                poly.setAsBox(width, height);\r
                box.createFixture(poly, density);\r
                poly.dispose();\r
\r
+\r
                return box;\r
-       }       \r
\r
-       private Body createEdge(BodyType type, float x1, float y1, float x2, float y2, float density) {\r
+       }\r
+\r
+       private Body createEdge (BodyType type, float x1, float y1, float x2, float y2, float density) {\r
                BodyDef def = new BodyDef();\r
                def.type = type;\r
                Body box = world.createBody(def);\r
\r
-               EdgeShape poly = new EdgeShape();               \r
+\r
+               EdgeShape poly = new EdgeShape();\r
                poly.set(new Vector2(0, 0), new Vector2(x2 - x1, y2 - y1));\r
                box.createFixture(poly, density);\r
                box.setTransform(x1, y1, 0);\r
                poly.dispose();\r
\r
+\r
                return box;\r
        }\r
\r
-       Body createCircle(BodyType type, float radius, float density) {\r
+\r
+       Body createCircle (BodyType type, float radius, float density) {\r
                BodyDef def = new BodyDef();\r
                def.type = type;\r
                Body box = world.createBody(def);\r
\r
+\r
                CircleShape poly = new CircleShape();\r
                poly.setRadius(radius);\r
                box.createFixture(poly, density);\r
                poly.dispose();\r
\r
+\r
                return box;\r
-       }       \r
\r
-       private Body createPlayer() {\r
+       }\r
+\r
+       private Body createPlayer () {\r
                BodyDef def = new BodyDef();\r
                def.type = BodyType.DynamicBody;\r
                Body box = world.createBody(def);\r
\r
-               PolygonShape poly = new PolygonShape();         \r
+\r
+               PolygonShape poly = new PolygonShape();\r
                poly.setAsBox(0.45f, 1.4f);\r
                playerPhysicsFixture = box.createFixture(poly, 1);\r
-               poly.dispose();                 \r
\r
-               CircleShape circle = new CircleShape();         \r
+               poly.dispose();\r
+\r
+               CircleShape circle = new CircleShape();\r
                circle.setRadius(0.45f);\r
                circle.setPosition(new Vector2(0, -1.4f));\r
-               playerSensorFixture = box.createFixture(circle, 0);             \r
-               circle.dispose();               \r
\r
+               playerSensorFixture = box.createFixture(circle, 0);\r
+               circle.dispose();\r
+\r
                box.setBullet(true);\r
\r
+\r
                return box;\r
        }\r
\r
+\r
        @Override\r
-       public void resume() {\r
\r
+       public void resume () {\r
+\r
        }\r
\r
+\r
        @Override\r
-       public void render() {\r
+       public void render () {\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                cam.position.set(player.getPosition().x, player.getPosition().y, 0);\r
                cam.update();\r
                renderer.render(world, cam.combined);\r
\r
+\r
                Vector2 vel = player.getLinearVelocity();\r
-               Vector2 pos = player.getPosition();             \r
+               Vector2 pos = player.getPosition();\r
                boolean grounded = isPlayerGrounded(Gdx.graphics.getDeltaTime());\r
-               if(grounded) {\r
+               if (grounded) {\r
                        lastGroundTime = TimeUtils.nanoTime();\r
                } else {\r
-                       if(TimeUtils.nanoTime() - lastGroundTime < 100000000) {\r
+                       if (TimeUtils.nanoTime() - lastGroundTime < 100000000) {\r
                                grounded = true;\r
                        }\r
                }\r
\r
-               // cap max velocity on x                \r
-               if(Math.abs(vel.x) > MAX_VELOCITY) {                    \r
+\r
+               // cap max velocity on x\r
+               if (Math.abs(vel.x) > MAX_VELOCITY) {\r
                        vel.x = Math.signum(vel.x) * MAX_VELOCITY;\r
                        player.setLinearVelocity(vel.x, vel.y);\r
                }\r
\r
+\r
                // calculate stilltime & damp\r
-               if(!Gdx.input.isKeyPressed(Keys.A) && !Gdx.input.isKeyPressed(Keys.D)) {                        \r
+               if (!Gdx.input.isKeyPressed(Keys.A) && !Gdx.input.isKeyPressed(Keys.D)) {\r
                        stillTime += Gdx.graphics.getDeltaTime();\r
                        player.setLinearVelocity(vel.x * 0.9f, vel.y);\r
-               }\r
-               else { \r
+               } else {\r
                        stillTime = 0;\r
-               }                       \r
\r
+               }\r
+\r
                // disable friction while jumping\r
-               if(!grounded) {                 \r
+               if (!grounded) {\r
                        playerPhysicsFixture.setFriction(0f);\r
                        playerSensorFixture.setFriction(0f);\r
                } else {\r
-                       if(!Gdx.input.isKeyPressed(Keys.A) && !Gdx.input.isKeyPressed(Keys.D) && stillTime > 0.2) {\r
+                       if (!Gdx.input.isKeyPressed(Keys.A) && !Gdx.input.isKeyPressed(Keys.D) && stillTime > 0.2) {\r
                                playerPhysicsFixture.setFriction(1000f);\r
                                playerSensorFixture.setFriction(1000f);\r
-                       }\r
-                       else {\r
+                       } else {\r
                                playerPhysicsFixture.setFriction(0.2f);\r
                                playerSensorFixture.setFriction(0.2f);\r
                        }\r
\r
+\r
                        // dampen sudden changes in x/y of a MovingPlatform a little bit, otherwise\r
                        // character hops :)\r
-                       if(groundedPlatform != null && groundedPlatform instanceof MovingPlatform && ((MovingPlatform)groundedPlatform).dist == 0) {\r
-                               player.applyLinearImpulse(0, -24, pos.x, pos.y);                                \r
+                       if (groundedPlatform != null && groundedPlatform instanceof MovingPlatform\r
+                               && ((MovingPlatform)groundedPlatform).dist == 0) {\r
+                               player.applyLinearImpulse(0, -24, pos.x, pos.y);\r
                        }\r
                }\r
-               \r
+\r
                // since Box2D 2.2 we need to reset the friction of any existing contacts\r
                List<Contact> contacts = world.getContactList();\r
-               for(int i = 0; i < world.getContactCount(); i++) {\r
+               for (int i = 0; i < world.getContactCount(); i++) {\r
                        Contact contact = contacts.get(i);\r
                        contact.resetFriction();\r
                }\r
\r
+\r
                // apply left impulse, but only if max velocity is not reached yet\r
-               if(Gdx.input.isKeyPressed(Keys.A) && vel.x > -MAX_VELOCITY) {\r
+               if (Gdx.input.isKeyPressed(Keys.A) && vel.x > -MAX_VELOCITY) {\r
                        player.applyLinearImpulse(-2f, 0, pos.x, pos.y);\r
                }\r
\r
+\r
                // apply right impulse, but only if max velocity is not reached yet\r
-               if(Gdx.input.isKeyPressed(Keys.D) && vel.x < MAX_VELOCITY) {\r
+               if (Gdx.input.isKeyPressed(Keys.D) && vel.x < MAX_VELOCITY) {\r
                        player.applyLinearImpulse(2f, 0, pos.x, pos.y);\r
                }\r
\r
+\r
                // jump, but only when grounded\r
-               if(jump) {                      \r
+               if (jump) {\r
                        jump = false;\r
-                       if(grounded) {\r
-                               player.setLinearVelocity(vel.x, 0);                     \r
+                       if (grounded) {\r
+                               player.setLinearVelocity(vel.x, 0);\r
                                System.out.println("jump before: " + player.getLinearVelocity());\r
                                player.setTransform(pos.x, pos.y + 0.01f, 0);\r
-                               player.applyLinearImpulse(0, 40, pos.x, pos.y);                 \r
-                               System.out.println("jump, " + player.getLinearVelocity());                              \r
+                               player.applyLinearImpulse(0, 40, pos.x, pos.y);\r
+                               System.out.println("jump, " + player.getLinearVelocity());\r
                        }\r
-               }                                       \r
\r
+               }\r
+\r
                // update platforms\r
-               for(int i = 0; i < platforms.size; i++) {\r
+               for (int i = 0; i < platforms.size; i++) {\r
                        Platform platform = platforms.get(i);\r
-                       platform.update(Math.max(1/30.0f, Gdx.graphics.getDeltaTime()));\r
+                       platform.update(Math.max(1 / 30.0f, Gdx.graphics.getDeltaTime()));\r
                }\r
\r
-               // le step...   \r
+\r
+               // le step...\r
                world.step(Gdx.graphics.getDeltaTime(), 4, 4);\r
-//             accum += Gdx.graphics.getDeltaTime();\r
-//             while(accum > TICK) {\r
-//                     accum -= TICK;\r
-//                     world.step(TICK, 4, 4);\r
-//             }\r
-               player.setAwake(true);          \r
\r
+// accum += Gdx.graphics.getDeltaTime();\r
+// while(accum > TICK) {\r
+// accum -= TICK;\r
+// world.step(TICK, 4, 4);\r
+// }\r
+               player.setAwake(true);\r
+\r
                cam.project(point.set(pos.x, pos.y, 0));\r
                batch.begin();\r
-               font.drawMultiLine(batch, "friction: " + playerPhysicsFixture.getFriction() + "\ngrounded: " + grounded, point.x+20, point.y);\r
+               font.drawMultiLine(batch, "friction: " + playerPhysicsFixture.getFriction() + "\ngrounded: " + grounded, point.x + 20,\r
+                       point.y);\r
                batch.end();\r
-       }       \r
\r
-       private boolean isPlayerGrounded(float deltaTime) {                             \r
+       }\r
+\r
+       private boolean isPlayerGrounded (float deltaTime) {\r
                groundedPlatform = null;\r
                List<Contact> contactList = world.getContactList();\r
-               for(int i = 0; i < contactList.size(); i++) {\r
+               for (int i = 0; i < contactList.size(); i++) {\r
                        Contact contact = contactList.get(i);\r
-                       if(contact.isTouching() && (contact.getFixtureA() == playerSensorFixture ||\r
-                          contact.getFixtureB() == playerSensorFixture)) {                             \r
\r
+                       if (contact.isTouching()\r
+                               && (contact.getFixtureA() == playerSensorFixture || contact.getFixtureB() == playerSensorFixture)) {\r
+\r
                                Vector2 pos = player.getPosition();\r
                                WorldManifold manifold = contact.getWorldManifold();\r
                                boolean below = true;\r
-                               for(int j = 0; j < manifold.getNumberOfContactPoints(); j++) {\r
+                               for (int j = 0; j < manifold.getNumberOfContactPoints(); j++) {\r
                                        below &= (manifold.getPoints()[j].y < pos.y - 1.5f);\r
                                }\r
\r
-                               if(below) {\r
-                                       if(contact.getFixtureA().getUserData() != null && contact.getFixtureA().getUserData().equals("p")) {\r
-                                               groundedPlatform = (Platform)contact.getFixtureA().getBody().getUserData();                                                     \r
+\r
+                               if (below) {\r
+                                       if (contact.getFixtureA().getUserData() != null && contact.getFixtureA().getUserData().equals("p")) {\r
+                                               groundedPlatform = (Platform)contact.getFixtureA().getBody().getUserData();\r
                                        }\r
\r
-                                       if(contact.getFixtureB().getUserData() != null && contact.getFixtureB().getUserData().equals("p")) {\r
+\r
+                                       if (contact.getFixtureB().getUserData() != null && contact.getFixtureB().getUserData().equals("p")) {\r
                                                groundedPlatform = (Platform)contact.getFixtureB().getBody().getUserData();\r
-                                       }                                                                                       \r
-                                       return true;                    \r
+                                       }\r
+                                       return true;\r
                                }\r
\r
+\r
                                return false;\r
                        }\r
                }\r
                return false;\r
        }\r
 \r
\r
        @Override\r
-       public boolean keyDown(int keycode) {\r
-               if(keycode == Keys.W) jump = true;\r
+       public boolean keyDown (int keycode) {\r
+               if (keycode == Keys.W) jump = true;\r
                return false;\r
        }\r
\r
+\r
        @Override\r
-       public boolean keyUp(int keycode) {\r
-               if(keycode == Keys.W) jump = false;\r
+       public boolean keyUp (int keycode) {\r
+               if (keycode == Keys.W) jump = false;\r
                return false;\r
        }\r
\r
+\r
        Vector2 last = null;\r
        Vector3 point = new Vector3();\r
\r
+\r
        @Override\r
-       public boolean touchDown(int x, int y, int pointerId, int button) {\r
+       public boolean touchDown (int x, int y, int pointerId, int button) {\r
                cam.unproject(point.set(x, y, 0));\r
\r
-               if(button == Input.Buttons.LEFT) {\r
-                       if(last == null) {\r
+\r
+               if (button == Input.Buttons.LEFT) {\r
+                       if (last == null) {\r
                                last = new Vector2(point.x, point.y);\r
                        } else {\r
                                createEdge(BodyType.StaticBody, last.x, last.y, point.x, point.y, 0);\r
@@ -346,39 +348,39 @@ public class Box2DCharacterControllerTest extends GdxTest implements Application
                } else {\r
                        last = null;\r
                }\r
\r
+\r
                return false;\r
        }\r
-       \r
+\r
        abstract class Platform {\r
-               abstract void update(float deltatime);\r
+               abstract void update (float deltatime);\r
        }\r
-       \r
+\r
        class CirclePlatform extends Platform {\r
                Body platform;\r
-               \r
-               public CirclePlatform(int x, int y, float radius, float da) {\r
+\r
+               public CirclePlatform (int x, int y, float radius, float da) {\r
                        platform = createCircle(BodyType.KinematicBody, radius, 1);\r
                        platform.setTransform(x, y, 0);\r
                        platform.getFixtureList().get(0).setUserData("p");\r
                        platform.setAngularVelocity(da);\r
                        platform.setUserData(this);\r
                }\r
-               \r
+\r
                @Override\r
                void update (float deltatime) {\r
-               }               \r
+               }\r
        }\r
\r
+\r
        class MovingPlatform extends Platform {\r
-               Body platform;          \r
+               Body platform;\r
                Vector2 pos = new Vector2();\r
                Vector2 dir = new Vector2();\r
                float dist = 0;\r
                float maxDist = 0;\r
\r
-               public MovingPlatform(float x, float y, float width, float height, float dx, float dy, float da, float maxDist) {\r
-                       platform = createBox(BodyType.KinematicBody, width, height, 1);                 \r
+\r
+               public MovingPlatform (float x, float y, float width, float height, float dx, float dy, float da, float maxDist) {\r
+                       platform = createBox(BodyType.KinematicBody, width, height, 1);\r
                        pos.x = x;\r
                        pos.y = y;\r
                        dir.x = dx;\r
@@ -389,15 +391,15 @@ public class Box2DCharacterControllerTest extends GdxTest implements Application
                        platform.setAngularVelocity(da);\r
                        platform.setUserData(this);\r
                }\r
\r
-               public void update(float deltaTime) {\r
+\r
+               public void update (float deltaTime) {\r
                        dist += dir.len() * deltaTime;\r
-                       if(dist > maxDist) {\r
+                       if (dist > maxDist) {\r
                                dir.mul(-1);\r
                                dist = 0;\r
                        }\r
\r
+\r
                        platform.setLinearVelocity(dir);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index afa6219..34f9906 100644 (file)
@@ -27,7 +27,6 @@ import com.badlogic.gdx.graphics.Texture;
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.MathUtils;\r
@@ -148,18 +147,13 @@ public class Box2DTest extends GdxTest implements InputProcessor {
                // We also create a simple ChainShape we put above our\r
                // ground polygon for extra funkyness.\r
                ChainShape chainShape = new ChainShape();\r
-               chainShape.createLoop(new Vector2[] {\r
-                       new Vector2(-10, 10),\r
-                       new Vector2(-10, 5),\r
-                       new Vector2(10, 5),\r
-                       new Vector2(10, 11),\r
-               });\r
+               chainShape.createLoop(new Vector2[] {new Vector2(-10, 10), new Vector2(-10, 5), new Vector2(10, 5), new Vector2(10, 11),});\r
                BodyDef chainBodyDef = new BodyDef();\r
                chainBodyDef.type = BodyType.StaticBody;\r
                Body chainBody = world.createBody(chainBodyDef);\r
                chainBody.createFixture(chainShape, 0);\r
                chainShape.dispose();\r
-               \r
+\r
                createBoxes();\r
 \r
                // You can savely ignore the rest of this method :)\r
@@ -300,6 +294,7 @@ public class Box2DTest extends GdxTest implements InputProcessor {
        }\r
 \r
        Matrix4 transform = new Matrix4();\r
+\r
        private void renderBox (Body body, float halfWidth, float halfHeight) {\r
                // get the bodies center and angle in world coordinates\r
                Vector2 pos = body.getWorldCenter();\r
@@ -315,7 +310,7 @@ public class Box2DTest extends GdxTest implements InputProcessor {
                renderer.setColor(1, 1, 1, 1);\r
                renderer.rect(-halfWidth, -halfHeight, halfWidth * 2, halfHeight * 2);\r
                renderer.end();\r
-       }               \r
+       }\r
 \r
        /** we instantiate this vector and the callback here so we don't irritate the GC **/\r
        Vector3 testPoint = new Vector3();\r
index fc75bea..dde9b08 100644 (file)
@@ -19,7 +19,6 @@ package com.badlogic.gdx.tests;
 import com.badlogic.gdx.Application;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.InputMultiplexer;\r
-import com.badlogic.gdx.Input.Keys;\r
 import com.badlogic.gdx.InputProcessor;\r
 import com.badlogic.gdx.input.GestureDetector;\r
 import com.badlogic.gdx.input.GestureDetector.GestureListener;\r
index a3f0065..5aabdd5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import java.nio.ByteBuffer;\r
@@ -367,4 +368,4 @@ public class BufferUtilsTest extends GdxTest {
        private void checkFloat (double val1, double val2) {\r
                if (val1 != val2) throw new GdxRuntimeException("Error, val1 != val2");\r
        }\r
-}
\ No newline at end of file
+}\r
index 22b384d..7f94010 100644 (file)
@@ -62,7 +62,7 @@ public class ComplexActionTest extends GdxTest {
                stage.addActor(img2);\r
 \r
                img1.addAction(complexAction);\r
-               //img2.action(complexAction.copy());\r
+               // img2.action(complexAction.copy());\r
        }\r
 \r
        @Override\r
index 04452ab..b437813 100644 (file)
@@ -1,18 +1,19 @@
 /*******************************************************************************\r
-* Copyright 2011 See AUTHORS file.\r
-* \r
-* Licensed under the Apache License, Version 2.0 (the "License");\r
-* you may not use this file except in compliance with the License.\r
-* You may obtain a copy of the License at\r
-* \r
-*   http://www.apache.org/licenses/LICENSE-2.0\r
-* \r
-* Unless required by applicable law or agreed to in writing, software\r
-* distributed under the License is distributed on an "AS IS" BASIS,\r
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-* See the License for the specific language governing permissions and\r
-* limitations under the License.\r
-******************************************************************************/\r
+ * Copyright 2011 See AUTHORS file.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *   http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import java.util.Random;\r
@@ -32,76 +33,74 @@ import com.badlogic.gdx.tests.utils.GdxTest;
 \r
 public class CullTest extends GdxTest implements ApplicationListener {\r
 \r
-   public boolean needsGL20() {\r
-      return false;\r
-   }\r
-\r
-   Mesh sphere;\r
-   Camera cam;\r
-   SpriteBatch batch;\r
-   BitmapFont font;\r
-   Vector3[] positions = new Vector3[100];\r
-   \r
-   @Override public void create() {\r
-      sphere = ObjLoader.loadObj(Gdx.files.internal("data/sphere.obj").read());\r
-      //cam = new PerspectiveCamera(45, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\r
-      cam = new OrthographicCamera(45, 45 * (Gdx.graphics.getWidth() / (float) Gdx.graphics.getHeight()) );\r
-      \r
-      cam.near = 1;\r
-      cam.far = 200;\r
-      \r
-      Random rand = new Random();\r
-      for(int i = 0; i < positions.length; i++) {\r
-         positions[i] = new Vector3(rand.nextFloat() * 100 - rand.nextFloat() * 100, \r
-                                    rand.nextFloat() * 100 - rand.nextFloat() * 100, \r
-                                    rand.nextFloat() * -100 - 3);\r
-      }\r
-      batch = new SpriteBatch();\r
-      font = new BitmapFont();\r
-      //Gdx.graphics.setVSync(true);\r
-      //Gdx.app.log("CullTest", "" + Gdx.graphics.getBufferFormat().toString());\r
-   }\r
-   \r
-   @Override public void render() {\r
-      GL10 gl = Gdx.gl10;\r
-      \r
-      gl.glClearColor(0, 0, 0, 0);\r
-      gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\r
-      gl.glEnable(GL10.GL_DEPTH_TEST);\r
-      \r
-      cam.update();\r
-      cam.apply(gl);\r
-      \r
-      int visible = 0;\r
-      for(int i = 0; i < positions.length; i++) {\r
-         if(cam.frustum.sphereInFrustum(positions[i], 1)) {\r
-            gl.glColor4f(1, 1, 1, 1);\r
-            visible++;\r
-         }\r
-         else {\r
-            gl.glColor4f(1, 0, 0, 1);\r
-         }\r
-         gl.glPushMatrix();\r
-         gl.glTranslatef(positions[i].x, positions[i].y, positions[i].z);\r
-         sphere.render(GL10.GL_TRIANGLES);\r
-         gl.glPopMatrix();\r
-      }\r
-      \r
-      if(Gdx.input.isKeyPressed(Keys.A))\r
-         cam.rotate(20 * Gdx.graphics.getDeltaTime(), 0, 1, 0);\r
-      if(Gdx.input.isKeyPressed(Keys.D))\r
-         cam.rotate(-20 * Gdx.graphics.getDeltaTime(), 0, 1, 0);      \r
-      \r
-      gl.glDisable(GL10.GL_DEPTH_TEST);\r
-      batch.begin();\r
-      font.draw(batch, "visible: " + visible + "/100" + ", fps: " + Gdx.graphics.getFramesPerSecond(), 0, 20);\r
-      batch.end();\r
-   }\r
-\r
-   @Override\r
-   public void dispose() {\r
-       batch.dispose();\r
-       font.dispose();\r
-       sphere.dispose();\r
-   }\r
-}
\ No newline at end of file
+       public boolean needsGL20 () {\r
+               return false;\r
+       }\r
+\r
+       Mesh sphere;\r
+       Camera cam;\r
+       SpriteBatch batch;\r
+       BitmapFont font;\r
+       Vector3[] positions = new Vector3[100];\r
+\r
+       @Override\r
+       public void create () {\r
+               sphere = ObjLoader.loadObj(Gdx.files.internal("data/sphere.obj").read());\r
+               // cam = new PerspectiveCamera(45, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\r
+               cam = new OrthographicCamera(45, 45 * (Gdx.graphics.getWidth() / (float)Gdx.graphics.getHeight()));\r
+\r
+               cam.near = 1;\r
+               cam.far = 200;\r
+\r
+               Random rand = new Random();\r
+               for (int i = 0; i < positions.length; i++) {\r
+                       positions[i] = new Vector3(rand.nextFloat() * 100 - rand.nextFloat() * 100, rand.nextFloat() * 100 - rand.nextFloat()\r
+                               * 100, rand.nextFloat() * -100 - 3);\r
+               }\r
+               batch = new SpriteBatch();\r
+               font = new BitmapFont();\r
+               // Gdx.graphics.setVSync(true);\r
+               // Gdx.app.log("CullTest", "" + Gdx.graphics.getBufferFormat().toString());\r
+       }\r
+\r
+       @Override\r
+       public void render () {\r
+               GL10 gl = Gdx.gl10;\r
+\r
+               gl.glClearColor(0, 0, 0, 0);\r
+               gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\r
+               gl.glEnable(GL10.GL_DEPTH_TEST);\r
+\r
+               cam.update();\r
+               cam.apply(gl);\r
+\r
+               int visible = 0;\r
+               for (int i = 0; i < positions.length; i++) {\r
+                       if (cam.frustum.sphereInFrustum(positions[i], 1)) {\r
+                               gl.glColor4f(1, 1, 1, 1);\r
+                               visible++;\r
+                       } else {\r
+                               gl.glColor4f(1, 0, 0, 1);\r
+                       }\r
+                       gl.glPushMatrix();\r
+                       gl.glTranslatef(positions[i].x, positions[i].y, positions[i].z);\r
+                       sphere.render(GL10.GL_TRIANGLES);\r
+                       gl.glPopMatrix();\r
+               }\r
+\r
+               if (Gdx.input.isKeyPressed(Keys.A)) cam.rotate(20 * Gdx.graphics.getDeltaTime(), 0, 1, 0);\r
+               if (Gdx.input.isKeyPressed(Keys.D)) cam.rotate(-20 * Gdx.graphics.getDeltaTime(), 0, 1, 0);\r
+\r
+               gl.glDisable(GL10.GL_DEPTH_TEST);\r
+               batch.begin();\r
+               font.draw(batch, "visible: " + visible + "/100" + ", fps: " + Gdx.graphics.getFramesPerSecond(), 0, 20);\r
+               batch.end();\r
+       }\r
+\r
+       @Override\r
+       public void dispose () {\r
+               batch.dispose();\r
+               font.dispose();\r
+               sphere.dispose();\r
+       }\r
+}\r
index 8e990f2..800a4bb 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -31,8 +32,8 @@ public class CustomShaderSpriteBatchTest extends GdxTest {
        public void create () {\r
                batch = new SpriteBatch(10);\r
                ShaderProgram.pedantic = false;\r
-               shader = new ShaderProgram(Gdx.files.internal("data/shaders/batch.vert").readString(),\r
-                                                                                       Gdx.files.internal("data/shaders/batch.frag").readString());\r
+               shader = new ShaderProgram(Gdx.files.internal("data/shaders/batch.vert").readString(), Gdx.files.internal(\r
+                       "data/shaders/batch.frag").readString());\r
                batch.setShader(shader);\r
                texture = new Texture("data/badlogic.jpg");\r
        }\r
@@ -44,7 +45,7 @@ public class CustomShaderSpriteBatchTest extends GdxTest {
                batch.draw(texture, 0, 0);\r
                batch.end();\r
        }\r
-       \r
+\r
        @Override\r
        public void dispose () {\r
                batch.dispose();\r
@@ -56,4 +57,4 @@ public class CustomShaderSpriteBatchTest extends GdxTest {
        public boolean needsGL20 () {\r
                return true;\r
        }\r
-}
\ No newline at end of file
+}\r
index 269a500..84a2566 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import java.util.LinkedList;\r
 \r
-import com.badlogic.gdx.Game;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.Camera;\r
 import com.badlogic.gdx.graphics.GL10;\r
@@ -27,8 +27,6 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
 import com.badlogic.gdx.graphics.g3d.decals.CameraGroupStrategy;\r
 import com.badlogic.gdx.graphics.g3d.decals.Decal;\r
 import com.badlogic.gdx.graphics.g3d.decals.DecalBatch;\r
-import com.badlogic.gdx.graphics.g3d.decals.GroupStrategy;\r
-import com.badlogic.gdx.graphics.g3d.decals.SimpleOrthoGroupStrategy;\r
 import com.badlogic.gdx.math.WindowedMean;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
@@ -64,7 +62,7 @@ public class DecalTest extends GdxTest {
                h = Gdx.graphics.getHeight() / 0.8f;\r
                for (int i = 0; i < INITIAL_RENDERED; i++) {\r
                        toRender.add(makeDecal());\r
-               }               \r
+               }\r
                cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\r
                cam.near = 0.1f;\r
                cam.far = 10f;\r
@@ -147,4 +145,4 @@ public class DecalTest extends GdxTest {
                idx++;\r
                return sprite;\r
        }\r
-}
\ No newline at end of file
+}\r
index a988b65..f253142 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
-import com.badlogic.gdx.ApplicationAdapter;\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Demonstrates how to use non-continuous (aka dirty-only) rendering. The\r
- * application will clear the screen with a random color every frame it\r
- * renders. Rendering requests are issued automatically if new input\r
- * events arrive.\r
+/** Demonstrates how to use non-continuous (aka dirty-only) rendering. The application will clear the screen with a random color\r
+ * every frame it renders. Rendering requests are issued automatically if new input events arrive.\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class DirtyRenderingTest extends GdxTest {\r
        @Override\r
        public void create () {\r
@@ -68,4 +63,4 @@ public class DirtyRenderingTest extends GdxTest {
                Gdx.gl.glClearColor(MathUtils.random(), MathUtils.random(), MathUtils.random(), MathUtils.random());\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
        }\r
-}
\ No newline at end of file
+}\r
index 44f578e..44dc9fa 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -91,4 +92,4 @@ public class ETC1Test extends GdxTest {
                img1.dispose();\r
                img2.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 8360218..779da19 100644 (file)
@@ -80,7 +80,7 @@ public class EdgeDetectionTest extends GdxTest {
                logger = new FPSLogger();\r
                calculateOffsets();\r
        }\r
-       \r
+\r
        @Override\r
        public void dispose () {\r
                shader.dispose();\r
index 25b5b4a..e88f547 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -39,4 +40,4 @@ public class ExitTest extends GdxTest {
        public void dispose () {\r
                Gdx.app.log("ExitTest", "disposed");\r
        }\r
-}
\ No newline at end of file
+}\r
index 58cc44a..3911886 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -20,11 +21,8 @@ import com.badlogic.gdx.audio.Music;
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Tests playing back audio from the external storage. \r
- * @author mzechner\r
- *\r
- */\r
+/** Tests playing back audio from the external storage.\r
+ * @author mzechner */\r
 public class ExternalMusicTest extends GdxTest {\r
 \r
        @Override\r
@@ -33,7 +31,7 @@ public class ExternalMusicTest extends GdxTest {
                FileHandle src = Gdx.files.internal("data/8.12.mp3");\r
                FileHandle dst = Gdx.files.external("8.12.mp3");\r
                src.copyTo(dst);\r
-               \r
+\r
                // create a music instance and start playback\r
                Music music = Gdx.audio.newMusic(dst);\r
                music.play();\r
@@ -44,4 +42,4 @@ public class ExternalMusicTest extends GdxTest {
                // delete the copy on the external storage\r
                Gdx.files.external("8.12.mp3").delete();\r
        }\r
-}
\ No newline at end of file
+}\r
index ee3dd69..85f7f3c 100644 (file)
 \r
 package com.badlogic.gdx.tests;\r
 \r
-import java.nio.FloatBuffer;\r
-import java.nio.ShortBuffer;\r
 import java.util.Arrays;\r
 \r
-import com.badlogic.gdx.audio.AudioBuild;\r
 import com.badlogic.gdx.audio.analysis.AudioTools;\r
 import com.badlogic.gdx.audio.analysis.FFT;\r
 import com.badlogic.gdx.audio.analysis.KissFFT;\r
-import com.badlogic.gdx.utils.GdxNativesLoader;\r
 import com.badlogic.gdx.utils.SharedLibraryLoader;\r
 \r
-/**\r
- * Simples test that makes sure the output of KissFFT and FFT are (mostly)\r
- * equal.\r
- * @author mzechner\r
- *\r
- */\r
+/** Simples test that makes sure the output of KissFFT and FFT are (mostly) equal.\r
+ * @author mzechner */\r
 public class FFTTest {\r
        static int SAMPLES = 1024;\r
 \r
@@ -40,11 +32,11 @@ public class FFTTest {
                new SharedLibraryLoader("../../extensions/gdx-audio/libs/gdx-audio-natives.jar").load("gdx-audio");\r
                short[] samples = AudioTools.generate(44100, 440, SAMPLES);\r
                float[] samplesFloat = AudioTools.generateFloat(44100, 440, SAMPLES);\r
-               \r
+\r
                // Damien's FFT\r
                FFT fft = new FFT(SAMPLES, 44100);\r
                fft.forward(samplesFloat);\r
-               float[] spectrum = fft.getSpectrum();           \r
+               float[] spectrum = fft.getSpectrum();\r
                System.out.println(Arrays.toString(spectrum));\r
 \r
                // KissFFT\r
index 8f215f9..5a3d99d 100644 (file)
@@ -110,8 +110,7 @@ public class FilesTest extends GdxTest {
                } else {\r
                        message += "External storage not available";\r
                }\r
-               if (Gdx.files.isLocalStorageAvailable())\r
-               {\r
+               if (Gdx.files.isLocalStorageAvailable()) {\r
                        message += "Local storage available\n";\r
                        message += "Local storage path: " + Gdx.files.getLocalStoragePath() + "\n";\r
 \r
@@ -163,8 +162,8 @@ public class FilesTest extends GdxTest {
                                        }\r
                                }\r
                        }\r
-                       \r
-                       if (!Gdx.files.local("test.txt").delete()) message += "Couldn't delete localstorage/test.txt";                  \r
+\r
+                       if (!Gdx.files.local("test.txt").delete()) message += "Couldn't delete localstorage/test.txt";\r
                }\r
                try {\r
                        testClasspath();\r
@@ -216,10 +215,9 @@ public class FilesTest extends GdxTest {
                } catch (Exception expected) {\r
                }\r
                if (handle.list().length != 0) fail();\r
-               if (Gdx.app.getType() != ApplicationType.Android)\r
-               {\r
-                       if (!handle.parent().exists()) fail();  \r
-               }               \r
+               if (Gdx.app.getType() != ApplicationType.Android) {\r
+                       if (!handle.parent().exists()) fail();\r
+               }\r
                try {\r
                        handle.read().close();\r
                        fail();\r
@@ -230,8 +228,7 @@ public class FilesTest extends GdxTest {
                        dir = Gdx.files.internal("data");\r
                else\r
                        dir = Gdx.files.internal("../gdx-tests-android/assets/data");\r
-               if (Gdx.app.getType() != ApplicationType.Android)\r
-               {\r
+               if (Gdx.app.getType() != ApplicationType.Android) {\r
                        if (!dir.exists()) fail();\r
                }\r
                if (!dir.isDirectory()) fail();\r
@@ -240,8 +237,7 @@ public class FilesTest extends GdxTest {
                if (!child.name().equals("badlogic.jpg")) fail();\r
                if (!child.nameWithoutExtension().equals("badlogic")) fail();\r
                if (!child.extension().equals("jpg")) fail();\r
-               if (Gdx.app.getType() != ApplicationType.Android)\r
-               {\r
+               if (Gdx.app.getType() != ApplicationType.Android) {\r
                        if (!child.parent().exists()) fail();\r
                }\r
                FileHandle copy = Gdx.files.external("badlogic.jpg-copy");\r
@@ -395,6 +391,7 @@ public class FilesTest extends GdxTest {
                handle.delete();\r
                handle.deleteDirectory();\r
        }\r
+\r
        private void testLocal () throws IOException {\r
                String path = "meow";\r
                FileHandle handle = Gdx.files.local(path);\r
@@ -464,6 +461,7 @@ public class FilesTest extends GdxTest {
                handle.delete();\r
                handle.deleteDirectory();\r
        }\r
+\r
        private void fail () {\r
                throw new RuntimeException();\r
        }\r
index 6de4018..2a58f8b 100644 (file)
@@ -98,11 +98,8 @@ public class FrameBufferTest extends GdxTest {
 \r
                        "void main()                  \n" + "{                            \n" + "   v_Color = a_Color;"\r
                        + "   v_texCoords = a_texCoords;\n" + "   gl_Position =   a_Position;  \n" + "}                            \n";\r
-               String fragmentShader = "#ifdef GL_ES\n"\r
-                       + "precision mediump float;\n"\r
-                  + "#endif\n"\r
-                  + "varying vec4 v_Color;\n" + "varying vec2 v_texCoords; \n"\r
-                       + "uniform sampler2D u_texture;\n" +\r
+               String fragmentShader = "#ifdef GL_ES\n" + "precision mediump float;\n" + "#endif\n" + "varying vec4 v_Color;\n"\r
+                       + "varying vec2 v_texCoords; \n" + "uniform sampler2D u_texture;\n" +\r
 \r
                        "void main()                                  \n" + "{                                            \n"\r
                        + "  gl_FragColor = v_Color * texture2D(u_texture, v_texCoords);\n" + "}";\r
index 90d0f97..504d0f4 100644 (file)
@@ -80,8 +80,8 @@ public class FramebufferToTextureTest extends GdxTest {
                gl.glPopMatrix();\r
 \r
                if (Gdx.input.justTouched() || fbTexture == null) {\r
-                       if(fbTexture != null) fbTexture.getTexture().dispose();\r
-                       fbTexture = ScreenUtils.getFrameBufferTexture();\r
+                       if (fbTexture != null) fbTexture.getTexture().dispose();\r
+                       fbTexture = ScreenUtils.getFrameBufferTexture();\r
                }\r
 \r
                batch.begin();\r
index 8ae84e5..6bd0ab7 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -35,7 +36,7 @@ public class FreeTypeTest extends GdxTest {
        public void create () {\r
                boolean flip = false;\r
                batch = new SpriteBatch();\r
-               if(flip) {\r
+               if (flip) {\r
                        OrthographicCamera cam = new OrthographicCamera();\r
                        cam.setToOrtho(flip);\r
                        cam.update();\r
@@ -58,9 +59,9 @@ public class FreeTypeTest extends GdxTest {
                font.setColor(Color.RED);\r
                font.drawMultiLine(batch, "This is a test\nAnd another line\n()§$%&/!12390#", 100, 112);\r
                ftFont.drawMultiLine(batch, "This is a test\nAnd another line\n()§$%&/!12390#", 100, 112);\r
-//             batch.disableBlending();\r
+// batch.disableBlending();\r
                batch.draw(ftFont.getRegion(), 300, 0);\r
-//             batch.enableBlending();\r
+// batch.enableBlending();\r
                batch.end();\r
        }\r
 \r
@@ -68,4 +69,4 @@ public class FreeTypeTest extends GdxTest {
        public boolean needsGL20 () {\r
                return true;\r
        }\r
-}
\ No newline at end of file
+}\r
index a09db86..1c12a4f 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -162,4 +163,4 @@ public class FrustumTest extends GdxTest {
 \r
                renderer.end();\r
        }\r
-}
\ No newline at end of file
+}\r
index ea0d912..5511a48 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -81,4 +82,4 @@ public class FullscreenTest extends GdxTest {
        public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index 993f46b..cf4a281 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.ApplicationListener;\r
@@ -124,4 +125,4 @@ public class GestureDetectorTest extends GdxTest implements ApplicationListener
        public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index 6b1dfd2..63052e7 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -83,4 +84,4 @@ public class GroupCullingTest extends GdxTest {
        public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index 3feefe5..bb2c5f8 100644 (file)
@@ -19,7 +19,6 @@ package com.badlogic.gdx.tests;
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.Texture;\r
-import com.badlogic.gdx.scenes.scene2d.Group;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Image;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
index f7e2efb..3cdc8a9 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -74,4 +75,4 @@ public class ImageTest extends GdxTest {
        public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index 76f142c..c960ba3 100644 (file)
@@ -18,8 +18,6 @@ package com.badlogic.gdx.tests;
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.GL20;\r
-import com.badlogic.gdx.graphics.GLCommon;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
@@ -56,7 +54,7 @@ public class ImmediateModeRendererTest extends GdxTest {
 \r
        @Override\r
        public void create () {\r
-               if(Gdx.graphics.isGL20Available()) \r
+               if (Gdx.graphics.isGL20Available())\r
                        renderer = new ImmediateModeRenderer20(false, true, 1);\r
                else\r
                        renderer = new ImmediateModeRenderer10();\r
index 9904c07..e20b8d1 100644 (file)
@@ -20,16 +20,15 @@ import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.Input.Buttons;\r
 import com.badlogic.gdx.Input.Keys;\r
 import com.badlogic.gdx.InputProcessor;\r
-import com.badlogic.gdx.input.RemoteInput;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
 public class InputTest extends GdxTest implements InputProcessor {\r
 \r
        @Override\r
        public void create () {\r
-//             Gdx.input = new RemoteInput();\r
+// Gdx.input = new RemoteInput();\r
                Gdx.input.setInputProcessor(this);\r
-//             Gdx.input.setCursorCatched(true);\r
+// Gdx.input.setCursorCatched(true);\r
        }\r
 \r
        @Override\r
index e591b5a..d664e67 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -89,4 +90,4 @@ public class IntegerBitmapFontTest extends GdxTest {
                font.drawMultiLine(batch, text, 10.5f, 120.5f);\r
                font.drawMultiLine(batch, text, 10.5f, 180.5f, 200, HAlignment.CENTER);\r
        }\r
-}
\ No newline at end of file
+}\r
index d785387..2c59486 100644 (file)
@@ -1,3 +1,4 @@
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -8,59 +9,50 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Shows how to use fonts for languages other than english. Note \r
- * that only alphabets with a humble amount of glyphs can be used\r
- * (100 is about the maximum we'd recommend). All western languages\r
- * fit into that category, some asian languages might work as well,\r
- * e.g. Korean. Any right-to-left languages like arabic won't work,\r
- * neither do languages like Japanese or Chinese due to their huge\r
- * amount of glyphs which don't fit into a single texture.</p>\r
+/** Shows how to use fonts for languages other than english. Note that only alphabets with a humble amount of glyphs can be used\r
+ * (100 is about the maximum we'd recommend). All western languages fit into that category, some asian languages might work as\r
+ * well, e.g. Korean. Any right-to-left languages like arabic won't work, neither do languages like Japanese or Chinese due to\r
+ * their huge amount of glyphs which don't fit into a single texture.</p>\r
  * \r
- * Note that you don't have to use the FreeType extension for this,\r
- * you can generate fonts with Hiero as well. The FreeType extension\r
- * allows you to generate fonts at runtime for different screen densities.\r
- * It is not portable to GWT!</p>\r
+ * Note that you don't have to use the FreeType extension for this, you can generate fonts with Hiero as well. The FreeType\r
+ * extension allows you to generate fonts at runtime for different screen densities. It is not portable to GWT!</p>\r
  * \r
- * For each script examplified below we only use a few characters from\r
- * the respective alphabet. You'll have to pass in a string containing\r
- * all the printable characters of that language that you want to use!\r
+ * For each script examplified below we only use a few characters from the respective alphabet. You'll have to pass in a string\r
+ * containing all the printable characters of that language that you want to use!\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class InternationalFontsTest extends GdxTest {\r
        OrthographicCamera cam;\r
        SpriteBatch batch;\r
        BitmapFont koreanFont;\r
        BitmapFont cyrillicFont;\r
        BitmapFont thaiFont;\r
-       \r
+\r
        @Override\r
-       public void create() {\r
+       public void create () {\r
                FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal("data/unbom.ttf"));\r
                koreanFont = generator.generateFont(18, "한국어/조선말", false);\r
                generator.dispose();\r
-               \r
+\r
                generator = new FreeTypeFontGenerator(Gdx.files.internal("data/russkij.ttf"));\r
                cyrillicFont = generator.generateFont(18, FreeTypeFontGenerator.DEFAULT_CHARS, false);\r
                generator.dispose();\r
-               \r
+\r
                generator = new FreeTypeFontGenerator(Gdx.files.internal("data/garuda.ttf"));\r
                thaiFont = generator.generateFont(18, "วรณยุกต์", false);\r
                generator.dispose();\r
-               \r
+\r
                batch = new SpriteBatch();\r
-               \r
+\r
                cam = new OrthographicCamera();\r
                cam.setToOrtho(false, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\r
                cam.update();\r
        }\r
 \r
        @Override\r
-       public void render() {\r
+       public void render () {\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-               \r
+\r
                batch.setProjectionMatrix(cam.combined);\r
                batch.begin();\r
                koreanFont.draw(batch, "한국어/조선말", 0, 22);\r
@@ -70,8 +62,8 @@ public class InternationalFontsTest extends GdxTest {
        }\r
 \r
        @Override\r
-       public void resize(int width, int height) {\r
+       public void resize (int width, int height) {\r
                cam.setToOrtho(false, width, height);\r
        }\r
-       \r
+\r
 }\r
index 358b596..ee0441c 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -134,4 +135,4 @@ public class InterpolationTest extends GdxTest {
        public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index 52ca02f..80dcb8a 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.OrthographicCamera;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.Vector2;\r
@@ -126,4 +126,4 @@ public class InverseKinematicsTest extends GdxTest {
                        bones[i + 1].position.set(x, y, 0);\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 3c6eb23..0122a1d 100644 (file)
@@ -23,7 +23,6 @@ import com.badlogic.gdx.graphics.GL10;
 import com.badlogic.gdx.graphics.OrthographicCamera;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.g2d.SpriteCache;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
@@ -84,7 +83,8 @@ public class IsometricTileTest extends GdxTest {
        public void dispose () {\r
                renderer.dispose();\r
                texture.dispose();\r
-               for(SpriteCache cache: caches) cache.dispose();\r
+               for (SpriteCache cache : caches)\r
+                       cache.dispose();\r
        }\r
 \r
        @Override\r
index b58d9d4..fd82167 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -22,18 +23,14 @@ import com.badlogic.gdx.graphics.g2d.Jpeg;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Test for the gdx-image extension. Usually you'd just use\r
- * Pixmap directly. gdx-image can be used if more robust jpeg\r
- * loading is necessary, e.g. if the images come from the web.\r
- *  \r
- * @author mzechner\r
- *\r
- */\r
+/** Test for the gdx-image extension. Usually you'd just use Pixmap directly. gdx-image can be used if more robust jpeg loading is\r
+ * necessary, e.g. if the images come from the web.\r
+ * \r
+ * @author mzechner */\r
 public class JpegTest extends GdxTest {\r
        Texture texture;\r
        SpriteBatch batch;\r
-       \r
+\r
        @Override\r
        public void create () {\r
                texture = new Texture(Jpeg.read(Gdx.files.internal("data/43kJgl.jpg")));\r
@@ -51,5 +48,5 @@ public class JpegTest extends GdxTest {
        @Override\r
        public boolean needsGL20 () {\r
                return true;\r
-       }       \r
-}
\ No newline at end of file
+       }\r
+}\r
index 82bb3b1..7a1c71a 100644 (file)
@@ -21,15 +21,13 @@ import com.badlogic.gdx.graphics.GL10;
 import com.badlogic.gdx.graphics.Texture.TextureFilter;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Align;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
index 0dbee27..5ddbbf0 100644 (file)
@@ -47,14 +47,13 @@ public class LifeCycleTest extends GdxTest {
 \r
        @Override\r
        public void create () {\r
-               Gdx.app.log("Test", "app created: " + Gdx.graphics.getWidth() + "x"\r
-                       + Gdx.graphics.getHeight());\r
+               Gdx.app.log("Test", "app created: " + Gdx.graphics.getWidth() + "x" + Gdx.graphics.getHeight());\r
        }\r
 \r
        @Override\r
        public void resize (int width, int height) {\r
-               Gdx.app.log("Test", "app resized: " + width + "x" + height\r
-                       + ", Graphics says: " + Gdx.graphics.getWidth() + "x" + Gdx.graphics.getHeight());\r
+               Gdx.app.log("Test", "app resized: " + width + "x" + height + ", Graphics says: " + Gdx.graphics.getWidth() + "x"\r
+                       + Gdx.graphics.getHeight());\r
        }\r
 \r
        @Override\r
index 78de661..e49878d 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -80,4 +81,4 @@ public class LineDrawingTest extends GdxTest {
                        vertexIndex = 0;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 187bf35..9bb30ea 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -106,7 +107,7 @@ public class MatrixJNITest extends GdxTest {
                float[] fvecs = new float[3 * 500000];\r
                start = TimeUtils.nanoTime();\r
                Matrix4.mulVec(mata.val, fvecs, 0, 500000, 3);\r
-               Gdx.app.log("MatrixJNITest", "jni bulk vecs * matrix took: " + (TimeUtils.nanoTime() - start) / 1000000000.0f);                 \r
+               Gdx.app.log("MatrixJNITest", "jni bulk vecs * matrix took: " + (TimeUtils.nanoTime() - start) / 1000000000.0f);\r
 \r
                start = TimeUtils.nanoTime();\r
                for (int i = 0; i < 1000000; i++) {\r
@@ -137,4 +138,4 @@ public class MatrixJNITest extends GdxTest {
                        if (mat1.val[i] != mat2.val[i]) throw new GdxRuntimeException("matrices not equal");\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 42f43c1..040f502 100644 (file)
@@ -22,8 +22,6 @@ import com.badlogic.gdx.graphics.GL20;
 import com.badlogic.gdx.graphics.Mesh;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.VertexAttribute;\r
-import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
-import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
@@ -37,28 +35,15 @@ public class MeshShaderTest extends GdxTest {
 \r
        @Override\r
        public void create () {\r
-               String vertexShader = "attribute vec4 a_position;    \n" + \r
-                                                                        "attribute vec4 a_color;\n" +\r
-                                                                        "attribute vec2 a_texCoord0;\n" + \r
-                                                                        "uniform mat4 u_worldView;\n" + \r
-                                                                        "varying vec4 v_color;" + \r
-                                                                        "varying vec2 v_texCoords;" + \r
-                                                                        "void main()                  \n" + \r
-                                                                        "{                            \n" + \r
-                                                                        "   v_color = vec4(1, 1, 1, 1); \n" + \r
-                                                                        "   v_texCoords = a_texCoord0; \n" + \r
-                                                                        "   gl_Position =  u_worldView * a_position;  \n"      + \r
-                                                                        "}                            \n";\r
-               String fragmentShader = "#ifdef GL_ES\n" +\r
-                                                                               "precision mediump float;\n" + \r
-                                                                               "#endif\n" + \r
-                                                                               "varying vec4 v_color;\n" + \r
-                                                                               "varying vec2 v_texCoords;\n" + \r
-                                                                               "uniform sampler2D u_texture;\n" + \r
-                                                                               "void main()                                  \n" + \r
-                                                                               "{                                            \n" + \r
-                                                                               "  gl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n"\r
-                                                                               + "}";\r
+               String vertexShader = "attribute vec4 a_position;    \n" + "attribute vec4 a_color;\n" + "attribute vec2 a_texCoord0;\n"\r
+                       + "uniform mat4 u_worldView;\n" + "varying vec4 v_color;" + "varying vec2 v_texCoords;"\r
+                       + "void main()                  \n" + "{                            \n" + "   v_color = vec4(1, 1, 1, 1); \n"\r
+                       + "   v_texCoords = a_texCoord0; \n" + "   gl_Position =  u_worldView * a_position;  \n"\r
+                       + "}                            \n";\r
+               String fragmentShader = "#ifdef GL_ES\n" + "precision mediump float;\n" + "#endif\n" + "varying vec4 v_color;\n"\r
+                       + "varying vec2 v_texCoords;\n" + "uniform sampler2D u_texture;\n" + "void main()                                  \n"\r
+                       + "{                                            \n" + "  gl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n"\r
+                       + "}";\r
 \r
                shader = new ShaderProgram(vertexShader, fragmentShader);\r
                if (shader.isCompiled() == false) {\r
@@ -67,10 +52,8 @@ public class MeshShaderTest extends GdxTest {
                }\r
 \r
                mesh = new Mesh(true, 4, 6, VertexAttribute.Position(), VertexAttribute.ColorUnpacked(), VertexAttribute.TexCoords(0));\r
-               mesh.setVertices(new float[] {-0.5f, -0.5f, 0, 1, 1, 1, 1, 0, 1, \r
-                                                                                                0.5f, -0.5f, 0, 1, 1, 1, 1, 1, 1, \r
-                                                                                                0.5f, 0.5f, 0, 1, 1, 1, 1, 1, 0, \r
-                                                                                                -0.5f, 0.5f, 0, 1, 1, 1, 1, 0, 0});\r
+               mesh.setVertices(new float[] {-0.5f, -0.5f, 0, 1, 1, 1, 1, 0, 1, 0.5f, -0.5f, 0, 1, 1, 1, 1, 1, 1, 0.5f, 0.5f, 0, 1, 1, 1,\r
+                       1, 1, 0, -0.5f, 0.5f, 0, 1, 1, 1, 1, 0, 0});\r
                mesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\r
                texture = new Texture(Gdx.files.internal("data/bobrgb888-32x32.png"));\r
        }\r
@@ -96,7 +79,7 @@ public class MeshShaderTest extends GdxTest {
                mesh.render(shader, GL10.GL_TRIANGLES);\r
                shader.end();\r
        }\r
-       \r
+\r
        @Override\r
        public void dispose () {\r
                mesh.dispose();\r
index deabfdf..1e31d8a 100644 (file)
@@ -44,10 +44,9 @@ public class MeshTest extends GdxTest {
                mesh = new Mesh(true, 4, 6, new VertexAttribute(Usage.Position, 3, "a_position"), new VertexAttribute(Usage.ColorPacked, 4,\r
                        "a_color"), new VertexAttribute(Usage.TextureCoordinates, 2, "a_texCoords"));\r
 \r
-               mesh.setVertices(new float[] {-0.5f, -0.5f, 0, Color.toFloatBits(255, 0, 0, 255), 0, 0, \r
-                                                   0.5f, -0.5f, 0, Color.toFloatBits(0, 255, 0, 255), 1, 0, \r
-                                                   0.5f, 0.5f, 0, Color.toFloatBits(0, 0, 255, 255), 1f, 1, \r
-                                                   -0.5f, 0.5f, 0, Color.toFloatBits(255, 255, 255, 255), 0, 1});\r
+               mesh.setVertices(new float[] {-0.5f, -0.5f, 0, Color.toFloatBits(255, 0, 0, 255), 0, 0, 0.5f, -0.5f, 0,\r
+                       Color.toFloatBits(0, 255, 0, 255), 1, 0, 0.5f, 0.5f, 0, Color.toFloatBits(0, 0, 255, 255), 1f, 1, -0.5f, 0.5f, 0,\r
+                       Color.toFloatBits(255, 255, 255, 255), 0, 1});\r
                mesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\r
 \r
                texture = new Texture(Gdx.files.internal("data/badlogic.jpg"), true);\r
index 83746dc..773f43c 100644 (file)
@@ -30,13 +30,11 @@ import com.badlogic.gdx.graphics.glutils.MipMapGenerator;
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.CheckBox;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
-import com.badlogic.gdx.scenes.scene2d.ui.CheckBox.CheckBoxStyle;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
 import com.badlogic.gdx.scenes.scene2d.ui.SelectBox;\r
 import com.badlogic.gdx.scenes.scene2d.ui.SelectBox.SelectBoxStyle;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 import com.badlogic.gdx.tests.utils.PerspectiveCamController;\r
 import com.badlogic.gdx.utils.GdxRuntimeException;\r
index 405d810..430d8d8 100644 (file)
@@ -23,12 +23,8 @@ import com.badlogic.gdx.audio.io.VorbisDecoder;
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Demonstrates how to read and playback an OGG file with the {@link VorbisDecoder} found\r
- * in the gdx-audio extension.\r
- * @author mzechner\r
- *\r
- */\r
+/** Demonstrates how to read and playback an OGG file with the {@link VorbisDecoder} found in the gdx-audio extension.\r
+ * @author mzechner */\r
 public class Mpg123Test extends GdxTest {\r
        /** the file to playback **/\r
        private static final String FILE = "data/8.12.mp3";\r
@@ -36,31 +32,32 @@ public class Mpg123Test extends GdxTest {
        Mpg123Decoder decoder;\r
        /** an AudioDevice for playing back the PCM data **/\r
        AudioDevice device;\r
-       \r
+\r
        @Override\r
        public void create () {\r
                // copy ogg file to SD card, can't playback from assets\r
                FileHandle externalFile = Gdx.files.external("tmp/test.mp3");\r
                Gdx.files.internal(FILE).copyTo(externalFile);\r
-               \r
+\r
                // Create the decoder and log some properties. Note that we need\r
                // an external or absolute file\r
                decoder = new Mpg123Decoder(externalFile);\r
-               Gdx.app.log("Mp3", "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: " + decoder.getLength());\r
+               Gdx.app.log("Mp3",\r
+                       "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: " + decoder.getLength());\r
 \r
                // Create an audio device for playback\r
-               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1? true: false);\r
-               \r
+               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1 ? true : false);\r
+\r
                // start a thread for playback\r
                Thread playbackThread = new Thread(new Runnable() {\r
                        @Override\r
-                       public void run() {\r
+                       public void run () {\r
                                int readSamples = 0;\r
                                // we need a short[] to pass the data to the AudioDevice\r
                                short[] samples = new short[2048];\r
-                               \r
+\r
                                // read until we reach the end of the file\r
-                               while((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
+                               while ((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
                                        // write the samples to the AudioDevice\r
                                        device.writeSamples(samples, 0, readSamples);\r
                                }\r
@@ -71,7 +68,7 @@ public class Mpg123Test extends GdxTest {
        }\r
 \r
        @Override\r
-       public void dispose() {\r
+       public void dispose () {\r
                // we should synchronize with the thread here\r
                // left as an excercise to the reader :)\r
                device.dispose();\r
index a552924..09c38e8 100644 (file)
@@ -18,11 +18,9 @@ package com.badlogic.gdx.tests;
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Input.Peripheral;\r
-import com.badlogic.gdx.InputProcessor;\r
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.OrthographicCamera;\r
-import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
index ed8db47..23e8df6 100644 (file)
@@ -61,7 +61,7 @@ public class MusicTest extends GdxTest {
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                batch.begin();\r
                batch.draw(buttons, 0, 0);\r
-//             font.draw(batch, "\"Three of a perfect pair: " + music[0].getPosition(), 10, Gdx.graphics.getHeight() - 20);\r
+// font.draw(batch, "\"Three of a perfect pair: " + music[0].getPosition(), 10, Gdx.graphics.getHeight() - 20);\r
                batch.end();\r
 \r
                if (Gdx.input.justTouched()) {\r
@@ -86,6 +86,7 @@ public class MusicTest extends GdxTest {
        public void dispose () {\r
                batch.dispose();\r
                buttons.getTexture().dispose();\r
-               for(Music m: music) m.dispose();\r
+               for (Music m : music)\r
+                       m.dispose();\r
        }\r
 }\r
index 296dd2d..b416ab2 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -37,7 +38,7 @@ public class OnscreenKeyboardTest extends GdxTest implements InputProcessor {
                font = new BitmapFont();\r
                text = "";\r
                Gdx.input.setInputProcessor(this);\r
-//             Gdx.input.setOnscreenKeyboardVisible(true);\r
+// Gdx.input.setOnscreenKeyboardVisible(true);\r
        }\r
 \r
        public void render () {\r
@@ -100,4 +101,4 @@ public class OnscreenKeyboardTest extends GdxTest implements InputProcessor {
                // TODO Auto-generated method stub\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index c319c2a..4a93da7 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -76,7 +77,7 @@ public class ParallaxTest extends GdxTest {
                batch = new SpriteBatch();\r
                font = new BitmapFont(Gdx.files.internal("data/arial-15.fnt"), false);\r
        }\r
-       \r
+\r
        @Override\r
        public void dispose () {\r
                layers[0].getTexture().dispose();\r
@@ -141,4 +142,4 @@ public class ParallaxTest extends GdxTest {
                font.draw(batch, "fps: " + Gdx.graphics.getFramesPerSecond(), 0, 30);\r
                batch.end();\r
        }\r
-}
\ No newline at end of file
+}\r
index 3055ede..1db03cd 100644 (file)
@@ -111,14 +111,13 @@ public class ParticleEmitterTest extends GdxTest {
 \r
                Gdx.input.setInputProcessor(inputProcessor);\r
        }\r
-       \r
+\r
        @Override\r
        public void dispose () {\r
                spriteBatch.dispose();\r
                effect.dispose();\r
        }\r
 \r
-\r
        public void render () {\r
                spriteBatch.getProjectionMatrix().setToOrtho2D(0, 0, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\r
                float delta = Gdx.graphics.getDeltaTime();\r
index 593b7fa..49c68bc 100644 (file)
@@ -1,31 +1,19 @@
-package com.badlogic.gdx.tests;\r
 \r
-import java.util.ArrayList;\r
-import java.util.List;\r
+package com.badlogic.gdx.tests;\r
 \r
-import com.badlogic.gdx.Application.ApplicationType;\r
 import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.InputProcessor;\r
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.Mesh;\r
 import com.badlogic.gdx.graphics.OrthographicCamera;\r
 import com.badlogic.gdx.graphics.Texture;\r
-import com.badlogic.gdx.graphics.VertexAttribute;\r
-import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
-import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
-import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;\r
 import com.badlogic.gdx.graphics.g2d.PolygonRegion;\r
-import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
+import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;\r
 import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
-import com.badlogic.gdx.math.EarClippingTriangulator;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.math.Matrix4;\r
-import com.badlogic.gdx.math.Vector2;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
-import com.badlogic.gdx.utils.Array;\r
 import com.badlogic.gdx.utils.Disposable;\r
 \r
 public class PolygonRegionTest extends GdxTest {\r
@@ -36,46 +24,45 @@ public class PolygonRegionTest extends GdxTest {
 \r
        PolygonSpriteBatch batch;\r
        PolygonRegionDebugRenderer debugRenderer;\r
-       \r
+\r
        Texture texture;\r
        OrthographicCamera camera;\r
        PolygonRegion region;\r
-       \r
+\r
        boolean usePolygonBatch = true;\r
 \r
        @Override\r
        public void create () {\r
                texture = new Texture(Gdx.files.internal("data/tree.png"));\r
-               region = new PolygonRegion(new TextureRegion(texture), \r
-                       Gdx.files.internal("data/tree.psh"));\r
-               \r
+               region = new PolygonRegion(new TextureRegion(texture), Gdx.files.internal("data/tree.psh"));\r
+\r
                camera = new OrthographicCamera(480, 320);\r
                camera.position.x = 0;\r
                camera.position.y = 0;\r
                camera.update();\r
-               \r
+\r
                batch = new PolygonSpriteBatch();\r
                debugRenderer = new PolygonRegionDebugRenderer();\r
-               \r
+\r
                Gdx.input.setInputProcessor(this);\r
        }\r
 \r
        @Override\r
        public void render () {\r
                GL10 gl = Gdx.gl10;\r
-               \r
+\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                Gdx.gl.glClearColor(0.25f, 0.25f, 0.25f, 1.0f);\r
-               \r
+\r
                camera.apply(Gdx.gl10);\r
                batch.setProjectionMatrix(camera.combined);\r
-               \r
+\r
                batch.begin();\r
-               \r
+\r
                batch.draw(region, -128, -128, 256, 256);\r
-               \r
+\r
                batch.end();\r
-               \r
+\r
                debugRenderer.setProjectionMatrix(camera.combined);\r
                debugRenderer.draw(region, -128, -128, 0, 0, 256, 256, 1, 1, 0);\r
        }\r
@@ -86,17 +73,17 @@ public class PolygonRegionTest extends GdxTest {
                texture.dispose();\r
                batch.dispose();\r
        }\r
-       \r
+\r
        public class PolygonRegionDebugRenderer implements Disposable {\r
                ShapeRenderer renderer;\r
-               \r
-               public PolygonRegionDebugRenderer(){\r
+\r
+               public PolygonRegionDebugRenderer () {\r
                        renderer = new ShapeRenderer();\r
                }\r
-               \r
+\r
                public void draw (PolygonRegion region, float x, float y, float originX, float originY, float width, float height,\r
                        float scaleX, float scaleY, float rotation) {\r
-                       \r
+\r
                        float[] localVertices = region.getLocalVertices();\r
                        float[] texCoords = region.getTextureCoords();\r
 \r
@@ -107,29 +94,29 @@ public class PolygonRegionTest extends GdxTest {
                        float sY = height / region.getRegion().getRegionHeight();\r
                        float fx1, fx2, fx3, px1, px2, px3;\r
                        float fy1, fy2, fy3, py1, py2, py3;\r
-                       \r
+\r
                        final float cos = MathUtils.cosDeg(rotation);\r
                        final float sin = MathUtils.sinDeg(rotation);\r
-                       \r
+\r
                        renderer.setColor(Color.RED);\r
                        renderer.begin(ShapeType.Line);\r
 \r
-                       for(int i=0; i<localVertices.length; i+=6){\r
+                       for (int i = 0; i < localVertices.length; i += 6) {\r
                                fx1 = localVertices[i] * sX;\r
-                               fy1 = localVertices[i+1] * sY;\r
-                               fx2 = localVertices[i+2] * sX;\r
-                               fy2 = localVertices[i+3] * sY;\r
-                               fx3 = localVertices[i+4] * sX;\r
-                               fy3 = localVertices[i+5] * sY;\r
-                               \r
+                               fy1 = localVertices[i + 1] * sY;\r
+                               fx2 = localVertices[i + 2] * sX;\r
+                               fy2 = localVertices[i + 3] * sY;\r
+                               fx3 = localVertices[i + 4] * sX;\r
+                               fy3 = localVertices[i + 5] * sY;\r
+\r
                                fx1 -= originX;\r
                                fy1 -= originY;\r
                                fx2 -= originX;\r
                                fy2 -= originY;\r
                                fx3 -= originX;\r
                                fy3 -= originY;\r
-                               \r
-                               if(scaleX != 1 || scaleY != 1){\r
+\r
+                               if (scaleX != 1 || scaleY != 1) {\r
                                        fx1 *= scaleX;\r
                                        fy1 *= scaleY;\r
                                        fx2 *= scaleX;\r
@@ -137,35 +124,35 @@ public class PolygonRegionTest extends GdxTest {
                                        fx3 *= scaleX;\r
                                        fy3 *= scaleY;\r
                                }\r
-                               \r
+\r
                                px1 = cos * fx1 - sin * fy1;\r
                                py1 = sin * fx1 + cos * fy1;\r
                                px2 = cos * fx2 - sin * fy2;\r
                                py2 = sin * fx2 + cos * fy2;\r
                                px3 = cos * fx3 - sin * fy3;\r
                                py3 = sin * fx3 + cos * fy3;\r
-                               \r
+\r
                                px1 += worldOriginX;\r
                                py1 += worldOriginY;\r
                                px2 += worldOriginX;\r
                                py2 += worldOriginY;\r
                                px3 += worldOriginX;\r
                                py3 += worldOriginY;\r
-                               \r
+\r
                                renderer.line(px1, py1, px2, py2);\r
                                renderer.line(px2, py2, px3, py3);\r
                                renderer.line(px3, py3, px1, py1);\r
                        }\r
-                       \r
+\r
                        renderer.end();\r
-                       \r
+\r
                        renderer.setColor(Color.BLUE);\r
                        renderer.begin(ShapeType.FilledCircle);\r
-                       \r
+\r
                        renderer.filledCircle(worldOriginX, worldOriginY, 4);\r
-                       \r
+\r
                        renderer.end();\r
-                       \r
+\r
                        // Calculate the bounding rect, is there a better way?!\r
                        // bottom left and top right corner points relative to origin\r
                        fx1 = -originX;\r
@@ -235,20 +222,20 @@ public class PolygonRegionTest extends GdxTest {
                        y3 += worldOriginY;\r
                        x4 += worldOriginX;\r
                        y4 += worldOriginY;\r
-                       \r
+\r
                        // Draw the bounding rectangle\r
                        renderer.setColor(Color.GREEN);\r
                        renderer.begin(ShapeType.Line);\r
-                       \r
+\r
                        renderer.line(x1, y1, x2, y2);\r
                        renderer.line(x2, y2, x3, y3);\r
                        renderer.line(x3, y3, x4, y4);\r
                        renderer.line(x4, y4, x1, y1);\r
-                       \r
+\r
                        renderer.end();\r
                }\r
-               \r
-               public void setProjectionMatrix(Matrix4 matrix){\r
+\r
+               public void setProjectionMatrix (Matrix4 matrix) {\r
                        this.renderer.setProjectionMatrix(matrix);\r
                }\r
 \r
index ff46912..1eb1a3f 100644 (file)
@@ -1,3 +1,4 @@
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -13,96 +14,94 @@ import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.math.Rectangle;\r
-import com.badlogic.gdx.tests.PolygonRegionTest.PolygonRegionDebugRenderer;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
 public class PolygonSpriteTest extends GdxTest {\r
 \r
-               @Override\r
-               public boolean needsGL20 () {\r
-                       return false;\r
-               }\r
-       \r
-               PolygonSpriteBatch batch;\r
-               ShapeRenderer renderer;\r
-               \r
-               Texture texture;\r
-               OrthographicCamera camera;\r
-               PolygonRegion region;\r
-               Rectangle bounds;\r
-               \r
-               Array<PolygonSprite> sprites = new Array<PolygonSprite>();\r
-       \r
-               @Override\r
-               public void create () {\r
-                       texture = new Texture(Gdx.files.internal("data/tree.png"));\r
-                       region = new PolygonRegion(new TextureRegion(texture), Gdx.files.internal("data/tree.psh"));\r
-                       \r
-                       renderer = new ShapeRenderer();\r
-                       \r
-                       camera = new OrthographicCamera(480, 320);\r
-                       camera.position.x = 240;\r
-                       camera.position.y = 160;\r
-                       camera.update();\r
-                       \r
-                       batch = new PolygonSpriteBatch();\r
-                       \r
-                       for(int i=0; i<50; i++){\r
-                               PolygonSprite sprite = new PolygonSprite(region);\r
-                               sprite.setPosition(MathUtils.random(-30, 440), MathUtils.random(-30, 290));\r
-                               sprite.setColor(MathUtils.random(), MathUtils.random(), MathUtils.random(), 1.0f);\r
-                               sprite.setScale(MathUtils.random(0.5f, 1.5f), MathUtils.random(0.5f, 1.5f));\r
-                               sprites.add(sprite);\r
-                       }\r
-               }\r
-       \r
-               @Override\r
-               public void render () {\r
-                       GL10 gl = Gdx.gl10;\r
-                       \r
-                       Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-                       Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1.0f);\r
-                       \r
-                       camera.apply(Gdx.gl10);\r
-                       batch.setProjectionMatrix(camera.combined);\r
-                       \r
-                       batch.begin();\r
-                       \r
-                       for(int i=0; i<sprites.size; i++){\r
-                               PolygonSprite sprite = sprites.get(i);\r
-                               sprite.rotate(45 * Gdx.graphics.getDeltaTime());\r
-                               sprite.translateX(10 * Gdx.graphics.getDeltaTime());\r
-                               \r
-                               if(sprite.getX() > 450)\r
-                                       sprite.setX(-50);\r
-                               \r
-                               sprite.draw(batch);\r
-                       }\r
-                       batch.end();\r
-                       \r
-                       // Some debug rendering, bounding box & origin of one sprite\r
-                       renderer.setProjectionMatrix(camera.combined);\r
-                       renderer.setColor(Color.GREEN);\r
-                       renderer.begin(ShapeType.Rectangle);\r
-                       \r
-                       PolygonSprite sprite = sprites.get(49);\r
-                       \r
-                       bounds = sprite.getBoundingRectangle();\r
-                       renderer.rect(bounds.x, bounds.y, bounds.width, bounds.height);\r
-                       \r
-                       renderer.end();\r
-                       \r
-                       renderer.begin(ShapeType.FilledCircle);\r
-                       \r
-                       renderer.filledCircle(sprite.getX() + sprite.getOriginX(), sprite.getY() + sprite.getOriginY(), 4);\r
-                       \r
-                       renderer.end();\r
+       @Override\r
+       public boolean needsGL20 () {\r
+               return false;\r
+       }\r
+\r
+       PolygonSpriteBatch batch;\r
+       ShapeRenderer renderer;\r
+\r
+       Texture texture;\r
+       OrthographicCamera camera;\r
+       PolygonRegion region;\r
+       Rectangle bounds;\r
+\r
+       Array<PolygonSprite> sprites = new Array<PolygonSprite>();\r
+\r
+       @Override\r
+       public void create () {\r
+               texture = new Texture(Gdx.files.internal("data/tree.png"));\r
+               region = new PolygonRegion(new TextureRegion(texture), Gdx.files.internal("data/tree.psh"));\r
+\r
+               renderer = new ShapeRenderer();\r
+\r
+               camera = new OrthographicCamera(480, 320);\r
+               camera.position.x = 240;\r
+               camera.position.y = 160;\r
+               camera.update();\r
+\r
+               batch = new PolygonSpriteBatch();\r
+\r
+               for (int i = 0; i < 50; i++) {\r
+                       PolygonSprite sprite = new PolygonSprite(region);\r
+                       sprite.setPosition(MathUtils.random(-30, 440), MathUtils.random(-30, 290));\r
+                       sprite.setColor(MathUtils.random(), MathUtils.random(), MathUtils.random(), 1.0f);\r
+                       sprite.setScale(MathUtils.random(0.5f, 1.5f), MathUtils.random(0.5f, 1.5f));\r
+                       sprites.add(sprite);\r
                }\r
-       \r
-               @Override\r
-               public void dispose () {\r
-                       texture.dispose();\r
-                       batch.dispose();\r
+       }\r
+\r
+       @Override\r
+       public void render () {\r
+               GL10 gl = Gdx.gl10;\r
+\r
+               Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
+               Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1.0f);\r
+\r
+               camera.apply(Gdx.gl10);\r
+               batch.setProjectionMatrix(camera.combined);\r
+\r
+               batch.begin();\r
+\r
+               for (int i = 0; i < sprites.size; i++) {\r
+                       PolygonSprite sprite = sprites.get(i);\r
+                       sprite.rotate(45 * Gdx.graphics.getDeltaTime());\r
+                       sprite.translateX(10 * Gdx.graphics.getDeltaTime());\r
+\r
+                       if (sprite.getX() > 450) sprite.setX(-50);\r
+\r
+                       sprite.draw(batch);\r
                }\r
+               batch.end();\r
+\r
+               // Some debug rendering, bounding box & origin of one sprite\r
+               renderer.setProjectionMatrix(camera.combined);\r
+               renderer.setColor(Color.GREEN);\r
+               renderer.begin(ShapeType.Rectangle);\r
+\r
+               PolygonSprite sprite = sprites.get(49);\r
+\r
+               bounds = sprite.getBoundingRectangle();\r
+               renderer.rect(bounds.x, bounds.y, bounds.width, bounds.height);\r
+\r
+               renderer.end();\r
+\r
+               renderer.begin(ShapeType.FilledCircle);\r
+\r
+               renderer.filledCircle(sprite.getX() + sprite.getOriginX(), sprite.getY() + sprite.getOriginY(), 4);\r
+\r
+               renderer.end();\r
+       }\r
+\r
+       @Override\r
+       public void dispose () {\r
+               texture.dispose();\r
+               batch.dispose();\r
+       }\r
 }\r
index 66effe0..42f6b3c 100644 (file)
@@ -30,14 +30,14 @@ public class PreferencesTest extends GdxTest {
 \r
        public void create () {\r
                Preferences prefs = Gdx.app.getPreferences(".test");\r
-               if(prefs.contains("bool")) {\r
+               if (prefs.contains("bool")) {\r
                        if (prefs.getBoolean("bool") != true) throw new GdxRuntimeException("bool failed");\r
                        if (prefs.getInteger("int") != 1234) throw new GdxRuntimeException("int failed");\r
                        if (prefs.getLong("long") != Long.MAX_VALUE) throw new GdxRuntimeException("long failed");\r
                        if (prefs.getFloat("float") != 1.2345f) throw new GdxRuntimeException("float failed");\r
                        if (!prefs.getString("string").equals("test!")) throw new GdxRuntimeException("string failed");\r
                }\r
-               \r
+\r
                prefs.clear();\r
                prefs.putBoolean("bool", true);\r
                prefs.putInteger("int", 1234);\r
index 11fe6f7..28baa7c 100644 (file)
@@ -32,7 +32,6 @@ import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer20;
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.Matrix4;\r
 import com.badlogic.gdx.math.Vector3;\r
-import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
index b6da397..e526dfb 100644 (file)
@@ -20,7 +20,6 @@ import com.badlogic.gdx.Gdx;
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.Texture;\r
-import com.badlogic.gdx.graphics.g2d.NinePatch;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
index 411696d..2347fc2 100644 (file)
@@ -35,7 +35,7 @@ public class ScrollPane2Test extends GdxTest {
                Gdx.input.setInputProcessor(stage);\r
 \r
                skin = new Skin(Gdx.files.internal("data/uiskin.json"));\r
-               \r
+\r
                Table mytable = new Table();\r
                mytable.debug();\r
                mytable.add(new Image(new Texture("data/group-debug.png")));\r
index 8869630..e006d95 100644 (file)
@@ -23,15 +23,13 @@ import com.badlogic.gdx.scenes.scene2d.InputEvent;
 import com.badlogic.gdx.scenes.scene2d.InputListener;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
-import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle;\r
-import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;\r
+import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Slider;\r
-import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
 import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
+import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;\r
-import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
@@ -89,7 +87,7 @@ public class ScrollPaneTest extends GdxTest {
                                scroll.setFlickScroll(flickButton.isChecked());\r
                        }\r
                });\r
-               \r
+\r
                final TextButton fadeButton = new TextButton("Fade Scrollbars", skin.get("toggle", TextButtonStyle.class));\r
                fadeButton.setChecked(true);\r
                fadeButton.addListener(new ChangeListener() {\r
index cff67d6..352c21c 100644 (file)
@@ -30,11 +30,9 @@ import com.badlogic.gdx.graphics.glutils.ShaderProgram;
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.SelectBox;\r
-import com.badlogic.gdx.scenes.scene2d.ui.SelectBox.SelectBoxStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 import com.badlogic.gdx.tests.utils.PerspectiveCamController;\r
index 5e5d67b..7b8c260 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.OrthographicCamera;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Tests alpha blending with all ShapeRenderer shapes.\r
- * @author mzechner\r
- *\r
- */\r
+/** Tests alpha blending with all ShapeRenderer shapes.\r
+ * @author mzechner */\r
 public class ShapeRendererAlphaTest extends GdxTest {\r
        ShapeRenderer renderer;\r
 \r
@@ -40,22 +37,22 @@ public class ShapeRendererAlphaTest extends GdxTest {
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                Gdx.gl.glEnable(GL10.GL_BLEND);\r
                Gdx.gl.glBlendFunc(GL10.GL_SRC_ALPHA, GL10.GL_ONE_MINUS_SRC_ALPHA);\r
-               \r
+\r
                renderer.begin(ShapeType.Rectangle);\r
                renderer.setColor(1, 0, 0, 0.5f);\r
                renderer.rect(0, 0, 100, 200);\r
                renderer.end();\r
-               \r
+\r
                renderer.begin(ShapeType.FilledRectangle);\r
                renderer.setColor(0, 1, 0, 0.5f);\r
                renderer.filledRect(200, 0, 100, 100);\r
                renderer.end();\r
-               \r
+\r
                renderer.begin(ShapeType.Circle);\r
                renderer.setColor(0, 1, 0, 0.5f);\r
                renderer.circle(400, 50, 50);\r
                renderer.end();\r
-               \r
+\r
                renderer.begin(ShapeType.FilledCircle);\r
                renderer.setColor(1, 0, 1, 0.5f);\r
                renderer.filledCircle(500, 50, 50);\r
@@ -66,4 +63,4 @@ public class ShapeRendererAlphaTest extends GdxTest {
        public void dispose () {\r
                renderer.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 54528d1..85a017a 100644 (file)
@@ -17,7 +17,6 @@
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.InputProcessor;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.g2d.Animation;\r
index 3abc84a..d39d0f4 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -87,10 +88,10 @@ public class SimpleDecalTest extends GdxTest {
                        Decal decal = decals.get(i);\r
                        if (billboard) {\r
                                // billboarding for ortho cam :)\r
-//                             dir.set(-camera.direction.x, -camera.direction.y, -camera.direction.z);\r
-//                             decal.setRotation(dir, Vector3.Y);\r
-                               \r
-                               // billboarding for perspective cam \r
+// dir.set(-camera.direction.x, -camera.direction.y, -camera.direction.z);\r
+// decal.setRotation(dir, Vector3.Y);\r
+\r
+                               // billboarding for perspective cam\r
                                decal.lookAt(camera.position, camera.up);\r
                        }\r
                        batch.add(decal);\r
@@ -108,4 +109,4 @@ public class SimpleDecalTest extends GdxTest {
        public boolean needsGL20 () {\r
                return true;\r
        }\r
-}
\ No newline at end of file
+}\r
index 8dab4b4..8ef5e28 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -23,11 +24,8 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 import com.badlogic.gdx.utils.CharArray;\r
 \r
-/**\r
- * Shows how to pull up the softkeyboard and process input from it.\r
- * @author mzechner\r
- *\r
- */\r
+/** Shows how to pull up the softkeyboard and process input from it.\r
+ * @author mzechner */\r
 public class SoftKeyboardTest extends GdxTest {\r
        SpriteBatch batch;\r
        BitmapFont font;\r
@@ -40,7 +38,7 @@ public class SoftKeyboardTest extends GdxTest {
                batch = new SpriteBatch();\r
                font = new BitmapFont();\r
                textBuffer = new SimpleCharSequence();\r
-               \r
+\r
                // we register an InputAdapter to listen for the keyboard\r
                // input. The on-screen keyboard might only generate\r
                // "key typed" events, depending on the backend.\r
@@ -48,13 +46,13 @@ public class SoftKeyboardTest extends GdxTest {
                        @Override\r
                        public boolean keyTyped (char character) {\r
                                // convert \r to \n\r
-                               if(character == '\r') character = '\n';\r
-                               \r
+                               if (character == '\r') character = '\n';\r
+\r
                                // if we get \b, we remove the last inserted character\r
-                               if(character == '\b' && textBuffer.length() > 0) {\r
+                               if (character == '\b' && textBuffer.length() > 0) {\r
                                        textBuffer.delete();\r
                                }\r
-                               \r
+\r
                                // else we just insert the character\r
                                textBuffer.add(character);\r
                                return true;\r
@@ -68,35 +66,34 @@ public class SoftKeyboardTest extends GdxTest {
                batch.begin();\r
                font.drawMultiLine(batch, textBuffer, 0, Gdx.graphics.getHeight() - 20);\r
                batch.end();\r
-               \r
+\r
                // bring up the keyboard if we touch the screen\r
-               if(Gdx.input.justTouched()) {\r
+               if (Gdx.input.justTouched()) {\r
                        Gdx.input.setOnscreenKeyboardVisible(true);\r
                        textBuffer = new SimpleCharSequence();\r
                }\r
        }\r
-       \r
-       /**\r
-        * Let's create a very simple {@link CharSequence} implementation\r
-        * that can handle common text input operations.\r
-        * @author mzechner\r
-        *\r
-        */\r
+\r
+       /** Let's create a very simple {@link CharSequence} implementation that can handle common text input operations.\r
+        * @author mzechner */\r
        public static class SimpleCharSequence implements CharSequence {\r
                CharArray chars = new CharArray();\r
                int cursor = -1;\r
-               \r
-               public void add(char c) {\r
+\r
+               public void add (char c) {\r
                        cursor++;\r
-                       if(cursor == -1) chars.add(c);\r
-                       else chars.insert(cursor, c);\r
+                       if (cursor == -1)\r
+                               chars.add(c);\r
+                       else\r
+                               chars.insert(cursor, c);\r
                }\r
-               \r
-               public void delete() {\r
-                       if(chars.size == 0) return;\r
+\r
+               public void delete () {\r
+                       if (chars.size == 0) return;\r
                        chars.removeIndex(cursor - 1);\r
                        cursor--;\r
                }\r
+\r
                @Override\r
                public char charAt (int index) {\r
                        return chars.get(index);\r
@@ -112,4 +109,4 @@ public class SoftKeyboardTest extends GdxTest {
                        return null;\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 80b602b..ecb5c78 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import java.util.Comparator;\r
@@ -27,65 +28,53 @@ import com.badlogic.gdx.math.MathUtils;
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * Demonstrates how to do simple z-sorting of sprites\r
- * @author mzechner\r
- *\r
- */\r
+/** Demonstrates how to do simple z-sorting of sprites\r
+ * @author mzechner */\r
 public class SortedSpriteTest extends GdxTest {\r
-       /** \r
-        * Sprite based class that adds a z-coordinate for\r
-        * depth sorting. Note that allt he constructors\r
-        * were auto-generated in Eclipse (alt + shift + s, c).\r
-        * @author mzechner\r
-        *\r
-        */\r
+       /** Sprite based class that adds a z-coordinate for depth sorting. Note that allt he constructors were auto-generated in Eclipse\r
+        * (alt + shift + s, c).\r
+        * @author mzechner */\r
        public class MySprite extends Sprite {\r
                public float z;\r
 \r
-               public MySprite() {\r
+               public MySprite () {\r
                        super();\r
                }\r
 \r
-               public MySprite(Sprite sprite) {\r
+               public MySprite (Sprite sprite) {\r
                        super(sprite);\r
                }\r
 \r
-               public MySprite(Texture texture, int srcX, int srcY, int srcWidth,\r
-                               int srcHeight) {\r
+               public MySprite (Texture texture, int srcX, int srcY, int srcWidth, int srcHeight) {\r
                        super(texture, srcX, srcY, srcWidth, srcHeight);\r
                }\r
 \r
-               public MySprite(Texture texture, int srcWidth, int srcHeight) {\r
+               public MySprite (Texture texture, int srcWidth, int srcHeight) {\r
                        super(texture, srcWidth, srcHeight);\r
                }\r
 \r
-               public MySprite(Texture texture) {\r
+               public MySprite (Texture texture) {\r
                        super(texture);\r
                }\r
 \r
-               public MySprite(TextureRegion region, int srcX, int srcY, int srcWidth,\r
-                               int srcHeight) {\r
+               public MySprite (TextureRegion region, int srcX, int srcY, int srcWidth, int srcHeight) {\r
                        super(region, srcX, srcY, srcWidth, srcHeight);\r
                }\r
 \r
-               public MySprite(TextureRegion region) {\r
+               public MySprite (TextureRegion region) {\r
                        super(region);\r
                }\r
        }\r
 \r
-       /**\r
-        * Comparator used for sorting, sorts in ascending order (biggset z to smallest z).\r
-        * @author mzechner\r
-        *\r
-        */\r
+       /** Comparator used for sorting, sorts in ascending order (biggset z to smallest z).\r
+        * @author mzechner */\r
        public class MySpriteComparator implements Comparator<MySprite> {\r
                @Override\r
-               public int compare(MySprite sprite1, MySprite sprite2) {\r
-                       return (sprite2.z  - sprite1.z) > 0? 1: -1;\r
+               public int compare (MySprite sprite1, MySprite sprite2) {\r
+                       return (sprite2.z - sprite1.z) > 0 ? 1 : -1;\r
                }\r
        }\r
-       \r
+\r
        /** spritebatch used for rendering **/\r
        SpriteBatch batch;\r
        /** the texture used by the sprites **/\r
@@ -96,52 +85,54 @@ public class SortedSpriteTest extends GdxTest {
        MySpriteComparator comparator = new MySpriteComparator();\r
 \r
        @Override\r
-       public void create() {\r
+       public void create () {\r
                // create the SpriteBatch\r
                batch = new SpriteBatch();\r
-               \r
-               // load a texture, usually you dispose of this \r
+\r
+               // load a texture, usually you dispose of this\r
                // eventually.\r
                texture = new Texture("data/badlogicsmall.jpg");\r
-               \r
-               // create 100 sprites, tinted red, from dark to light. \r
+\r
+               // create 100 sprites, tinted red, from dark to light.\r
                // red color component is also used as z-value so we\r
                // can see that the sorting works.\r
-               for(int i = 0; i < 100; i++) {\r
+               for (int i = 0; i < 100; i++) {\r
                        // create the sprite and set a random position\r
                        MySprite sprite = new MySprite(texture);\r
                        sprite.setPosition(MathUtils.random() * Gdx.graphics.getWidth(), MathUtils.random() * Gdx.graphics.getHeight());\r
-                       \r
+\r
                        // create a random z coordinate in the range 0-1\r
                        sprite.z = MathUtils.random();\r
-                       \r
+\r
                        // set the tinting color to the z coordinate as well\r
                        // for visual inspection\r
                        sprite.setColor(sprite.z, 0, 0, 1);\r
-                       \r
+\r
                        // add the sprite to the array\r
                        sprites.add(sprite);\r
                }\r
        }\r
+\r
        @Override\r
-       public void render() {\r
+       public void render () {\r
                Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-               \r
+\r
                // sort the sprites (not necessary if we know\r
                // the are already sorted).\r
                sprites.sort(comparator);\r
-               \r
+\r
                // draw the sprites\r
                batch.begin();\r
-               for(MySprite sprite: sprites) {\r
+               for (MySprite sprite : sprites) {\r
                        sprite.draw(batch);\r
                }\r
                batch.end();\r
        }\r
+\r
        @Override\r
        public void dispose () {\r
                batch.dispose();\r
                texture.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 2848b76..af3509b 100644 (file)
@@ -30,7 +30,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table;
 import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
 import com.badlogic.gdx.scenes.scene2d.utils.Align;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;\r
-import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
index 190692b..da9a3a0 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.tests;\r
+ ******************************************************************************/\r
 \r
-import java.nio.ShortBuffer;\r
+package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.audio.AudioDevice;\r
-import com.badlogic.gdx.audio.analysis.AudioTools;\r
 import com.badlogic.gdx.audio.io.VorbisDecoder;\r
 import com.badlogic.gdx.audio.transform.SoundTouch;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Demonstrates how to read an OGG file and play it back with a {@link VorbisDecoder} as\r
- * well as how to alter the audio pitch with the {@link SoundTouch} API exposed in the\r
- * gdx-audio extension.\r
- * @author mzechner\r
- *\r
- */\r
+/** Demonstrates how to read an OGG file and play it back with a {@link VorbisDecoder} as well as how to alter the audio pitch with\r
+ * the {@link SoundTouch} API exposed in the gdx-audio extension.\r
+ * @author mzechner */\r
 public class SoundTouchTest extends GdxTest {\r
        /** the file to playback **/\r
        private static final String FILE = "data/cloudconnected.ogg";\r
@@ -41,47 +35,48 @@ public class SoundTouchTest extends GdxTest {
        AudioDevice device;\r
        /** SoundTouch instance to modify the PCM data **/\r
        SoundTouch soundTouch;\r
-       \r
+\r
        @Override\r
        public void create () {\r
                // copy ogg file to SD card, can't playback from assets\r
                FileHandle externalFile = Gdx.files.external("tmp/test.ogg");\r
                Gdx.files.internal(FILE).copyTo(externalFile);\r
-               \r
+\r
                // Create the decoder and log some properties. Note that we need\r
                // and external or absolute file!\r
                decoder = new VorbisDecoder(externalFile);\r
-               Gdx.app.log("SoundTouchTest", "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: " + decoder.getLength());\r
+               Gdx.app.log("SoundTouchTest", "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: "\r
+                       + decoder.getLength());\r
 \r
                // Create an audio device for playback\r
-               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1? true: false);\r
-               \r
+               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1 ? true : false);\r
+\r
                // Create the SoundTouch instance\r
                soundTouch = new SoundTouch();\r
                soundTouch.setChannels(decoder.getChannels());\r
                soundTouch.setSampleRate(decoder.getRate());\r
                soundTouch.setPitchSemiTones(2);\r
-               \r
+\r
                // start a thread for playback\r
                Thread playbackThread = new Thread(new Runnable() {\r
                        @Override\r
-                       public void run() {\r
+                       public void run () {\r
                                // we need a short[] to pass the data to the AudioDevice\r
                                short[] samples = new short[2048];\r
                                int readSamples = 0;\r
-                               \r
+\r
                                // read until we reach the end of the file, we read the file\r
                                // fully as SoundTouch#receiveSamples returns uneven numbers\r
                                // of samples from time to time. Could be solved with a ring\r
                                // buffer :)\r
-                               while((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
+                               while ((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
                                        // process samples with sound touch, divide by 2 for stereo samples\r
                                        // as one sample contains both left and right channel data in SoundTouch.\r
                                        soundTouch.putSamples(samples, 0, readSamples / decoder.getChannels());\r
                                }\r
-                               \r
+\r
                                // read the samples from SoundTouch and play them back\r
-                               while((readSamples = soundTouch.receiveSamples(samples, 0, samples.length / decoder.getChannels())) > 0) {\r
+                               while ((readSamples = soundTouch.receiveSamples(samples, 0, samples.length / decoder.getChannels())) > 0) {\r
                                        device.writeSamples(samples, 0, readSamples * decoder.getChannels());\r
                                }\r
                        }\r
@@ -91,7 +86,7 @@ public class SoundTouchTest extends GdxTest {
        }\r
 \r
        @Override\r
-       public void dispose() {\r
+       public void dispose () {\r
                // we should synchronize with the thread here\r
                // left as an excercise to the reader :)\r
                device.dispose();\r
@@ -104,4 +99,4 @@ public class SoundTouchTest extends GdxTest {
        public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index c2ea85b..8c41cb1 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -24,18 +25,15 @@ import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Test for issue http://code.google.com/p/libgdx/issues/detail?id=493\r
- * @author mzechner\r
- *\r
- */\r
+/** Test for issue http://code.google.com/p/libgdx/issues/detail?id=493\r
+ * @author mzechner */\r
 public class SpriteBatchOriginScaleTest extends GdxTest {\r
        SpriteBatch batch;\r
        TextureRegion region;\r
        ShapeRenderer renderer;\r
-       \r
+\r
        @Override\r
-       public void create() {\r
+       public void create () {\r
                region = new TextureRegion(new Texture("data/badlogicsmall.jpg"));\r
                batch = new SpriteBatch();\r
                renderer = new ShapeRenderer();\r
@@ -43,19 +41,19 @@ public class SpriteBatchOriginScaleTest extends GdxTest {
        }\r
 \r
        @Override\r
-       public void render() {\r
+       public void render () {\r
                Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-               \r
+\r
                renderer.begin(ShapeType.Line);\r
                renderer.setColor(1, 1, 1, 1);\r
                renderer.line(0, 100, Gdx.graphics.getWidth(), 100);\r
                renderer.line(100, 0, 100, Gdx.graphics.getHeight());\r
                renderer.end();\r
-               \r
+\r
                batch.begin();\r
                batch.draw(region, 100, 100, 0, 0, 32, 32, 2, 2, 20);\r
                batch.end();\r
        }\r
-       \r
-}
\ No newline at end of file
+\r
+}\r
index 1435ad3..7d618ab 100644 (file)
@@ -222,10 +222,8 @@ public class SpriteBatchTest extends GdxTest implements InputProcessor {
                Gdx.input.setInputProcessor(this);\r
        }\r
 \r
-       \r
-       \r
        @Override\r
-       public void resize(int width, int height) {\r
+       public void resize (int width, int height) {\r
                Gdx.app.log("SpriteBatchTest", "resized: " + width + ", " + height);\r
        }\r
 \r
index f8965c0..6f23fd0 100644 (file)
@@ -31,9 +31,9 @@ import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
 import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
 import com.badlogic.gdx.math.Vector2;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
+import com.badlogic.gdx.scenes.scene2d.Group;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.InputListener;\r
-import com.badlogic.gdx.scenes.scene2d.Group;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Image;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
index 345a14c..b897eef 100644 (file)
@@ -24,17 +24,12 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.InputListener;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
-import com.badlogic.gdx.scenes.scene2d.Touchable;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Stack;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
 import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
-import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.TextField;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;\r
-import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;\r
-import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener.ChangeEvent;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
 public class TableLayoutTest extends GdxTest {\r
index 7ca54af..3f05599 100644 (file)
@@ -21,7 +21,6 @@ import com.badlogic.gdx.graphics.GL10;
 import com.badlogic.gdx.graphics.Texture;\r
 import com.badlogic.gdx.graphics.g2d.NinePatch;\r
 import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
-import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.CheckBox;\r
index 4585435..bbe9342 100644 (file)
@@ -30,7 +30,6 @@ import com.badlogic.gdx.graphics.Pixmap;
 import com.badlogic.gdx.graphics.VertexAttribute;\r
 import com.badlogic.gdx.graphics.VertexAttributes;\r
 import com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer10;\r
-import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.Intersector;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.math.Quaternion;\r
@@ -59,7 +58,7 @@ public class TerrainTest extends GdxTest {
 \r
                int len = chunk.vertices.length;\r
                for (int i = 3; i < len; i += 4) {\r
-       \r
+\r
                        chunk.vertices[i] = Color.toFloatBits(rand.nextInt(255), rand.nextInt(255), rand.nextInt(255), 255);\r
                }\r
                mesh = new Mesh(true, chunk.vertices.length / 3, chunk.indices.length, new VertexAttribute(VertexAttributes.Usage.Position,\r
@@ -107,9 +106,9 @@ public class TerrainTest extends GdxTest {
 \r
        private void handleInput (Input input, float delta) {\r
                if (input.isTouched()) {\r
-                       // simply modifying speed  \r
-                       delta = delta+0.0485f;\r
-                       \r
+                       // simply modifying speed\r
+                       delta = delta + 0.0485f;\r
+\r
                        Ray ray = camera.getPickRay(input.getX(), input.getY());\r
                        if (Intersector.intersectRayTriangles(ray, chunk.vertices, chunk.indices, 4, intersection)) {\r
                                intersected = true;\r
@@ -139,33 +138,32 @@ public class TerrainTest extends GdxTest {
 \r
                if (input.isKeyPressed(Keys.W)) {\r
                        Vector3 forward = new Vector3().set(camera.direction).mul(delta);\r
-                       camera.position.add(forward);   \r
+                       camera.position.add(forward);\r
                }\r
                if (input.isKeyPressed(Keys.S)) {\r
                        Vector3 backward = new Vector3().set(camera.direction).mul(delta);\r
-                       camera.position.sub(backward);          \r
+                       camera.position.sub(backward);\r
                }\r
-               \r
+\r
                if (input.isKeyPressed(Keys.A)) {\r
                        Vector3 left = new Vector3().set(camera.direction.cpy().crs(camera.up).nor()).mul(delta);\r
-                       camera.position.sub(left);                                      \r
+                       camera.position.sub(left);\r
                }\r
                if (input.isKeyPressed(Keys.D)) {\r
                        Vector3 right = new Vector3().set(camera.direction.cpy().crs(camera.up).nor()).mul(delta);\r
-                       camera.position.add(right);                                     \r
+                       camera.position.add(right);\r
                }\r
-               \r
-               \r
+\r
                Vector3 forward = new Vector3().set(camera.direction).mul(delta);\r
-               camera.position.add(forward);                   \r
-               int nextId = ( MathUtils.floor(camera.position.x) * 33) + MathUtils.floor(camera.position.z);\r
-               // are we still on our current chunk ? - maybe switching to another chunk \r
-               if( nextId > heightmap.length-1 || nextId < 0  ){\r
-                       camera.position.y = 5;                  // index not in bounds\r
-               }else{\r
-                       camera.position.y = this.heightmap[nextId] * 4 + 1; // current pos found                        \r
+               camera.position.add(forward);\r
+               int nextId = (MathUtils.floor(camera.position.x) * 33) + MathUtils.floor(camera.position.z);\r
+               // are we still on our current chunk ? - maybe switching to another chunk\r
+               if (nextId > heightmap.length - 1 || nextId < 0) {\r
+                       camera.position.y = 5; // index not in bounds\r
+               } else {\r
+                       camera.position.y = this.heightmap[nextId] * 4 + 1; // current pos found\r
                }\r
-               \r
+\r
        }\r
 \r
        final static class TerrainChunk {\r
@@ -187,7 +185,7 @@ public class TerrainTest extends GdxTest {
                        this.vertices = new float[heightMap.length * vertexSize];\r
                        this.indices = new short[width * height * 6];\r
                        this.vertexSize = vertexSize;\r
-                       \r
+\r
                        buildHeightmap("data/heightmap.png");\r
                        buildIndices();\r
                        buildVertices();\r
@@ -219,7 +217,7 @@ public class TerrainTest extends GdxTest {
                        int idx = 0;\r
                        int hIdx = 0;\r
                        int inc = vertexSize - 3;\r
-                       int strength = 4; // multiplier for heightmap                   \r
+                       int strength = 4; // multiplier for heightmap\r
 \r
                        for (int z = 0; z < heightPitch; z++) {\r
                                for (int x = 0; x < widthPitch; x++) {\r
index 2724cad..628bfa0 100644 (file)
@@ -21,8 +21,6 @@ import com.badlogic.gdx.graphics.GL10;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.math.MathUtils;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Button;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
 import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
@@ -30,14 +28,14 @@ import com.badlogic.gdx.tests.utils.GdxTest;
 public class TextButtonTest extends GdxTest {\r
        private Stage stage;\r
        private Skin skin;\r
-       \r
+\r
        @Override\r
        public void create () {\r
                stage = new Stage(0, 0, false, new SpriteBatch());\r
                Gdx.input.setInputProcessor(stage);\r
                skin = new Skin(Gdx.files.internal("data/uiskin.json"));\r
                for (int i = 0; i < 1; i++) {\r
-                       TextButton t = new TextButton("Button"+i, skin);\r
+                       TextButton t = new TextButton("Button" + i, skin);\r
                        t.setX(MathUtils.random(0, Gdx.graphics.getWidth()));\r
                        t.setY(MathUtils.random(0, Gdx.graphics.getHeight()));\r
                        t.setWidth(MathUtils.random(50, 200));\r
@@ -51,8 +49,8 @@ public class TextButtonTest extends GdxTest {
                Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                stage.draw();\r
-               Gdx.app.log("X", "FPS: "+Gdx.graphics.getFramesPerSecond());\r
-               Gdx.app.log("X", "GL20: "+Gdx.graphics.isGL20Available());\r
+               Gdx.app.log("X", "FPS: " + Gdx.graphics.getFramesPerSecond());\r
+               Gdx.app.log("X", "GL20: " + Gdx.graphics.isGL20Available());\r
                Gdx.app.log("X", "render calls: " + stage.getSpriteBatch().totalRenderCalls);\r
                stage.getSpriteBatch().totalRenderCalls = 0;\r
        }\r
@@ -67,4 +65,4 @@ public class TextButtonTest extends GdxTest {
                stage.dispose();\r
                skin.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 2356574..6ab1ada 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 public class TextButtonTestGL2 extends TextButtonTest {\r
        @Override\r
-       public boolean needsGL20() {\r
+       public boolean needsGL20 () {\r
                return true;\r
        }\r
-}
\ No newline at end of file
+}\r
index 13c5c7a..a3e8611 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Input.Keys;\r
 import com.badlogic.gdx.InputAdapter;\r
-import com.badlogic.gdx.InputMultiplexer;\r
 import com.badlogic.gdx.graphics.GL10;\r
 import com.badlogic.gdx.graphics.g2d.Animation;\r
 import com.badlogic.gdx.graphics.g2d.BitmapFont;\r
@@ -103,4 +103,4 @@ public class TextureAtlasTest extends GdxTest {
                batch.dispose();\r
                font.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 85fd1c2..afe1f86 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -22,21 +23,18 @@ import com.badlogic.gdx.graphics.GL10;
 import com.badlogic.gdx.graphics.Mesh;\r
 import com.badlogic.gdx.graphics.OrthographicCamera;\r
 import com.badlogic.gdx.graphics.Pixmap;\r
-import com.badlogic.gdx.graphics.VertexAttribute;\r
 import com.badlogic.gdx.graphics.Pixmap.Format;\r
-import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.graphics.Texture;\r
+import com.badlogic.gdx.graphics.VertexAttribute;\r
+import com.badlogic.gdx.graphics.VertexAttributes.Usage;\r
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.math.Vector2;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 import com.badlogic.gdx.utils.Array;\r
 \r
-/**\r
- * Shows the impact on frame rate if you switch textures to often. This is\r
- * how you should NOT do it :)\r
- * @author mzechner\r
- */\r
+/** Shows the impact on frame rate if you switch textures to often. This is how you should NOT do it :)\r
+ * @author mzechner */\r
 public class TextureBindTest extends GdxTest {\r
        Texture tex1;\r
        Texture tex2;\r
@@ -44,8 +42,8 @@ public class TextureBindTest extends GdxTest {
        ShaderProgram shader;\r
        Array<Vector2> positions = new Array<Vector2>();\r
        Camera cam;\r
-       \r
-       public void create() {\r
+\r
+       public void create () {\r
                Pixmap pixmap = new Pixmap(32, 32, Format.RGB565);\r
                pixmap.setColor(1, 0, 0, 1);\r
                pixmap.fill();\r
@@ -54,61 +52,64 @@ public class TextureBindTest extends GdxTest {
                pixmap.fill();\r
                tex2 = new Texture(pixmap);\r
                pixmap.dispose();\r
-               \r
-               for(int i = 0; i < 2000; i++) {\r
-                       positions.add(new Vector2((float)Math.random() * Gdx.graphics.getWidth(), (float)Math.random() * Gdx.graphics.getHeight()));\r
+\r
+               for (int i = 0; i < 2000; i++) {\r
+                       positions.add(new Vector2((float)Math.random() * Gdx.graphics.getWidth(), (float)Math.random()\r
+                               * Gdx.graphics.getHeight()));\r
                }\r
-               \r
-               if(Gdx.graphics.isGL20Available()) shader = SpriteBatch.createDefaultShader();\r
+\r
+               if (Gdx.graphics.isGL20Available()) shader = SpriteBatch.createDefaultShader();\r
                cam = new OrthographicCamera(Gdx.graphics.getWidth(), Gdx.graphics.getHeight());\r
                cam.update();\r
-               mesh = new Mesh(false, 4, 6, new VertexAttribute(Usage.Position, 2,\r
-                               ShaderProgram.POSITION_ATTRIBUTE), new VertexAttribute(Usage.ColorPacked, 4, ShaderProgram.COLOR_ATTRIBUTE),\r
-                               new VertexAttribute(Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE + "0"));\r
-               mesh.setIndices(new short[] { 0, 1, 2, 2, 3, 0 });\r
-               mesh.setVertices(new float[] { 0, 0, Color.WHITE.toIntBits(), 0, 1,\r
-                                                                          32, 0, Color.WHITE.toIntBits(), 1, 1,\r
-                                                                          32, 32, Color.WHITE.toIntBits(), 1, 0,\r
-                                                                          0, 32, Color.WHITE.toIntBits(), 0, 0 });\r
-//             mesh.setAutoBind(false);\r
+               mesh = new Mesh(false, 4, 6, new VertexAttribute(Usage.Position, 2, ShaderProgram.POSITION_ATTRIBUTE), new VertexAttribute(\r
+                       Usage.ColorPacked, 4, ShaderProgram.COLOR_ATTRIBUTE), new VertexAttribute(Usage.TextureCoordinates, 2,\r
+                       ShaderProgram.TEXCOORD_ATTRIBUTE + "0"));\r
+               mesh.setIndices(new short[] {0, 1, 2, 2, 3, 0});\r
+               mesh.setVertices(new float[] {0, 0, Color.WHITE.toIntBits(), 0, 1, 32, 0, Color.WHITE.toIntBits(), 1, 1, 32, 32,\r
+                       Color.WHITE.toIntBits(), 1, 0, 0, 32, Color.WHITE.toIntBits(), 0, 0});\r
+// mesh.setAutoBind(false);\r
        }\r
 \r
-       public void render() {\r
+       public void render () {\r
                Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-               \r
-               if(Gdx.graphics.isGL20Available()) {\r
+\r
+               if (Gdx.graphics.isGL20Available()) {\r
                        shader.begin();\r
                        shader.setUniformi("u_texture", 0);\r
                        shader.setUniformMatrix("u_projectionViewMatrix", cam.combined);\r
-//                     mesh.bind(shader);\r
+// mesh.bind(shader);\r
                } else {\r
                        cam.apply(Gdx.gl10);\r
                        Gdx.gl.glEnable(GL10.GL_TEXTURE_2D);\r
-//                     mesh.bind();\r
+// mesh.bind();\r
                }\r
 \r
-               for(int i = 0; i < positions.size; i++) {\r
+               for (int i = 0; i < positions.size; i++) {\r
                        float x = positions.get(i).x;\r
                        float y = positions.get(i).y;\r
-                       if(i % 2 == 0) tex1.bind();\r
-                       else tex2.bind();\r
-                       \r
-                       if(Gdx.graphics.isGL20Available()) mesh.render(shader, GL10.GL_TRIANGLES);\r
-                       else mesh.render(GL10.GL_TRIANGLES);\r
+                       if (i % 2 == 0)\r
+                               tex1.bind();\r
+                       else\r
+                               tex2.bind();\r
+\r
+                       if (Gdx.graphics.isGL20Available())\r
+                               mesh.render(shader, GL10.GL_TRIANGLES);\r
+                       else\r
+                               mesh.render(GL10.GL_TRIANGLES);\r
                }\r
-               if(Gdx.graphics.isGL20Available()) {\r
-//                     mesh.unbind(shader);\r
+               if (Gdx.graphics.isGL20Available()) {\r
+// mesh.unbind(shader);\r
                        shader.end();\r
                } else {\r
-//                     mesh.unbind();\r
+// mesh.unbind();\r
                }\r
                Gdx.app.log("TextureBindTest", "fps: " + Gdx.graphics.getFramesPerSecond());\r
                Gdx.app.log("TextureBindTest", "gl2: " + Gdx.graphics.isGL20Available());\r
        }\r
 \r
        @Override\r
-       public boolean needsGL20() {\r
+       public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index 538b365..46f717f 100644 (file)
@@ -40,15 +40,11 @@ public class TextureDownloadTest extends GdxTest {
        BitmapFont font;\r
        SpriteBatch batch;\r
 \r
-\r
        @Override\r
        public void create () {\r
                new Thread(new Runnable() {\r
-                       /**\r
-                        * Downloads the content of the specified url to the array. The\r
-                        * array has to be big enough.\r
-                        */\r
-                       private int download(byte[] out, String url) {\r
+                       /** Downloads the content of the specified url to the array. The array has to be big enough. */\r
+                       private int download (byte[] out, String url) {\r
                                InputStream in = null;\r
                                try {\r
                                        HttpURLConnection conn = null;\r
@@ -79,12 +75,12 @@ public class TextureDownloadTest extends GdxTest {
                                        }\r
                                }\r
                        }\r
-                       \r
+\r
                        @Override\r
                        public void run () {\r
-                               byte[] bytes = new byte[200*1024]; // assuming the content is not bigger than 200kb.\r
+                               byte[] bytes = new byte[200 * 1024]; // assuming the content is not bigger than 200kb.\r
                                int numBytes = download(bytes, "http://www.badlogicgames.com/wordpress/wp-content/uploads/2012/01/badlogic-new.png");\r
-                               if(numBytes != 0) {\r
+                               if (numBytes != 0) {\r
                                        // load the pixmap, make it a power of two if necessary (not needed for GL ES 2.0!)\r
                                        Pixmap pixmap = new Pixmap(bytes, 0, numBytes);\r
                                        final int originalWidth = pixmap.getWidth();\r
@@ -103,7 +99,7 @@ public class TextureDownloadTest extends GdxTest {
                                }\r
                        }\r
                }).start();\r
-               \r
+\r
                font = new BitmapFont();\r
                batch = new SpriteBatch();\r
        }\r
@@ -112,8 +108,8 @@ public class TextureDownloadTest extends GdxTest {
        public void render () {\r
                Gdx.gl.glClearColor(0.2f, 0.2f, 0.2f, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-               \r
-               if(image != null) {\r
+\r
+               if (image != null) {\r
                        batch.begin();\r
                        batch.draw(image, 100, 100);\r
                        batch.end();\r
index 6ba7e95..7727b1c 100644 (file)
@@ -2,30 +2,12 @@
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
-import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.Texture;\r
-import com.badlogic.gdx.graphics.g2d.NinePatch;\r
-import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
-import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
-import com.badlogic.gdx.graphics.glutils.ShapeRenderer;\r
-import com.badlogic.gdx.graphics.glutils.ShapeRenderer.ShapeType;\r
-import com.badlogic.gdx.math.MathUtils;\r
-import com.badlogic.gdx.scenes.scene2d.Actor;\r
-import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
-import com.badlogic.gdx.scenes.scene2d.InputListener;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
-import com.badlogic.gdx.scenes.scene2d.actions.FloatAction;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
-import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
-import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Touchpad;\r
-import com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener;\r
-import com.badlogic.gdx.scenes.scene2d.utils.EmptyDrawable;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-import static com.badlogic.gdx.scenes.scene2d.actions.Actions.*;\r
-\r
 public class TouchpadTest extends GdxTest {\r
        Stage stage;\r
 \r
index 4e18434..e263eff 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import java.util.HashMap;\r
@@ -219,4 +220,4 @@ public class TransformationTest extends InputAdapter implements ApplicationListe
                        d.setScale(Gdx.graphics.getDeltaTime() * dir + d.getScaleX(), Gdx.graphics.getDeltaTime() * dir + d.getScaleY());\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index bfe19f2..705bb3e 100644 (file)
@@ -3,8 +3,6 @@ package com.badlogic.gdx.tests;
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.GL10;\r
-import com.badlogic.gdx.graphics.Texture;\r
-import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
@@ -12,9 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table;
 import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Tree;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Tree.Node;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Tree.TreeStyle;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;\r
-import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
 public class TreeTest extends GdxTest {\r
index 59de723..de8fcd6 100644 (file)
@@ -26,31 +26,21 @@ import com.badlogic.gdx.scenes.scene2d.Stage;
 import com.badlogic.gdx.scenes.scene2d.ui.Button;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Button.ButtonStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.CheckBox;\r
-import com.badlogic.gdx.scenes.scene2d.ui.CheckBox.CheckBoxStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Image;\r
 import com.badlogic.gdx.scenes.scene2d.ui.ImageButton;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
 import com.badlogic.gdx.scenes.scene2d.ui.ImageButton.ImageButtonStyle;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Label.LabelStyle;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Label;\r
 import com.badlogic.gdx.scenes.scene2d.ui.List;\r
-import com.badlogic.gdx.scenes.scene2d.ui.List.ListStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;\r
-import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane.ScrollPaneStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.SelectBox;\r
-import com.badlogic.gdx.scenes.scene2d.ui.SelectBox.SelectBoxStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Skin;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Slider;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Slider.SliderStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.SplitPane;\r
-import com.badlogic.gdx.scenes.scene2d.ui.SplitPane.SplitPaneStyle;\r
+import com.badlogic.gdx.scenes.scene2d.ui.Table;\r
 import com.badlogic.gdx.scenes.scene2d.ui.TextButton;\r
-import com.badlogic.gdx.scenes.scene2d.ui.TextButton.TextButtonStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.TextField;\r
 import com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldListener;\r
-import com.badlogic.gdx.scenes.scene2d.ui.TextField.TextFieldStyle;\r
 import com.badlogic.gdx.scenes.scene2d.ui.Window;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Window.WindowStyle;\r
 import com.badlogic.gdx.scenes.scene2d.utils.ChangeListener;\r
 import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
index 5b72c14..4a40f6a 100644 (file)
@@ -16,8 +16,6 @@
 \r
 package com.badlogic.gdx.tests;\r
 \r
-import java.nio.ShortBuffer;\r
-\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.GL20;\r
@@ -28,7 +26,6 @@ import com.badlogic.gdx.graphics.glutils.IndexBufferObject;
 import com.badlogic.gdx.graphics.glutils.ShaderProgram;\r
 import com.badlogic.gdx.graphics.glutils.VertexBufferObject;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
-import com.badlogic.gdx.utils.BufferUtils;\r
 \r
 public class VertexBufferObjectShaderTest extends GdxTest {\r
        Texture texture;\r
@@ -91,10 +88,10 @@ public class VertexBufferObjectShaderTest extends GdxTest {
 \r
                texture = new Texture(Gdx.files.internal("data/badlogic.jpg"));\r
        }\r
-       \r
+\r
        @Override\r
        public void resume () {\r
                vbo.invalidate();\r
        }\r
 \r
-}
\ No newline at end of file
+}\r
index 363f41b..5ccc47e 100644 (file)
 \r
 package com.badlogic.gdx.tests;\r
 \r
-import java.nio.ShortBuffer;\r
-\r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.audio.AudioDevice;\r
-import com.badlogic.gdx.audio.analysis.AudioTools;\r
 import com.badlogic.gdx.audio.io.VorbisDecoder;\r
 import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Demonstrates how to read and playback an OGG file with the {@link VorbisDecoder} found\r
- * in the gdx-audio extension.\r
- * @author mzechner\r
- *\r
- */\r
+/** Demonstrates how to read and playback an OGG file with the {@link VorbisDecoder} found in the gdx-audio extension.\r
+ * @author mzechner */\r
 public class VorbisTest extends GdxTest {\r
        /** the file to playback **/\r
        private static final String FILE = "data/engine-2.ogg";\r
@@ -38,31 +31,32 @@ public class VorbisTest extends GdxTest {
        VorbisDecoder decoder;\r
        /** an AudioDevice for playing back the PCM data **/\r
        AudioDevice device;\r
-       \r
+\r
        @Override\r
        public void create () {\r
                // copy ogg file to SD card, can't playback from assets\r
                FileHandle externalFile = Gdx.files.external("tmp/test.ogg");\r
                Gdx.files.internal(FILE).copyTo(externalFile);\r
-               \r
+\r
                // Create the decoder and log some properties. Note that we need\r
                // an external or absolute file\r
                decoder = new VorbisDecoder(externalFile);\r
-               Gdx.app.log("Vorbis", "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: " + decoder.getLength());\r
+               Gdx.app.log("Vorbis",\r
+                       "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: " + decoder.getLength());\r
 \r
                // Create an audio device for playback\r
-               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1? true: false);\r
-               \r
+               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1 ? true : false);\r
+\r
                // start a thread for playback\r
                Thread playbackThread = new Thread(new Runnable() {\r
                        @Override\r
-                       public void run() {\r
+                       public void run () {\r
                                int readSamples = 0;\r
                                // we need a short[] to pass the data to the AudioDevice\r
                                short[] samples = new short[2048];\r
-                               \r
+\r
                                // read until we reach the end of the file\r
-                               while((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
+                               while ((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
                                        // write the samples to the AudioDevice\r
                                        device.writeSamples(samples, 0, readSamples);\r
                                }\r
@@ -73,7 +67,7 @@ public class VorbisTest extends GdxTest {
        }\r
 \r
        @Override\r
-       public void dispose() {\r
+       public void dispose () {\r
                // we should synchronize with the thread here\r
                // left as an excercise to the reader :)\r
                device.dispose();\r
index d7a4d6b..36b714f 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.tests;\r
+ ******************************************************************************/\r
 \r
-import java.nio.ShortBuffer;\r
+package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.audio.AudioDevice;\r
-import com.badlogic.gdx.audio.analysis.AudioTools;\r
-import com.badlogic.gdx.audio.io.VorbisDecoder;\r
 import com.badlogic.gdx.audio.io.WavDecoder;\r
-import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
 public class WavTest extends GdxTest {\r
@@ -32,26 +28,27 @@ public class WavTest extends GdxTest {
        WavDecoder decoder;\r
        /** an AudioDevice for playing back the PCM data **/\r
        AudioDevice device;\r
-       \r
+\r
        @Override\r
        public void create () {\r
-               // Create the decoder and log some properties. \r
+               // Create the decoder and log some properties.\r
                decoder = new WavDecoder(Gdx.files.internal(FILE));\r
-               Gdx.app.log("WavTest", "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: " + decoder.getLength());\r
+               Gdx.app.log("WavTest",\r
+                       "channels: " + decoder.getChannels() + ", rate: " + decoder.getRate() + ", length: " + decoder.getLength());\r
 \r
                // Create an audio device for playback\r
-               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1? true: false);\r
-               \r
+               device = Gdx.audio.newAudioDevice(decoder.getRate(), decoder.getChannels() == 1 ? true : false);\r
+\r
                // start a thread for playback\r
                Thread playbackThread = new Thread(new Runnable() {\r
                        @Override\r
-                       public void run() {\r
+                       public void run () {\r
                                int readSamples = 0;\r
                                // we need a short[] to pass the data to the AudioDevice\r
                                short[] samples = new short[2048];\r
-                               \r
+\r
                                // read until we reach the end of the file\r
-                               while((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
+                               while ((readSamples = decoder.readSamples(samples, 0, samples.length)) > 0) {\r
                                        Gdx.app.log("WavTest", "read " + readSamples + " samples");\r
                                        // write the samples to the AudioDevice\r
                                        device.writeSamples(samples, 0, readSamples);\r
@@ -63,7 +60,7 @@ public class WavTest extends GdxTest {
        }\r
 \r
        @Override\r
-       public void dispose() {\r
+       public void dispose () {\r
                // we should synchronize with the thread here\r
                // left as an excercise to the reader :)\r
                device.dispose();\r
@@ -74,4 +71,4 @@ public class WavTest extends GdxTest {
        public boolean needsGL20 () {\r
                return false;\r
        }\r
-}
\ No newline at end of file
+}\r
index 61b36c5..03a2e4e 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -23,14 +24,10 @@ import com.badlogic.gdx.graphics.g2d.BitmapFont;
 import com.badlogic.gdx.graphics.g2d.SpriteBatch;\r
 import com.badlogic.gdx.graphics.g2d.TextureAtlas;\r
 import com.badlogic.gdx.graphics.g2d.TextureRegion;\r
-import com.badlogic.gdx.input.GestureDetector;\r
-import com.badlogic.gdx.input.GestureDetector.GestureAdapter;\r
-import com.badlogic.gdx.math.Vector2;\r
 import com.badlogic.gdx.scenes.scene2d.Actor;\r
 import com.badlogic.gdx.scenes.scene2d.InputEvent;\r
 import com.badlogic.gdx.scenes.scene2d.InputListener;\r
 import com.badlogic.gdx.scenes.scene2d.Stage;\r
-import com.badlogic.gdx.scenes.scene2d.ui.Image;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
 /** A simple example of how to use a y-down coordinate system.\r
@@ -167,4 +164,4 @@ public class YDownTest extends GdxTest {
                region.getTexture().dispose();\r
                stage.dispose();\r
        }\r
-}
\ No newline at end of file
+}\r
index 5c29056..a184766 100644 (file)
@@ -52,7 +52,7 @@ public class ContinuousTest extends Box2DTest {
                        shape.set(new Vector2(-10, 0), new Vector2(10, 0));\r
                        body.createFixture(shape, 0);\r
                        shape.dispose();\r
-                       \r
+\r
                        PolygonShape poly = new PolygonShape();\r
                        poly.setAsBox(0.2f, 1.0f, new Vector2(0.5f, 1.0f), 0);\r
                        body.createFixture(poly, 0);\r
index c57338c..c877958 100644 (file)
@@ -99,7 +99,8 @@ public class Prismatic extends Box2DTest {
 \r
                // if (renderer.batch != null) {\r
                // renderer.batch.begin();\r
-               // // renderer.batch.drawText(renderer.font, "Keys: (l) limits, (m) motors, (s) speed", 0, Gdx.app.getGraphics().getHeight(),\r
+               // // renderer.batch.drawText(renderer.font, "Keys: (l) limits, (m) motors, (s) speed", 0,\r
+// Gdx.app.getGraphics().getHeight(),\r
                // // Color.WHITE);\r
                // // renderer.batch.drawText(renderer.font, "Motor Force = " + m_joint.getMotorForce(), 0,\r
                // // Gdx.app.getGraphics().getHeight() - 15, Color.WHITE);\r
index 4172e69..274e1e8 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.examples;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -23,53 +24,49 @@ import com.badlogic.gdx.graphics.g2d.SpriteBatch;
 import com.badlogic.gdx.math.Vector3;\r
 import com.badlogic.gdx.tests.utils.GdxTest;\r
 \r
-/**\r
- * Demonstrates how to let a sprite follow a finger touching the\r
- * screen.\r
+/** Demonstrates how to let a sprite follow a finger touching the screen.\r
  * \r
- * @author mzechner\r
- *\r
- */\r
+ * @author mzechner */\r
 public class MoveSpriteExample extends GdxTest {\r
        Texture texture;\r
        SpriteBatch batch;\r
        OrthographicCamera camera;\r
        Vector3 spritePosition = new Vector3();\r
-       \r
-       public void create() {\r
+\r
+       public void create () {\r
                // create a SpriteBatch with which to render the sprite\r
                batch = new SpriteBatch();\r
-               \r
+\r
                // load the sprite's texture. note: usually you have more than\r
                // one sprite in a texture, see {@see TextureAtlas} and {@see TextureRegion}.\r
                texture = new Texture(Gdx.files.internal("data/bobargb8888-32x32.png"));\r
-               \r
+\r
                // create an {@link OrthographicCamera} which is used to transform\r
                // touch coordinates to world coordinates.\r
                camera = new OrthographicCamera();\r
-               \r
+\r
                // we want the camera to setup a viewport with pixels as units, with the\r
                // y-axis pointing upwards. The origin will be in the lower left corner\r
                // of the screen.\r
                camera.setToOrtho(false);\r
        }\r
-       \r
-       public void render() {\r
+\r
+       public void render () {\r
                // set the clear color and clear the screen.\r
                Gdx.gl.glClearColor(1, 1, 1, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
-               \r
+\r
                // draw the sprite\r
                batch.begin();\r
                batch.draw(texture, spritePosition.x, spritePosition.y);\r
                batch.end();\r
-               \r
+\r
                // if a finger is down, set the sprite's x/y coordinate.\r
-               if(Gdx.input.isTouched()) {\r
-                       // the unproject method takes a Vector3 in window coordinates (origin in \r
+               if (Gdx.input.isTouched()) {\r
+                       // the unproject method takes a Vector3 in window coordinates (origin in\r
                        // upper left corner, y-axis pointing down) and transforms it to world\r
                        // coordinates.\r
                        camera.unproject(spritePosition.set(Gdx.input.getX(), Gdx.input.getY(), 0));\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index 3be9bb3..27fba44 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.gwt;\r
 \r
 import java.io.DataInputStream;\r
@@ -31,7 +32,7 @@ public class GwtBinaryTest extends GdxTest {
                FileHandle handle = Gdx.files.internal("data/arial.ttf");\r
                bytes = new byte[(int)handle.length()];\r
                DataInputStream in = new DataInputStream(handle.read());\r
-               for(int i = 0; i < 100; i++) {\r
+               for (int i = 0; i < 100; i++) {\r
                        try {\r
                                bytes[i] = in.readByte();\r
                        } catch (IOException e) {\r
@@ -45,4 +46,4 @@ public class GwtBinaryTest extends GdxTest {
                Gdx.gl.glClearColor(1, 0, 0, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
        }\r
-}
\ No newline at end of file
+}\r
index d4b2545..ab9a5b5 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.gwt;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -35,8 +36,10 @@ public class GwtInputTest extends GdxTest {
                Gdx.gl.glClearColor(0, 0, 0, 1);\r
                Gdx.gl.glClear(GL10.GL_COLOR_BUFFER_BIT);\r
                renderer.begin(ShapeType.FilledRectangle);\r
-               if(Gdx.input.isTouched()) renderer.setColor(Color.RED);\r
-               else renderer.setColor(Color.GREEN);\r
+               if (Gdx.input.isTouched())\r
+                       renderer.setColor(Color.RED);\r
+               else\r
+                       renderer.setColor(Color.GREEN);\r
                renderer.filledRect(Gdx.input.getX() - 15, Gdx.graphics.getHeight() - Gdx.input.getY() - 15, 30, 30);\r
                renderer.end();\r
        }\r
@@ -45,4 +48,4 @@ public class GwtInputTest extends GdxTest {
        public boolean needsGL20 () {\r
                return true;\r
        }\r
-}
\ No newline at end of file
+}\r
index 45583fc..2ddd66b 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.gwt;\r
 \r
 import java.util.ArrayList;\r
@@ -20,7 +21,6 @@ import java.util.List;
 \r
 import com.badlogic.gdx.Gdx;\r
 import com.badlogic.gdx.Preferences;\r
-import com.badlogic.gdx.files.FileHandle;\r
 import com.badlogic.gdx.graphics.Color;\r
 import com.badlogic.gdx.graphics.GL20;\r
 import com.badlogic.gdx.graphics.Mesh;\r
@@ -59,8 +59,9 @@ public class GwtTest extends GdxTest {
                Preferences pref = Gdx.app.getPreferences("test");\r
                boolean resultb = pref.getBoolean("test");\r
                int resulti = pref.getInteger("test");\r
-               \r
-               shader = new ShaderProgram(Gdx.files.internal("data/shaders/shader-vs.glsl"), Gdx.files.internal("data/shaders/shader-fs.glsl"));\r
+\r
+               shader = new ShaderProgram(Gdx.files.internal("data/shaders/shader-vs.glsl"),\r
+                       Gdx.files.internal("data/shaders/shader-fs.glsl"));\r
                if (!shader.isCompiled()) throw new GdxRuntimeException(shader.getLog());\r
                mesh = new Mesh(VertexDataType.VertexBufferObject, true, 6, 0, VertexAttribute.Position(), VertexAttribute.TexCoords(0));\r
                mesh.setVertices(new float[] {-0.5f, -0.5f, 0, 0, 1, 0.5f, -0.5f, 0, 1, 1, 0.5f, 0.5f, 0, 1, 0, 0.5f, 0.5f, 0, 1, 0, -0.5f,\r
@@ -71,7 +72,7 @@ public class GwtTest extends GdxTest {
 \r
                String params = Gdx.files.internal("data/gwttestparams.txt").readString();\r
                numSprites = Integer.parseInt(params);\r
-               \r
+\r
                batch = new SpriteBatch();\r
                positions = new ArrayList<Vector2>();\r
                for (int i = 0; i < numSprites; i++) {\r
@@ -85,7 +86,7 @@ public class GwtTest extends GdxTest {
                cache = new BitmapFontCache(font);\r
                cache.setColor(Color.RED);\r
                cache.setMultiLineText("This is a Test", 0, 0);\r
-               \r
+\r
                atlas = new TextureAtlas(Gdx.files.internal("data/pack"));\r
        }\r
 \r
@@ -107,7 +108,8 @@ public class GwtTest extends GdxTest {
                        sprite.setPosition(position.x, position.y);\r
                        sprite.draw(batch);\r
                }\r
-               font.draw(batch, "fps:" + Gdx.graphics.getFramesPerSecond() + ", delta: " + Gdx.graphics.getDeltaTime() + ", #sprites: " + numSprites, 0, 30);\r
+               font.draw(batch, "fps:" + Gdx.graphics.getFramesPerSecond() + ", delta: " + Gdx.graphics.getDeltaTime() + ", #sprites: "\r
+                       + numSprites, 0, 30);\r
                cache.setPosition(200, 200);\r
                cache.draw(batch);\r
                batch.end();\r
@@ -133,4 +135,4 @@ public class GwtTest extends GdxTest {
        public boolean needsGL20 () {\r
                return true;\r
        }\r
-}
\ No newline at end of file
+}\r
index c7885e3..3eb3122 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.gwt;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -129,9 +130,8 @@ public class GwtTestWrapper extends GdxTest {
                        table.add(button).expandX().fillX();\r
                }\r
                container.row();\r
-               container\r
-                       .add(new Label("Click on a test to start it, press ESC to close it.", new LabelStyle(font, Color.WHITE)))\r
-                       .pad(5, 5, 5, 5);\r
+               container.add(new Label("Click on a test to start it, press ESC to close it.", new LabelStyle(font, Color.WHITE))).pad(5,\r
+                       5, 5, 5);\r
 \r
                Gdx.input = new InputWrapper(Gdx.input) {\r
                        @Override\r
@@ -635,4 +635,4 @@ public class GwtTestWrapper extends GdxTest {
        public boolean needsGL20 () {\r
                return true;\r
        }\r
-}
\ No newline at end of file
+}\r
index 539c1fd..0f2cd41 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
-package com.badlogic.gdx.tests.utils;\r
+ ******************************************************************************/\r
 \r
-import java.io.File;\r
+package com.badlogic.gdx.tests.utils;\r
 \r
 import com.badlogic.gdx.files.FileHandle;\r
 \r
-/**\r
- * Used to generate an assets.txt file for a specific directory.\r
- * @author mzechner\r
- *\r
- */\r
+/** Used to generate an assets.txt file for a specific directory.\r
+ * @author mzechner */\r
 public class AssetsFileGenerator {\r
        public static void main (String[] args) {\r
                FileHandle file = new FileHandle(args[0]);\r
                StringBuffer list = new StringBuffer();\r
                args[0] = args[0].replace("\\", "/");\r
-               if(!args[0].endsWith("/")) args[0] = args[0] + "/";\r
+               if (!args[0].endsWith("/")) args[0] = args[0] + "/";\r
                traverse(file, args[0], list);\r
                new FileHandle(args[0] + "/assets.txt").writeString(list.toString(), false);\r
        }\r
-       \r
-       private static final void traverse(FileHandle directory, String base, StringBuffer list) {\r
-               if(directory.name().equals(".svn")) return;\r
+\r
+       private static final void traverse (FileHandle directory, String base, StringBuffer list) {\r
+               if (directory.name().equals(".svn")) return;\r
                String dirName = directory.toString().replace("\\", "/").replace(base, "") + "/";\r
                System.out.println(dirName);\r
-               for(FileHandle file: directory.list()) {\r
-                       if(file.isDirectory()) {\r
+               for (FileHandle file : directory.list()) {\r
+                       if (file.isDirectory()) {\r
                                traverse(file, base, list);\r
                        } else {\r
                                String fileName = file.toString().replace("\\", "/").replace(base, "");\r
-                               if(fileName.endsWith(".png") || fileName.endsWith(".jpg") || fileName.endsWith(".jpeg")) {\r
+                               if (fileName.endsWith(".png") || fileName.endsWith(".jpg") || fileName.endsWith(".jpeg")) {\r
                                        list.append("i:" + fileName + "\n");\r
                                        System.out.println(fileName);\r
-                               } else\r
-                               if(fileName.endsWith(".glsl") || fileName.endsWith(".fnt") || fileName.endsWith(".pack") ||\r
-                                       fileName.endsWith(".obj") || file.extension().equals("") || fileName.endsWith("txt")) {\r
+                               } else if (fileName.endsWith(".glsl") || fileName.endsWith(".fnt") || fileName.endsWith(".pack")\r
+                                       || fileName.endsWith(".obj") || file.extension().equals("") || fileName.endsWith("txt")) {\r
                                        list.append("t:" + fileName + "\n");\r
                                        System.out.println(fileName);\r
                                } else {\r
-                                       if(fileName.endsWith(".mp3") || fileName.endsWith(".ogg") || fileName.endsWith(".wav")) continue;\r
+                                       if (fileName.endsWith(".mp3") || fileName.endsWith(".ogg") || fileName.endsWith(".wav")) continue;\r
                                        list.append("b:" + fileName + "\n");\r
                                        System.out.println(fileName);\r
                                }\r
                        }\r
                }\r
        }\r
-}
\ No newline at end of file
+}\r
index f471f10..f2c9eb3 100644 (file)
@@ -37,72 +37,41 @@ import com.badlogic.gdx.tests.examples.MoveSpriteExample;
 import com.badlogic.gdx.tests.gles2.HelloTriangle;\r
 import com.badlogic.gdx.tests.gles2.SimpleVertexShader;\r
 \r
-/**\r
- * List of GdxTest classes. To be used by the test launchers. If you write your\r
- * own test, add it in here!\r
+/** List of GdxTest classes. To be used by the test launchers. If you write your own test, add it in here!\r
  * \r
- * @author badlogicgames@gmail.com\r
- */\r
+ * @author badlogicgames@gmail.com */\r
 public class GdxTests {\r
-       public static final Class[] tests = { AnimationTest.class,\r
-                       AccelerometerTest.class, ActionTest.class,\r
-                       ActionSequenceTest.class, GroupTest.class, AlphaTest.class,\r
-                       AtlasIssueTest.class, AssetManagerTest.class,\r
-                       FilterPerformanceTest.class, AudioDeviceTest.class,\r
-                       AudioRecorderTest.class, BitmapFontAlignmentTest.class,\r
-                       BitmapFontFlipTest.class, GroupCullingTest.class,\r
-                       GestureDetectorTest.class, LabelTest.class, BitmapFontTest.class,\r
-                       BlitTest.class, TableTest.class, BobTest.class,\r
-                       ImageScaleTest.class, TableLayoutTest.class,\r
-                       Box2DTest.class, InterpolationTest.class, TouchpadTest.class,\r
-                       Box2DTestCollection.class, BufferUtilsTest.class, ImageTest.class,\r
-                       CompassTest.class, ComplexActionTest.class, CullTest.class,\r
-                       DeltaTimeTest.class, EdgeDetectionTest.class, ETC1Test.class,\r
-                       ExitTest.class, FilesTest.class, ScrollPaneTest.class,\r
-                       FloatTest.class, FrameBufferTest.class,\r
-                       FramebufferToTextureTest.class, FrustumTest.class,\r
-                       FullscreenTest.class, Gdx2DTest.class, GroupFadeTest.class,\r
-                       ImmediateModeRendererTest.class, Scene2dTest.class,\r
-                       ImmediateModeRendererAlphaTest.class,\r
-                       IndexBufferObjectClassTest.class, TreeTest.class,\r
-                       IndexBufferObjectShaderTest.class, InputTest.class,\r
-                       IntegerBitmapFontTest.class, InverseKinematicsTest.class,\r
-                       IsoCamTest.class, IsometricTileTest.class, KinematicBodyTest.class,\r
-                       LifeCycleTest.class, LineDrawingTest.class, ScrollPane2Test.class,\r
-                       ManagedTest.class, ManualBindTest.class, MatrixJNITest.class,\r
-                       MD5Test.class, MeshMultitextureTest.class, MeshShaderTest.class,\r
-                       MeshTest.class, MipMapTest.class, MultitouchTest.class,\r
-                       MusicTest.class, MyFirstTriangle.class, ObjTest.class,\r
-                       OnscreenKeyboardTest.class, OrthoCamBorderTest.class,\r
-                       ParallaxTest.class, ParticleEmitterTest.class, PickingTest.class,\r
-                       PixelsPerInchTest.class, PixmapBlendingTest.class,\r
-                       PixmapTest.class, PolygonRegionTest.class, PolygonSpriteTest.class, PreferencesTest.class,\r
-                       ProjectiveTextureTest.class, Pong.class, ProjectTest.class,\r
-                       RemoteTest.class, RotationTest.class, ShaderMultitextureTest.class,\r
-                       ShadowMappingTest.class, SplineTest.class,\r
-                       SimpleAnimationTest.class, SimpleDecalTest.class,\r
-                       SimpleStageCullingTest.class, SoundTest.class,\r
-                       SpriteCacheTest.class, SpriteCacheOffsetTest.class,\r
-                       SpriteBatchRotationTest.class, SpriteBatchShaderTest.class,\r
-                       SpriteBatchTest.class, SpritePerformanceTest.class,\r
-                       SpritePerformanteTest2.class, StagePerformanceTest.class,\r
-                       StageTest.class, TerrainTest.class, TextureDataTest.class,\r
-                       TextureDownloadTest.class, TextureFormatTest.class,\r
-                       TextureAtlasTest.class, TextInputDialogTest.class,\r
-                       TextureRenderTest.class, TiledMapTest.class, TileTest.class,\r
-                       UITest.class, VBOVATest.class, VertexArrayTest.class,\r
-                       VertexBufferObjectTest.class, VertexArrayClassTest.class,\r
-                       VertexBufferObjectClassTest.class,\r
-                       VertexBufferObjectShaderTest.class, VibratorTest.class,\r
-                       VorbisTest.class, WaterRipples.class, HelloTriangle.class,\r
-                       SimpleVertexShader.class, ShapeRendererTest.class,\r
-                       MoveSpriteExample.class, SoundTouchTest.class, Mpg123Test.class, WavTest.class,\r
-                       TextButtonTest.class, TextButtonTestGL2.class, TextureBindTest.class,\r
-                       SortedSpriteTest.class, ExternalMusicTest.class, SoftKeyboardTest.class, \r
-                       DirtyRenderingTest.class, FreeTypeTest.class, YDownTest.class, ScreenCaptureTest.class,\r
-                       InternationalFontsTest.class};\r
+       public static final Class[] tests = {AnimationTest.class, AccelerometerTest.class, ActionTest.class, ActionSequenceTest.class,\r
+               GroupTest.class, AlphaTest.class, AtlasIssueTest.class, AssetManagerTest.class, FilterPerformanceTest.class,\r
+               AudioDeviceTest.class, AudioRecorderTest.class, BitmapFontAlignmentTest.class, BitmapFontFlipTest.class,\r
+               GroupCullingTest.class, GestureDetectorTest.class, LabelTest.class, BitmapFontTest.class, BlitTest.class, TableTest.class,\r
+               BobTest.class, ImageScaleTest.class, TableLayoutTest.class, Box2DTest.class, InterpolationTest.class, TouchpadTest.class,\r
+               Box2DTestCollection.class, BufferUtilsTest.class, ImageTest.class, CompassTest.class, ComplexActionTest.class,\r
+               CullTest.class, DeltaTimeTest.class, EdgeDetectionTest.class, ETC1Test.class, ExitTest.class, FilesTest.class,\r
+               ScrollPaneTest.class, FloatTest.class, FrameBufferTest.class, FramebufferToTextureTest.class, FrustumTest.class,\r
+               FullscreenTest.class, Gdx2DTest.class, GroupFadeTest.class, ImmediateModeRendererTest.class, Scene2dTest.class,\r
+               ImmediateModeRendererAlphaTest.class, IndexBufferObjectClassTest.class, TreeTest.class, IndexBufferObjectShaderTest.class,\r
+               InputTest.class, IntegerBitmapFontTest.class, InverseKinematicsTest.class, IsoCamTest.class, IsometricTileTest.class,\r
+               KinematicBodyTest.class, LifeCycleTest.class, LineDrawingTest.class, ScrollPane2Test.class, ManagedTest.class,\r
+               ManualBindTest.class, MatrixJNITest.class, MD5Test.class, MeshMultitextureTest.class, MeshShaderTest.class, MeshTest.class,\r
+               MipMapTest.class, MultitouchTest.class, MusicTest.class, MyFirstTriangle.class, ObjTest.class, OnscreenKeyboardTest.class,\r
+               OrthoCamBorderTest.class, ParallaxTest.class, ParticleEmitterTest.class, PickingTest.class, PixelsPerInchTest.class,\r
+               PixmapBlendingTest.class, PixmapTest.class, PolygonRegionTest.class, PolygonSpriteTest.class, PreferencesTest.class,\r
+               ProjectiveTextureTest.class, Pong.class, ProjectTest.class, RemoteTest.class, RotationTest.class,\r
+               ShaderMultitextureTest.class, ShadowMappingTest.class, SplineTest.class, SimpleAnimationTest.class, SimpleDecalTest.class,\r
+               SimpleStageCullingTest.class, SoundTest.class, SpriteCacheTest.class, SpriteCacheOffsetTest.class,\r
+               SpriteBatchRotationTest.class, SpriteBatchShaderTest.class, SpriteBatchTest.class, SpritePerformanceTest.class,\r
+               SpritePerformanteTest2.class, StagePerformanceTest.class, StageTest.class, TerrainTest.class, TextureDataTest.class,\r
+               TextureDownloadTest.class, TextureFormatTest.class, TextureAtlasTest.class, TextInputDialogTest.class,\r
+               TextureRenderTest.class, TiledMapTest.class, TileTest.class, UITest.class, VBOVATest.class, VertexArrayTest.class,\r
+               VertexBufferObjectTest.class, VertexArrayClassTest.class, VertexBufferObjectClassTest.class,\r
+               VertexBufferObjectShaderTest.class, VibratorTest.class, VorbisTest.class, WaterRipples.class, HelloTriangle.class,\r
+               SimpleVertexShader.class, ShapeRendererTest.class, MoveSpriteExample.class, SoundTouchTest.class, Mpg123Test.class,\r
+               WavTest.class, TextButtonTest.class, TextButtonTestGL2.class, TextureBindTest.class, SortedSpriteTest.class,\r
+               ExternalMusicTest.class, SoftKeyboardTest.class, DirtyRenderingTest.class, FreeTypeTest.class, YDownTest.class,\r
+               ScreenCaptureTest.class, InternationalFontsTest.class};\r
 \r
-       public static String[] getNames() {\r
+       public static String[] getNames () {\r
                List<String> names = new ArrayList<String>();\r
                for (Class clazz : tests)\r
                        names.add(clazz.getSimpleName());\r
@@ -110,21 +79,18 @@ public class GdxTests {
                return names.toArray(new String[names.size()]);\r
        }\r
 \r
-       public static GdxTest newTest(String testName) {\r
+       public static GdxTest newTest (String testName) {\r
                try {\r
                        Class clazz = Class.forName("com.badlogic.gdx.tests." + testName);\r
-                       return (GdxTest) clazz.newInstance();\r
+                       return (GdxTest)clazz.newInstance();\r
                } catch (Exception e1) {\r
                        try {\r
-                               Class clazz = Class.forName("com.badlogic.gdx.tests.gles2."\r
-                                               + testName);\r
-                               return (GdxTest) clazz.newInstance();\r
+                               Class clazz = Class.forName("com.badlogic.gdx.tests.gles2." + testName);\r
+                               return (GdxTest)clazz.newInstance();\r
                        } catch (Exception e2) {\r
                                try {\r
-                                       Class clazz = Class\r
-                                                       .forName("com.badlogic.gdx.tests.examples."\r
-                                                                       + testName);\r
-                                       return (GdxTest) clazz.newInstance();\r
+                                       Class clazz = Class.forName("com.badlogic.gdx.tests.examples." + testName);\r
+                                       return (GdxTest)clazz.newInstance();\r
                                } catch (Exception e3) {\r
                                        e3.printStackTrace();\r
                                        return null;\r
index 86aa5d5..7c02317 100644 (file)
@@ -12,7 +12,8 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
  * See the License for the specific language governing permissions and\r
  * limitations under the License.\r
- ******************************************************************************/
+ ******************************************************************************/\r
+\r
 package com.badlogic.gdx.tests.utils;\r
 \r
 import com.badlogic.gdx.Gdx;\r
@@ -105,4 +106,4 @@ public class PerspectiveCamController extends InputAdapter {
                return true;\r
        }\r
 \r
-}
\ No newline at end of file
+}\r